I have a 2-wire thermostat that activates my baseboard heater when the 2 wires are shorted. I did an experiment closing those two wires with a relay and got that working well with an ESP32 as the controller for the relay, but the board and relay require their own power supply. I would like to use the 20VAC on those two wires to provide power to the ESP32 and relay, but I'm not sure if this will work the way I think it will. Can you take a look at this scematic and tell me if I'm going to blow my thermostat relay doing this?
-
\$\begingroup\$ Once you close the relay, the voltage between the two wires that you see will drop to nearly zero. So after some (probably short) amount of time, the "5v dc" will become "0v dc". Probably easiest to just skip this and add a battery, but if you want to be tricky you could use a rechargeable battery and recharge it when the relay is off. \$\endgroup\$– JustinCommented Apr 15, 2021 at 18:42
-
\$\begingroup\$ @Justin Yeah you're right, I just tested it with a multimeter and it dropped to 0 when the relay was closed... I didn't even think of that! If you write this as an answer I will accept it. (Good idea with the rechargeable battery though - that's my next experiment!) \$\endgroup\$– old_ddCommented Apr 15, 2021 at 18:55
-
\$\begingroup\$ You'll need a battery charger circuit that is designed for 20Vac and will not discharge the battery when it sees 0Vac. Not sure how easy something like that is to find. \$\endgroup\$– JustinCommented Apr 15, 2021 at 19:46
-
1\$\begingroup\$ the battery charger would have to draw very low current to prevent the baseboard heater from activating \$\endgroup\$– jsotolaCommented Apr 15, 2021 at 20:17
-
\$\begingroup\$ Power source may be the baseboard control panel. If you got 20VAC, somethere should be transformer. To power your MCU you need convert 20VAC to 5VDC. \$\endgroup\$– user263983Commented Apr 15, 2021 at 21:43
1 Answer
I had this same problem and have come up with some clever solutions that work in my environment.
The first solution is to place a capacitor in series with the two wires for the "zone closed" condition. This can allow AC current to pass, yet still maintain a voltage across the capacitor that can be used to power the microcontroller! A problem is that the capacitor needs to be fairly large to pass reasonable current, and it also must be non-polarized.
The second solution is to place a transformer primary in series with the two wires for the "zone closed" condition. This will allow AC current to pass, yet induce a voltage in the secondary that can be used to power the microcontroller (which would probably have to be rectified etc.)
There are some nuances about how to do this ... in the second solution, you would need to rapidly switch the microcontroller from drawing power from the two wires, to drawing power from the transformer secondary. But this isn't too hard to accomplish.
-
\$\begingroup\$ @keyboard-bandit, here is some more information: 1) Two polar (electrolytic) capacitors back-to-back solve the power problem cheaply and in a small space. 2) The Shelly Uni is an interesting and inexpensive device that can be powered by 24VAC directly and also includes two solid state relays that might pass enough current to power on the zone (about .11A each, or .22A when used together; if that is not enough, it can control a mechanical relay or larger capacity solid state relay). As a bonus, the Uni can connect directly to a DHT22 temperature sensor for a complete remote solution! \$\endgroup\$ Commented May 10, 2022 at 17:04