NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Thermostat Logging

October 05, 2009
by luke
luke's Avatar


I'm working on a project that requires keeping track of when our furnace is running. I'm not sure how to detect this, though. Coming from the thermostat, I know which wire controls heat, and I know that it's 24 volts AC when running, but I don't know how to convert that into something the MCU can read.

I was thinking something like one of these:

  1. Convert to DC, step down to 5V, and send it straight into the MCU
  2. Get some sort of voltage sensor so I'm not connected directly to the 24V circuit
  3. Figure out where the thermostat is controlling the output, and solder some wires in there

Any suggestions?



October 06, 2009
by rusirius
rusirius's Avatar

A few things that come to mind...

An opto-isolator is the first... If you drive one side with the 24V, and use logic level on the other side... The 4N35 or 4N37 are two that I use a lot of... Also keep in mind that the 24V for the furnace is almost certainly 24V AC, not DC, so you'll need to rectify it... For these purposes you don't need to get crazy... In fact, a simple diode (i.e. 4001) should work fine... Even though the voltage will drop to 0 during the negative swing of the cycle, it should still be plenty fast enough to drive the LED and keep it lit... The same POV effect that allows multiplexing of LEDs will keep the logic side of the opto-isolator up and running... Worst case if you find that not to be the case is to pop a small cap in there to hold the power while it's in the negative portion of the swing... Essentially just a very simple half-wave rectifier...

You could also rig up a pretty simple "current" sensor... That 24V is no doubt running a relay coil, so there should be some current to detect... You need to make a current sensing coil in order to do this...

Without running all the calcs, this would be largely trial and error, but you should be able to get something usable... Try starting with this...

Take a few large washers... Maybe like 1 or 1 1/2" and stack them together, maybe 4 or 5 to make a "core"... Then just take a wire (small gauge) and make a bunch of loops around those washers... Then just run the 24V wire through the center of that core... You SHOULD get a measurable voltage across the wires (the looped one) when the unit is powered up and running... Ground one side and tie the other to your ADC and use that to detect it's "on" state... You might have to play around making more loops, using smaller gauge wire, etc until you get a suitable signal, but again you should probably get ballpark...

Last but not least, you could probably use a hall-effect sensor on the blower fan or something to that effect as well...

October 08, 2009
by luke
luke's Avatar

OK, thanks. I'll see if I can figure something out.

October 08, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi Luke,

I also would recommend the optoisolator plus half-wave rectifier solution. Especially because you don't know how that system is grounded, and since you're talking about doing logging, you probably have this all connected to your computer. I've made a quick sketch -- let me know if this helps:

24 VAC furnace signal to half wave rectifier to optoisolator to microcontroller pin

Added some back of the envelope calculations that should help you get started! Best,


October 08, 2009
by rusirius
rusirius's Avatar

Awesome Mike...

This ladies and gentlemen is EXACTLY why nerdkits and their support are so awesome... I'll be the first to admit that when initially answering this question I debated on making a drawing, but honestly just didn't feel like it... I know... Boo Hoo... LOL... But here Mike did exactly that... You know the man has got to be crazy busy, and yet he took the time out of his day to make a schematic to help out a customer...

That's some awesome stuff right there...

October 09, 2009
by luke
luke's Avatar

Yeah, really nice. It explains what's going on, which is great. Thanks!

Post a Reply

Please log in to post a reply.

Did you know that two resistors can be used to make a voltage divider? Learn more...