Detect LED on without a photo cell

Say I have some sort of electronic device (wireless phone base in this case) with an LED that turns on when it is in use. I've taken it it apart and gotten access to the leads on the LED, and I'm wanting to wire it to an Arduino so that when the light turns on, a signal is sent to the Arduino. Preferably keeping the LED functional and without using a photo cell. How could I make that work?

Measure the voltage across the LED with an Arduino analogue input. That will tell you if it is on or off.

I assume I would need common ground, right? So anode to my analog pin and cathode to ground? That simple?

Say I only had a digital pin available. Any reason that wouldn't work?

Yes, common Gnd. Digital pin is okay if the Voltage toggles to at least the levels expected for a valid high & low.

I don't think just connecting to the anode/cathode of the LED will work out on a digital pin. The LED is only dropping 1.X VDC, and I doubt it has any sort of current limiting resistor in the led. You might be able to backtrack a little more and find the current limiting resistor that goes with it and include it in your circuit, or find a way to use an analog pin.

If you can't or don't want to share grounds, then use an opto coupler.
Steal a bit of the indicator LED current by connecting the opto LED with a ~470ohm current limiting resistor across the LED (assuming red LED), and connect the opto transistor between a digital pin and ground of the Arduino. Enable internal pull up with pinMode(optoPin, INPUT_PULLUP);
Leo..

I'm currently stuck with digital (hoping to make an ESP-01 work). I have a handful of opto-isolators sitting around, so I think I'll go with that. How did you come up with 470 ohms for the resistor? Just to help me understand. The LED is dropping 1.75V.

Bapstack:
... Just to help me understand. The LED is dropping 1.75V.

The IR LED inside an opto coupler has a Vf of about 1.2volt at low currents.
Leaving 1.75 - 1.2 = 0.55volt across the CL resistor.
An opto LED current of 0.55/470 = ~1mA.
More than enough to sink the internal pull up current of a pin (assuming a CTR of the optocoupler of >=50%).
Leo..

Why would you not want to use a "photocell"? Using one, you avoid all the complications of connecting wires to your gizmo, possibly creating serious grounding problems.

LEDs are photodiodes. You can use an LED of about the same color to detect light emitted by another LED. For highest sensitivity the detector LED should emit light a bit redder (by about 50 nm) than the emitter LED.

Wrap black tape around the two LEDs facing each other, measure the voltage across the detector LED, and you are done.

Bapstack:
I'm currently stuck with digital (hoping to make an ESP-01 work).

But you said

and I'm wanting to wire it to an Arduino

An ESP-01 is not an Arduino.

jremington:
Why would you not want to use a "photocell"?

I guess I'm not completely opposed, but I'd want to keep it inside the phone base enclosure, and that might be more cumbersome than just running two wires from the LED leads. I also was just curious about the process of measuring the voltage across the LED, which was way simpler than I expected.

Grumpy_Mike:
An ESP-01 is not an Arduino.

No, I misspoke. ESP-01 using the Arduino IDE. And now that I think of it, the 3.3V for the ESP probably means a lower input voltage (1.75V in my case) would be enough to turn the GPIO high if connected directly.

Or maybe I'm wrong. The chart at the bottom of page 15 on the datasheet says the minimum input voltage is "0.75VDD", where VDD is 3.3V. Does that mean the minimum is 2.475V? Or 0.75V?

0.75VDD means 0.75*3.3volt = 2.475volt.