logo elektroda
logo elektroda
X
logo elektroda

INA219 ESP8266 measuring voltage, current, current through the module

sznickers 501 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21392080
    sznickers
    Level 11  
    Greetings esteemed members of the public. Please help. I am displaying too low current, voltage, power values. Is it a broken module or something needs to be set?
    Screenshot of the ESP Easy Mega interface showing low voltage, current, and power values. .
    Connection diagram of D1 mini Wemos with INA219 current sensor. .
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 21392123
    sznickers
    Level 11  
    Thanks, I didn't connect the ground :) . But that's not all, this module has a limitation of 26V and 3A. Is it possible to measure higher voltages, higher currents with it through a voltage divider ?
    Connection diagram of ESP-01 with INA219 current sensor. .
  • #4 21392173
    viayner
    Level 43  
    Hello,
    and who knew about your ground problem, you didn't include it earlier.
    1 Read the datasheet, it will answer your questions.
    2. the INA219 can operate in differential mode, so connecting or not connecting the ground should not make a difference to the current measurement.
    3. just like any other meter, by adding a voltage divider, you can increase the voltage measurement range, and by changing the shunt resistor, you affect the current measurement.
    But you need to check:
    - that you do not exceed the dependent operating conditions of the circuit after the change
    - adding a shunt resistor and a voltage divider at the same time will affect the measurements and the way you measure, this is something you have to take into account.
    Regards
  • ADVERTISEMENT
  • #5 21392242
    gklub
    Level 30  
    P=I^2*R
    For 3A you already have 1W.
    "Solder" a second 100mΩ resistor or replace it with a matching one, or look for a module for higher current.
    With voltage there is no problem - almost always a divider allows you to increase the range.
  • #6 21392584
    tajwoj
    Level 26  
    You will need to use a separate circuit to measure voltage using the divider.
    The voltage on the INA219 is measured on one of the differential inputs for current measurement and using a voltage divider will prevent current measurement.
    See INA226 , is up to 36V.
  • ADVERTISEMENT
  • #7 21397183
    sznickers
    Level 11  
    Thank you all very much for your willingness and for your help. I burnt myself a 219 ina and have to order a new :) . On the other hand, I figured out something else and it works nicely. I'll record something on YT and post a link here, generally I need a bit of help to create a sensor in domoticz called amount of Wh, I have a power sensor, now it needs to be "multiplied" by time. I don't know-need to set up a time sensor to measure how long the power sensor is running ? Or as if it is possible - to already create such a "ruler" in ESP Easy, which will display the amount of wh energy.
  • #8 21403960
    sznickers
    Level 11  
    ACS712 measurement module with green screw terminal and pins. .
    I have done it differently. I used the ACS712 current measurement module - 5A and I measure the voltage via a voltage divider. I do not expect under load voltages>100V DC.
    I connected this to an ESP32 S2 board - it supposedly has 3.3V but this module pulled it. I've done as analogue inputs, we'll see how the measurement goes.
    A table fragment showing configuration of analog inputs for voltage and current measurement. .

Topic summary

The discussion addresses low voltage, current, and power readings from an INA219 sensor module connected to an ESP8266. Initial issues included a missing ground connection, which was critical for accurate measurements. The INA219 supports programmable gain amplifier (PGA) settings to adjust measurement ranges, with a maximum voltage of 26V and current of 3A. To measure higher voltages, a voltage divider can be used, but this affects current measurement since INA219 measures voltage differentially across a shunt resistor. Increasing current measurement range requires changing or paralleling the shunt resistor to handle higher power dissipation. For higher voltage and current ranges, alternatives like the INA226 (up to 36V) or ACS712 current sensor module (5A range) combined with a voltage divider were suggested. The user also explored integrating power measurement over time (Wh) in Domoticz or ESP Easy, seeking methods to multiply power readings by time to calculate energy consumption. The discussion highlights the importance of proper wiring, understanding sensor limitations, and adapting hardware or software for extended measurement capabilities.
Summary generated by the language model.
ADVERTISEMENT