CircuitPython driver for the TI INA260 current and power sensor

  • Author(s): Bryan Siepert

Implementation Notes


Software and Dependencies:

class adafruit_ina260.AveragingCount

Options for averaging_count

AveragingCount Number of measurements to average
AveragingCount.COUNT_1 1 (Default)
AveragingCount.COUNT_4 4
AveragingCount.COUNT_16 16
AveragingCount.COUNT_64 64
AveragingCount.COUNT_128 128
AveragingCount.COUNT_256 256
AveragingCount.COUNT_512 512
AveragingCount.COUNT_1024 1024
class adafruit_ina260.ConversionTime

Options for current_conversion_time or voltage_conversion_time

ConversionTime Time
ConversionTime.TIME_140_us 140 us
ConversionTime.TIME_204_us 204 us
ConversionTime.TIME_332_us 332 us
ConversionTime.TIME_558_us 588 us
ConversionTime.TIME_1_1_ms 1.1 ms (Default)
ConversionTime.TIME_2_116_ms 2.116 ms
ConversionTime.TIME_4_156_ms 4.156 ms
ConversionTime.TIME_8_244_ms 8.244 ms
class adafruit_ina260.INA260(i2c_bus, address=64)

Driver for the INA260 power and current sensor.

  • i2c_bus (I2C) – The I2C bus the INA260 is connected to.
  • address – The I2C device address for the sensor. Default is 0x40.

The window size of the rolling average used in continuous mode


The current (between V+ and V-) in mA


The conversion time taken for the current measurement


The mode that the INA260 is operating in. Must be one of Mode.CONTINUOUS, Mode.TRIGGERED, or Mode.SHUTDOWN


The power being delivered to the load in mW


The bus voltage in V


The conversion time taken for the bus voltage measurement

class adafruit_ina260.Mode

Modes avaible to be set

Mode Description
Mode.CONTINUOUS Default: The sensor will continuously measure the bus voltage and shunt voltage across the shunt resistor to calculate power and current
Mode.TRIGGERED The sensor will immediately begin measuring and calculating current, bus voltage, and power. Re-set this mode to initiate another measurement
Mode.SHUTDOWN Shutdown the sensor, reducing the quiescent current and turning off current into the device inputs. Set another mode to re-enable