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, addr=64)[source]

Driver for the INA219 current sensor

bus_voltage

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

calibration

Calibration register (cached value)

current

The current through the shunt resistor in milliamps.

power

The power through the load in Watt.

set_calibration_16V_400mA()[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()[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()[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()[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

shunt_voltage

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

class adafruit_ina219.Mode[source]

Constants for mode