adafruit_ina219

CircuitPython driver for the INA219 current sensor.

  • Author(s): Dean Miller

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_ina219.ADCResolution[source]

Constants for bus_adc_resolution or shunt_adc_resolution

class adafruit_ina219.BusVoltageRange[source]

Constants for bus_voltage_range

class adafruit_ina219.Gain[source]

Constants for gain

class adafruit_ina219.INA219(i2c_bus: I2C, addr: int = 64)[source]

Driver for the INA219 current sensor

property bus_voltage: float

The bus voltage (between V- and GND) in Volts

property calibration: int

Calibration register (cached value)

property current: float

The current through the shunt resistor in milliamps.

property power: float

The power through the load in Watt.

set_calibration_16V_400mA() None[source]

Configures to INA219 to be able to measure up to 16V and 400mA of current. Counter overflow occurs at 1.6A.

Note

These calculations assume a 0.1 ohm shunt resistor is present

set_calibration_16V_5A() None[source]

Configures to INA219 to be able to measure up to 16V and 5000mA of current. Counter overflow occurs at 8.0A.

Note

These calculations assume a 0.02 ohm shunt resistor is present

set_calibration_32V_1A() None[source]

Configures to INA219 to be able to measure up to 32V and 1A of current. Counter overflow occurs at 1.3A.

Note

These calculations assume a 0.1 ohm shunt resistor is present

set_calibration_32V_2A() None[source]

Configures to INA219 to be able to measure up to 32V and 2A of current. Counter overflow occurs at 3.2A.

Note

These calculations assume a 0.1 shunt ohm resistor is present

property shunt_voltage: float

The shunt voltage (between V+ and V-) in Volts (so +-.327V)

class adafruit_ina219.Mode[source]

Constants for mode