I have a 2 wire thermostat. R is +24VAC, W is Heater. I have no Ground wire (C), and I cannot open the thermostat.

When the heater goes on, the thermostat internal relay gets powered and connects R and W together.

How can I detect when the heater is on from those two wires?



  • measure the current flowing in the wire
    – jsotola
    Oct 28, 2020 at 2:01
  • 2
    R -----/\/\/\---|>|----- W ... perhaps a high value resistor in series with an LED .... it is possibe that a small amount of current could pass without activating the heater ... the LED would actually be emitter part of an optocoupler ... when the heater is off, the LED is on ... the thermostat contacts short out the LED when they close, which causes the LED to turn off
    – jsotola
    Oct 28, 2020 at 2:11
  • @jsotola Your opto solution worked! I have used an optocoupler in series with a 22k resistor and it does not trigger the heater. I measured the resistance between emitter and collector terminals of the optocoupler. Heater on → 0 (shorted) Heater off → 17Mohm I hope I hooked it up correctly to Arduino to detect it.
    – zip85
    Oct 28, 2020 at 3:29
  • 1
    You should add a diode in reverse in parallel with the LED of the optocoupler. At the moment you're halving the power delivered to the heater. Also the optocoupler may die from the reverse voltage of AC. That is if it really is AC - you say +24VAC which makes no sense - there is no + in AC, only DC.
    – Majenko
    Oct 28, 2020 at 21:41
  • 1
    @Majenko added D1 but it was working anyway. The heater has a relay so it's on or off. Also added pull-down R2.
    – zip85
    Oct 29, 2020 at 6:05

1 Answer 1


With checking the temperature in the room. When the contact is closed store the current temperature. Check after a minute the temperature again. If it is higher, the heater is on.

  • I only needed to sense the thermostat output to detect when the heater is on and log the event on my Arduino. The temperature is already checked by the thermostat. I got help in the comments and I updated the circuit which already works.
    – zip85
    Oct 30, 2020 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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