Build a better RGB LED controller. by bigclive
Featured
rgb14.JPG
This RGB LED controller kit is somewhat different to other offerings on the 'net. Whereas most others use a single button to step through short pre-programmed loops this controller is intelligent enough to understand different colour palletes and generate colours in real time using a huge 8 million bit randomiser. It lets you choose a colour pallete from sharp vivid colours to soft pastels and the speed and way it will move between them. It also has a selection of other effects thrown in just for good measure, and remembers it's current settings when the power is turned off.

The fact that this kit does the equivalent of thousands of dollars worth of architectural lighting equipment means it's widely used in theme parks, cruise ships, trucks, architectural installations, techno-art and many other applications. It's also perfect for mood lighting in your workshop, games room, garden and home.

The unit is shown here with a selection of RGB panels connected to it for demonstration purposes. Almost any common anode (common positive) array can be used with suitable resistors. In the picture you can see a strip of Dioder LED lighting from IKEA http://www.ikea.com/, a round MR16 sized panel as featured at http://www.bigclive.com/happy.htm and a large floodlight panel as featured at http://www.bigclive.com/flud.htm.

The finished module will run an any voltage between about 8V to 30V and is capable of switching up to about 5A (5000mA) per colour without need for heatsinks on the MOSFETs.

This kit has been around for many years and the software has been steadily refined. I do a complete kit of parts including the PCB on my website at:-
http://www.bigclive.com/shop.htm

This kit is also a great base module for writing your own code for any application that requires a couple of button inputs and three high current outputs.

The module uses the following colour palletes:-

Full spectrum - over 16 million colours ranging from black through all colors to white.
Bright - a large array of bright colours ranging from saturated primaries to intense pastels.
Vibrant - (my favourite) super saturated colours from deep purples to brilliant turquoises.
Primary - a small selection of hard primary colours.

Here are the programs included in the controller kit. You use the program button to step through them, and the option button to change speed/colour etc.

1. Morph and hold with vibrant colours.
2. Morph and hold with bright colours.
3. Morph and hold with full spectrum colours.
4. Red marker to show where you are in the program list.
5. Sweep continually between vibrant colours.
6. Sweep continually between bright colours.
7. Sweep continually between full spectrum colours.
8. Green marker.
9. Indie dim full spectrum.
10. Indie dim pastels.
11. Blue marker.
12. Rainbow that can be stopped and started with the option button.
13. Rainbow with variable speed.
14. Black marker

Programs below here can be "locked out" if required to avoid flashy effects in an architectural application.
To lock or unlock them, just hold both buttons in for 15 seconds until the output changes from blue to either red (locked out) or green (unlocked). You can do this as many times as you like.

15. Colour burst with vibrant colours.
16. Colour burst with bright colours.
17. Colour burst with full spectrum colours.
18. Cyan marker.
19. Color plasma lightning. (variable speed)
20. White plasma lightning. (variable speed)
21. Colour strobe with variable speed (vibrant colours).
22. Windswept flames. Each channel wavers like a flame with variable speed.
23. Subtle flames. Much softer waver effect.
24. Rainbow trail. (variable speed).
25. Jewel fountain. (variable speed).
26. X-fader. The classic two channel cross fader with variable speed.
27. Peppers Ghost with variable delay.
28. Juddermeister. Just completely psychedelic! Variable speed.
29. Hazard. For controlling two channels of LED hazard warning lights. Variable reps and styles.
30. Random static full colour. A new one is picked at random when you press the option button.
31. Random full spectrum colour. Option button selects a new random one.
32. White marker.

Morph and hold programs sweep to a random colour, then hold it for an adjustable delay selected by the option button in 3 second increments.

Sweep programs continually fade between random colours.

In indie dim modes each channel does its own thing, fading between random intensities.

Colour burst steps between random colours with variable speed.

Peppers ghost is an optical illusion where two images alternate via their reflection on a piece of glass. Look it up on the 'net. This is ideal for Halloween FX. The option button can be used to increase the hold time between fades in multiples of 3 seconds.

