Monitoring PLC Status With Electron

Hi everyone, I was wondering what the best approach would be to monitor the status of a PLC with an Electron. The controller has three status LED colors (red, yellow, green) and pulses them in various patterns for diagnostics and status reporting.

As you can probably guess, there are quite a few combinations of light pulses to indicate a variety of operating conditions or faults. I initially thought I would use an RGB color sensor like this one from DF Robot

I am wondering if the Particle will be able to handle all the necessary code to translate the light pulses into actionable data and forward a fault message (IE: PLC is offline), or if it would be better to offload the data to a web service for processing.

Any thoughts would be appreciated!


@stormchaserjohn, which PLC model are you trying to monitor?

Hi peekay123,

Thanks for chiming in!

My bad, thought it was a PLC but on closer inspection it turned out to be an HVAC control board. Someone dropped it on my desk with a sticky note attached that said “connect me!”, and like an idiot I accepted the challenge.

No serial interface or plugin, just lights that blink.


@stormchaserjohn I suggest using a high impedance input to monitor the voltage (on/off) across the LEDs. You could just solder/clip wires directly to them and use Digital Read Commands. (since it’s an old HVAC board that someone “dropped” on your desk)

Seems like that would be a lot easier than an RGB sensor.

Good Luck!

@stormchaserjohn, HVAC control board? Can you post a picture or two?

1 Like

Yep, here’s a shot of it

@stormchaserjohn, can you get a picture of the whole board, not just a portion?

1 Like

Here’s a better one, sorry about that

So I guess I’m still not sure what you are trying to accomplish. It’s an HVAC controller and the thermostat connects to the bottom screw terminal with yellow, white, red, green, and common (black). The colors have specific meanings that are standardized:

  • Red 24VAC (source)
  • Black common (generally used only if thermostat needs power)
  • Green Fan-connect to red to make fan run
  • White Heat-connect to red to call for heat
  • Yellow A/C-connect to red to call for cooling

Normally the green/white/yellow wires are switched to red with relays or mercury temperature switches or similar. For automation, you probably want to use a relay to close them off to red and isolate your smart controller from the 24VAC. When the relays close, the 24VAC drops in some installations and so having good power reserves or even a separate power supply is important.

You should be concerned about unattended runaway operation since equipment can be damaged and even a fire could be started by continuously calling for heat or to a lesser extent cooling. If this is in your house, your home owner’s insurance is not going to pay off if you install this and there is a big problem, which is worth thinking about. Have fun and be safe.

1 Like

@bko, just found the part with catalog sheet and instructions:

Of interest in the instruction is:

I believe the OP wants to read the flash codes with a Photon for passive remote diagnostics.

1 Like

OK, that is particularly easy: put an opto-coupler LED in parallel with the board’s LED and look for edges. You will have to have some heuristics for how it behaves over time like what is rapid flash versus 8 flashes but it is not hard with a little state machine.

1 Like

This exactly what we were hoping to accomplish. As well, we wanted an architecture that would enable expansion to units that use RGB colors as fault codes, also. We considered even just running a Pi or comparable processor running OpenCV, and equipped with a camera module.