Go Down

Topic: How to detect an external led (on / off) (Read 63 times) previous topic - next topic

afeno

Hello,

First of all, Let me say that I don't know too much about electronics. Sorry for my ignorance or vocabulary.

I would like to detect if a led that is attached to an external device is on or off. I managed to solder some cables out of the device. So now I need to figure out how can I detect if the led is on or off with the  Arduino.
I noticed that between the Anode and Kathode I have 2 Volts when the led is on (I checked with a multimeter)
My first try was to connect the Kathode to Arduino Gnd and the Anode to A1 and read the A1 analog input. I don't know why but when I do that, then I read 4.7V between the Anode and Kathode no matter if the led is on or off.

The setup is attached.

What is the best (and easy) way to detect if a led is on or off? By the way, I don't have too much hardware at hand (like diodes or transistors).

Is it possible that the GNDs are different and this is creating some problems on what I was trying to implement?

Thanks!


Wawa

If grounds are different and/or dangerous voltages are involved, use an opto coupler.

Connect the LED of the opto coupler in series with the LED of the device.
Connect the opto transistor collector to a digital pin and the emitter to Arduino ground.

In setup, use pinMode(pin, INPUT_PULLUP);
Leo..

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy