Source: https://mokxi.com/parts/ina226
Updated: 2026-11-19

Part

# Power monitor, INA226

Current, bus voltage and power through a real 0.1 ohm shunt, 2.5 uV a count, over I2C.

See every part

- 8 pins
- 1 setting
- In 1 project

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Power monitor, INA226 in brief

What it is, and every setting the properties panel gives it.

The INA226 is TI’s current and power monitor, the more precise sibling of the INA219. It measures the voltage across a shunt resistor to 2.5 microvolts, the bus voltage on a pin of its own and the power, and reports them over I2C. On the common CJMCU-226 board the shunt is a real 0.1 ohm resistor between IN+ and IN-, in series with the load, and VBUS is tied to the load’s supply side. Mokxi models the sixteen-bit registers: the configuration, the shunt at 2.5 microvolts a count, the bus at 1.25 millivolts, power, current, the calibration, the mask and enable with its conversion-ready flag, and the alert limit, plus the two ID registers. Current and power read zero until the calibration is written, which every library does in its setup call. A conversion takes 2.2 ms by default, times the averaging count. Rob Tillaart’s INA226.h and INA226_WE.h both read it. The noise that averaging removes and the SMBus alert response are not modeled.

Family

Sensors

Pins

8

address

64

Pins

## 8 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VCC

Supply, 2.7 to 5.5 V.

GND

Ground.

SCL

I2C. The board carries the pull-ups.

SDA

I2C. The board carries the pull-ups.

ALERT

Pulls low on the alert chosen in mask/enable.

VBUS

The bus voltage input: tie it to the load's supply side.

IN+

The two ends of the 0.1 ohm shunt, in series with the load.

IN-

The two ends of the 0.1 ohm shunt, in series with the load.

How to use it

## How to read an INA226 current and power monitor

The built-in project watches a 12 V lamp on one INA226 and a 5 V load on an INA3221, both on one I2C bus. For the INA226, VCC takes 5 V and GND, SDA and SCL go to the Uno’s bus, and the load is wired through the shunt: the 12 V supply to IN+, then IN- to the lamp and the lamp to ground. VBUS goes to the supply side of the load, which is how the chip reads the rail’s own voltage. The address is 0x40.

The sketch uses Rob Tillaart’s library: INA226 rail12(0x40), then begin() and setMaxCurrentShunt(0.8, 0.1), 0.8 A of expected maximum and the 0.1 ohm shunt. That call writes the calibration register, which is why it matters: until it is written, current and power read zero. After that getBusVoltage(), getCurrent_mA() and getPower_mW() print the rail every half second, and swapping the lamp for another model changes the current.

Two mistakes cause most of the zeros. Leaving VBUS unconnected makes the bus voltage and the power read zero, and reading current before the calibration is written does the same to current and power. The registers are sixteen bits: the shunt is 2.5 microvolts a count, the bus 1.25 millivolts, and a conversion takes 2.2 ms by default times the averaging count. The address runs from 0x40 to 0x4F.

Part pin

Board pin

VCC, GND

5 V and ground (2.7 V to 5.5 V)

SDA, SCL

The Uno’s I2C bus; the board carries the pull-ups

IN+

The 12 V supply

IN-

The load, here a 12 V 0.1 A lamp

VBUS

The load’s supply side

ALERT

Not used

The chip runs from 2.7 V to 5.5 V, so it works on a 3.3 V ESP32 or Pico, on that board’s I2C pins, at the same address.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Reading voltage, current and power every half second

Common errors

## Common Power monitor, INA226 errors and fixes

What goes wrong

The fix

Current and power read zero.

The calibration register has not been written. Call the library’s setup, such as setMaxCurrentShunt(0.8, 0.1), after begin().

The bus voltage and power read zero.

VBUS is not connected. Tie it to the supply side of the load.

The chip is not found on the bus.

Check the address, 0x40 to 0x4F set by the strap pins and the part’s address property, and that SDA and SCL are not swapped.

A reading changes slowly or lags a step.

A conversion takes 2.2 ms by default times the averaging count. Wait for the conversion-ready flag, or lower the averaging.

Questions

## Questions and answers

### What is the difference between the INA226 and the INA219?

The INA226 is the more precise one: 2.5 microvolts a count on the shunt, a bus voltage pin of its own and an alert pin. Both talk over I2C.

### Why does the INA226 read zero current?

Because the calibration register is still zero. Every library writes it in its setup call, such as setMaxCurrentShunt(), which takes the expected maximum current and the shunt’s resistance.

### Which libraries read the INA226?

Rob Tillaart’s INA226.h, which the project uses, and Wolfgang Ewald’s INA226_WE.h, which Mokxi also compiles.

### What shunt does the module have?

A 0.1 ohm resistor between IN+ and IN-, in series with the load. The model uses a real 0.1 ohm resistance, so the voltage it drops is part of the circuit.

How it is modeled

## What is true about the Power monitor, INA226, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

The noise that averaging removes, and the SMBus alert response.

From INA226 current and power monitor, in full.

Projects

## See the Power monitor, INA226 in a project

One built-in project uses it. It opens in the editor, already wired.

Boards

## The boards it is shown on

This board has a built-in project with the Power monitor, INA226 in it.

- Arduino Uno R3

Keep going

## Keep going

- Ohm's Law, in a Circuit You Can Run
- Arduino PZEM-004T and ZMPT101B AC Energy Meter
- Current monitor, INA219
- Current sensor, ACS712
- Voltage sensor, 0 to 25 V

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Power monitor, INA226

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
