Relay with status feedback

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
androx
Normal user
Posts: 11
Joined: 26 Oct 2016, 20:24
Location: Rome

Relay with status feedback

#1 Post by androx » 26 Oct 2016, 20:41

My target is controlling a relay (for boiler on/off) and be sure of its status.
I used a esp8266-e12 as test board and a simple realys module controlled via GPIO (this one https://www.amazon.it/gp/product/B00YBHAFH6/)
The relay module has a red led always on if the 3,3v of supply is present and a green led that switches on when the relay is activated.
So I removed the green led and connected the GND to the common ESP ground and the positive of green led to a ESP GPIO port.
After I programmed the last GPIO port as switch device.
In this way when I activate the relay I also have a level change in the feedback port (instead of the green led).
What do you think about this solution? any suggestion are of course welcomed.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Relay with status feedback

#2 Post by papperone » 26 Oct 2016, 21:58

I'm not sure what you are trying to achieve.
If your scope is to make sure the relay is closed then you shoudl do it differently as this way you describe is not bringing any added control.
You need to check the physical state of the relay with, for example, a current sensor on the output of relay to confirm it's closed or not...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

User avatar
androx
Normal user
Posts: 11
Joined: 26 Oct 2016, 20:24
Location: Rome

Re: Relay with status feedback

#3 Post by androx » 26 Oct 2016, 22:49

papperone wrote:I'm not sure what you are trying to achieve.
If your scope is to make sure the relay is closed then you shoudl do it differently as this way you describe is not bringing any added control.
You need to check the physical state of the relay with, for example, a current sensor on the output of relay to confirm it's closed or not...
Do you mean in case that the part of circuit the drive the led fails? The relays connect a 220VAC line which kind of sensors do you suggest?
In any case my problem is to be sure to know the state of relays. Can I just read the GPIO status in such a way?

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Relay with status feedback

#4 Post by papperone » 26 Oct 2016, 23:12

androx wrote:
papperone wrote:I'm not sure what you are trying to achieve.
If your scope is to make sure the relay is closed then you shoudl do it differently as this way you describe is not bringing any added control.
You need to check the physical state of the relay with, for example, a current sensor on the output of relay to confirm it's closed or not...
Do you mean in case that the part of circuit the drive the led fails? The relays connect a 220VAC line which kind of sensors do you suggest?
In any case my problem is to be sure to know the state of relays. Can I just read the GPIO status in such a way?
I mean the opposite; in the setup you describe, the relay can be damaged/not working but as the LED reacts correctly you may end up with wrong status.
If you have something like ACS712 that can monitor the output, you can read back its value and have a proofpoint that relay is physically closed.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Jopiek
New user
Posts: 9
Joined: 13 Aug 2016, 00:13

Re: Relay with status feedback

#5 Post by Jopiek » 26 Oct 2016, 23:43

What you also can do is check if the boiler water shows a temperature increase in a certain time. If the relay is used instead of a normal thermostat the risk of sticky contacts is very low. I would not worry about the the boiler being on. It will have an internal safety to switch it off due too high water temperature but it will keep on heating. More important is the off state. What you can do is connect a second relay in series and measure the temperature of the water on the boiler outlet. If you do not see a temperature decrease you can use the second relay to turn it off. Chance of two relays being faulty is very small. Also in case of power failure the relays should be in off position. I have a similar relay board running as a thermostat for more than a year now without any problems.

User avatar
androx
Normal user
Posts: 11
Joined: 26 Oct 2016, 20:24
Location: Rome

Re: Relay with status feedback

#6 Post by androx » 27 Oct 2016, 08:22

Both the previous ideas are very interesting.
Thank you.
I looked at ACS712 datasheet and I have just to decide how to drive the Vout (0-5 Vac) to the esp8266 1V analog input: A resistor voltage divider 1:5 or just let the channel in saturation reading just a on/off value.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Relay with status feedback

#7 Post by papperone » 27 Oct 2016, 11:24

To be on the safe side I'll suggest to use a voltage divider.
As well please note there are different ACS712 chip with different max values (5A, 20A and 30A if I remember correctly) but if you want just to know the status on/off the measurement accuracy is not relevant.
Another "simple" trick can be to have a photoresistor attached to the ON/OFF light of the boiler (a friend of mine uses this solution) in order to read the boiler status directly on it.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

User avatar
androx
Normal user
Posts: 11
Joined: 26 Oct 2016, 20:24
Location: Rome

Re: Relay with status feedback

#8 Post by androx » 28 Oct 2016, 22:17

papperone wrote: Another "simple" trick can be to have a photoresistor attached to the ON/OFF light of the boiler (a friend of mine uses this solution) in order to read the boiler status directly on it.
:) Yes nice trick but I do not have It. :(
I suppose i Will use the hall effect sensore you suggested to me. Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests