Photo transistor to read LED state

I recently installed new pool equipment (salt water generator) and wanted to read its status LEDs remotely.
Figured how to read them with a photo transistor and a resistor per LED, connecting to a ESP32 gpio pin. Instructions here.

The LEDs are inside a covered metal box, so no ambient light when the cover is closed, made it easy as I get almost zero when LED is off and close to full scale when LED is on.
If you have ambient light, it could still work but you’re more likely to need to use an ADC input. I tried the ADC too, and it works. But you have to go read the input periodically so not as nice as a binary input.

Could not really find any information on reading LEDs at this forum so posting this in case it helps someone.

Randy

You might find some reference to it regarding garage door openers that have leds to show status. Can’t find the thread now. Another option of course is to hack into the device and put an opto in parralel with the led, although that’s gonna void your warranty :slight_smile:

I had considered monitoring the voltage across the leds, but didn’t want to do anything to void warranty on my new SWG. Never found a garage opener led reader thread, probably didn’t search for the right thing. But I already figured it out anyway :grinning: