Got my first Arduino today and it is up and running beautifully. I plan on driving some high-powered servos and would like to do so using using external power for the servos while running the Arduino off of a 9volt battery. For the external servo power I'll be using a 6 volt gel cell (4Ah) batteries for untethered work and a regulated 6v PS for tethered. I'm sure I can figure out how to regulate the battery it so I don't jack up the servos, but I'm not sure about the wiring of servo+battery+arduino ground.
I'm assuming I hook up the servo's yellow wire to a pwm pin on the Arduino, and the servo's Pos wire to the battery's positive terminal only. Do I:
(A) Connect only the servo's ground to the Arduino's ground or;
(B) Connect BOTH the servo's ground and the battery's negative terminal to the Arduino's ground? Or;
(C) Have I got it completely wrong?
Normally I'd just try connecting things from least to most dangerous until it worked, but I don't want to fry the Arduino!
Also if anyone wants to give me a quick rundown of how to regulate the battery to no more than 6v, that would be awesome as well!
I'm assuming I hook up the servo's yellow wire to a pwm pin on the Arduino
With the latest version of the Arduino Servo library you can use any pin. Don't use the PWM from analogWrite to drive a servo.
Also if anyone wants to give me a quick rundown of how to regulate the battery to no more than 6v
You could simply put a diode in series (between the positive battery terminal and the servo positive power connector). This will reduce the voltage by around 0.7 volts so a fully charged battery should be giving not much more than 6 volts and still provide enough voltage for the servo when the battery runs down. A 1 amp diode (1N4001) would be a good choice.
A more efficient (and much more complicated) approach is to use a switching dc to dc converter (such as buck converter) but this is probably overkill for your application.
You need a regulator, either a liner regulator like the ones shown here:-
These burn up power in the form of heat.
The other thing you can go for which is more efficient is a switching regulator or DC to DC converter like these:-
However these are more expensive. Also you could use on of these to produce 5V and go straight on the 5V input of the Arduino without going through it's regulator.