esphome-docs/components/sensor/ina219.rst

76 lines
2.7 KiB
ReStructuredText
Raw Normal View History

INA219 DC Current Sensor
========================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up INA219 DC current sensors
:image: ina219.jpg
:keywords: ina219
The ``ina219`` sensor platform allows you to use your INA219 High Side DC Current Sensor
(`datasheet <https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ina219-current-sensor-breakout.pdf>`__,
`Adafruit`_) sensors with
2019-02-16 23:25:23 +01:00
ESPHome. The :ref:`I²C Bus <i2c>` is
required to be set up in your configuration for this sensor to work.
.. figure:: images/ina219-full.jpg
:align: center
:width: 50.0%
INA219 DC Current Sensor.
.. _Adafruit: https://www.adafruit.com/product/904
.. figure:: images/ina219-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: ina219
address: 0x40
shunt_resistance: 0.1 ohm
current:
name: "INA219 Current"
power:
name: "INA219 Power"
bus_voltage:
name: "INA219 Bus Voltage"
shunt_voltage:
name: "INA219 Shunt Voltage"
max_voltage: 32.0V
max_current: 3.2A
2019-01-06 18:56:14 +01:00
update_interval: 60s
Configuration variables:
2018-08-24 22:44:01 +02:00
------------------------
- **address** (*Optional*, int): Manually specify the I²C address of the sensor. Defaults to ``0x40``.
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on the board for current calculation.
Defaults to ``0.1 ohm``.
2019-02-16 23:25:23 +01:00
- **max_voltage** (*Optional*, float): The maximum bus voltage you are expecting. ESPHome will use this to
configure the sensor optimally. Defaults to ``32V`` (the max).
2019-02-16 23:25:23 +01:00
- **max_current** (*Optional*, float): The maximum current you are expecting. ESPHome will use this to
configure the sensor optimally. Defaults to ``3.2A``.
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
2019-02-17 12:28:17 +01:00
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): Use the power value of the sensor in watts. All options from
2019-02-17 12:28:17 +01:00
:ref:`Sensor <config-sensor>`.
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value of the sensor in V.
2019-02-17 12:28:17 +01:00
All options from :ref:`Sensor <config-sensor>`.
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value of the sensor in V.
2019-02-17 12:28:17 +01:00
All options from :ref:`Sensor <config-sensor>`.
2019-01-06 18:56:14 +01:00
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
See Also
2018-08-24 22:44:01 +02:00
--------
- :ref:`sensor-filters`
- :doc:`ina3221`
2019-05-12 22:44:59 +02:00
- :apiref:`ina219/ina219.h`
- `INA219 Arduino Library <https://github.com/adafruit/Adafruit_INA219>`__ by `Adafruit <https://www.adafruit.com/>`__
- :ghedit:`Edit`