0
\$\begingroup\$

I've built an esp8266 based web thermostat to control my heating system. Everything seems to be working fine for the moment :)

What I want to accomplish is "sniff" or intercept the boiler´s status from the front panel's status LEDs, to see if this heater is actually turned on, on a MQTT Dashboard.

A very nasty way would be to connect some wires from the boiler's LEDs to some GPIO pins. But I'm not quite sure about that approach. I believe I would have to use some type of buffer, optoisolator, etc. (I could also place a LDR, o phototransistor in from of the boiler's LED, but I dont want to physically block the visual feedback)

How could I accomplish this? Any ideas?

Appreciate your help, Cheers! Marc

PD: This exact same question has been asked in the Arduino Forum almost a month ago, but haven´t received any replies yet. Sorry for the double post.

\$\endgroup\$
  • \$\begingroup\$ i would use an ldr + a new LED to preserve on-device feeback \$\endgroup\$ – dandavis Aug 22 '17 at 18:48
1
\$\begingroup\$

You might want to see the answers to a similar post in the Arduino Stackexchange:

https://arduino.stackexchange.com/questions/43923/how-to-detect-if-led-is-switched-on-in-external-circuit-using-arduino-nano/43926#43926

The short answer: use an optocoupler in series to the LED.

Using an LDR/photodiode/phototransistor would be too much sensitive to the environment light.

\$\endgroup\$
  • \$\begingroup\$ Thanks, just as you and @Wouter van Ooijen suggested, I´ll go with the optocoupler in series.. BTW, what I didnt quite get from the link you´ve suggested is: Shouldn´t the phototransitor connection be like.. +Vcc -> phototransistor -> Arduino input? \$\endgroup\$ – spacefolder Aug 22 '17 at 19:21
  • 2
    \$\begingroup\$ No, it shouldn't. The arduino input must be configured with pull-up. In this way, when the LED is ON, the phototransistor will be ON too, therefore the input pin will be low. When the LED is off, the phototransistor is off too, and the internal pull-up resistor will hold the input at 1. Using the connection Vcc-->PT-->Arduino, you will have no way to put the input low (when the PT is off, the input will be either 1 -if the pull-up is enabled - or it will be just floating, which would result to an undefined state). In such case you should disable pull up and use an external pull down. \$\endgroup\$ – next-hack Aug 22 '17 at 20:18
3
\$\begingroup\$

I'd try to put an optocoupler in series with the indicator LED. If the LED still lights up this setup will likely work.

It might be that the total voltage drop is now too much. In that case you could try to put an optocoupler + series resistor in parallel to the indicator LED + its series resistor.

Another option could be to replace the LED with the optocoupler, and drive the LED (which is now isolated from the thermostat) from your uC.

For some thermostat / boiler combinations is might be possible to sniff the protocol. In my country OpenTherm is used a lot, and a free project exists that describes an interface (using a PIC16F88).

\$\endgroup\$
0
\$\begingroup\$

How about image processing? Install a camera in front of the boiler's status panel, and use some software to extract the LED status, etc

\$\endgroup\$
  • 1
    \$\begingroup\$ Naw, have a spare servant sit and watch them and flick the right switch on the Arduino inputs. \$\endgroup\$ – Transistor Aug 23 '17 at 5:06

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.