Go Down

Topic: Detecting a led lighting up (Read 1 time)previous topic - next topic

Michaelc1985

Jan 20, 2015, 01:35 am
hello all

This is my first post. I was wondering is there a way that I can detect when a led is powered on a device such as a CD player or PS3 controller by detecting when it receives power.

Thanks

Michael

KenF

#1
Jan 20, 2015, 02:01 am
Yes of course you can.

weedpharma

#2
Jan 20, 2015, 02:02 am
Simplest way would be a light dependant resistor. You would have to come up with a way of mounting it to collect as much light as possible.

To connect it to your Arduino, put a 10k resistor from 5v to an analogue input, then the LDR from input to gnd. Read the analogue input and set you trigger point to a value that indicates the LED is lit.

You may have to change the 10k depending on the value of the LDR. Use a multi meter to measure the R of the LDR with and without the LED lit. Look for a value that will give a good range of voltage variation with the R from 5v in the range of 1k to 27k.

Weedpharma

Michaelc1985

#3
Jan 20, 2015, 02:29 am
Can it be done without LDR?

KenF

#4
Jan 20, 2015, 02:33 am
Can it be done without LDR?

Michaelc1985

#5
Jan 20, 2015, 02:46 am
Yes I do. I can solder to the board

raschemmel

#6
Jan 20, 2015, 03:24 am
Would you be content to know how much current the led is drawing? (measure the voltage across the current limiting resistor using an analog input )

Consider this:
If the led is not lit, it won't draw any current.
If the led is burned out , it won't draw any current.

KenF

#7
Jan 20, 2015, 03:41 am
Would you be content to know how much current the led is drawing? (measure the voltage across the current limiting resistor using an analog input )

Consider this:
If the led is not lit, it won't draw any current.
If the led is burned out , it won't draw any current.
But the voltage being supplied to the LED would be detectable, whether the LED is blown or otherwise.  So I think the voltage across the diode would be more useful,

raschemmel

#8
Jan 20, 2015, 03:53 am
If the resistor is connected to power and the diode to ground you can measure the forward voltage, which,
now that I think about it , would actually be more useful. If it were wired the other way around, the voltage across the led would have to be subtracted from 5V. If it was 2.3V , then the voltage measured across the resistor would be 2.7V. I think the first method would be preferred because if you measure between 2.3
and 3.3V , it's a pretty safe bet that the led is working or it wouldn't be in that range.

Paul__B

#9
Jan 20, 2015, 10:54 am
Yes I do. I can solder to the board
Well now, here is the problem.  You need to figure out to what the LED is connected.  Generally, a LED has a current limiting resistor in series - you want to be able to detect the voltage not just across the LED, but across the combination of the resistor and LED.

As you determine this, you want to know which side of this combination  is connected to either a supply line or a ground line, and which side is switched by some transistor or IC.  You need to know what voltage is applied to that combination so that you can figure how to apply it to the Arduino.

An easy way to do this is to use an opto-coupler with a series resistor, this combination wired across the combination of resistor and LED you found on the circuit board, the resistor you use for the opto-coupler being five times the value of the resistor on the board.  The output (transistor element) of the opto-coupler is then wired between an Arduino input and ground with that input set to "INPUT_PULLUP".

raschemmel

#10
Jan 20, 2015, 01:00 pm
Short version: Two- for- one offer.
Light one led , get one free.

Go Up