Full Color LED: Radio Shack 276-028 $2.99 (More datasheet reading)

FullColorLEDCircuitBoardTopSept. 22, 2009 - Waiting on parts to come in can be boring so I went on a dig through my parts bin and found this LED still in its original packaging. While the packaging leaves a lot to be desired, I actually found the datasheet on RS’ website. I played with this LED and some 1k resistors on a breadboard, and now I’m going to make a night light that changes colors. The original program that I wrote lasts about 15 minutes, and it cycles through all of the colors [edit – at least I thought it would). It uses a rough PWM method that I wrote to fade in and out.

After a little math work I decided on using 20mA for all of my colors. They are rated for 30 to 50 mA depending on the color, but with this I can use the output pins on my PIC12F675. This saves a lot of transistors for another project.

If you look at the PIC12F675 datasheet on page 81 you can find the electrical specifications. It specifies that you can sink or source 25mA per pin with a max of 125mA for the whole port. The port consists of 6 pins, so you don’t want to exceed 20mA per pin. I’m only using 3 pins so I am well under the max.

The first few paragraphs and the initial testing were done almost a year ago. It has taken me that long to finally complete the project. I had the breadboard testing and verification completed. All I needed to do was make a circuit board and populate it.

FullColorLEDCircuitBoardBottomSept. 8, 2010 – The circuit board was made today with the micRo CNC router. This goes to show how quickly having a CNC router can help make a circuit board. In less than 30 minutes I went from copper clad to printed circuit board. I think that drawing the board in Eagle may have taken me 45 minutes. I also didn’t verify a few things so I had to improvise, but such is life. I added .1″ too much to the tact switch, so I just used some pins and soldered a regular switch to the board.

The program version 1 was the initial program written in 2009. Version 2 is an updated version that I changed to shorten the execution and to add a second program that alternates each time the device is reset. V2 also works like it should. I wrote the first program so fast that I didn’t even make sure it worked like I programmed it to.

Adjusting the green led down some might make for a more dramatic color when combining green with other colors. Sometimes it really overpowers the mix. It’s just a suggestion that I will probably not follow through myself. :)

C Program File V1 (Works, but not as intended) / C Program File V2
Schematic
Board
HEX V1 / HEX V2 (Hex is for those who do not have a C compiler)

Comments are closed.