logo elektroda
logo elektroda
X
logo elektroda

How to properly configure ACS712 with ESP8266 and ESPEASY for Domoticz?

fantic_lemon 3294 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17821057
    fantic_lemon
    Level 2  
    Hi, I have a Domoticz at home where I read the temperature from the central heating furnace, the temperature from outside, plus I have additionally set up alerts on the telegram communicator when certain temperatures are exceeded. I recently purchased an ACS712 current measurement sensor. I wanted to connect it to the ESP8266 with ESPEASY preloaded. I have configured the device as Analog Input and the sensor is connected to port A0 on the ESP. With no load in ESPASY I have a value of 755-754, when there is a load it jumps from 738-778. Can anyone tell me if this is correct?
  • ADVERTISEMENT
  • Helpful post
    #2 17821123
    xury
    Automation specialist
    This sensor is a bit problematic in combination with the ESPEasy. As you know the analog input on the boards with the esp8266 has a range of 0-1V So you need to be a voltage divider. The sensor at zero current gives half the reference voltage at the output. In addition, the ESPEasy collects too few samples to calculate the RMS. It is better to use the PZEM-004t on the Tasmot software for this. I took a different route and made a current measurement on an SCT013 connected to an esp32 according to a German project from the website
    http://technik-fan.de/index.php/Open_Energy_Monitor_mit_dem_ESP32
  • ADVERTISEMENT
  • #3 17821267
    fantic_lemon
    Level 2  
    You know, I don't really need that precise a current value, it's more about knowing when a device is working and when it's not.
  • #4 17821345
    xury
    Automation specialist
    Well I think you need to get the voltage divider right so that the zero current corresponds to 0.5V and that should correspond to about 512 readings on the ADC. Anything below or above that is current flow. In your case it is a little above but to know if something is drawing current it should be enough. You need to write yourself a suitable formula and in rules send status information e.g. via mqtt
ADVERTISEMENT