-->
Page 1 of 2

strange behavior, possible damage driving servo

PostPosted: Fri Jul 22, 2016 3:10 pm
by jayekub
board.png


i soldered the diagrammed circuit on perfboard, installed the nodemcu firmware, and had it successfully driving a Futaba S3003 servo for a couple weeks before it started behaving strangely.

at first i began hearing the servo twitching around for no discernible reason. when it go into this state, i was able to telnet to the esp and confirm that my code wasn't responsible (it's controlled via mqtt and prints messages when it activates pwm).

i thought maybe leaving the signal pin in a floating state was allowing random fluctuations to cause servo movement. to test this i needed to reflash the firmware to install the gpio package, but after doing so i'm no longer able to get either gpio writes or pwm to work anymore (either by attaching to the servo or a multimeter).

i'm very amateur when it comes to electronics, so i'm wondering if maybe there's something bad about my design. in particular, i'm wondering if it's dangerous to directly drive the signal input on the servo from a gpio pin? when i tried measuring the current the servo's signal line is sinking i remember it being miniscule, but maybe there are conditions that could cause it to draw too much current? would a resistor be able to protect against this, or maybe i should drive it using a transistor?

also, any ideas what could cause the random servo movement? when pwm isn't active, would it help to keep the signal line pulled up/down?

thanks for any assistance!

Re: strange behavior, possible damage driving servo

PostPosted: Thu Aug 04, 2016 9:25 am
by RaspberryPiThree
Is your issue fixed yet? I'm having a similar issue on Futaba S3003. As soon as I connect 3V, GND, and Signal (to GPIO2 on Nodemcu) the motor starts moving in the counterclockwise direction.

Re: strange behavior, possible damage driving servo

PostPosted: Thu Aug 04, 2016 10:09 am
by Mmiscool
normally if you set the pin low. it will stop all servo movement. then you can use the arduino servo function to set a value.

Re: strange behavior, possible damage driving servo

PostPosted: Thu Aug 04, 2016 10:16 am
by RaspberryPiThree
Thanks. I'll give that a try. My Nodemcu 3v, GND, and GPIO2 are directly connected to the servo's VCC, GND, and signal pins without any resistors or capcitors. I hope that doesn't matter though.