I purchased two servos (Servo - Generic High Torque (Standard Size) - ROB-11965 - SparkFun Electronics) and hooked one up and got it working and was giddy. Then I hooked up the other one and tried to control both and my arduino kinda freaked out and I could hear the usb device attach/detach sound on my PC. I was using the USB cable as a power supply. Is that a no-no with using two of these?
Those are high torque servos so two of them are probably drawing more current than the USB can provide.
Try using batteries or an external 5v DC supply to power the servos.
There is a picture here indicating how this would be wired up : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1250070061/6#6
Don't forget to connect all the grounds together.
Very helpful, thanks.
I have several stripped USB extension cables that I use to power my servos when the Arduino is connected to the computer. They provide the steady 5V and 500mA max of normal USB connections :).
They provide the steady 5V and 500mA max of normal USB connections .
Which with some model servos and depending on the mechanical load on the servo, may still not be enough current. An external +5vdc power supply rated to handle worst case load for all the attached servo is the best method of powering servos.
Lefty
I have some 5v 500ma wal-warts. Would those work or would they be the same as the USB power since they are rated the same? Should I just invest in a 5v 1A wal-wart?
The USB power rating is shared between all devices on the same hub (usually each pair of ports on a desktop PC). Powered USB hubs may be able to provide 500mA per cable.
You can run really big motors using relays...
Using a 1/2 amp (500mA) wall wart to power the servos depends on current drawn by servos. At least it will keep the USB connection from crashing.
Remember, the Arduino only handles "somewhere around" 500mA also. Best best is to provide external power for the servos and power the Arduino from USB.
Ken H.
the Arduino only handles "somewhere around" 500mA also
That is the limit on the regulator but it will cook long before that.
See:-
http://www.thebox.myzen.co.uk/Tutorial/Power.html
and
http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html
The limits are less than 40mA per pin and the total of all the pins not to add up to more than 200mA.