Close

Closing a switch with 24 VAC

A project log for Thermostat Controlled TV Volume

Controlling TV volume with the house thermostat. If you're thinking WTF? click through for details!

alex-richAlex Rich 10/03/2015 at 03:050 Comments

So I was a little bit stumped about the right way to automatically press the button on my keyfob transmitter using the 24 VAC signal in my thermostat as a control signal. The keyfob button connects 12V to an input pin on a transmitter chip to send it high. So in this case not only is the control signal AC, but the voltage is 24 V which is higher than the 12 V I am switching on the keyfob.

I looked at 24 VAC relays for a simple fix, but those were huge and were obviously designed for carrying serious current.

So then I hopped into Hacker Channel and asked for a bit of help! Thanks to some pointers from @Kumar, Abhishek I now have a neat circuit planned out.

It turns out the switch is doable, but the circuit is more complicated than I had hoped.

1. First I have to rectify the AC with a diode, this is obvious otherwise my switch would be flipping off and on at 60 Hz. Without some filtering I would still have an oscillating signal, so a filter is added after the diode to sufficiently reduce ripple and make it look like DC. Not sure what the DC voltage will end up being, but I have to assume 24 VDC for now.

2. Just hooking up a single BJT or MOSFET won't work because 24V is probably too much to control most MOSFETS (I looked it up and max Vgs appears to commonly be 20V). A single transistor won't work because control voltage has to be lower than the voltage you are switching or current won't flow. So ultimately the solution is using two transistor stages with an NPN controlling a PNP that actually does the switching.

I don't completely get that last part, it seems like my button is shorted all the time through the base and collector of the PNP transistor.... maybe I need to read up on PNPs some more, but I thought there is current flowing from base to collector to keep it off, which would mean current is flowing across the contacts of the button whether the transistor is switched on or off... I don't know, let me think that through.

Thanks again Abhishek, he even drew the circuit in KiCAD for me!


Discussions