Relay with status feedback
Moderators: grovkillen, Stuntteam, TD-er
Relay with status feedback
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.
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.
Re: Relay with status feedback
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...
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Relay with status feedback
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?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...
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?
Re: Relay with status feedback
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.androx wrote: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?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...
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?
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Relay with status feedback
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.
Re: Relay with status feedback
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.
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.
Re: Relay with status feedback
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.
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
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: Relay with status feedback
Yes nice trick but I do not have It.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.
I suppose i Will use the hall effect sensore you suggested to me. Thanks
Who is online
Users browsing this forum: No registered users and 34 guests