servo burning out a WiPY3?
I am trying to control a DS3218 servo using a WiPy 3.0.
I have the servo and the WiPy being powered by the same 5V regulated supply. And using a PWM on P10 for the servo control.
After moving the servo position back and forth for about a minute, all of a sudden, the development board starts overheating (too hot to even touch), at the top (near the regulator) and then stops working. Won't boot, can't reset, doesn't safe boot, etc... which I'm assuming means I burnt out the board - either the ESP32 or the regulator or both.
This has happened to two different WiPys. Researching, I now know I should have used a level shifter for the PWM control line.
Servos can draw a fair bit of current, but I thought they did that from the power lines, which is why I have the servo connected directly to the power supply (and not through the WiPys 3v3 output).
Should I be surprised that without the level shifter the servo can damage the WiPY?
robert-hh last edited by
@PyDrew That could be caused by the servo connected to the same 5V power supply as the WiPy. The servo can cause high energy high voltage spikes on the power supply line when switched off which cannot be suppressed by the power regulator. The maximum input voltage of the WiPy Vin pin is 6V. Any voltage beyond that will kill the regulator.
So the best is to use different supplies for the Servo and the Wipy.
On option you have to salvage the WiPy is to either replace the LM3281 power regulator (difficult), or just to remove it from the board (easy) and supply the WiPy though the 3.3V Pin. That might be even possible from the 5V supply for Servo, if you use a 3.3V regulator which can withstand higher input voltages, like a LD1117 plus spike filtering.
I just re-wired using 74AHCT125 but the same thing happened. The top part of the board got too hot to even touch and now my third wipy is dead.
Here's the code I'm using:
import pycom import logging import time from machine import Pin pycom.heartbeat(False) pycom.rgbled(0x001100) logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() from machine import Pin, PWM dutycycle = 0.07 min_dutycycle = 0.02 max_dutycycle = 0.128 pwm = PWM(0, frequency=50) servo = pwm.channel(0, pin='P10', duty_cycle=dutycycle) while True: servo.duty_cycle(0.03) time.sleep(0.5) servo.duty_cycle(0.04) time.sleep(0.5) servo.duty_cycle(0.05) time.sleep(0.5) servo.duty_cycle(0.06) time.sleep(0.5) servo.duty_cycle(0.07) time.sleep(0.5)