Have you ever built a project with a lot of LEDs, and found out that one of the LEDs was defective? Although it's somewhat rare, there are some defective LEDs when you go through hundreds of them. I found that RGB-LED have high defect rate, most likely due to the fact that each of them has three LEDs (R,G,B) in them.
I have had a few situations where one of the RGB LEDs was not working fully, and having to desolder to remove it. Here because RGB LEDs have four leads instead of two, desoldering is difficult.
So here's the quick & easy RGB-LED test that I build on a breadboard. You can build this in less than 15 minutes and save a big hassle later!
Remove these ads by
Signing UpStep 1: Putting it together
1x Breadboard (small one is fine)
1x PIC16F627, 628A or 648A
1x 0.1 uF capacitor
1x 20 k ohm resistor
3x 220 ohm resistors
3x 470 ohm resistors
3x 120 ohm resistors
some jumper wires
1x 5V regulated power supply or 4x NiMH batteries in a holder
You'll also need a programmer capable of programming PIC microcontrollers, such as MPLAB ICD or PICKit.
As you can see, the circuit & construction is very simple. Once you have the parts, just put them on a breadboard in 5 minutes! Use the picture as the reference.
Then fire up your programmer and you are ready to go.
This unit is made to test common cathode type RGB LEDs, however, it's very easy to change the firmware to test common anode types. (No hardware change needed.) (See the update below)
Schematic and source code (assembly) are provided for those who are interested, but no need to look if you just want to get going with your LED testing...
Update: Source code has been updated to be able to switch between common Cathode and common Anode type LEDs. Change the following line in the source:
COM_ANODE equ 0
to:COM_ANODE equ 1
to make it common Anode tester.





































Visit Our Store »
Go Pro Today »




and how is going to affect to the project ???
The PIC has a PWM module, so you can use it. But to fade many LEDs can be hard, and that lead me to develop Aurora 9x18...
Aki
This simple project inspired me to learn way more than you would have guessed. I hope I learn enough to be half as good as your skill level. Thanks again. If I wore a hat I'd tip it to you. You'll be seeing my LED projects with a little more flair from now on.
Working with actual projects is the best way to learn. Looking forward to seeing your future instructables.
Aki
Change the following line in the source:
COM_ANODE equ 0
to:
COM_ANODE equ 1
Then make/rebuild and program the PIC.
Aki
I will change the code and upload it here when I have the time...
Aki
Sorry to pester you. As I have mentioned before, this is a big hurdle for me to jump, so I appreciate your time very much. Thanks.
Dustin
Aki
Otherwise, you might want to color code the wires a bit. It's way too easy to make mistakes, and too hard for others to check the connections.
Aki
If I get this working it will be a huge hurdle for me in my attempts to learn to program
The RGBs I have say typical forward voltage is 3.2 for the green and blue and only 2 V for the red. Does it just depend?
I have a 12V power supply handy, so obviously I will have to change the resistor values and it made me worry what the cap is for and if the PIC chip has a voltage drop I need to worry about.
The voltages are correct as you say - I designed this circuit using LEDs with 3.2V for blue/green, and 2V for red. I adjusted the resistors to make R,G, and B to have visually the same brightness. (within the safe limit)
The microcontroller can only take up to 5V of supply voltage. You will need to use regulator or something to reduce the voltage to 5V. (Over 5.5V can damage the microcontroller)
That's a pull-up for MCLR (reset) pin. This pin needs to be "high" for the microcontroller to run.
Aki
http://www.dealextreme.com/p/breadboard-jumper-wires-for-electronic-diy-70-cable-pack-80208