3 unstable releases

0.2.0 Jan 30, 2024
0.1.1 Jan 30, 2024
0.1.0 Mar 27, 2022

#457 in Hardware support

Download history 26/week @ 2023-12-18 8/week @ 2024-01-15 8/week @ 2024-01-29 19/week @ 2024-02-19 38/week @ 2024-02-26 6/week @ 2024-03-04 4/week @ 2024-03-11 57/week @ 2024-04-01

63 downloads per month

MIT/Apache

23KB
373 lines

ina226

Rust embedded-hal driver for the Texas Instruments INA226.

License

Rand is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.


lib.rs:

This is a platform agnostic Rust driver for the INA226, an I2C output current/voltage/power monitor with alerts, using the embedded-hal traits.

This driver allows you to:

The device

The INA226 is a current shunt and power monitor with an I2C™- or SMBUS-compatible interface. The device monitors both a shunt voltage drop and bus supply voltage. Programmable calibration value, conversion times, and averaging, combined with an internal multiplier, enable direct readouts of current in amperes and power in watts.

The INA226 senses current on common-mode bus voltages that can vary from 0 V to 36 V, independent of the supply voltage. The device operates from a single 2.7-V to 5.5-V supply, drawing a typical of 330 µA of supply current. The device is specified over the operating temperature range between –40°C and 125°C and features up to 16 programmable addresses on the I2C-compatible interface.

Datasheet:

Dependencies

~295KB