Sensing when Apple TV or Cable Box LED comes on.

I am setting up an IR receiver/transmitter (with an Arduino Uno) that turns certain AV components on and switches inputs, and now it is controlled by buttons, but I'd like it to have knowledge of the on/off state of certain hardware (apple tv and cable box) so it could turn to the correct input when a certain device comes on. There may be a better way here, like watching the power draw on the wall plug (although the apple tv is always on, in standby mode), or something else, but the one thing both devices have in common is their power status LEDs. Both boxes are very easily disassembled, so I'd like to tap into their LEDs and have the arduino sense the voltage drop on an input (not sure if I need to use Analog or Digital in though). There is probably a simple answer to this, but I have more of a CS background than EE and I am confused by the different grounds in this situation, so I'm not sure how to hook this up in a way that doesn't mess with the other components negatively. Let me know what you think.


Maybe there is room enough inside to place a photocell (a/k/a LDR). There might be enough light from the LED to make for a reading from it, enough to tell if it's definitely light from the LED vs. ambient coming in through the LED's lens. This way you'd leave the device electronics out of circuit.

Thanks for the reply. I had that Idea but quickly dismissed it because I didn't want extraneous light (room lights, etc) to affect it, but I guess if it was in the apple tv box and shielded a bit I might be able to find a threshold that proves reliable. I'll try that out and let you know.

Thanks again!

Update: I managed to squeeze a photocell in there and when the appletv is closed it hardly lets any light in, so I was able to code a reliable upper and lower threshold to sense when it comes on or off. I ended up using a counter that counts up if a check is greater than threshold and down if not, and that counter has to make it to 5 before it kicks off the IR commands to turn everything else on. It's working great so far. Thanks again :)

is the code/schematic interesting enough to share? I vote yes ;)