Skip to content

INA226

TI INA226 bidirectional current / power monitor (36 V, 16-bit).

Live catalog

Prefer labwired_describe with the catalog id over guessing pins or addresses.

Status at a glance

Aspect Status
Catalog id ina226
Bus I²C
Address 0x40 default; 0x40–0x4F by A0/A1
Source configs/devices/ina226.yaml (declarative, no Rust model)
Datasheet TI SBOS547, §7.5 programming, §7.6 register maps (Table 2), equations 3–4
Tier smoke-proven (register-level tests: crates/core/tests/everyday_sensor_set.rs)

Pins / attachment

Pin / net Role
SDA I²C SDA
SCL I²C SCL
VDD/GND Power (digital twin)

Support matrix

Behavior Status Notes
Manufacturer ID 0xFE = 0x5449, Die ID 0xFF = 0x2260 ✅
Configuration POR 0x4127 + write mask + RST ✅ D14:D12 fixed 100; RST restores all registers
Shunt (2.5 µV/LSB) / bus (1.25 mV/LSB) ✅ 0.1 Ω shunt
Current / power follow CALIBRATION ✅ Equations 3 and 4; read 0 until CAL is written
CVRF ⚠️ 2.2 ms after a Configuration write; cleared by reading Mask/Enable
Averaging, conversion times, alert / ALERT pin, power-down ❌
Analog / power ❌ Bench

Stimulus

Host inputs: bus_voltage (V), current (A through 0.1 Ω).

How to run

  1. Place the part and an MCU in Playground, or add it to a system YAML:
    external_devices:
      - id: "ina226"
        type: "ina226"
        connection: "i2c0"   # the bus id your chip system uses
    
  2. Agent: labwired_list → labwired_describe id=ina226 → wire → labwired_validate → labwired_run / labwired_verify.
  3. Register-level smoke: cargo test -p labwired-core --test everyday_sensor_set — IDs 0x5449 / 0x2260, config 0x4127, shunt 10000 and bus 4000 counts at 0.25 A / 5 V. The same file's negative control proves the check fails against a part that answers only 0x00 or only 0xFF.

Limitations

  • The configuration reset is 0x4127 per the datasheet, not 0xFFFF.
  • Power uses |current| (the register is unsigned).

See the YAML header for the full datasheet trace and every named approximation.