INA3221 3-Channel DC Current Sensor

The ina3221 sensor platform allows you to use your INA3221 3-Channel DC Current Sensor (datasheet, switchdoc) sensors with esphomelib. The I²C Bus is required to be set up in your configuration for this sensor to work.

../../../_images/ina3221-full.jpg

INA3221 3-Channel DC Current Sensor

../../../_images/ina3221-ui.png
# Example configuration entry
sensor:
  - platform: ina3221
    address: 0x40
    channel_1:
      shunt_resistance: 0.1 ohm
      current:
        name: "INA3221 Channel 1 Current"
      power:
        name: "INA3221 Channel 1 Power"
      bus_voltage:
        name: "INA3221 Channel 1 Bus Voltage"
      shunt_voltage:
        name: "INA3221 Channel 1 Shunt Voltage"
    channel_2:
      # ...
    channel_3:
      # ...
    update_interval: 15s

Configuration variables:

  • address (Optional, int): Manually specify the i^2c address of the sensor. Defaults to 0x40.
  • channel_1 (Optional): The configuration options for the 1st channel.
    • shunt_resistance (Optional, float): The value of the shunt resistor on this channel for current calculation. Defaults to 0.1 ohm.
    • current (Optional): Use the current value on this channel in amperes. All options from Sensor and MQTT Component.
    • power (Optional): Use the power value on this channel in watts. All options from Sensor and MQTT Component.
    • bus_voltage (Optional): Use the bus voltage (voltage of the high side contact) value on this channel in V. All options from Sensor and MQTT Component.
    • shunt_voltage (Optional): Use the shunt voltage (voltage across the shunt resistor) value on this channel in V. All options from Sensor and MQTT Component.
  • channel_2 (Optional): The configuration options for the 2nd channel. Same options as 1st channel.
  • channel_3 (Optional): The configuration options for the 3rd channel. Same options as 1st channel.
  • update_interval (Optional, Time): The interval to check the sensor. Defaults to 15s. See update_interval gotchas.
../../../_images/ina3221-pins.jpg

Pins on the INA3221. For communication only VS, GND, SCL and SDA need to be connected. Note that all 3 channels share the same GND reference.