-->
Page 1 of 1

Status indication problem!

PostPosted: Sat Apr 01, 2017 5:06 pm
by antonmi97
Hello everyone,

I'm brand new to the ESP8266 community and I have been fiddling and working on a project that would really be a life saver for me, but I have one unsolved problem.

I want to control my water heater with my NodeMCU board, and a relay, but I also want to keep the manual switch, so I decided that a three-way switch system would be the best option. But then there is the problem that with my NodeMCU and the Blynk app I can only see if my relay is active or not, and not if the water heater is on. This means that I have to have a status indicator that returns to the NodeMCU and over it's analog input says whether the water heater is on or not. The manual switch will have a little light indicating if the heater is on, but I don't know how to feed the NodeMCU the status data since the heater works on European mains voltage (230V).

Any suggestions on how to solve this efficiently and safely? Please :D

Re: Status indication problem!

PostPosted: Mon Apr 03, 2017 10:16 am
by daniel_ezsbc
You need a "Split-core Current Transformer" that you can clamp over the mains wire to sense the current flowing in the wire. There are many available on eBay, Aliexpress and from people who sell industrial sensors. Just make sure that you get one with the right range, 30A full scale is probably OK. Rectify the output with a diode and run it through a resistor scaled to give a logic '1' when the heater is on.

If you buy a halfway decent ct then you are fully isolated from the mains. A google search for "YHDC 30A SCT 013" will give you an image of my favorite, low cost current transformer.

Re: Status indication problem!

PostPosted: Mon Apr 03, 2017 4:00 pm
by Barnabybear
Hi, keep your existing switch but leave it in the off postion.
Add a button to the NodeMCU and code it in as a manual overide to what ever your doing now.
You have the existing switch to fall back on should your setup fails.
Because you can see the button you can report its status.
Job done and much cheaper than trying to get mains to your NodeMCU.

Re: Status indication problem!

PostPosted: Mon Apr 03, 2017 4:48 pm
by greglangford
Is putting the manual switch on to a GPIO pin an option? Obviously not at mains level, but you could pull a GPIO LOW when the switch is on which will fire up the water heater. The light in the switch will not run at GPIO levels though.

I think the CT idea is probably the best, be careful not to zap yourself on the output of the CT though. They can make some high voltage at times depending on model.