Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

idea for testing LEDs

Status
Not open for further replies.

_SquiD_

Advanced Member level 4
Joined
Jul 30, 2008
Messages
114
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Activity points
2,035
Hi there everybody.

Can anyone tell me how can I test that a certain LED (connected at a certain PORT pin - as output) is broken ?

Thanks in advance.

-SQD-
 

Hi,
you should apply a serial resistor(or the bias resistor take between LED & GND) & read back (maybe through a schmitt/"digitalizer" if the voltage isnt full CMOS range) the voltage over their...
K.
 

For red, yellow or green LED use 3V, for blue 4V ..

If you have a lab power supply with current limit adjust the voltage to 3V and the short-circuit current to max 10mA ..
Ensure that the output of the power supply is floating, i.e. is isolated from your circuit .. Now you can safely test LEDs ..

If you don’t have such a power supply take 2 x 1.5V batteries (=3V) and add a resistor in series .. see attached picture ..

Rgds,
IanP
 

@ IanP: you clearly didn't understand my question.

Let me be more explicit : Let's say I have connected 8 LEDs on PORTB (one LED to one PIN) of a microcontroller. I want to command these LEDs however I want but I want also to test their functionality. So this is my question: How can I test one of these LEDs ?

Bogdan M.
 

So are you just wanting to turn on and off the LED's with the attached microcontroller? I dont understand your statement.

I want to command these LEDs however I want but I want also to test their functionality

If you want to see if the LED is broken then you could use a DMM set to "diode check" and see if it open in one direction and some voltage in the other direction.
 

aj9999 said:
If you want to see if the LED is broken then you could use a DMM set to "diode check" and see if it open in one direction and some voltage in the other direction.

Yes, I want to check if it is broken and eventually when the microcontroller detects a broken LED enters in a certain routine.

What's a DMM set ? Be more specific please ?

Bogdan M.
 

I think I understand. To be clear you are able to turn the LED on and off as desired but you want to be able to tell if the LED gets damaged somehow.

When I spoke earlier of a DMM I was refering to a Digital Multimeter so that you could test the LED independent of the microcontroller, however thats not what you want.

I would think it is unlikley that the LED will fail due to their long lifespan. Maybe you could set up a current sense resistor and measure the voltage with an ADC. Lets say your PIC output normally drives the output high to turn on the LED you know what the voltage across the resistor is (2v?)and if that voltage gets larger (4v?) then you could enter a routine to do whatever you want.

If you are wanting to test all 8bits you could mutliplex into a single ADC if you dont have 8 ADCs on your PIC.
 

Hi AJ,

there is another way how thw LED can be tested without using ADC. That's why I asked how the LED is driven, i.e. High voltage level (LED between I/O pin and GND - sourcing current from uC) or Low voltage level (LED between I/O pin and Vcc - sinking current to uC).

Awaiting the answer :)
 

Zasto,

I dont want to steal Squids thread but I am interested in your answer, normally I sink LED's because of the higher current limit. As I am new to the PIC world I am curious what you are suggesting.
Thanks
 

_SquiD_ said:
@ IanP: you clearly didn't understand my question.
Bogdan M.

If one states the problem clearly - one can expect to get the right answer ..

The chances that an LED fails are more the less the same as the failure of the microcontroller ..
Mate, you are chasing your tail ..
 

@zasto: High voltage level (LED between I/O pin and GND - sourcing current from uC).

Please explain as detailed as you can. Thanks.
 

Sorry squid. I really did not have time to go through all your posts... so writing to your first basic question.... How to test LED's while keeping them connected to the MP or MC, or for that matter any circuit..... right

Its quite simple....
1) Switch off your circuit... completely... If possible take one of the legs of the LED out of the circuit.. If not possible then too its fine.
2) Take an extra battery (9V) which u usually get in market or a nice remote battery. And also take a resistor (compulsorily above 1K Ω).
3) now connect one the battery-LED-Resistor in series. Meaning (Connect positive terminal of the battery to the resistor and the other leg of the resistor to the anode of the LED. and then connect the negative terminal of the battery to the cathode of the LED.)
4) If it glows- good luck for the project. If it does not, then good luck debugging or de-soldering)


*Cathode of LED is the one having shorter leg... of the one having a flat metal nearing it inside the glass..
**It usually happens while soldering that you tend to overheat LED causing failure of LED.. Or In a breadboard connection the connectivity of the breadboard is usually faulty.
*** you can not comment anything on the functionality of the Mu-P/Mu-C coz the circuit making it work was still turned off....


Thanks,
Akshay
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top