Current, Power & ADC

# Texas Instruments INA219 digital twin

26 V bidirectional high-side current, shunt and bus voltage monitor.

standing: provisional I2C (I2C1 on nucleo-f767zi) 0x40–0x4F (default 0x40)

Vendor Texas Instruments Current, Power & ADC

Interface I2C 0x40–0x4F (default 0x40)

Record Status 2026-11-21 rev 287d49a4a (clean tree)

## Driver oracle & capability record

Driver oracle PASS: 7/7 stages passed on nucleo-f767zi; generator 0.1.0+policy.12.

| Driver reference         | [libdriver/ina219 driver (commit 266a1ee32)](https://github.com/libdriver/ina219) (MIT)                                                         |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Evidence standing        | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Datasheet accuracy basis | bus 1 LSB = 4 mV; shunt offset +/-200 uV (PGA /8) + 0.5 % current error + 10 uV LSB; current 0.5 % + 200 uV / 0.1 ohm (SBOS448G)                |
| Negative control         | stimulus outside the datasheet tolerance -> oracle FAIL                                                                                         |
| Published record         | [accuracy/driver-oracles-2026-11-21.json](https://circuittwin.ai/evidence/accuracy/driver-oracles-2026-11-21.json) (SHA-256 dd20a19b84c9)       |

## Measured driver round-trip results

| Quantity    | Measured | Expected | Error  | Datasheet Tolerance |
| ----------- | -------- | -------- | ------ | ------------------- |
| BUS\_mV     | 5000 mV  | 5000 mV  | 0 mV   | ±4 mV               |
| SHUNT\_uV   | 20000 uV | 20000 uV | 0 uV   | ±310 uV             |
| CURRENT\_mA | 199 mA   | 200 mA   | \-1 mA | ±3 mA               |

## Key registers & reset values

| Address / Field | Register        | Reset / Expected | Purpose                                        |
| --------------- | --------------- | ---------------- | ---------------------------------------------- |
| 0x00            | CONFIG          | 0x399F           | Bus range, PGA gain, ADC resolution and mode   |
| 0x01            | SHUNT\_V        | 10 uV/LSB        | Signed shunt voltage reading                   |
| 0x02            | BUS\_V          | 4 mV/LSB         | Bus voltage plus CNVR and OVF flags            |
| 0x04 / 0x05     | CURRENT / CALIB | 0x0000           | Scaled current register and calibration factor |

## Attach with ct CLI

Shell - run firmware with INA219

```
# Run compiled firmware with INA219 attached on nucleo-f767zi
ct run --json --board nucleo-f767zi --device ina219 build/app.elf

# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/ina219.xml tests/ina219-fault.suite.yaml
```

## Fault-injection test snippet (suite.yaml)

tests/ina219-fault.suite.yaml

```
version: 1
board: nucleo-f767zi
firmware: build/app.elf
tests:
  - name: ina219-i2c-nack-and-bad-id
    faults:
      - at_ms: 30
        bus: I2C1
        kind: nack
        address: 0x40
        count: 2
      - at_ms: 150
        part: ina219
        kind: register_override
        register: 0x00
        value: 0xFF
    expect:
      console_contains: "DRIVER_FAULT_DETECTED"
      exit_code: 0
```

## Compatible board twins

[Board: nucleo-f767zi](https://circuittwin.ai/boards/nucleo-f767zi) [Board: nucleo-f446re](https://circuittwin.ai/boards/nucleo-f446re) [Board: blue-pill-f103c8](https://circuittwin.ai/boards/blue-pill-f103c8) [Board: esp32-devkitc](https://circuittwin.ai/boards/esp32-devkitc) [Accuracy report](https://circuittwin.ai/docs/accuracy)

## More in Current, Power & ADC

[ADS1015 (Texas)](https://circuittwin.ai/twins/ads1015) [ADS1115 (Texas)](https://circuittwin.ai/twins/ads1115) [ADS1220 (Texas)](https://circuittwin.ai/twins/ads1220) [ADS1256 (Texas)](https://circuittwin.ai/twins/ads1256) [BQ27441-G1 (Texas)](https://circuittwin.ai/twins/bq27441-g1) [HX711 (Avia)](https://circuittwin.ai/twins/hx711)

> ## Inject INA219 bus faults in CI
>
> Wire INA219 onto your MCU board twin, drive physical stimuli and fail builds when your driver hangs on NACKs or frozen registers.
>
> [Start now](https://app.circuittwin.ai/try) [Inputs & fault injection docs](https://circuittwin.ai/docs/inputs) [Connect a coding agent](https://circuittwin.ai/docs/agents)
