Pic RGB Power board with Infrared remote control
Description
Power Pic RGB with Infrared remote control is a circuit that generates many colors using a RGB LED and fades between them.
The concept comes from Pic RGB project [1] where the goal was to develop a fading algorithm between different colors, randomly generated.
Being its third evolution, this time the goal is to use a remote control to change the colors, either by choosing a specific color or by selecting an automatic color fading mode, in which the software will keep changing colors over the color spectrum!
Design and Implementation
Like the previous Power Pic RGB project, this one was designed to be placed inside a white globe. The globe is available at IKEA at a price of 9.90 euros [3].
The microcontroller in this circuit is similar to the ones used in the other Pic RGB projects. The software is compiled for a PIC 12F675 but may be easily changed to another pic12F*, since it only requires two timers and a pin with the Interrupt on Change feature. The circuit is similar to Power PIC RGB with the addition of a TSOP1738 infra red receiver.
The infrared remote is a Universal Remote Control Unit model URC11C-9C bought at a chinese store for about 3 euros. It is configured to emit SIRC infrared codes for Sony TV sets. In this remote the configuration code is 001, but other remote controllers with SIRC encoding may be used. Just check their configuration sheet for Sony codes and try them.
Schematic
From left to right we can see the power supply based on a 7805 5V 1A regulator, the microcontroller, on the right the three mosfets that will drive the LED and below the TSOP1738 to receive the infrared signals. 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 Heat sink.
The TSOP1738 infrared receiver can be replaced with any model like TSOP1238, TSOP31238, TSOP1736, SFH5110, etc. as long as the receiving frequency is between 36Khz and 40Khz. Ideally it should be 38Khz. R5 and C4 perform some filtering on the TSOP1738 supply voltage and R4 is a pull-up to maintain GP1 at 5V when no signal is being received.
| Amount | Part | Description |
| 1 | D1 | 1N4001 Rectifier diode or similar |
| 1 | C1 | 2200uF/25V capacitor |
| 2 | C3,C5 | 100nF capacitor |
| 1 | C2 | 470uF/10V capacitor |
| 1 | C4 | 4.7uF/10V capacitor |
| 1 | IC2 | 7805 regulator |
| 1 | IC1 | PIC 12F675 |
| 1 | IR1 | TSOP1738 or similar 38Khz, 3 pin infrared receiver |
| 3 | Q1,Q2,Q3 | BS170 mosfet |
| 1 | R5 | 100 Ohm resistor |
| 1 | R4 |
10k resistor |
| 1 | R1 | 10 Ohm/1W resistor |
| 2 | R2,R3 | 5.6 Ohm /1W resistor |
| 1 | J1 | Molex 4 pin male 90 degrees PCB connector |
| 1 | J1 cap | Molex 4 pin female |
| 1 | J2 | Power connector for PCB |
| 4 | - | wires to connect the molex to the LED |
| 1 | LED | Prolight 3W RGB LED with common anode |
| 1 | - | Heat sink for the LED or some aluminum piece large enough to remove the heat |
| 1 | - | TO-220 Heat sink for the 7805 regulator |
| 1 | - | AC/DC power supply capable of delivering 1A ("wall wart" or similar) |
| 2 | - | M3 bolts, nuts and some washers |
| 1 | - | 4K7 or 10K pull-up resistor for MCLR pin. It is missing in the schematic due to a human error. Place it on the tracks side of the PCB |
PCB
The PCB and Schematic were created using Eagle from Cadsoft. The PCB is circular because it was developed to be placed inside an IKEA white globe [3]. The light bulb holder has to be removed from the inside so the LED and heat sink may be placed in its position.
PCB - Click to enlarge
Both tracks and silk screen are available for download in two separate PDF files. Both files have mirror images suitable for photographic or toner transfer methods. Get the tracks file and the silk screen file.
The 4 pin molex connector is the output to the LED. The pin order is as follows:
- red
- green
- blue
- 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.
The LED requires a heat sink otherwise its life will be significantly reduced. The LM7805 also requires a heat sink.
Here's a picture of the first four PCBs right after etching, two of them still with the toner:

Some pictures of the PCB after assembly:
![]() |
![]() |
Update: Found a problem while testing the first PCB. The MCLR pull-up is missing and the firmware available here doesn't disable the MCLR pin. So either put a 10K resistor between pins 1 and 4 of the pic or recompile the software disabling the MCLR pin. I placed the resistor at the bottom of the pcb because it was simpler to do.

Software
The software is written in C and consists of a triple PWM modulator, a SIRC decoder and a HSV to RGB converter.
The PWM modulator and the SIRC decoder are designed as device drivers and are fully interrupt driven. This way the main loop of the program is dedicated to do the remaining task of deciding what to do with the decoded infrared buttons.
Instead of giving the user direct control over the RGB value on the LEDs, the software implements the HSV color space in order to navigate along the full color spectrum. The HSV color space [2] can be perceived as a cone where each component represents the following:
- Hue: a circular region that starts from pure red, to blue, green and ends in red again (see picture);
- Saturation: the distance measured from the center of the circular region, it represents the amount of color;
- Value: the distance from the bottom of the cone, it represents the amount of light.
Using the HSV color space gives the user the ability to navigate along the color spectrum just by increasing or decreasing Hue. Adjusting Saturation and Value refines the selected color. This is a lot easier than asking the user to select the Red, Green and Blue components independently. As an example, imagining the user wants a light blue color, he/she should change the Hue until the color is near blue and then decrease saturation a little, until the light blue pleases him/her.
The firmware for pic12F675 is available for download below.
The final circuit is built and all four PCBs are working properly. Below are some pictures of the final circuit ready to be placed inside the globe. The LED requires a heat sink otherwise degradation will be accelerated and its life reduced.
![]() |
![]() |
The circuit looks like this when working:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
A final note to anyone wanting to improve the software: the optimum number of colors using 6 bit for PWM is attained with 378 hue values. This number comes from 63 pwm steps * 6 = 378. And 6 is related to the slope of the HSV to RGB function.
Files available for download:
- Schematic
- PCB tracks PDF (mirror image)
- PCB top silk screen PDF (mirror images)
- V3.1 Firmware (360 hue values that produce very nice colors)
- V4.0 Firmware (More colors, GPIO0 indicates power status, remembers rotation mode across power cycles)
- V4.1 Firmware (several bug fixes, improved overall responsiveness)
All firmwares include source code.










