INA219 I²C Power Monitor

Drop a tiny shunt in series with a battery and read out live volts, milliamps, and watts over I²C — perfect for sizing a project's power budget.

Difficulty: Breadboard. Estimated build time: about 35 minutes. Estimated parts cost: about US$5.00. 6-line bill of materials. Compare supplier offers when available. A bench instrument that watches the current and voltage going to a load and reports them in real time.

Wire the INA219 into your load's positive rail

The INA219 must sit ON the positive supply wire: power source connects to VIN+, and the load connects to VIN-. Internally that puts the 0.1 Ω shunt resistor in series. Connect the chip's own VCC to 3.3 V or 5 V (it works on either), and GND to your circuit's ground. SDA and SCL go to the matching Arduino pins (A4 and A5 on an UNO). Pull-ups to VCC are usually built into the hobby module.

Install the Adafruit INA219 library

In the Arduino IDE Library Manager, search for "Adafruit INA219" and install. Open File > Examples > Adafruit INA219 > getcurrent. The example begins with ina219.begin() to detect the chip on address 0x40 (the default; up to 16 addresses are possible by tying A0/A1 to different rails), then prints bus voltage, shunt voltage, current, and power once a second.

Read your project's power

Hook the INA219 in series with whatever you want to measure: a Raspberry Pi running idle, an ESP32 doing Wi-Fi, an LED strip at varying brightness. Open Serial Monitor at 115200 baud and watch the numbers move. Bus voltage tells you the rail your load actually sees, current tells you the demand, and the power column saves you a multiplication. You'll be surprised — a sleeping ESP32 draws under 1 mA, but its Wi-Fi peaks momentarily over 250 mA every time it transmits.

Calibrate for higher currents

The default library setting expects a 0.1 Ω shunt and ranges up to 3.2 A. If you need finer resolution for low-current sleep tests, call ina219.setCalibration_16V_400mA() which gives you 4 µA per count instead of 100 µA. If you need higher current, swap in a 0.01 Ω shunt and use ina219.setCalibration_32V_2A() (or write your own coefficients). The chip's gain stages handle the rest, but remember that a 0.01 Ω shunt drops less voltage — you trade range for resolution.