Introduction: Versatile RGB LED PWM Driver
Follow these simple instructions to build you own RGB LED PWM driver. This easy to construct, versatile driver board will allow you to make your own RGB LED driver that can be built into all kinds of lighting effects. It doesn't need DMX or any other external controller to operate, just a suitable power supply. The firmware is available as a free download and the sequences fully customizable, so if you have access to a PIC programmer you can create your own range of sequences for use with the kit.
However, if you just want a ready-to-go driver you can buy a complete kit of parts including pre-programmed PIC with a range of effects; a short kit comprising the PCB and a preprogrammed PIC or the PCB only, whichever best meets your needs.
All available from the PIC Projects Store http://picprojects.org.uk/shop/shop.htm
More details of this project, other RGB drivers and the firmware download can also be found on the PICPROECTS website http://picprojects.org.uk/projects/picprojects.htm
There are others around who offer a similar kit based on our firmware code. We suggest you stick with this one, the original customizable RGB LED PWM Driver from the people who developed the PIC firmware.
Step 1: Overview
This driver can be used with a large range of RGB LEDs, LED array modules or indvidual LEDs.
The firmware programmed into the PIC microcontroller generates an 8 bit resolution PWM signal on 3 output channels. The outputs control three power MOSFETs that when connected to Red, Green and Blue LEDs are capable of generating a huge range of colours and effects.
The kit comes complete with a pre-programmed PIC microcontroller that includes a range of colour fading and strobe effects. User control is via a single push button switch which has three functions:
1. Short press, Freeze / Run the current effect
2. Double press, steps to the next effect
3. Long press > 1.5 seconds puts the driver into standby , holding the switch for a further 1.5 seconds turns it back on.
The current freeze / run state, colour and sequence are all saved to NVRAM so the driver always powers up using the last sequence and state.
More details of this project, other RGB drivers and the firmware download can be found on the PICPROECTS website http://picprojects.org.uk/projects/picprojects.htm
Step 2: Identifying the Kit Contents
All the parts shown are supplied in the full kit available from http://picprojects.org.uk/shop/
The kit is fairly simple to construct, but you will need a soldering iron, solder, side cutters (long nosed pliers can be usefull too). If you've never soldered before, have practice on a scrap board before attempting assembly of the kit I also recommend checking out this Instructable 'How-to-solder' https://www.instructables.com/id/How-to-solder/
The board should be assembled starting with the smaller parts and working up to the larger ones. Install and solder into place one component at a time.
The MOSFETs Q1,Q2,Q3 should be left in the anti static packaging until you are ready to install them onto the PCB.
Resistors 1/4 watt, carbon film 5%
R1, R2, R3 120 ohms [brown red brown gold]
R4, R5, R6 10K ohms [brown black orange gold]
R7 1K ohms [brown black red gold]
R8 270 ohms [red violet brown gold]
C1 100nF mutilayer ceramic 2.5 pin spacing
C2 220nF miniature polyester 5mm pin spacing
C3, C4 100uF 25volt electrolytic capacitor
D1, 1N4148 diode
LED1, 3mm Green LED
Q1, Q2, Q3 STP36NF06L, N-channel logic level MOSFET
IC1 PIC mictrocontroller preprogrammed with RGB PWM LED driver firmware
IC2 78L05, 5 volt regulator
CN1, CN2 3 way 16amp PCB terminal block
S1 PCB mounting right angle tactile switch
8-pin DIP socket for IC1
Nylon PCB standoff spacers + M3 x 6mm screws (4 off)
Step 3: The PCB
This is the unpopulated PCB viewed from the top or component side. The white screen print legend shows you where to fit the components.
Some parts have to be fitted the correct way round. The silk screen has markings to indicate which way to fit the part. We'll cover this for those specific parts as we come to them during assembly.
Step 4: Assembly Step 1. Resistors
The first parts to be installed are the resistors. It doesn't matter which way round they are fitted but there are four different values used. The resistors use coloured bands to indicate their value.
R1, R2, R3
120 ohms, identified by Brown Red Brown Gold
R4, R5, R6
10K ohms, identified by Brown Black Orange Gold
1K ohms, identified by Brown Black Red Gold
270 ohms, identified by Red Violet Brown Gold
Step 5: Assembly Step 2. Diode D1
After installing all the resistor fit Diode D1.
This needs to be fitted the correct way round. If you look carefully at the main body of the part it has a black band around one end.
The black band on the Diode body should be at the same end as the white band on the PCB overlay as the photograph shows.
Step 6: Assembly Step 3. Capacitors C1, C2
Next we will install capacitors C1 and C2.
C1 has a value of 100nF, and has the marking '104' on the body
C2 has a value of 220nF. It has the marking. '.22' on the body
Step 7: Assembly Step 4. Voltage Regulator IC2
IC2 is the 78L05 voltage regulator. It's a small part with a black body and three leads on the bottom of the part. It has a flat face on one side were you will find the part number.
Install it onto the PCB as shown. You will have to bend the centre lead of the part back slightly to fit the triangular arrangement of the holes in the PCB.
Step 8: Assembly Step 5. C3, C4
Next we install capacitors C3 and C4, they are marked 100uF 25V
These are electrolytic capacitors and need to be fitted the correct way round.
If you look at the leads on the part, one is longer than the other.
The long one is the + lead
The short one the - lead
Now if you look at the PCB, there is a + next to one of the two holes in the PCB. You must fit the capacitor so that the long lead goes in to the hole marked +
The photo should make this clear
Step 9: Assembly Step 6, IC Socket
Install the 8 pin DIP socket.
You will notice it has a small semicircular cutout in one end. There is a similar marking on the PCB overlay. Install the socket onto the PCB so these match.
Step 10: Assembly Step 7, LED
Next we install the 3mm LED.
This LED is simply a power-on indicator LED.
The LED has one lead shorter than the other. The short lead is the Cathode and it must be fitted in to the hole nearest the text "LED1" on the overlay as indicated in the photo.
You can fit the LED without bending the leads, or you might want to bend the leads through 90 degrees if you are mounting the board inside a box or case. This will then bring the LED into line with the mode switch S1 which is also right-angle mounted.
Step 11: Assembly Step 8. Switch S1
Now install the switch into position S1.
The switch position S2 marked on the PCB is not used.
Step 12: Assembly Step 9. MOSFETs Q1,Q2,Q3
The next step is to fit the three power MOSFETs.
These must be fitted the correct way round. The metal tab should be located nearest the terminal block positions CN1 and CN2 as shown in the photo.
Fit each MOSFET one at a time and solder into place.
Step 13: Assembly Step 10. Connectors CN1. CN2
Next step is the two connectors CN1 and CN2,
These are an interlocking connector so you will need to fit them togther so the keyed edge on one connector fits into the slot on the other one.
Fit to the PCB and solder in place. Make sure the connectors fit snuggly against the PCB with no gap.
Step 14: Assembly Step 11. Solder Exposed Copper
On the underside of the PCB you will see some exposed copper around the locations of the MOSFETs and connector blocks.
These areas of copper should be tinned with solder. This will improve the abilty of the copper in this area of the board to carry higher electrical current.
Photo left show the PCB before the copper has been tinned and the photo right shows the areas now tinned with solder
Step 15: Assembly Step 12. Fit the PIC Microcontroller
With the PCB fully assembled you can now install the PIC microcontroller into the socket.
Look carefully at the PIC microcontroller package and you will see an indent in the top corner. This denotes pin 1 of the device.
Insert the PIC into the 8 pin DIP socket with the indent towards the voltage regulator IC2. See the photo for this step which illustrates this.
Step 16: End of Assembly
That completes the assembly of driver PCB
Your assembled PCB should look similar to the one in the photos here.
You can apply power to the driver PCB without any LED modules connected to the outputs. The green power-on LED1 should light whenever power is applied to the board.
Step 17: Connecting LED Modules to the Driver
DC in should be in the range 9 to 24 volts. It should also be able to supply the current requirements of all three output channels. This will depend on the type of LEDs used so we can't specify any particular power source.
Maximum output per channel is 5 amps for a total of 15 amps. Connecting cables should also be rated for the current they will be carrying. Although the driver can handle up to 15 amps, it is perfectly happy to drive a few 5mm LEDs at 30mA, as we say it is a versatile driver.
LED arrays, modules etc should have their negative or cathode terminals connected to the MOSFET outputs and the positive or anode connection to the common terminal as shown below.
Depending on the type of LED used you may need to include a current limiting resistors. Some modules have these built in, refer to the manufacturers information for the specific LEDs you plan to use.
A very good 'free' web based tool that will design arrays of LEDs for you, check out this site. http://led.linear1.org/led.wiz
The board can drive a huge range of LED types, even single 5mm LED as the picture here shows.
If you want more information on other RGB LED projects don't forget to check out the PICPROJECTS web site http://picprojects.org.uk/projects/picprojects.htm