3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Quick & Easy RGB-LED Tester

Quick & Easy RGB-LED Tester

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 adsRemove these ads by Signing Up
 

Step 1Putting it together

Putting it together
«
  • IMG_0997.jpg
  • RGB_LED_tester-schematic-rev1.gif
Here's the part list:

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.



« Previous StepDownload PDFView All StepsNext Step »
23 comments
Sep 24, 2011. 2:45 PMblinkyblinky says:
How would you make them fade in and out?
Sep 25, 2011. 9:15 PMblinkyblinky says:
I only need two to fade.
Sep 24, 2011. 2:43 PMblinkyblinky says:
Will this circuit work with a 16c711 chip?
Sep 12, 2011. 7:03 PMduggerpato says:
Thanks! Your instructable just helped me to understand a great deal about how to write a simple program and actually programming a PIC. I had to look up and research the datasheets and other guides to learn how to program. I had to learn about the MCLR function. I had to learn to navigate the PIC software I was using and the process involved there.

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.

Sep 12, 2011. 8:10 AMduggerpato says:
Okay, the LEDs were my problem. I just got them from radioshack, and they did not say, but a comment for them says that they are common anode, not common cathode. I wouldn't be able to ask you how to change the firmware to common anode, could I? That would be awesome, because I admit very little knowledge of software writing.
Sep 12, 2011. 11:04 AMduggerpato says:
Awesome. You are a gentleman and a scholar. I look forward to see the code changes so I know how it's done. btw, I'm reading an output off the pic16 of about .5 V on each pin the LED would plug into. Hopefully this is what it is supposed to be :)

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
Sep 6, 2011. 6:48 PMduggerpato says:
(removed by author or community request)
Sep 6, 2011. 6:30 PMduggerpato says:
Hey bud I just built this circuit, but have never programmed before. I have a PICkit 2, and imported your hex file into MPLAB software. It appears it took, the hex file shows and everything. BUT, nothing happens otherwise. I have 5 volts at pin 14. I am using a PIC16F628a. Would that mean some small changes for the asm file and hex file?

If I get this working it will be a huge hurdle for me in my attempts to learn to program
Aug 24, 2011. 8:49 PMduggerpato says:
I may be asking a common knowledge question, but what's the .1 uF capacitor for?

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.
Aug 25, 2011. 6:15 AMduggerpato says:
great this is very helpful. I noticed the brightness of the three were very different on the datasheet so now I understand the differing resistor values. Thanks again!
Aug 24, 2011. 8:52 PMduggerpato says:
20k ohm throws me off too...
Aug 25, 2011. 6:13 AMduggerpato says:
awesome, thanks a bunch
Aug 17, 2011. 11:54 AMduggerpato says:
I was just on microchip.com, which type are you using here? I don't know which package type is which (PDIP, SSOP, etc.) I'm guessing I want the PDIP for this purpose....
Jul 3, 2011. 9:17 PMtdawber-mandeno says:
May i recomend some bread bord jumpers i broujt two for this project (and others) and good thing about these it dosent matter if you bend one
http://www.dealextreme.com/p/breadboard-jumper-wires-for-electronic-diy-70-cable-pack-80208

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
186
Followers
13
Author:ledartist(Visit TheLEDart.com for more)
I work with LEDs and microcontrollers to create beautiful objects.