LED monitoring

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi all,
I have a project in which I need to monitor a couple of LEDs for activity. This is part of an automated system.
The LEDs are driven from a microcontroller.

3.3V, then a resistor with the LED cathode connected to the micro I/O pin. So a low signal will trigger the LED on.

Could I simply monitor the junction between the resistor and anode of the LED and feed this into the A/D of the 2nd microcontroller (which will be used to monitor when the LEDs are switched on)?

Best regards,
Rajinder
 

Bluejets

Oct 5, 2014
7,374
Joined
Oct 5, 2014
Messages
7,374
Depends on the micro parameters. With pin high you will get a high signal but with pin low maybe voltage will not go low enough.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,272
Joined
Nov 17, 2011
Messages
14,272
Could I simply monitor the junction between the resistor and anode of the LED and feed this into the A/D of the 2nd microcontroller (which will be used to monitor when the LEDs are switched on)?
The voltage on the junction resistor <> LED will be 3.3V-(Iled*R). Measuring this voltage with the ADC of another (or the same) micro will give you a good indication of current flow.

Depends on the micro parameters. With pin high you will get a high signal but with pin low maybe voltage will not go low enough.
If the µC driving the LEDs can supply enough current to still deliver a clear low signal when the LED is turned on, you don't even net an ADC to monitor the LED status. Simply connect the driving pin with an input pin of the monitoring µC and look for logic high or low levels. LED current in this case must not exceed the max. low output current of the driving µC. Otherwise it is not guaranteed that the logic level for LED=on is really low.
 

Omey Cool

May 30, 2016
3
Joined
May 30, 2016
Messages
3
Why not use a transistor as switch so as to increase/invert voltage?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,272
Joined
Nov 17, 2011
Messages
14,272
Why not use a transistor as switch so as to increase/invert voltage?
This is not the primary issue here. This will be required if the driving µC cannot deliver sufficient current to the LEDs.
Of course, if a driver (transistor) is required, the same considerations as above apply to the sensing of the LED's state.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,968
Joined
Jun 21, 2012
Messages
4,968
Hi all,
I have a project in which I need to monitor a couple of LEDs for activity. This is part of an automated system.
The LEDs are driven from a microcontroller.

3.3V, then a resistor with the LED cathode connected to the micro I/O pin. So a low signal will trigger the LED on.

Could I simply monitor the junction between the resistor and anode of the LED and feed this into the A/D of the 2nd microcontroller (which will be used to monitor when the LEDs are switched on)?

Best regards,
Rajinder
Why can't you just "monitor" the micro I/O pin that is driving the LED cathode? If it is "off" or high impedance, then you will "see" the 3.3 V supply at the cathode of the LED through the anode connection to the current-limiting resistor and the resistor connection to 3.3 V DC. When the LED is "on" the cathode will be near common potential. No need for an A/D conversion at the "monitoring" point, just a digital input to a microcontroller or whatever the "monitor" is.

OTOH, if you need to "see" whether the LED is actually illuminated or not, then perhaps an optical solution is indicated. What are you trying to DO?
 

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
No I don't need to see if the LED is illuminated. But need to see it has been activated.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Then, as Hevens says, the pin that is driving the LED is already a digital signal. High for off and low for on.

Bob
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,272
Joined
Nov 17, 2011
Messages
14,272
You can use an interrupt or you can poll the state of the pin from within a loop.
 
Top