2018-08-22 22:05:28 +02:00
|
|
|
INA219 DC Current Sensor
|
|
|
|
========================
|
|
|
|
|
|
|
|
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
|
|
|
|
esphomelib. 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:: 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
|
|
|
|
update_interval: 15s
|
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------------
|
2018-08-22 22:05:28 +02:00
|
|
|
|
|
|
|
- **address** (*Optional*, int): Manually specify the i^2c 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``.
|
|
|
|
- **max_voltage** (*Optional*, float): The maximum bus voltage you are expecting. esphomelib will use this to
|
|
|
|
configure the sensor optimally. Defaults to ``32V`` (the max).
|
|
|
|
- **max_current** (*Optional*, float): The maximum current you are expecting. esphomelib 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
|
|
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
|
|
- **power** (*Optional*): Use the power value of the sensor in watts. All options from
|
|
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
|
|
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value of the sensor in V.
|
|
|
|
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
|
|
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value of the sensor in V.
|
|
|
|
All options from :ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``15s``.
|
|
|
|
See :ref:`sensor-default_filter`.
|
|
|
|
|
|
|
|
See Also
|
2018-08-24 22:44:01 +02:00
|
|
|
--------
|
2018-08-22 22:05:28 +02:00
|
|
|
|
|
|
|
- :ref:`sensor-filters`
|
|
|
|
- :doc:`ina3221`
|
|
|
|
- :doc:`API Reference </api/sensor/ina219>`
|
2018-08-24 22:44:01 +02:00
|
|
|
- `INA291 Arduino Library <https://github.com/adafruit/Adafruit_INA219>`__ by `Adafruit <https://www.adafruit.com/>`__
|
2018-08-22 22:05:28 +02:00
|
|
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/current/esphomeyaml/components/sensor/ina219.rst>`__
|
2018-10-12 16:33:22 +02:00
|
|
|
|
|
|
|
.. disqus::
|