Battery: AA, coin cell, LiPo
A voltage behind an internal resistance: 1.6 V a fresh AA, 4.2 V a full LiPo, and less once a motor starts.
- 2 pins
- 3 settings
- In 20 projects
- In 4 lessons
The Battery: AA, coin cell, LiPo in brief
What it is, and every setting the properties panel gives it.
A battery here is a voltage behind an internal resistance, which is the one thing the number on its label leaves out. Fresh and unloaded it reads more than the label: 1.6 V for an AA, 9.6 V for a 9 V battery, 4.2 V for a full 18650 or LiPo cell. Under load it sags by the current times that resistance, so a 9 V battery with 1.7 ohms inside loses about 0.8 V into an 18 ohm load, and 100 mA costs a coin cell about a volt inside itself, which is why one cannot run a servo. The kind property picks AA and AAA packs, NiMH, coin cells, one or two 18650s, LiPo pouches, 2S and 3S RC packs or a 12 V lead-acid block, each with its figure from a datasheet or a stated assumption. The charge slider moves it in a straight line between its empty and full voltages. It does not run down while the circuit runs, so the slider is how you show what a flat battery does.
- Family
- Power and wiring
- Pins
- 2
- kind
- 9v (or aa2, aa3, aa4, 18650, 18650x2, aa1, aaa1, aaa2, aa6, aa8, nimh4, nimh6, cr2032, cr2025, lir2032, lipo500, lipo1000, lipo2000, lipo2s, lipo3s, sla12)
- charge
- 100
- capacity
- 0
2 pins
Named as the editor names them, so a wire lands where you expect it.
How to read a battery’s voltage with an Arduino
One lithium-ion cell is 4.2 V full and about 3.0 V empty, under the Uno’s 5 V reference, so it goes straight onto an analog pin: the red lead to A0 and the black lead to GND. The volts are analogRead(A0) times 5 / 1023, and a straight line from 3.0 to 4.2 V gives a rough percent.
The circuit here does that with an 18650, a 16x2 I2C LCD and a traffic light module. Drag the battery’s charge slider: full reads 4.20 V and 100 %, half 3.60 V and 50 %, and under 20 % the red light blinks. A battery over 5 V, two 18650s, a 9 V battery or a 12 V pack, needs a voltage divider in front of the pin.
On a 3.3 V board a full lithium-ion cell is over the ADC’s range, so read it through two equal resistors and double the result.
float volts = analogRead(A0) * 5.0 / 1023.0;
int percent = constrain((int)((volts - 3.0) / 1.2 * 100.0 + 0.5), 0, 100);What is true about the Battery: AA, coin cell, LiPo, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
It is a source. The battery starts an analog solve the way the bench supply does, so resistors, LEDs, motors and the TB6612FNG's bridge all draw real current from it.
Internal resistance. Energizer's E91 sheet gives a fresh alkaline AA as 150 to 300 milliohms; the part uses 0.2 ohm a cell. The 9 V figure, 1.7 ohm, is an assumption in the range fresh 9 V batteries measure (Energizer's 522 sheet gives no number). Into 18 ohm, half an amp, a 9 V battery loses about 0.8 V inside itself.
Fresh and empty. A fresh alkaline cell reads about 1.6 V unloaded, and both sheets rate a cell down to 0.8 V.
18650 cells. Samsung's INR18650-25R sheet charges a cell to 4.20 V and gives its AC impedance as 18 milliohm or less. The part uses 0.04 ohm a cell, an assumption that adds the slower DC part of the drop and a holder's springs. That is why two 18650s run a robot car's motors where a 9 V battery gives up: two amps cost them about 0.16 V. The sheet discharges a cell to 2.5 V under load; resting, an emptied cell comes back to about 3.0 V, which is the part's 0 percent.
AAA. Energizer's E92 sheet gives the same 150 to 300 milliohms as the AA; the part uses 0.25 ohm, inside it, for the smaller cell.
NiMH. Panasonic's eneloop sheet: 1.2 V nominal, tested down to 1.0 V, about 25 milliohm at 1 kHz; the part uses 0.03 ohm a cell with a holder. Off the charger a cell rests at about 1.40 V, which is a measurement rather than a datasheet figure. Four NiMH cells give 4.8 V where four alkalines give 6, which is why a 5 V project runs on four of them.
Coin cells. Energizer's CR2032 and CR2025 sheets: 3.0 V, rated down to 2.0 V. A fresh one reads about 3.2 V unloaded (a measurement). The CR2032 sheet's pulse test starts near 10 ohm inside, rising past 100 ohm as it empties; the part uses the fresh 10 ohm. That is why a coin cell cannot run a servo or a Wi-Fi radio: 100 mA would cost it a volt inside itself. The LIR2032 is the rechargeable Li-ion one, 4.2 V full, 0.6 ohm or less.
LiPo. One-cell pouches charge to 4.2 V and stop at 3.0 V, like an 18650. Their sheets give no internal resistance; comparable cells' sheets, protection board included, give under 200 milliohm for 500 mAh, about 100 for 1200 mAh and about 70 for 2400 mAh, which is what the part uses. An RC pack is far stiffer: 0.01 ohm a cell is an assumption (new packs measure 3 to 10 milliohm a cell) with the leads added. The 2S and 3S packs draw their balance plug, but it has no pins: charging is not modeled.
Lead-acid. Yuasa's NP7-12 sheet gives 23 milliohm; its manual has a 12 V block at about 12.8 V at rest when full and 11.8 V empty. Under load it is rated down to 10.5 V.
Not modeled
The battery emptying while the circuit runs (a 2850 mAh AA would take hours of
simulated time to notice), resistance rising as it empties, temperature, and
recovery after a rest. A coin cell's resistance climbing past 100 ohm as it empties
is not modeled either, nor its resistance rising with the current it is asked for.
So a red LED wired straight across a CR2032, the "LED throwie", takes about 100 mA
here and burns out, while on the bench the cell sags further and the LED survives.
Give the LED a resistor, as you would anyway. Between full and empty charge is a straight line, which is
an assumption: the real curve is flatter in the middle. It is there to show what a
flat battery does to a circuit, not to predict run time.
From Battery, in full.
See the Battery: AA, coin cell, LiPo in a project
20 built-in projects use it. Each opens in the editor, already wired.
Where it turns up in a lesson
4 lessons place it in their own circuits.
The boards it is shown on
Each of these 2 boards has a built-in project with the Battery: AA, coin cell, LiPo in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Battery: AA, coin cell, LiPo
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.