load control with esp32

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
noxin
New user
Posts: 8
Joined: 28 Dec 2023, 12:44

load control with esp32

#1 Post by noxin » 05 Nov 2024, 13:37

hello,

I have an electricity consumer, an aquarium heater, that I want to check whether it switches on and off. I tried in vain to work with an acs 712. The ACS 712 is not suitable for the voltage of the local network, 230 V. What I need is simply to check whether a load of around 300 watts is being switched, an exact measurement is not necessary. Has anyone of you already implemented something like this and can give me a little support?

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: load control with esp32

#2 Post by Ath » 05 Nov 2024, 17:04

A simple solution could be to use an ESP-based smart plug, like a Shelly or similar, with power measurement support, that can be loaded with an alternative firmware (ESPEasy of course :lol:), install a matching build that includes P076 (HLW8012/BL0937) or P077 (CSE7766) that will provide information about the power delivered.
You then also have the option of selectively turning it off or on.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: load control with esp32

#3 Post by TD-er » 05 Nov 2024, 17:21

Sonoff has several modules like these called "POW" (various editions with imaginative names like POW/POW-r2/POW-r3)
The earlier ones weren't that "well designed", so I would not trust those to handle large currents.

However the newer R3 versions are quite nice with a display and running an ESP32.
Those Sonoff POW ones are not "wall plug" versions, but more "DIN rail" and you need to screw in the wires in screw terminals.

User avatar
uah007
Normal user
Posts: 27
Joined: 15 Oct 2022, 23:04
Location: Ukraine, Kyiv

Re: load control with esp32

#4 Post by uah007 » 05 Nov 2024, 22:20

noxin wrote: 05 Nov 2024, 13:37 What I need is simply to check whether a load of around 300 watts is being switched, an exact measurement is not necessary.
Image
This device fully meets your request.

Rob73
Normal user
Posts: 62
Joined: 25 May 2022, 15:05

Re: load control with esp32

#5 Post by Rob73 » 05 Nov 2024, 22:26

For my electric water heater I use a 220 volt relay. When the element kicks on, it pulls in the coil and its totally isolated from my esp modules. Works great. I use 24 volt ones on my ac unit for when the fan kicks on and it goes to heat or ac. I also use one on my deep well pump. I dont know if they will work in your situation, but they work great for what I need. I could not find any other good way to indicate whether these devices were running. But the relays work great.

Robby

noxin
New user
Posts: 8
Joined: 28 Dec 2023, 12:44

Re: load control with esp32

#6 Post by noxin » 07 Nov 2024, 10:57

Thank you very much for your answers!

I would like to couple the load sensor with a relay and a 1wire temperature sensor via a rule, so the reference to uah007 would be helpful.
Sometimes aquarium heaters have a tendency to fail when the temperature is reached, hence the relay.
Unfortunately, I didn't find exactly this sensor that uah007 pictured. I found this: AC Digital PZEM-004T Multifunction Meter with clamp.
is this comparable?
@TDer: do these kind of sensors use "Serial Helper" in espeasy ?

User avatar
uah007
Normal user
Posts: 27
Joined: 15 Oct 2022, 23:04
Location: Ukraine, Kyiv

Re: load control with esp32

#7 Post by uah007 » 07 Nov 2024, 13:42

noxin wrote: 07 Nov 2024, 10:57 Sometimes aquarium heaters have a tendency to fail when the temperature is reached, hence the relay.
I think you only need a temperature sensor and one relay module. Use the plugin "Regulator - Level Control" and set up "Email Notifications (SMTP)" to send emails.
A rule that will check the temperature and send you an email about a heater malfunction could look like this

Code: Select all

On ds18b20#temperature<22 Do // The temperature dropped below 22°.
   If %Uptime%>30 And %v1%=0 // 30 minutes have passed since the power was turned on.
     Let,1,1
     notify 1,"{jimmydean@domain123.com},Check the heater!<br>Water temperature is 20 degrees.<br>Uptime %Uptime% ","Aquarium"
  Endif
Endon
Link to AC Power Monitoring Module
https://www.aliexpress.com/item/4001125 ... ry_from%3A

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: load control with esp32

#8 Post by Ath » 07 Nov 2024, 16:39

noxin wrote: 07 Nov 2024, 10:57 I would like to couple the load sensor with a relay and a 1wire temperature sensor via a rule, so the reference to uah007 would be helpful.
Sometimes aquarium heaters have a tendency to fail when the temperature is reached, hence the relay.
That's why a smart-switch would be quite useful, simple 'plug and play' solution ;)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: load control with esp32

#9 Post by TD-er » 07 Nov 2024, 21:38

noxin wrote: 07 Nov 2024, 10:57 Thank you very much for your answers!

I would like to couple the load sensor with a relay and a 1wire temperature sensor via a rule, so the reference to uah007 would be helpful.
Sometimes aquarium heaters have a tendency to fail when the temperature is reached, hence the relay.
Unfortunately, I didn't find exactly this sensor that uah007 pictured. I found this: AC Digital PZEM-004T Multifunction Meter with clamp.
is this comparable?
@TDer: do these kind of sensors use "Serial Helper" in espeasy ?
Each plugin in ESPEasy for a device which needs UART (including Modbus RTU), is using the Serial Helper and thus ESPEasySerial.
This way there is a uniform abstraction to pick whichever serial port you like to use (HW serial/SW serial/I2C-to-UART...)

noxin
New user
Posts: 8
Joined: 28 Dec 2023, 12:44

Re: load control with esp32

#10 Post by noxin » 14 Nov 2024, 15:16

hi,

small update: im waiting for delivery of the sensorboard.

Regards
noxin

noxin
New user
Posts: 8
Joined: 28 Dec 2023, 12:44

Re: load control with esp32

#11 Post by noxin » 04 Dec 2024, 10:36

hello,

got one of this boards now delivered

PZEM-004T 10A-100A Wechselstrom 80-260V AC Current Sensor ESP32 STM ESP8266 UART

from ebay.

I found some hints In the "Serial Helper configuration". now for the first thing to do is configuring the hardware/wiring in an appropriate case (220V).
I assume i will have further questions an that state :)

regards
noxin

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: load control with esp32

#12 Post by TD-er » 04 Dec 2024, 10:51

The PZEM-004T does have some isolation between the section which you connect to the ESP and the mains voltage.
However, make sure to keep the wires connected to your ESP out of the way of the mains voltage as those typical 'Dupont wires' you may use are typically not isolated enough to withstand mains voltage.
And please have the mains voltage part isolated in some plastic enclosure so you won't hurt yourself or damage any electronics.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests