Pages: [1]   Go Down
Author Topic: Servo and power supply question - turns in one direction  (Read 1199 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12483
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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.

Logged

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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" ? 
Logged

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8962
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could be bad code.
Logged

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

SW Scotland
Offline Offline
Edison Member
*
Karma: 13
Posts: 1325
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 

Logged

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8962
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Pages: [1]   Go Up
Jump to: