Go Down

Topic: Power output on digital pin not working properly (Read 1 time) previous topic - next topic


so im trying to use a servo in the following fashion. (a mini servo from an old RC helicopter kit that crashed and is waiting to be fixed)

gnd to gnd
+5 to digital pin 8 set to output
control to digital pin 9 attached to servo object via servo.h

i have it set up this way so that i can turn power to the servo off when its not being used so that the object it is conected to can be turned by hand while the servo is still attached.

I have run the servo with +5 to +5 gnd to gnd and data to 9 and run the sweep program to ensure the servo is still good (and it is)

the problem is that the "5 volts" from digital pin 8 (set to output, with a digital write to HIGH) doesnt seem to be providing enough power.

the servo hums but doesnt move when told to.

does the pin not provide enough amps?
can i not use a pin in this manner?

if it doesnt output enough amps to run the servo can i hope to have to activate a relay and provide power switching that way?


Dec 14, 2008, 07:30 pm Last Edit: Dec 14, 2008, 07:31 pm by retrolefty Reason: 1
"does the pin not provide enough amps?"

That is correct. A digital ouput pin can only output around 30-35 milliamps maximum and it is quite possible to damage the output pin trying to supply the current needed by your servo, which can require hundreds of milliamps or even over an amp depending on the mechanical load on the servo. What you can do is have the output pin turn on a switching transistor or a relay which can handle the current load of your servo. Keep in mind that a  relay requires current also to operate and would need to draw less then 30ma also to function correctly.


i cant find a spec sheet that lists the load in mA so i dont know how to calculate the resisters needed.
(hell i cant find a spec sheet that lists any electrical details)


what are the odds ill find a relay that will opperate at or under 30mA


They are avalible. They mostly rate relay coils by their resistance, so current for a 5vdc relay coil is = to 5vdc / coil ohms.

Here is one example that requires about 28ma of coil current at 5vdc.

Contacts are rated for up to 2 amps so that should handle a R/C servo fine. The source of voltage for the servo should not come from the +5vdc power on the Arduino board as it doesn't have enough extra  current capacity for the servo.



iv been powering it via the +5vdc line on the board for testing.  seems to work ok but ill make sure to change that when i finalize my design.

the board is currently being powered by the USB jack.

sure makes it alot less convenient not being able to use the +5vdc line on the board.  Now im going to have to redesign my board layout to interface with the power supply.

the power supply is a wall wart jack with a relay to switch between wall wart power (if available) and a battery pack without powering down the board.

it was going to be a separate board but now i need to figue out how to roll it all into one.

back to the drawing board

Go Up