Documentation

INA219 I2C Bi-Directional Current & Power Monitoring Sensor Module with Soldering and Foam | ShillehTek Product Manual
Documentation / INA219 I2C Bi-Directional Current & Power Monitoring Sensor Module with Soldering and Foam | ShillehTek Product Manual

INA219 I2C Bi-Directional Current & Power Monitoring Sensor Module with Soldering and Foam | ShillehTek Product Manual

manualshillehtek

Overview

The INA219 is a high-side bidirectional current and power monitor that talks I2C. It sits in series with your load (between the supply and whatever you're powering), measures both the voltage drop across an onboard 0.1 Ω shunt and the bus voltage, and reports current, voltage, and power as 16-bit values over I2C. Perfect for battery monitoring, solar logging, motor characterization, and any project where you need to know "how much is this drawing right now?"

Bidirectional means it reads both positive and negative current — handy for charging vs. discharging logic on Li-ion or LiFePO4 systems. The two solder-jumper pads (A0/A1) let you set up to 4 unique I2C addresses, so you can stack multiple INA219s on one bus to monitor several rails at once.

At a Glance

Operating Voltage
3.0 - 5.5V (logic)
Bus Voltage Range
0 - 26V
Max Current
±3.2A
Resolution
12-bit
Interface
I2C
Default Address
0x40

Specifications

Parameter Value
IC Texas Instruments INA219
Logic Voltage 3.0V - 5.5V
Bus Voltage 0V - 26V
Maximum Current ±3.2A (with 0.1 Ω shunt)
Shunt Resistor 0.10 Ω (R100), 1% precision
Current Resolution 0.1 mA (typical, configurable)
Bus Voltage Resolution 4 mV
Power Calculation Internal (V × I)
ADC 12-bit, 4 PGA gains (0.32V / 0.16V / 0.08V / 0.04V FS)
Communication I2C, up to 2.94 MHz
I2C Addresses 0x40 (default), up to 4 via A0/A1 pads (0x40, 0x41, 0x44, 0x45)
Pins Vcc, Gnd, Scl, Sda, Vin+, Vin- (also screw terminals for Vin+/-)

Pinout Diagram

INA219 pinout showing Vin- and Vin+ screw terminals at top, 0.10 Ohm R100 shunt, I2C address pads A0/A1, and Vcc/Gnd/Scl/Sda/Vin+/Vin- breakout pins

Wiring Guide

Inserting the INA219 in Your Load Circuit

Wire it like an in-line ammeter: break the high-side wire, route it through Vin+ and Vin-. The shunt drops a tiny voltage proportional to current, which the chip measures.

Terminal Connect To
Vin+ Power supply positive (e.g., battery +)
Vin- Load positive (the device you're measuring)
Load GND Battery / supply GND (NOT through the module)
Module GND Shared with logic GND (Arduino/Pi GND)
Warning: Bus voltage is limited to 26V. Don't insert this into circuits above 26V — the chip will be destroyed. For higher-voltage rails use an INA226 or INA260 instead.
Tip: The screw terminals (Vin+/Vin-) handle 5A peak. For currents above 1A use the screw terminals, not the small breakout pins.

Arduino I2C Wiring

INA219 Pin Arduino Pin
Vcc 5V
Gnd GND
Scl A5
Sda A4

Raspberry Pi I2C Wiring

INA219 Pin Raspberry Pi Pin
Vcc Pin 1 (3.3V)
Gnd Pin 6 (GND)
Scl Pin 5 (GPIO 3)
Sda Pin 3 (GPIO 2)

Raspberry Pi Pico I2C Wiring

INA219 Pin Pico Pin
Vcc 3V3 (OUT)
Gnd GND
Scl GP5 (I2C0 SCL)
Sda GP4 (I2C0 SDA)

Code Examples

Arduino — Adafruit INA219 Library

ina219_arduino.ino
// INA219 - Arduino Example
// Library: Adafruit INA219

#include <Wire.h>
#include <Adafruit_INA219.h>

Adafruit_INA219 ina219;

void setup() {
  Serial.begin(9600);
  if (!ina219.begin()) {
    Serial.println("INA219 not found at 0x40");
    while (1);
  }
  // ina219.setCalibration_16V_400mA();   // for low-current logging
  // ina219.setCalibration_32V_1A();      // for typical projects
  ina219.setCalibration_32V_2A();         // default
}

void loop() {
  float busV   = ina219.getBusVoltage_V();
  float shuntV = ina219.getShuntVoltage_mV();
  float current_mA = ina219.getCurrent_mA();
  float power_mW   = ina219.getPower_mW();
  float loadV  = busV + (shuntV / 1000.0);

  Serial.print("Bus: ");   Serial.print(busV); Serial.println(" V");
  Serial.print("Load: ");  Serial.print(loadV); Serial.println(" V");
  Serial.print("Current: ");Serial.print(current_mA); Serial.println(" mA");
  Serial.print("Power: ");  Serial.print(power_mW); Serial.println(" mW");
  Serial.println();
  delay(1000);
}

Raspberry Pi (Python)

ina219_rpi.py
#!/usr/bin/env python3
# Install: pip install adafruit-circuitpython-ina219
# Enable I2C: sudo raspi-config -> Interface Options -> I2C

import time
import board, busio
from adafruit_ina219 import INA219

i2c = busio.I2C(board.SCL, board.SDA)
ina = INA219(i2c)

while True:
    bus = ina.bus_voltage           # V
    shunt = ina.shunt_voltage       # V
    current = ina.current           # mA
    power = ina.power               # W
    print(f"Bus: {bus:.2f}V  Shunt: {shunt*1000:.2f}mV  "
          f"I: {current:.2f}mA  P: {power*1000:.2f}mW")
    time.sleep(1)

Raspberry Pi Pico (MicroPython)

ina219_pico.py
# INA219 on Pico - MicroPython
# Install: copy ina219.py from robert-hh/INA219 (or pip install via mip)

from machine import I2C, Pin
from ina219 import INA219
import time

i2c = I2C(0, sda=Pin(4), scl=Pin(5), freq=400000)
ina = INA219(0.1, i2c)
ina.configure(voltage_range=ina.RANGE_16V, gain=ina.GAIN_AUTO)

while True:
    print('Bus: {:.2f}V  Current: {:.2f}mA  Power: {:.2f}mW'.format(
        ina.voltage(), ina.current(), ina.power()))
    time.sleep(1)

Frequently Asked Questions

Why am I always reading 0 mA?
Almost always wiring. Vin+ goes to the supply, Vin- goes to the load (in series). If you bypass the chip's shunt by wiring both ends to the same point, you'll read 0. Verify with a multimeter that current actually flows through Vin+ → Vin-.
Can it measure higher than 3.2A?
Yes — but you need to swap the 0.1 Ω shunt for a smaller one (e.g., 0.01 Ω for ~32A) and update the calibration register accordingly. The chip itself can monitor up to 3.2A as shipped; for higher current use an INA226 or external shunt with custom calibration.
What's the difference between bus voltage and load voltage?
Bus voltage is what the INA219 measures at Vin- (the load side). Load voltage = bus voltage + shunt voltage drop. For most low-current applications they're nearly identical (the shunt drop is millivolts), but for high current the difference matters.
Can I monitor multiple rails on one bus?
Yes. Bridge the A0 and/or A1 solder pads on each module to give it a unique address (0x40, 0x41, 0x44, 0x45). Up to 4 INA219s on one I2C bus.
Does it work with negative voltage?
No — the bus voltage range is 0 to 26V single-ended (referenced to GND). It DOES read bidirectional CURRENT (positive or negative through the shunt), so it can detect charging vs. discharging on a battery.
Do I need a level shifter on I2C?
No. The INA219 has internal level translation and works fine with both 3.3V (Pi, ESP32, Pico) and 5V (Arduino UNO) I2C buses without external shifters.