Rainbow trail and Jewel fountain whizz through hundreds of colours a second to leave a trail of colours on any moving object. If you get the angle right this looks amazing with fountains, since the water droplets sparkle with different colours. Also looks great on any high speed moving object. Experiment!

The hazard mode could be used to control banks of yellow LEDs for use as highway hazard lights or red and blue for police/fire applications.
 
Remove these adsRemove these ads by Signing Up

Step 1: Starting construction.

rgb1.JPG
When I design PCBs I always try to make them single sided with big chunky pads and tracks. This makes them much easier to build, modify and repair. The downside to this is that sometimes links are needed, but with a bit of care you can minimise the number required.

The two links on this board carry the full current of the red and green channels, so they should be fairly thick links. You can use a bit of solid wire or component lead off-cuts. I like to use off-cut leads from diodes because they are nice and thick.

I strongly recommend the use of traditional lead-tin based solder for my projects. The modern lead-free stuff is nowhere near as easy to use or as good as the lead based stuff. Lead has effectively been banned from mass produced consumer products for safety reasons but it's still perfectly acceptable to use it for DIY stuff like this.
1-40 of 53Next »
THX 1138 says: Oct 16, 2012. 9:07 AM
Hi BigClive. Is it possible to modify the design so that it doesn't simply give 12 volts for each channel, some of which then needs to be dropped by resistors?

For example, I want to power about 100 or so 5 mm RGB LEDs that have only four legs and therefore cannot be connected in series. It would be wastefull to drop 9 volts using resistors and I wish I could control the output voltage of the circuit so as to avoid this.
bigclive (author) says: Oct 16, 2012. 10:13 AM
Yes, you can use a lower voltage by replacing the voltage regulator with a link across it's two outer pins, and using a 5V supply to power both the LEDs and the controller. That way you're just having to drop between 3V (for the red LEDs) and 2V (for the green or blue LEDs) across the resistors. You could also replace the diode with a link to give the full 5V to the logic as opposed to about 4.5 with the diode in place, but I'd suggest keeping the diode in circuit in case of power supply polarity issues.

THX 1138 says: Oct 16, 2012. 1:38 PM
Will the logic function properly at a voltage lower than 4.5 V?
bigclive (author) says: Oct 16, 2012. 2:36 PM
Technically speaking it should operate down to a few volts, but the MOSFETs require near 5V to turn on properly and may behave like resistors if they don't get their desired gate voltage. As such I wouldn't really recommend going below about 4.5V .
dezinger says: Sep 30, 2012. 7:17 PM
First of all, thanks for making this kit available for those like me who haven't a clue how to program, but can solder and follow the steps to make one.

My question: Can I use, in place of resistors, Supertex's CL6 Constant Current LED Drivers to limit the current to the leds? I have a 24V, 5 Amp power supply, and want to light as many 100mA Leds per color as possible with heatsinks on the CL6's. Or maybe the CL7?
bigclive (author) says: Oct 2, 2012. 9:17 AM
I know others have used LM317 regulators to do this, so it should work. The LM317 version is very simple. It's just the regulator and a single resistor to set the current.

Keep in mind that these regulators all dissipate the excess voltage dropped across them as heat.
agr00m says: Aug 31, 2012. 9:14 AM
Thanks! I'm still pretty new to using transistors/mosfets as switches. I get the basics and understand some about the datasheets on switching full on, but not enough to know what substitutions will work in different applications.

Great instructable though, I've been looking for something like this for a long time!
bigclive (author) says: Aug 31, 2012. 12:30 PM
MOSFETs are a revelation in the sense that they exhibit such a low voltage drop when turned on. The controller was originally designed to handle a variety of transistor types, but MOSFETs are the best choice in this application.

I'm not sure I'd class this as an instructable though. It's more of a kit building guide with the added benefit of describing the function of each component.

