Electronic – Safely driving a SG90 servo with AVR PWM

avrpwmservo

I've read that servos tend to draw anywhere from 10mA to 200mA. Is there a standard configuration to drive servos using MCUs without directly connecting them to the output pins of the controller? Or is the high current drawn from the supply rather than the PWM control signal? I do not have a DMM immediately available with current measuring capabilities to test this.

Also, I get significant dimming of LEDs also connected to my supply when driving these servo devices. The supply I'm using is rated at 5.5V 750mA that I regulate to 5V using an LM7805 (rated at 1.5A), so I do not think over-current conditions is the issue here.

Any ideas?

Best Answer

The servo has independent power supply lines and control line

enter image description here

The high motor current travels through the power supply wires (black/red), while the orange wire is just a high impedance input that goes to the internal control circuit.

You can drive the control wire directly from an AVR I/O without a problem.


In case you are interested about the internal circuit of the SG90 servo, you can see it here

enter image description here

The internal controller is AA51880 and the orange wire drives pin 14 of the IC.