Go Down

Topic: Servo and power supply question - turns in one direction (Read 1 time) previous topic - next topic

ablarry91

For awhile now, I've been doing small arduino projects to learn the coding structure associated with it.  Recently, I ordered some small, 5 volt servos to experiment with motor control.  Using the provided "sweep" and "knob" examples provided, my main goal was to simply establish control of the servo.  Regardless of how the code was structured, however, the servo always turned as far as it could clockwise.  A lot of troubleshooting went on, and I found that the code would work if the servo was powered by the arduino, that is, the power, ground, and communication wires were all wired into the board.  I found that the servo misbehaved because I was using an external 5 volt power supply attached to the power and ground wires, with the communication wire attached to my arduino. 

This leads me to my question: why does my servo only work if all three leads are plugged into the arduino?  Why can't I use an external power supply if my communication wire is attached to the arduino?  Ultimately, I'd like to operate a few servos simultaneously, and I'm concerned that it may result in damage to my arduino. 

Any input is appreciated.  Thank you all.

robtillaart


If you use an external power for the servo you must connect the GND's and the "signal" line. The shared GND is a common reference for the signal.

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

ablarry91

Alright, so I think I've hooked up my external power source.  On my breadboard, I've grounded my power source to the ground on my breadboard, as well as the ground on my arduino.  It seems to work, but there's a lot of "chatter".  The motor is never quiet, like it was when my arduino was solely powering it.  The power source that I'm using is actually a all-in-one solderless breadboard kit, powered by 8 AA batteries.  Would the qualities of the batteries (in terms of charge) at all affect this "chatter" ? 

zoomkat

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

jackrae

Could be that 8 x AA = 12 volts is too high for the servo.  ie it is overshooting and becoming unstable.  5 volt servos are designed to run on 5 volts !

ablarry91

The breadboard itself is powered by 8 AA batteries, though the (+) leads that run out of the breadboard are divided by 1.5 volt integers.  So, I can choose from 1.5 volts, 3.0 volts... up 9.0 volts.  I'm running power out of the 4.5 volt. 

My only defense against the code not being bad is because the very same code works flawlessly when it is my arduino providing the power. 


zoomkat

Quote
My only defense against the code not being bad is because the very same code works flawlessly when it is my arduino providing the power.


Then your servo power setup is probably flawed.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Go Up