A ₹703 voltage monitor that tells you when a robot battery is getting low. A resistor divider scales a 3-cell pack (12.6 V full) down to a safe level, the Uno reads it against its internal 1.1 V reference, and three LEDs and a buzzer show green, yellow or red. The page works through the divider and the ADC counts so you can check your own numbers.
Scope: intermediate. This is a design worksheet with illustrative costs. It has not been bench-tested by this site. The divider and count tables were computed by script. The thresholds are common rules of thumb for Li-ion packs, not a battery maker’s limits; check your own cells’ datasheet. A monitor tells you the pack is low but does not protect it, so use a proper protection board for cut-off. Handle lithium cells with care.
How it works
The Uno’s ADC accepts 0 to 5 V by default, but the 5 V rail moves with USB and load, so the reading drifts. The internal 1.1 V reference is steadier but nominal, so the divider must bring 12.6 V below 1.1 V. A 110 kilohm resistor on top and a 10 kilohm resistor at the bottom gives a ratio of 10 / 120 = 0.0833, so 12.6 V becomes 1.05 V and 9.9 V becomes 0.825 V.
At the 1.1 V reference one ADC count is 1.1 / 1023 = 1.075 mV at the pin, which is 12.9 mV at the battery. The divider draws 12.6 V / 120 kΩ = 105 µA, a small drain. Because the divider’s source resistance is high for the ADC, a 100 nF capacitor from the pin to ground steadies the reading, and the sketch averages 16 samples.
Bill of materials
| Part | Qty | Unit | Total |
|---|---|---|---|
| Arduino Uno R3 (or compatible) | 1 | ₹550 | ₹550 |
| 110 kilohm resistor, 1% | 1 | ₹2 | ₹2 |
| 10 kilohm resistor, 1% | 1 | ₹2 | ₹2 |
| 100 nF capacitor | 1 | ₹3 | ₹3 |
| LEDs (green, yellow, red) | 3 | ₹5 | ₹15 |
| 220 ohm resistors | 3 | ₹2 | ₹6 |
| Active buzzer module | 1 | ₹15 | ₹15 |
| Breadboard | 1 | ₹60 | ₹60 |
| Jumper wires | 1 | ₹50 | ₹50 |
| Parts total | ₹703 | ||
Scroll the table sideways to see every column.
Prices checked Nov 2026. Shipping and tools are not included.
Prices are illustrative figures for Indian sellers in November 2026, before shipping, and have not been checked against current listings.
The numbers
| Pack voltage | Pin voltage | ADC count (1.1 V ref) | Suggested state |
|---|---|---|---|
| 12.6 V (full) | 1.050 V | 977 | Green |
| 11.1 V (nominal) | 0.925 V | 860 | Green |
| 10.5 V | 0.875 V | 814 | Yellow |
| 9.9 V | 0.825 V | 767 | Red, beep |
| 9.0 V | 0.750 V | 698 | Red, beep |
The internal reference is only nominal, commonly given as 1.1 V with a spread of several percent, and resistor tolerance adds a little more. Compare the displayed value with a multimeter on the pack and enter the correction in the sketch’s calibration constant.
Power and wiring
| Part | Connects to | Note |
|---|---|---|
| Divider top | Pack positive through the 110 kΩ resistor | Fuse the pack positive lead as for any robot |
| Divider middle | A0, with the 100 nF capacitor to GND | |
| Divider bottom | 10 kΩ to GND | Join the pack negative to the Uno GND |
| LEDs through 220 ohm | D2, D3, D4 | Green, yellow, red |
| Buzzer | D8 | Active buzzer |
The sketch
// Li-ion 3S voltage monitor: Uno + 110k/10k divider + LEDs + buzzer
// Design worksheet: calibrate CAL against a multimeter.
const int PIN = A0;
const int LED_G = 2, LED_Y = 3, LED_R = 4, BUZ = 8;
const float R_TOP = 110000.0, R_BOT = 10000.0;
const float VREF = 1.10;
float CAL = 1.00; // multiply to match a meter reading
const float V_OK = 10.8, V_LOW = 9.9;
float readPack() {
long sum = 0;
for (int i = 0; i < 16; i++) { sum += analogRead(PIN); delay(2); }
float pin = (sum / 16.0) * VREF / 1023.0;
return pin * (R_TOP + R_BOT) / R_BOT * CAL;
}
void setup() {
analogReference(INTERNAL); // 1.1 V on an Uno
pinMode(LED_G, OUTPUT); pinMode(LED_Y, OUTPUT);
pinMode(LED_R, OUTPUT); pinMode(BUZ, OUTPUT);
Serial.begin(9600);
for (int i = 0; i < 3; i++) { analogRead(PIN); delay(10); } // let the reference settle
}
void loop() {
float v = readPack();
digitalWrite(LED_G, v >= V_OK);
digitalWrite(LED_Y, v < V_OK && v >= V_LOW);
digitalWrite(LED_R, v < V_LOW);
digitalWrite(BUZ, v < V_LOW && (millis() / 500) % 2 == 0); // slow beep
Serial.println(v, 2);
delay(500);
}If the display reads high or low by a fixed ratio, set CAL to meter ÷ displayed. A pack under load sags, so readings taken while the motors run are lower than the resting voltage; some builds use a longer average or only judge the state when the load is light. The sketch has been proofread but not compiled on this site.
Test plan
- Bench supply or a known pack: check the reading against a multimeter at two voltages and set CAL.
- Threshold check: use an adjustable supply, if you have one, to step across 10.8 V and 9.9 V.
- Under load: run the robot motors and see how much the reading sags.
- Divider current: measure the drain with the monitor connected for a day and see if it matters for your pack.
- Noise: watch the reading with the motors running and add averaging if it jumps.
- Wiring check: verify the divider output with a meter before first connecting to the Uno.
What usually goes wrong
| Symptom | Likely cause | Fix |
|---|---|---|
| Reading far too high | Divider wired wrong or wrong resistor values | Measure the divider output with a meter before connecting |
| Reading saturates at 1023 | Pin voltage above 1.1 V | Increase the top resistor or check the ratio |
| Reading drifts | Reference or resistor tolerance | Calibrate with CAL |
| Jumpy under load | Motor noise | Average more samples and keep wires short |
| Pack drains slowly when idle | Divider always connected | Add a switch or accept 105 µA drain |
Upgrades
- Per-cell sensing: measure each cell to catch an unbalanced pack.
- Cut-off relay: disconnect the load below a hard limit.
- Current sense: add a current sensor and estimate remaining capacity.
- Display: show voltage and a percentage on a small screen.
Cost and parts notes
The ₹703 total is an illustration and does not include shipping. Use the cost calculator to compare sellers.
Common questions
Why the 1.1 V reference?
It does not move with the USB supply. The cost is a smaller input range, so the divider must scale harder.
Why a capacitor on the analog pin?
The divider has a high source resistance, and the capacitor helps the ADC sample a steady voltage.
Is 3.3 V per cell a safe limit?
It is a common warning level, not a rule. Follow your cell’s datasheet.
Can I use this on a 12 V lead-acid battery?
With the same divider it would work for the 10 to 14 V range, but check the 1.1 V limit at the top of the range.
Last reviewed: November 2026. This is a design worksheet with illustrative costs. It has not been bench-tested by this site; library names, pins and limits must be checked against your board and the current library versions, and measurements from your build are welcome.