The module does make an excellent base for other projects though, since it's possible to write your own software to do other things if you just need two inputs and three outputs.
agr00m says: Sep 12, 2012. 11:36 AM
Yeah, I've been working with some I2C RGB controllers called ghetto pixels. The chip I'm using is an Atiny45 and so far I've only been using it with single RGB LEDs, but I want to start using it to control larger LED arrays. I'm horribly new to electronics, but I have a programming background. So coding the master I2C chip has proved much easier than coming up with a simple board like this for regulating power to the chip as well as the LED array.

So as you said, I have a great project with two inputs and 3 outputs :) Thanks again!
agr00m says: Aug 30, 2012. 9:51 AM
I have some STP55NF06 MOSFETs, would those work ILO the 36?
bigclive (author) says: Aug 30, 2012. 1:03 PM
The letter "L" at the end of the MOSFET code is important. It means that the MOSFET is optimised for being driven at 5V logic levels. If you use an ordinary MOSFET then it may not turn on fully at 5V. Other than that, the STP55NF06L has a lower on-state resistance and would theoretically allow use at a slightly higher current without heatsinking.
lnijs says: Feb 12, 2012. 4:30 PM
so I'm kind of a dumbass as far as figuring out how many leds I can drive with this goes, I wonder if you can help me.

I will be using this strip:

www.sparkfun.com/products/10262

There's a datasheet that explains how much it consumes, but it's making me completely confused.

how much of those strips could I possibly use to run on your controller?
bigclive (author) says: Feb 12, 2012. 5:13 PM
Each group of 3 LEDs will draw about 20mA per colour, and as each metre has 30 RGB LEDs that's 10 circuits at 20mA = 200mA per colour. So the whole 5m strip will draw 1000mA per colour. The controller will switch up to 5000mA per colour.

You can also buy RGB amplifiers that buffer the controllers outputs to drive sections on separate power supplies.
dvjpopo says: Aug 29, 2011. 8:05 AM
number of MOSFET gk2yp p3wn or v3
Exiumind says: Aug 23, 2011. 9:09 PM
"The group of three resistors in parallel are for the MOSFET control" What is their function? will some irf630 work? i plan to do this with an arduino..
sorry im quite a noob =P
WardXmodem says: Jun 30, 2011. 2:28 PM
1) "lock out" - what a GREAT idea - to keep idle hands from playing and bringing up annoying pattern options!

2) No source - bummer, I like programming pics more than the effects of what they do - Perhaps a nominal charge to sell / license it?

3) schematic: Ditto, this IS after all "Instructibles", not "Details on a commercial-only product". I don't know FETs from much, but DID buy some little 100ma cheapies to play with and find 0-2v gate = open, and between 2V and 2.8V they conduct (going to try auto AAA battery replacement gizmo, allowing you to continue to listen to an MP3 even tho a battery died - the repl was switched in with an FET and an LED says which batt needs recharging, etc.

BUT STILL a very nice instructible 'cept for the source and schematic
bigclive (author) says: Jun 30, 2011. 3:25 PM
As mentioned elsewhere, I made an earlier version of the code open source, but it was used in a commercial product by a company, and at that point I decided to protect the more complex code I write by not making the source available. I do however sell pre-programmed chips. Sorry, I wish it wasn't that way, but it's galling when you see someone else cashing in on your hard work.
There's never really been a schematic for this design. I usually just do a few scribbles and then go straight to copper. It's super simple by design, with all the complicated stuff being done in software.
MOSFETs have a specific gate voltage where they start to turn on, and will not turn on fully until the rated voltage is reached. Below that they tend to act more as resistors.
Although this is a commercial kit, I don't actually approve of putting stuff like this on Instructables. My hand was forced when someone in Canada who seems to make a career of ripping off other peoples designs started selling a rival kit based on a copy of my design with someone else's ripped off software. He put the assembly instructions here on Instructables and I just kinda did the same. (But I asked Instructables management first.)
Check out my website at bigclive.com and you'll see that while I do have a few commercial projects, the bulk of the site is free.
flyinfinn says: Mar 5, 2011. 6:01 AM
Hey,
Love the instructable! When you say that others offer an RGB driver that uses a single button to step through the RGB, where did you find that? Or is there a certain name for that type of circuitry? Thanks!
bigclive (author) says: Mar 5, 2011. 7:57 AM
Hi. You can find the single button version at www.picprojects.org where it used to be free, but may not be any more since unfortunately it was used without Pete's permission on a commercial kit sold by someone in Canada.

