There are a multitude of different battery technologies available. There are some really great resources available for the nitty gritty details behind battery chemistries. Wikipedia is especially good and all encompassing. This tutorial focuses on the most often used batteries for embedded systems and DIY electronics.
There are some concepts and bits of knowledge you may want to know before reading this tutorial:
What is a Circuit?
Voltage, Current, Resistance, and Ohm's Law
What is Electricity?
Alternating Current (AC) vs. Direct Current (DC)
Looking to explore different batteries?
We've got you covered!
Lithium Ion Battery - 400mAhPRT-13851
Here are some terms often used when talking about batteries.
Capacity - Batteries have different ratings for the amount of power a given battery can store. When a battery is fully charged, the capacity is the amount of power it contains. Batteries of the same type will often be rated by the amount of current they can output over time. For example, there are 1000mAh (milli-Amp Hour) and 2000mAh batteries.
Nominal Cell Voltage - The average voltage a cell outputs when charged. The nominal voltage of a battery depends on the chemical reaction behind it. A lead-acid car battery will output 12V. A lithium coin cell battery will output 3V.
The key word here is "nominal", the actual measured voltage on a battery will decrease as it discharges. A fully charged LiPo battery will produce about 4.23V, while when discharged its voltage may be closer to 2.7V.
Shape - Batteries come in many sizes and shapes. The term ‘AA’ references a specific shape and style of a cell. There are a large variety.
Primary vs. Secondary - Primary batteries are synonymous with disposable. Once fully-drained, primary cells can't be recharged (reliably/safely). Secondary batteries are better known as rechargeable. These require another power source to fully charge back up, but they can fully charge/discharge many times over their life. In general primary batteries have a lower discharge rate, so they'll last longer, but they can be less economical than rechargeable batteries.
|Battery Shape||Chemistry||Nominal Voltage||Rechargeable?|
|AA, AAA, C, and D||Alkaline or Zinc-carbon||1.5V||No|
|9V||Alkaline or Zinc-carbon||9V||No|
|Silver Flat Pack||Lithium Polymer (LiPo)||3.7V||Yes|
|AA, AAA, C, D (Rechargeable)||NiMH or NiCd||1.2V||Yes|
|Car Battery||Six-cell lead acid||12.6V||Yes|
Energy Density - Combining capacity with shape and size of a battery, the energy density of a battery can be calculated. Different technologies allow different densities. For example, lithium batteries typically pack more juice into a given volume than alkaline or coin cell batteries.
Internal Discharge Rate - Have you ever tried to start a car that has been sitting for 6 months? Batteries discharge when sitting on the shelf or when unused. The rate at which the battery discharges itself over time is called internal discharge rate.
Safety - Because batteries store power, they are basically very tiny explosives. To prevent harm, batteries are designed to be as safe as possible. Most batteries technologies are designed to discharge safely in the event of misuse. If you hook up an alkaline battery incorrectly, it may get hot to the touch but should not catch fire. Most Lithium Polymer batteries have safety circuits built-in to prevent damage to battery and prevent it from unsafe usage.
For a full list of terms and technical overview Wikipedia is an [excellent resource](http://en.wikipedia.org/wiki/Battery_(electricity)).
Lithium Polymer (often abbreviated LiPo) batteries are very useful for embedded electronics. They offer the highest density readily available on the market. Because cell phones predominantly use this battery type, they are easy to find for reasonable prices. They do require special charging, so be sure to use the right charger for the job. SparkFun carries a variety of 3.7V Lithium Polymer batteries - many of which are listed below. The capacity of the battery you choose will depend on the intended run time of your project, size constraints, and other factors.
Lithium Ion Battery - 400mAhPRT-13851
Lithium Ion Battery - 2AhPRT-13855
Lithium Ion Battery - 850mAhPRT-13854
Polymer Lithium Ion Battery - 40mAhPRT-13852
Lithium Ion Battery - 1AhPRT-13813
Lithium Ion Battery - 110mAhPRT-13853
An individual LiPo cell has a nominal voltage of 3.7V. When fully charged you will see nearly 4.3V on the cell but it will quickly drop to 3.7V under normal use. When depleted, the cell will be around 3V. This means your project will need to handle various voltages if you are running directly from a cell. If you need 5V you will need to combine two LiPos in series to create a 7.4V pack and regulate down to 5V.
In the small electronics world, most LiPo batteries come terminated with various 2-pin connectors. At SparkFun, we use the JST connector. This prevents the battery from being plugged in wrong. The connector is a friction fit so it’s common to use pliers to gently remove the battery.
Charging and Discharging
There are many low-cost chargers created to charge LiPo batteries. They commonly use USB to charge the battery. Do not attempt to charge a LiPos without a charger. A LiPo battery can be harmed by overcharging, so use a specifically designed LiPo charger like the ones here:
SparkFun LiPo Charger/Booster - 5V/1APRT-14411
SparkFun Adjustable LiPo ChargerPRT-14380
SparkFun LiPo Charger Basic - Micro-USBPRT-10217
Before charging a Lithium Ion battery, make sure you are aware of your battery's capacity and the charge current supplied by the charger. More information can be found in the following tutorial: Setting the Charge Current.
LiPo batteries can also be harmed by being discharged too far. To protect against this, almost all LiPo batteries have a small safety circuit built into the top of the cell that will shut off the battery if the voltage drops below a certain threshold (usually 3V). The protection circuit board is usually under the yellow Kapton tape where the wires are connected.
LiPo batteries have a very low internal discharge rate. This makes them a good candidate for projects that have low power requirements and need to run for many days or months.
Respect the energy density: These batteries pack a punch and can source multiple amps continuously. The short-circuit protection will shut off the battery when a short is detected but when using these batteries with projects use common sense.
We recommend LiPo for nearly every portable application. They are fairly robust and when used safely provide a great power source.
Other Types of Lithium Ion Batteries
Round, High Capacity Lithium Ion Batteries
These batteries have been mainly used in flashlight type applications but are easy to use and install and have a lot of juice.
Nominal Voltage - These batteries also carry a nominal voltage of 3.7V but unlike the flat LiPo batteries, these round cell batteries do NOT have a protection circuit built in. Special care must be taken when charging and discharging these batteries so that they do not become damaged. More information on protection circuits can be found here.
Connectors - These batteries can be easily integrated into projects with specific battery holders:
Battery Holder - 1x18650 (wire leads)PRT-12899$1.15
Battery Holder - 18650 (PTH)PRT-13113$0.95
Battery Holder - 1x18650 (board mount)PRT-14963
Battery Holder - 2x18650 (board mount)PRT-14964
Charging and Discharging - Since there is no protection circuit on these batteries, the user must account for the possibility of over or under charging such that the battery isn't damaged. We recommend a universal charger like this one:$32.50
High Discharge Lithium Ion Batteries
High discharge lithium ion batteries are a great way to power any R/C, robotic, or portable project that needs a small battery with a lot of punch.
Nominal Voltage - These have a nominal voltage of 7.4V and like the round cell batteries, do NOT have a built in protection circuit. Special care must be taken when charging and discharging these batteries so that they do not become damaged. More information on protection circuits can be found here.
Connectors - The charge connector is a 3 pin JST-XH charge plug. Discharge is via Dean’s Connector discharge leads.
Charging and Discharging -Since there is no protection circuit on these batteries, the user must account for the possibility of over or under charging such that the battery isn't damaged. Because these are typically dual cell battery packs, a special charger is needed. This battery is not compatible with single cell chargers. We recommend a specialized charger such as this one:
Nickel Metal Hydride
Nickel Metal Hydride (often abbreviated NiMH) batteries are a proven rechargeable technology. These batteries are often lower cost than other chemistries but suffer from lower densities than LiPo. NiMH batteries require less stringent charging curves, which lower the cost of the chargers. NiMH are often found in lower cost electronic devices such as toothbrushes and cordless shavers where output voltage is less of a concern (you’ll notice your toothbrush running more slowly but continues to work).
2500 mAh NiMH Battery - AAPRT-00335
Each cell outputs nominally 1.2V. This is very similar to alkaline batteries of the same size that output 1.5V. Combining four AA NiMH will get you a 4.8V pack which should run most 5V systems but will drop in voltage as the pack discharges.
Charging and Discharging
NiMH batteries on their own have no discharge protection circuits. A discharge protection circuit prevents the battery from discharging below a certain voltage level to prevent damage to the battery. More information on NiMH batteries and over-discharge can be found here.
Because of their similarity to regular consumer batteries, charging NiMH batteries is often done with chargers that plug into the wall. We recommend NiMH for applications where a device has already been designed to use AA type batteries.
Coin cell batteries are great for very small, low power projects. These batteries are cheap! Buy them in bulk if you need a lot. They are great for testing LEDs. You'll find these type of batteries hidden inside remote controls, electronic tealight candles and lots of smaller disposable devices.
These batteries are not rechargeable. There are a few, more complex chargeable versions, but the vast majority of coin cells are meant to be thrown away once used.
The chemistries and technologies behind coin cells vary. Some are alkaline, others are lithium. Alkaline coin cell batteries have a nominal voltage of 1.5V. Lithium coin cell batteries, on the other hand, have a nominal voltage of 3V.
Coin cell batteries come in a few different sizes, each with a specially coded name to indicate the size and chemistry. Alkaline coin cells all start with an "L", while lithium coin cells are all prefixed with a "C". The popular CR2032, for example, is a lithium battery (3V nominal voltage) measuring 20mm in diameter and 3.2mm tall. An LR1154 (aka LR44) is an alkaline battery (1.5V) measuring 11mm across and 5.4mm tall.
Coin cells are great for powering an ATtiny or other small microcontroller and LED projects.
We’ve all grown up with this type of disposable battery. These batteries have been around for many decades, so you’ll find them everywhere! There’s also a multitude of battery holders and accessories for AA and 9V batteries.
These batteries are cheap, safe to use, and available everywhere, but sadly, they are not rechargeable. The alkaline chemistry makes these batteries particularly idiot proof (safe).
AAs and AAAs are the most common alkaline batteries and output 1.2V nominally (but are around 1.5V when first used). Because AAs output 1.2V, you will need to combine them in packs of 3 or 4 to run your 3.3V or 5V system. 9V batteries are obviously 9V nominally.
Panasonic Alkaline Battery - AAPRT-15201
A 9V battery with a connector cable is a great, quick way to make a project portable, but don’t expect the battery to last very long! While it outputs 9 volts, the capacity of a 9V battery is pretty low.
We regularly use this type of batteries with beginners. They are often comfortable with this type of battery and can easily find them. If they attach the battery backwards it may heat up, but little damage is done. Once a student is past the basics we generally transition users to LiPos because they last longer and can be recharged.
Resources and Going Further
Now that you know a little more about battery technologies you should check out these additional tutorials and projects:
How to Power a Project
How to Use a Multimeter
LilyPad Basics: Powering Your Project
Interested in learning more foundational topics?
See our Engineering Essentials page for a full list of cornerstone topics surrounding electrical engineering.