A ₹1,070 meter that tells you how much power your robot really uses. An ACS712 module measures current, a resistor divider measures battery voltage, and the Uno multiplies them to show volts, amps, watts and the watt-hours used so far. It is the quickest way to size a battery honestly, instead of guessing from the motor label.
Scope: intermediate. This is a design worksheet with illustrative costs. It has not been bench-tested by this site. The counts table was computed by script for the 5 A version of the module, which is commonly listed at 185 mV per amp. This build is for low-voltage DC only. Do not use it to measure mains, and do not connect a pack above the divider’s limit. Check your own module’s sensitivity on its listing, since 20 A and 30 A versions differ.
How it works
The ACS712 outputs half the supply voltage, about 2.5 V, when no current flows, and moves up or down from there in proportion to current: 185 mV per amp for the 5 A part. The Uno’s 10-bit ADC has 5 V / 1023 = 4.89 mV per count, so one count is about 26 mA. Currents smaller than a few counts, around 50 to 80 mA, are therefore lost in the noise, and the sketch treats them as zero.
Because the zero point differs between modules and with supply voltage, the sketch averages 200 readings at start-up with no load and calls that the zero. Current is (reading voltage − zero) ÷ 0.185. Voltage uses a 30 kΩ and 7.5 kΩ divider, a ratio of 0.2, so a 25 V pack reads 5 V at the pin; keep your battery well under that. Energy is power times time added up each loop and shown in watt-hours.
Bill of materials
| Part | Qty | Unit | Total |
|---|---|---|---|
| Arduino Uno R3 (or compatible) | 1 | ₹550 | ₹550 |
| ACS712 5 A current sensor module | 1 | ₹150 | ₹150 |
| 30 kilohm resistor, 1% | 2 | ₹2 | ₹4 |
| 7.5 kilohm resistor, 1% (or 2 × 15 kilohm in parallel) | 2 | ₹3 | ₹6 |
| 16×2 LCD with I2C backpack | 1 | ₹250 | ₹250 |
| Breadboard | 1 | ₹60 | ₹60 |
| Jumper wires | 1 | ₹50 | ₹50 |
| Parts total | ₹1,070 | ||
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
| Current (5 A module) | Sensor output | ADC count |
|---|---|---|
| -5 A | 1.575 V | 322 |
| 0 A | 2.500 V | 512 |
| 1 A | 2.685 V | 549 |
| 2 A | 2.870 V | 587 |
| 5 A | 3.425 V | 701 |
The module’s output moves with its supply voltage, so a Uno on a USB port that sags to 4.7 V shifts the readings. Power it from the same 5 V that serves as the ADC reference, as the Uno does by default, so the ratio stays right. A short 100 nF capacitor from the sensor output to ground helps with noise.
Power and wiring
| Part | Connects to | Note |
|---|---|---|
| ACS712 VCC, GND, OUT | 5V, GND, A0 | |
| Current path | Battery positive to the module IP+, IP− to the load | Thick wire; the module’s screw terminals carry the load current |
| Voltage divider | Battery positive → 30 kΩ → A1 → 7.5 kΩ → GND | Join battery negative to the Uno GND |
| LCD SDA / SCL | A4 / A5 | Address often 0x27 or 0x3F |
The sketch
// DC power meter: Uno + ACS712 5A + divider + I2C LCD
// Design worksheet: low-voltage DC only. Calibrate against a multimeter.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
const int I_PIN = A0, V_PIN = A1;
const float SENS = 0.185; // V per amp, 5 A module
const float DIV = (30000.0 + 7500.0) / 7500.0; // divider ratio, 5.0
const float VCC = 5.0;
const float DEAD_A = 0.06; // ignore currents below this
LiquidCrystal_I2C lcd(0x27, 16, 2);
float zeroV = 2.5;
float wh = 0;
unsigned long last = 0;
float readPin(int pin, int n) {
long sum = 0;
for (int i = 0; i < n; i++) sum += analogRead(pin);
return (sum / (float)n) * VCC / 1023.0;
}
void setup() {
lcd.init(); lcd.backlight();
lcd.print("Zeroing...");
zeroV = readPin(I_PIN, 200); // no load connected at start-up
lcd.clear();
last = millis();
}
void loop() {
float amps = (readPin(I_PIN, 50) - zeroV) / SENS;
if (fabs(amps) < DEAD_A) amps = 0;
float volts = readPin(V_PIN, 50) * DIV;
float watts = volts * amps;
unsigned long now = millis();
wh += watts * (now - last) / 3600000.0; // watt-hours
last = now;
lcd.setCursor(0, 0);
lcd.print(volts, 2); lcd.print("V "); lcd.print(amps, 2); lcd.print("A ");
lcd.setCursor(0, 1);
lcd.print(watts, 1); lcd.print("W "); lcd.print(wh, 2); lcd.print("Wh ");
delay(200);
}Start it with the load switched off so the zero is correct. Compare the volts and amps with a multimeter and adjust SENS or DIV by the ratio if they disagree; a module’s real sensitivity can differ a few percent from the listing. Watt-hours reset when the Uno resets. The sketch has been proofread but not compiled on this site.
Test plan
- Zero check: with no load the current should read 0.00 A; if it creeps, check the supply and the zeroing.
- Voltage check: compare the volts with a multimeter at two battery levels.
- Current check: run a known load, such as a bulb or a resistor with a calculated current, and compare with a clamp or series meter.
- Motor run: measure a robot’s idle, cruise and stall currents.
- Energy check: run a constant load for 10 minutes and compare the Wh with power × time.
- Noise: note how much the current flickers at light loads.
What usually goes wrong
| Symptom | Likely cause | Fix |
|---|---|---|
| Current reads 0.3 A with no load | Zero taken with a load connected | Restart with the load off |
| Readings drift | Supply voltage changes | Use a stable 5 V and average more samples |
| Volts read wrong by a fixed ratio | Divider resistors differ from the code | Measure the resistors and edit DIV |
| Current very noisy at low load | Resolution is about 26 mA per count | Average more, or use a more sensitive part |
| Module gets warm | Current above its rating | Check the model’s current range |
Upgrades
- Peak hold: record the highest current seen, useful for stall.
- Logging: record watts over time to an SD card.
- Battery gauge: estimate remaining capacity from Wh used.
- Better sensor: try a shunt-based monitor chip for finer low-current readings.
Cost and parts notes
The ₹1,070 total is an illustration and does not include shipping. Use the cost calculator to compare sellers.
Common questions
How accurate is an ACS712?
Hobby modules are usually good for a few percent at best and are noisy at small currents. Calibrate against a meter.
Why measure zero at start-up?
Each module’s zero point differs slightly, and a small error there is a large error at low current.
Can I use the 20 A version?
Yes, with SENS set to its listed sensitivity, about 100 mV per amp; the resolution gets coarser.
Can it measure mains?
Not with this build. Mains work needs proper isolation and training.
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.