Pete's software allows you to edit a table with specific target colours then fades between them. It requires a programmer like a PICkit2 to program your chip.
tchristensen0209 says: Feb 23, 2011. 7:21 AM
I want to order one of these kits from your website, as it looks like it is what I need.

I am not worried about the software, I will easily be able to learn the coding, I just have a few questions on the hardware.

It says that you can control "thousands", I would like to have around 600-800 leds in my project.

Question is, how would I go about hooking the LEDs to this controller? Would I need more hardware? Thanks, and great job!
bigclive (author) says: Feb 23, 2011. 8:15 AM
Hi. The MOSFETS used are rated at 35A each but without a heatsink they can handle up to about 5A due to their low internal on resistance.
Assuming 5A (5000mA) and series wired strings of three LEDs of each colour in series with suitable resistors, that would allow you to drive 750 LEDs per channel at 20mA or 1500 per channel at 10mA.
If using combined RGB LEDs with four wires it's not possible to connect them in series multiples, so you could only run 250 at 20mA or 500 at 10mA. Series multiples is a much more efficient way of using the LEDs.
The controller does come with built in software for a wide range of effects. Note that writing your own software for this controller would require a good knowledge of assembly code, since it's the only way you can achieve a fast enough PWM rate from the microcontroller used.
tchristensen0209 says: Feb 23, 2011. 11:35 AM
Thanks for the reply. Few more questions for you, if I may.

Your software is more of a mood lighting system if I understand correctly? So there is no patterns or flashing involved in the code?

If I were to get a heatsink for the MOSFETS, could I run more leds?

I am going to be using 4-wire common anode RGB LEDs. I could make due with 500 LEDS.

I would love to have them all working on the same controller, but if I couldn't go the heat sink route, is there a way I could hook two of these devices together?
bigclive (author) says: Feb 23, 2011. 1:35 PM
There are flashing and psychedelic effects included, but they can be locked out if desired. The controllers were designed for mood/architectural use.

You could add a thin fin to each MOSFET since they are close together, but note that the tab of the MOSFET is electrically connected with the outputs, so putting all the tabs on a common heatsink wouldn't work unless they were mounted with isolating hardware. If mounted off board on external heatsinks you would need to keep the connections to the MOSFETs short and keep the gate wire well away from the power carrying wires.

You can't really sync two controllers together, since they automatically reseed their randomisers based on user input and would be virtually impossible to match up.
tchristensen0209 says: Feb 23, 2011. 1:47 PM
If I went around that problem and added a little pc fan (powered separately), do you think I could put 500 LEDS on one controller?

Or is there any other way to get 50o LEDs to run off of 1?
bigclive (author) says: Feb 23, 2011. 2:28 PM
A fan would definitely help, but also keep in mind that if the LEDs are changing colours then the RGB channels are not going to be at full all the time. If you ran your LEDs at 10mA per chip (effectively 30mA per LED total) then you should be able to do the full 500. The standard 5mm package has low dissipation so running all the chips at 20mA (60mA total) may be pushing your LEDs thermally anyway.

Whatever you do I recommend splitting your LED circuits into a series of sub-circuits with a fuse on the common of each to allow the use of thinner cable without a meltdown if something shorts out.
CThoma031 says: Nov 16, 2010. 8:33 AM
Very nice build and kit on your website.

