-->
Page 1 of 2

Help me build my IoT enabled water heater with an ESP8266

PostPosted: Sun Mar 18, 2018 9:47 am
by peba
Dear fellow forum members!

TL;DR I am a software developer, has some experience with electornics, and I'm looking for a solution to be able to switch on/off the water heater in my home remotely.

I have a neat Ariston Velis water heater in my bathroom, works like a charm, and I'd like to internet-enable this thing.

On a daily basis I pretty much push the ON/OFF button on it, which heats 80 litres of water to 50 degrees of Celsius in about an hour or so. The problem is, even though it has an ECO mode, it is useless (I don't want to go into detail here) so over the years it worked out fine just to turn it off and on manually.

Recently I started playing with the EPS8266 with MicroPython, and I thought it would be awesome to place an additional ESP into the dashboard of the water heater so with the ESP I will be able to turn it off and on even when I'm not at home (could be pretty handy when I'm not at home and want hot water when I get there actually).

I got things covered with ESP8266 flashing, writing code, turning PINs off an on and whatnot. I also have a multimeter, some common sense about electronics, but with this I'm kinda stuck, and even if it's a really simple project, I don't wanna break my heater's PCB (or anything on it) because practically it's impossible to get my hands on any replacement.

My question would be:
How can I attach/solder an ESP8266 to this PCB without damaging a thing, having the ESP powered somehow from the heater's PCB, and being able to switch the heater using one of the ESP's legs and the traditional way as well by pushing the actual button on the dashboard?

Fyi, the power button on the PCB is just a simple pushbutton, nothing more. Also, I don't really need anything else (like setting the water temp etc) just the ability to be able to turn it off/on remotely with an ESP8266 board.

Looking forward to hear your suggestions on how should I tackle this. Thank you.

Re: Help me build my IoT enabled water heater with an ESP826

PostPosted: Sun Mar 18, 2018 2:48 pm
by rudy
1111.jpg


I made the above image before I looked closely at all the pictures. What I am showing is where I would recommend making your connections into the circuit board. I show a relay because that would keep the added electronics (the ESP8266 circuitry) isolated from the heater's power supply. This would be the safest thing to do.

I did not notice the ESP01 until I was done. I indicated using GPIO4 but since that is not available on that module then you will need to use either GPIO0 or GPIO2. You can also use RX or TX but that makes development a bit harder so it might be best to use GPIO2.

You show the ESP01 on the cover of the case and I assume you want all the circuitry to be inside the heater. That is desirable but it also makes some things a bit harder.

I would recommend not connecting the ESP circuitry to the internal power supply. It may not have the needed power that the ESP8266 needs to operate. The power supply for the ESP8266 should have a capability of 500mA for short periods. Average current will be closer to 100mA but peak current can easily be much higher.

While I showed a conventional relay in the picture I would recommend a optocoupler instead. This solves a problem with connecting to the available port pins.

ersbd.jpg


The ESP01 module you show needs to have a 3.3v power supply. Many problems are caused by people not understanding that this is a critical part of the design. The ESP8266 does not tolerate poor power.

At this point I would suggest using a complete built packaged unit and add that to the side of your heater.
https://www.aliexpress.com/store/produc ... 28317.html

This would need some modification, break the connections to the AC line on the relay.

Image

After the hardware is selected then you need to consider how to control it over the Internet. The easiest is to use the MQTT protocol and have an intermediate broker/server that you connect to in order to pass the commands through. Or you can have a server on the ESP8266 and enable port forwarding for it on your router.

This is just an overview. There are always details but I will leave that for now.

Re: Help me build my IoT enabled water heater with an ESP826

PostPosted: Sun Mar 18, 2018 2:56 pm
by rudy
Duplicate post.

Re: Help me build my IoT enabled water heater with an ESP826

PostPosted: Sun Mar 18, 2018 4:40 pm
by peba
Thanks for your suggestions, Rudy!

Wow, so much new stuff to learn and to look into! ;)
Just for the record, this is the first time I heard about an optocoupler, just sayin' :D :D

While I do understand your schematics is probably dead simple it's kinda confusing to me at first glance - hey, never learned this stuff, ever, I'm just interested in electronics - and the best way to learn something new is by doing it! And I love tinkering stuff that does something useful.

Well, as far as software concerned I got it covered, I'm a web developer, so I'm not afraid of code and Linux servers, and yup already built an IoT salt lamp on an ESP8266 communicating over MQTT 8-)

It's just y'know, when it comes to actual circuitry it's a whole new world. I'm not in a rush with this little project, just wanted to give it a kickoff. My plan is to digest what you suggested, come up with a drawing (probaby with a really childish one) and will post it here just for clarification if it's good enough.

And in the meantime I'm trying to to learn as much basic electronics as I can, because writing code for microcontrollers is awesome!