Choosing right type of battery
Robots using servo motors (legged robots or robotic arms) tend to operate at 4.8V (4x AA NiMh cells) or 6V (5x NiMh AA cells). You can use a fairly inexpensive voltage regulator to power the microcontroller, increasing the voltage from 6V to 9V.
Small to medium mobile robots often use a 6V, 9V or 12V NiMh battery pack, the choice of which depends on the nominal voltage of the drive motors. If the robot includes one or more servo motors (for a pan/tilt for example), the microcontroller can usually provide enough current from a 5V digital pin. If your microcontroller operates at 9V and you want to use 6V motors, you might consider a two battery solution.
Medium sized mobile robots tend to use one 12V battery; lead acid or single NiMh battery pack (or an 11.1V LiPo battery if weight is an issue). Large robots use 12V or 24V from one or more lead acid battery packs.
Standard battery voltages are: 1.2V: one rechargeable NiMh AA or AAA battery (unless you want a really small robot, one cell does not do much)
1.5V: one Alkaline AA or AAA battery(disadvantage of not being rechargeable and can’t do much on its own)
2.4v: two rechargeable AA or AAA batteries; still can’t do much on their own, even for small robots
3V: two alkaline AA or AAA batteries; most microcontrollers cannot operate at this voltage, let alone most actuators.
3.6V: three rechargeable NiMh AA or AAA batteries; this is usually the minimum voltage to run certain microcontrollers
3.7V: one LiPo battery; this is close enough to 3.6V and is the minimum to run certain microcontrollers
4.5V: three alkaline AA or AAA batteries why even consider non-rechargeable in robotics?
4.8V: four AA or AAA together provide the minimum voltage to operate a standard hobby servo motor. These can be either as individual cells or as a single rechargeable battery pack.
6V: four AA or AAA alkaline batteries, five rechargeable NiMh cells or one 6V rechargeable lead acid pack; this is the maximum (and ideal) voltage most hobby servos can handle. Use these if your servos need a bit more power.
7.2V: six AA or AAA rechargeable NiMh batteries is perfect for 7.2V DC gear motors. These are usually in a battery pack rather than as individual cells and you will need a more specific NiMh battery pack charger.
7.4V: two LiPo cells can often power a microcontroller and works great for 7.2V DC gear motors. Unfortunately it’s too high for most hobby servo motors.
7.5V: five alkaline AA or AAA: almost never used because it’s simply too many single-use batteries.
8.4V: 7x NiMh AA batteries (hard to find chargers for 7xAAA NiMh batteries). This is also not used much because it means charging 7 batteries at the same time.
9V: 6x Alkaline batteries, one 9V (NiMh or Alkaline) battery or one 9V lead acid batteru: please avoid using 6x alkaline for the sake of the environment. A 9V single cell rectangular battery is often used to power the microcontroller in dual battery configurations. 9V lead acid batteries are a bit harder to find and although they are quite heavy, are fairly inexpensive and high capacity.
9.6V: 7x NiMh cells, usually in a battery pack configuration. This is good for motors which operate at 9V, and also for microcontrollers (most can operate above 9V).
11.1V: three LiPo batteries produces almost 12V and is much lighter than 10x 1.2V cells or a 12V lead acid battery pack. You need a specific LiPo charger capable of charging 3 cell LiPo packs.
12V: 10x 1.2V cells (always configured as one NiMh battery pack) or one 12V rechargeable lead acid battery pack. 12V is ideal for a variety of DC gear motors and most microcontrollers.
Anything above 12V is usually reserved for very large robots. If you have a 14.4V LiPo or 18V NiMh pack from a cordless drill, keep in mind that finding motors which operate at these voltages is not easy.
[feature] This tutorial has been borrowed from Coleman Benson's post at Robot Shop [/feature]