The INA226 is a high-side current shunt and power monitor with an I2C interface. These sensors offer high accuracy for current and voltage measurements in various applications. With its integrated ADC, the INA226 can measure bus voltages from 0V to 36V and shunt voltages with a common-mode voltage range. It provides programmable conversion times and averaging, making it versatile for different precision requirements.

The INA219 is a simpler device suitable for basic current sensing applications, while the INA226 offers higher precision and additional features such as integrated voltage reference and programmable alert functions. The INA226 is ideal for more demanding applications that require precise current measurement and advanced monitoring capabilities.

INA3221 offers a 3-channel monitoring module.

INA sensors are I2C-compatible and commonly used in power management systems, battery chargers, and various industrial applications where accurate current and voltage measurements are essential for monitoring and control purposes.

INA sensor configuration example
INA sensor configuration example

INA219 resolution – this option allows you to select a measurement voltage and current range (wider range – less accuracy).

INA226 resolution – this option depends on a used shunt resistor with your sensor or sensor board (less current – higher accuracy). Please note that the firmware does not support other nominal values for shunt resistors.


Comments
Harvey Specter
Posted at 19:30 April 3, 2024
Hablahab
Reply
Author

I’m trying to get an INA219 sensor to work, it seems to be reporting values:

{
“battery”: 100,
“current_l4”: 0.015,
“device_l4”: “40”,
“humidity_l2”: 49.06,
“l4”: 0.041,
“l6”: 0,
“l7”: 0,
“l8”: 3.45,
“last_seen”: “2024-04-03T21:25:26+02:00”,
“linkquality”: 255,
“power_l4”: 0,
“pressure_l2”: 996,
“temperature_l2”: 21.91,
“voltage”: 3600,
“voltage_l4”: 2.7,
“voltage_l8”: 3.5,
“state_l5”: null
}

however I cannot get the values for voltage, current and power into mqtt. I’m using zigbee2mqtt and mosqitto and I have tried a lot of thing heres one of my sensors:

– state_topic: “zigbee2mqtt/wetterstation”
unit_of_measurement: “V”
value_template: “{{ value_json.voltage_l4 }}”
# availability:
# – topic: “zigbee2mqtt/wetterstation/availability”
# value_template: “{{ value_json.state }}”
# payload_available: “online”
# payload_not_available: “offline”
# json_attributes_topic: “zigbee2mqtt/wetterstation/attributes”
icon: mdi:battery
name: “Wetterstation Battery Voltage”
unique_id: wetterstation_ina219_voltage

I have also tried with the commented lines but same result. Always unavailable or unknown

    Harvey Specter
    Posted at 04:51 April 4, 2024
    Owner
    Reply
    Author

    Sorry, but this problem is not related to the PTVO firmware. My work ends when you received values in Z2M.

Leave a Reply to Hablahab
Cancel Reply