0
\$\begingroup\$

I have a question on how to safely connect and detect Thermostats outputs to Controller's GPIO inputs (RasPi and BeagleBone). I've been looking up a lot and most of the cases it is showing me how to connect GPIO outputs through relays then Thermostat inputs to make it a smart thermostats. I don't want that. What I'd like to have is:

Thermostat -> Controller -> Furnace.

So, I'm currently having a relay board between Controller and Furnace to control it. This should work. However, on the input side, I'm not sure how to connect thermostats output wires to the controller and detect which one is energized.

In other words, I'd like to know what ? in my high-level below needs to be so that I can connect them safely and know which thermostat call is called, knowing that thermostat output voltage will be 24VAC, and GPIO input can take 5VDC/3VDC, I believe. Please correct me if I'm wrong.

Thermostat -> ? -> Controller -> Relay board -> Furnace.

Thanks a lot guys.

\$\endgroup\$
1
\$\begingroup\$

First thing to do is find out if you have black (ground) wire available.

If you do, then make sure you have other colors right by operating thermostat and measuring voltage between other wires and ground. Standard pinout is G-fan, W-heat, Y-AC. The voltage should appear on the wire when corresponding function activated.

If you don't have ground (which is usually the case) then measure between red (24VAC) and G/W/Y. In this case the output is reversed - you should see some voltage when function is not active, and 0 when it is activated.

How exactly you use them depends on the availability of ground wire and location of you wiretap. If you placing this near the furnace you might be able to bring ground out of it, so the second case becomes the first. If this is not possible you'd have to disconnect red wire from furnace and supply your own DC (e.g. +5V) to it. (normally I'd recommend connecting it to GND, but if thermostat uses solid-state relays it might not work)

The best way to convert AC into I/O is by using optocouplers connected between G/W/Y and black wires. See here or here for examples. Or, even better, use AC optocoupler like H11AA1M, HCPL3700 to simplify circuit a lot.

If you had to disconnect red and supply your own DC then you can connect return wires from thermostat to I/O, with some resistors in series and pull-downs. However I would recommend using optocouplers on inputs anyway, to isolate your controller from whatever currents might lurk in your wiring.

Please, take the standard precautions when working on mains-powered appliances.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.