Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

INA219 current sensor with Arduino Uno — measure volts, amps and watts

Wire an INA219 to an Arduino Uno R3 over I2C, put it on the high side of a 12 V load with a common ground, and log voltage, current and power.

Arduino C++Verified — core avr 1.8.8, Adafruit INA219 1.2.3, 3 Nov 2026Compile-only

Community draft — report a mistake

The INA219 measures the current flowing to a load and the voltage across it, and works out the power. It is the sensor for solar-panel loggers, battery monitors and checking what a motor or LED strip really draws. The module costs about ₹150 and has a 0.1 Ω shunt resistor on board.

On the Uno the module’s logic side is plain I2C: 5V, GND and SDA/SCL. The measuring side goes in series with the + wire of the circuit you are measuring: supply + into VIN+, VIN− out to the load. That circuit’s ground must also connect to the INA219’s GND.

The sketch prints load voltage, supply voltage, current and power every second, using the Adafruit INA219 library’s default 32 V / 2 A calibration.

Wiring

Arduino Uno R3Only the pins used are shown · 5 V logic12 V supply or battery being measuredINA219 DC current/voltage sensor+-5VGNDSDA · 18SCL · 19VCCGNDSCLSDAVIN+VIN- → Load + (lamp, motor, LED strip); load − back to the supply −
Every connection
Arduino Uno R3INA219 DC current/voltage sensorWireNotes
—VIN-—To Load + (lamp, motor, LED strip); load − back to the supply − (not drawn)
5VVCCredPowers the INA219 chip only, not the load.
GNDGNDblack
SCLSCLyellowSame signal as A5
SDASDAblueSame signal as A4
12 V supply or battery being measured · +VIN+redCurrent flows in at VIN+, through the 0.1 Ω shunt, and out of VIN− to the load.
12 V supply or battery being measured · -GNDblackThe measured supply’s negative must share GND with the INA219, or the voltage readings are meaningless.

3.0–5.5 V part, 5 V board. Power VCC from your board's logic voltage (3.3 V or 5 V); the I2C pull-ups go to VCC, so they match your board.

Board quirks

  • The INA219 sits on the high side (in the + wire). It measures current and the load voltage at once; a low-side sensor can’t do both.
  • With the default 0.1 Ω shunt and calibration: up to 26 V on VIN± (the chip’s limit) and about 2–3.2 A. A 12 V motor that stalls above that needs a different shunt.
  • Bus voltage is measured at VIN−, after the shunt. The sketch adds the shunt drop back to show the supply voltage too.
  • Most modules have pull-ups to VCC, so on the Uno 5V is the right supply, and the module wires straight to SDA/SCL.

Code

ina219-uno.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// INA219 current/voltage/power monitor on an Arduino Uno R3, I2C at 0x40.
// VCC → 5V, GND → GND, SCL → SCL (A5), SDA → SDA (A4).
// High side: supply + → VIN+, VIN− → load +, load − → supply −, supply − also to INA219 GND.
// Default calibration: up to 32 V and 2 A with the 0.1 Ω shunt.
#include <Wire.h>
#include <Adafruit_INA219.h>

Adafruit_INA219 ina219;

void setup() {
  Serial.begin(9600);
  if (!ina219.begin()) {
    Serial.println(F("INA219 not found at 0x40 - check SDA/SCL"));
    for (;;) {}
  }
  Serial.println(F("INA219 ready"));
}

void loop() {
  float busV = ina219.getBusVoltage_V();        // voltage at VIN- (load side)
  float shuntmV = ina219.getShuntVoltage_mV();  // drop across the 0.1 ohm shunt
  float mA = ina219.getCurrent_mA();
  float mW = ina219.getPower_mW();
  Serial.print(F("Load "));
  Serial.print(busV, 2);
  Serial.print(F(" V  Supply "));
  Serial.print(busV + shuntmV / 1000.0, 2);
  Serial.print(F(" V  Current "));
  Serial.print(mA, 1);
  Serial.print(F(" mA  Power "));
  Serial.print(mW, 0);
  Serial.println(F(" mW"));
  delay(1000);
}

Library: Adafruit INA219 (Adafruit) — compiled with Adafruit INA219 1.2.3.

Expected serial output

Serial Monitor · 9600Output
INA219 ready
Load 12.08 V  Supply 12.12 V  Current 412.3 mA  Power 4980 mW
Load 12.07 V  Supply 12.11 V  Current 415.0 mA  Power 5010 mW

Common errors

Current reads 0 but the load works

The load isn’t going through the shunt — check the + wire goes into VIN+ and out of VIN−.

Bus voltage reads 0 or random

No common ground between the measured supply and the INA219.

Negative current

VIN+ and VIN− are swapped. Swap the two screw-terminal wires.

↑↓ to move · Enter to open