Unusual servo reaction

avrservo

I'm using DIY pwm-generator based on attiny13 to control servo. Pulse cycle is 37 Hz, pulse width is ~540us – ~2400us. Servo rotates correctly but on stationary positions it's vibrates (gears try to move). It's connected to noise on top of the pulses. Noise has random period.
enter image description here

So, am i doing right that i'm always sending pwm signal to servo? Should i turn off signal after reaching necessary angle? Or it's just wrong pulse width?

Best Answer

Assuming this is a standard size servo, put about 200 uF across the servo power leads, as close to the servo as possible. Put something similar across your control circuit.

Servos draw a LOT of power when they move. They draw even more in the startup spike when they start to move. This puts nasty glitches on your power bus, and those glitches CAN get back into your control circuit.

Yes, this answer IS written in my personal blood, thank you for asking...