Selecting the proper battery for your robot
I've noticed alot of posts lately have been about faulty power supplies, mainly because they are utilizing a 9V battery in their circuit. 9V batteries are intended to be used for primarily electronics, NOT MOTORS, because they have such a low output current and low capacity. Motors are much more suited to AA, AAA, D or C or even battery packs that are manufactured to a specific voltage and configuration (Think remote control car battery packs).
My robot barely works with a 9V, what gives?
A 9V battery is actually composed of 6 AAAA (yes, Quad A) batteries, or flat packs in series. These batteries have very tiny capacitances, at most you'll find at 500mA, which can power your robots electronics, such as the microcontroller, LEDs, and other low power draw electronics on your robot. This excludes motors 99% of the time. Motors, when compared to your typical microcontroller draw many many times more power, often into the hundreds of milliamps, and when they stall out (Hold the shaft of the motor still) they can draw several amps, which can drain a 9v battery in just minutes.
How to fix the problem? Many robots utilize a Motor Driver IC that has supplies for the logic side and the motor side. Connect 4xAA batteries into the MOTOR side of the controller. A 9V battery or even that same AA pack can be connected to the logic supply also. 4xAA batteries supply 4.8V-6.0V, which is within the supply range of most 5V tolerant electronic components. NEVER connect the motor supply with a 9V. Logic side may work, but not the motor supply.
What does a "veteran" do? I almost always have a single "High Voltage" (close to 10V) supply, often consisting of a Sealed Lead Acid battery (Tons of capacity) or a NIMH Battery pack (8.4V-9.6V, around 1100mAH), and this provides adequate voltage to the Voltage Regulator (almost always a 7805) which can be expected to require at least 2 volts more than they regulate. You can buy low drop out regulators that only need a fraction of a voltage higher than their output, but these are more expensive. The Battery pack or SLA battery has plenty of current capacity to power the motors, and are designed to output high currents, unlike the puny 9V battery.
What batteries should I use?
There are tons of battery chemistries out there; however there are a few I would go for. NIMH is my number one choice, because they have decent capacitance, cheap for their size and have a decent current output. Also, NIMH batteries are rechargeable and safer than NICAD batteries. NIMH batteries lack the "memory" effect, and do not contain Cadmium, a very toxic chemical.
A new popular choice nowadays is called a LiPo battery (Lithium polymer). Basically it’s a battery in a "sack". These batteries boast 3.7V per cell (unlike NIMH, Alkaline and NiCad’s 1.2-1.5V per cell), have huge energy densities and can be charged very quickly. They are also designed to output many times their capacitances in current; some batteries can output hundreds of amps for a short time! LiPo batteries are DANGEROUS however, any quick YouTube search for "exploding LiPo battery" can demonstrate what can happen if you charge these wrong.
LiPo wins the battle here, however the danger they present is much higher and they are more expensive, so I suggest to any beginner to start with NIMH batteries. You can buy a pack and a charger from Wal-Mart, or even buy a Battery pack via any hobby store that sells "Remote control car" battery packs. NIMH batteries can be charged in about an hour with the right charger.
Where to buy LiPo Batteries?
The best retailer of LiPo batteries is www.hobbyking.com which sell a huge variety of batteries in many cell configurations and capacitance for very, very low prices. I have yet to find a cheaper source of LiPo batteries and chargers than HobbyKing. The website sucks, but the prices are great.
There is yet a 3rd battery i can recommend from personal experience. Lead Acid Batteries are made of spongy lead grills with special electrolytes on each plate, and each cell has a 2V potential. The most common cell configuration is 6 Cells, or 12V. When you have a large robotic project that will require lots of amps, and you want to keep things simple, Lead Acid Batteries are the way to go. There are several times, Gel Cell (power wheels) and Sealed Lead Acid (Car Batteries). Lead Acid Batteries have relatively low power density for their weight, but they can output hundreds of amps easily for long periods of time (until they run out), and are easily chargeable, all they take is a 12V wall adapter! Just hook it up and it'll slow to a trickle when its full. They are like the "dinosaurs" of robot batteries, big, old, but reliable and robust, and easy to charge.
Li-Ion Batteries are usually found in cameras and Laptop batteries, and boast fantastic energy densities. However, They cannot output large currents at once. That is why we have Li-Po batteries. Li-Ion and Li-Po batteries are actually very similar, just different cell construction. However Li-ion batteries are fantastic for low current draw electronics, such as for a robot controller. This excludes motors. Li-Ion batteries are a bit tricky to charge compared to other batteries (excluding Li-Po), and I would still recommend a NiMH battery pack over a Li-Ion battery.
Recap of the 4 major battery types described:
Li-Po batteries are like the ferraris of batteries. Huge energy densities, 3.7V per cell, High Current output and can be charged quickly. However, they require lots of "Maintainence" to keep them running in peak condition, such as balancing. Balancing is when a charger ensures that each cell in a Li-Po battery is properly charged, also known as there are 3.7V per cell.
NIMH batteries are the family sedan of batteries. Decent energy densities, 1.2V per cell, Moderate Current output and can also be charged quickly. Easily charged and available in many sizes, and require little maintence to keep them functioning properly. They tend to self discharge a bit more than other batteries however.
Lead Acid Batteries are the old rusty trucks of Batteries. They require almost no maintainence, and are dead easy to charge. 2V per cell, and are heavy though. They also can output tons of current for their size, but are HEAVY. I mean, they're made out of lead, what did you expect? That is one slight environmental hazard however, as they do contain Sulfuric acid and Lead.