Enide! my web project

PIC RGB Power Board

Description

PIC RGB is a circuit that generates random RGB colors using a RGB LED and fades between them.

The initial project goal was to develop the fading algorithm which was successfully achieved. This time the idea was to drive a Prolight 3 Watt RGB LED and place it inside a nice white globe!

 

 

Design and Implementation
The PIC is the same one of the PIC RGB: 12F629. The circuit is basically the same with the addition of 3 BS170 mosfet transistors to drive the LED and a powerful 5V regulator.

 

Schematic

From left to right we can see the power supply based on a 7805 5V 1A regulator, the microcontroller and finally on the right the three mosfets that will drive the LED. Click the image to enlarge.

 

Schematic - Click to enlarge

Each mosfet can drive a maximum 600mA through its drain but according to Prolight each LED (red, green and blue) can only sustain 300mA which makes this mosfet perfect for the job.

Summing the 3 LED currents we get 900mA not counting the current consumed by the PIC which should be some 3 or 4 mA. The 7805 is able to supply 1A of current with a proper Heatsink.

List of Components

1 1N4001 Rectifier diode or similar
1 2200uF/25V capacitor
3 100nF capacitor
1 470uF/10V capacitor
1 4k7 resistor
1 LED 3mm
1 7805 regulator
1 PIC 12F629
1 Push button N/O similar to omron 10-xx switches
3 BS170 mosfet
1 10 Ohm/1W resistor
2 5.6 Ohm /1W resistor
1 Molex 4 pin male 90 degrees PCB connector
1 Molex 4 pin female
4 wires to connect the molex to the LED
1 Prolight 3W RGB LED with common anode
1 Heatsink for the LED or some aluminium piece large enough to remove the heat
1 TO-220 Heatsink for the 7805 regulator

 

PCB

The PCB and Schematic were created using Eagle from Cadsoft. Click the images to see bigger versions.

 

Here you'll find the PDF with the tracks (the text should be readable on the copper).

The components positions are shown on the next picture. Click to see a larger one.

The 4 pin molex connector is the output to the LED. The pin order is as follows:

  1. red
  2. green
  3. blue
  4. common anode (+5V)

The power resistors should be 1W each. C1 voltage should be above the input voltage of the circuit and C2 voltage should be greater than 5V (10V or 16V should do). The input diode can be any rectifier capable of driving 1A of current.

 

Software

The software is written in C and consists on a random number generator, an intensity fading function and a triple PWM modulator. All three color components have 256 levels of intensity.

The random number generator is the same from the candle simulator, except that it now returns a char. The previous version returns a single random bit.

This board runs well with Version 3a of PIC RGB and includes the new sequence mode. The sequence is Green, Green/Blue, Blue, Blue/Red, Red, Red/Green and starts overs. To switch between the random mode and the sequence mode click on the button.

Alternatively try the new remote control firmware, and connect a TSOP2736 or TSOP1738 to the button pin (GPIO1).

 

Evaluation

I have no pictures available right now but maybe next week I'll post some. Also the circuit is running flawlessly since December 2007.

 

Downloads

 

References

  1. PIC RGB
  2. TinyRGB 
  3. PIC12f675/12F629 datasheet from Microchip  
  4. BS170 datasheet
  5. 7805 datasheet