Electronics
How to measure a 12 V battery with a voltage divider
A meter or microcontroller that reads 0–5 V can't take 12 V directly, so scale it down with a voltage divider. Two resistors with the top one twice the bottom, like 20 kΩ over 10 kΩ, divide by 3: 12 V becomes 4.00 V. Read the bottom resistor's voltage and multiply by 3.
Pick the ratio
The output is the bottom resistor's share of the total:
For a third, Rtop = 2 × Rbottom. Leave room above 12 V: a car battery sits near 14.4 V while it charges, which this divider turns into 4.8 V, still under 5 V. Anything up to 15 V is safe.
Pick the current
The divider draws current from the battery all the time, so make it small, but well above what the meter takes. About 0.4 mA works:
Split a third and two thirds: 10 kΩ on the bottom, 20 kΩ on top. 20 kΩ isn't in the E12 range, so use two 10 kΩ in series. The whole divider burns 12 V × 0.4 mA ≈ 5 mW.
Live experiment
A camper van's battery gauge
Pip's camper van has a 12 V battery and a dashboard gauge that reads it through a ÷3 divider, so 4.00 V on the gauge means 12.0 V. Switch the gauge on, leave the lights on overnight to drain the battery, then go for a drive to charge it.
“Project: Battery Gauge” is the project that ends Junction City, Electronics World 2. Free with an account. Lessons unlock in order, so you’ll do the 14 before it first.
Wire the meters right
The voltmeter goes across the bottom resistor. To prove the divider only sips, put an ammeter in the divider's own path, not in the battery's main wire, where it would add every other load's current too. A power LED on its own branch, like a green one through 1 kΩ, draws about 10 mA without changing the reading.
Calibrate it
Ordinary resistors are only accurate to about ±5%. In the worst case the top is 5% high and the bottom 5% low, and the gauge reads 12 V as about 11.2 V. The difference between a full and a nearly flat lead-acid battery is under a volt, so that error matters.
Real gauges add a trimmer: replace the top with 15 kΩ plus a 10 kΩ potentiometer wired as a variable resistor, and adjust it until a known 12.0 V reads exactly 4.00 V.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Project: Battery Gauge” is the project that ends Junction City, Electronics World 2. Free with an account. Lessons unlock in order, so you’ll do the 14 before it first.
Or start from the very first lesson, no account neededWork it out
Practice questions
Three quick questions from the lessons. Pick an answer to check it.
Show the answer
Answer: two 10 kΩ in series. Series resistances add, 10 + 10 = 20 kΩ exactly. Two in parallel make 5 kΩ, and 22 kΩ would read about 3.75 V instead of 4 V.
- Why not “one 22 kΩ”? 22 kΩ is 10% too big, so the gauge would read about 3.75 V at 12 V instead of 4.00 V.
- Why not “two 10 kΩ in parallel”? Two equal resistors in parallel make half of one, 5 kΩ, not 20 kΩ.
Show the answer
Answer: The load pulls its output down. A divider acts like a battery behind Rth. A heavy load forms a second divider with Rth, so the output sags. A Zener holds its voltage instead.
- Why not “Dividers only work on AC”? A divider works on DC as well as AC: two resistors split any voltage across them.
- Why not “It makes too much voltage”? A divider can only give less than its input. The trouble is the opposite: a heavy load drags its output lower.
Show the answer
Answer: both their ends connect to the same two points. Parallel means both ends share the same two nodes, however the drawing looks. Series parts are on one path, so they always share the same current. Equal currents alone don't prove either.
- Why not “the same current flows through them”? Series parts always share one current, so equal currents don't prove two parts are in parallel.
- Why not “they're drawn next to each other”? A drawing can place parts side by side that aren't joined that way. What counts is which two points their ends connect to.
“Project: Battery Gauge” is the project that ends Junction City, Electronics World 2. Free with an account. Lessons unlock in order, so you’ll do the 14 before it first.
Questions people ask
What resistors do I need to read 12 V on an Arduino?
A ÷3 divider, with the top resistor twice the bottom one, like 20 kΩ over 10 kΩ. 12 V becomes 4 V, and up to 15 V stays under the board's 5 V limit, which covers a car battery while it charges at about 14.4 V.
Will a voltage divider drain my battery?
A little, all the time. 20 kΩ plus 10 kΩ draws 12 ÷ 30,000 = 0.4 mA, about 10 mAh a day, which a car battery won't notice. A 1 kΩ and 2 kΩ divider would draw ten times as much.
Why not use really big resistors, like 2 MΩ and 1 MΩ?
Whatever reads the divider draws a little current too, and through megohms that small current shifts the output. Keep the divider's current well above what the meter or input pin takes, and tens of kilohms is a good middle ground.
Related topics
- Voltage divider explainedTwo resistors that split a voltage: the formula, potentiometers, and why a load drags the output down.
- How to measure a voltage with an ArduinoFrom analogRead's count to volts you can trust: the sum, a divider for big voltages, and the reference.
- How to use a multimeterVolts across, amps in the loop: where the probes go, and the one mistake that blows the fuse.
- How to calculate equivalent resistanceShrink any series-parallel network to one resistor, one step at a time, and spot what's really in parallel.