If you have a moment I had a few questions about your Full RGB Controller Kit. Im very new and never done anything with RGB LEDs only single color ones.

Could you use your controller to control full RGB LEDs or does it only work with single color LEDs in an RGB array?

I want to make a grid of 9x7 RGB LEDs and think your controller would be great for my purposes.
bigclive (author) says: Nov 16, 2010. 1:16 PM
Hi, the controller will work fine with combined RGB LEDs but because the internal chips can't be wired in series groups you will need to use three resistors per LED. For standard 20mA RGB LEDs you could use three 470 ohm resistors per LED on a 12V supply.
CThoma031 says: Nov 16, 2010. 2:30 PM
Thanks for the fast reply- like I said before Im very new to LEDs and wiring things
2 last questions if you don't mind.

Would I still be able to run all 63 LEDs on it?

How/ where exactly would I put all 3 of the 470 ohm resistors for each led?

Thanks for your time again!
bigclive (author) says: Nov 16, 2010. 5:27 PM
You would have to use common anode LEDs (the red, green and blue chips have a common positive connection) and put the resistors on the red, green and blue leads, which may vary between different types of RGB LED.

The controller can handle up to about 5A (5000mA) per colour, so it will handle all your LEDs fine. You will need a fairly beefy 12V 4A power supply to run that number of LEDs.
CThoma031 says: Nov 16, 2010. 3:11 PM
Did you mean in a setup like this

(very basic diagram and only showing 1 led) or did you mean all 3 resistors before the LED
basic diagram.png
bigclive (author) says: Nov 16, 2010. 5:28 PM
That's right. And all the LEDs and resistors would be connected in parallel like that.
CThoma031 says: Nov 17, 2010. 7:56 AM
I should also say that I plan on running this in my car so I don't know if the battery will be enough, I would think so but never tried it!

First time for everything.
CThoma031 says: Nov 17, 2010. 7:47 AM
Since blue and green are 3v 470 ohm resistors would work but red is only 2v wouldn't that require something like 510 ohm resistors?
bigclive (author) says: Nov 17, 2010. 11:30 AM
With a common value of resistor the red would run at about 20mA and the green and blues at about 18mA. The voltage dropped across the resistors is high enough that the resistor value is less critical. If you're using this in your car then choose the resistors for 14V since that reflects the charge voltage of the battery. This would give a resistor value of about 600 ohm or the nearest higher value you can get. It may even be an idea to use all 1000 ohm resistors.
CThoma031 says: Nov 17, 2010. 11:49 AM
Thank you very much! Should have my order in soon for your controller unit.

I cant wait to get started!

Once again thanks you have been a great help in answering all of my questions!
bdexter says: Nov 9, 2009. 6:52 PM
Awesome Controller!!!!
Build mine this past weekend very easy!
Using to control five 3 watt RGB lights on top of entertainment center. Illuminates very nice, ceiling and walls around the entertainment center.
The police type light program is a nice touch. 
Keep making updates to the program maybe add some music sync?  

Thanks Clive
bigclive (author) says: Nov 10, 2009. 1:16 AM
Glad you like it.  I get asked about doing a music reactive version a lot, and have written a bit of experimental code.  Unfortunately I've still not found a simple beat detection circuit that can reliably pick out a pattern over the huge volume range between a home setting and a nightclub setting.  One day I'll revisit the beat detection circuitry (again) and finally crack it.
microbius says: Aug 21, 2010. 7:43 PM
What about doing it as a Beat-Tap to figure out the beat? Tap the Option button in time with the beat and then after x taps use a formula to figure out the BPM.
bigclive (author) says: Aug 22, 2010. 7:27 AM
Too complicated, since you'd need to do it with every track and it would drift out of sync with the bass. I've got a prototype beat detection version. I just need free time to work on the PCB design and the software before unleashing it on the dance posse.
Mechroneal says: Sep 16, 2010. 1:54 PM
Could you wire it directly into the sound system, and thus negate background noise?
1-40 of 53Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!