Help! My RC servo "jumps" on power-up

NVHLVNOP

Member
I've had this issue on all my PicAXE projects with servos, but it never bothered me until now. When the power switch is thrown to the on position, the servo moves very slightly in one direction. It is as if a little rush of current flows to the signal pin of the servo, telling it a new position, but then the signal suddenly dies out until I issue a servo command. Nothing happens when the power is switched off. Actually, I can flip the power switch back and forth rapidly, and the servo will keep rotating in one direction every time the switch hits the on position, until the servo reaches its mechanical limit. .How can I get this to stop happening?

I have a 9V battery that goes thru a LM2940 5V regulator. The regulator has filtering capacitors as recommended in its datasheet. Power to the PicAXE is pulled from the 5V rail. I also tap the servo power into the 5V rail. A common ground is used throughout the circuit. The signal wire of the servo is tied directly to an output pin of the PicAXE, with a 220 Ohm resistor in between. There is also a 100 uF electrolytic capacitor as close to the servo + and - wires as possible.

Before my circuit is powered down, a Servo OFF command is used. When the circuit is powered up, no servo command is used during the initialization sequence. Somehow, current is flowing to the servo's signal pin when the power switch is thrown.

I've also tried placing a 10K pull-down resistor from the servo signal wire to gnd to help keep it low when no command is given, but this made no difference. Also tried several different makes/models of servos.

I'm pretty sure this has nothing to do with the programming since it happens instantly when the switch is thrown. Why is this happening?

Help?
 

srnet

Senior Member
Disconnect the output pin from the PICAXE to the servo, you could just remove the 220R resistor.

What then happens at power up ?
 

Hemi345

Senior Member
I noticed the same thing when I was messing around with servos. I ended up controlling the power to the servo using a power mosfet. This eliminated the glitch at start up and I was able to gain a few ma of power savings when it was idle.
 

boriz

Senior Member
Maybe a small capacitor from the signal to ground at the servo end of the 220R, forming a low pass RC filter for the signal. Maybe adjust the resistor value upwards? Eventually, when the time constant is too large, the servo will stop working properly, but before you get that far, you might be able to find a happy medium. Might work. Might not. Just something to try.
 

erco

Senior Member
Also try a 2-position switch so that your circuit turns on first, outputting a servo signal, then switch on power to your servos a second later.
 

jedynakiewicz

Senior Member
I've also tried placing a 10K pull-down resistor from the servo signal wire to gnd to help keep it low when no command is given, but this made no difference.
Help?
It might be worthwhile trying the 10K as a pull-UP resistor... some microcontroller-based servo boards have a jumper to select pull-up or pull-down to suppress the servo start-up glitch. It depends upon the servo.
 

bluejets

Senior Member
But this doesn't happen on my RC planes...
When you turn your aircraft on, the transmitter is already on and supplying a signal.
I think you will find if you look closely, that the servos do position themselves at power-up as I said previously, even under transmitter on condition.
Without signal, they will constantly wind themselves around with each successive power-up.
Look up how a servo works internally and you will see the reason why.
Hint, it has to do with the internally generated servo position signal to the comparator.
 

Hemi345

Senior Member
When you turn your aircraft on, the transmitter is already on and supplying a signal.
It only took me one time of powering up my RC helicopter before I powered on the transmitter.... a few seconds of chaotic component destruction and busted knuckles, lesson learned. =)
 

Paix

Senior Member
Ouch, Hemi345, I can almost feel your knuckles getting a battering with those unexpectedly rotating parts. :)
 

thomasfoltz

New Member
This seems to be my question. Is the glitch caused by the power coming on, or by a spike in the control signal to the servo. With the control pin grounded, does the servo still jump when power is applied to the servo?
 

MPep

Senior Member
This seems to be my question. Is the glitch caused by the power coming on, or by a spike in the control signal to the servo. With the control pin grounded, does the servo still jump when power is applied to the servo?
Answer in post #11
Hint, it has to do with the internally generated servo position signal to the comparator.
Therefore it is internal to the servo, and not much can be done about it. :)
 

srnet

Senior Member
This seems to be my question. Is the glitch caused by the power coming on, or by a spike in the control signal to the servo. With the control pin grounded, does the servo still jump when power is applied to the servo?
Easiest way to find out, carry out the simple test suggested in post #2.
 

NVHLVNOP

Member
Thank you all for your suggestions. I finally had some time to get on the breadboard again today. The only way I was able to control the twitch was to apply the signal before the power. Without any circuitry or microprocessor, the servo would twitch every time power was applied. I ended up using a transistor as a switch to the power and my code looked something like this:
HIGH transistor_pin
SERVOPOS servo_pin
PAUSE 500 'required to allow the servo to move before power was removed
LOW transistor_pin 'to conserve power

Downside is the use of another output pin, but the twitch is gone when the battery is first plugged in.
 

srnet

Senior Member
The only way I was able to control the twitch was to apply the signal before the power. Without any circuitry or microprocessor, the servo would twitch every time power was applied. I ended up using a transistor as a switch to the power and my code looked something like this:
HIGH transistor_pin
SERVOPOS servo_pin
PAUSE 500 'required to allow the servo to move before power was removed
LOW transistor_pin 'to conserve power
Maybe I am misreading the code, but that appears to be powering up the servo before applying the signal ?
 

NVHLVNOP

Member
You are right. However, the servo signal is sent immediately after the power up, so the twitch is not noticed. I did another test without sending the signal right away, and the twitch is still there. I'll have to make sure the signal is being sent before powering up the servos. Thanks.
 

bluejets

Senior Member
If, as you say, you are satisfied with your present outcome then perhaps it will work the way you need it to.

Having said that, a servo is designed to operate with an incoming signal present and then power applied. After initial settling, then the design operation starts by changing the incoming pulse length to give the desired movement.

So by using it in the form you have built, it is operating outside of what it was originally designed to do. Hence the so called problem is really a user induced problem and difficult if not unable to be overcome.
 
Top