Project: 5x5x5 3mm RGB LED Cube - Page 1
Forum section: electronics / projects

author: SteveThing
author_rank: Newbie
timestamp: April 14, 2014, 05:24:32 am
content: Hi all,So my first foray into building a permanent project. Time to move off the breadboard and onto the PCB. Before I do that though, I'm looking for some advice on how to expand this circuit. The circuit is a design by Kevin Darrah:www.kevindarrah.com. It is a constant current LED driver. I like it because it is extremely simple and very flexible in terms of supply voltage. The design is straight from his Youtube video about it:Attached is my circuit so far. The question is, do I need to duplicate the circuit for each color pin of the RGB LED? Assuming my VCC is the same for all LEDs, can I just add a bunch of 2N3904s in parallel to the TLV431? I would assume there would be some slight voltage drop upon load (i.e. light up all 125 LEDs at once) which might screw up my theory. Comments/Issues/Suggestions? Any input would be greatly appreciated.EDIT:My goal is to have independent control of each color of each LED (so, 375 trigger pins). I have some 74HC595 latching shift registers I plan on using with this project as well, which I will include in future diagrams.

author: FreddyVictor
author_rank: Regular Contributor
timestamp: April 14, 2014, 07:23:23 am
content: yep, you cannot 'share' the TLV431 and have independant control of each LED...IMO, I would move immediately to the 74HC595 shift registers method....

author: mariush
author_rank: Super Contributor
timestamp: April 14, 2014, 01:42:42 pm
content: For a simple led, it's simply easier to just use a resistor to limit the current to the maximum you want for that led, and then pwm the led (adjust the on and off time) to adjust the "brightness" of the led.A shift register can handle about 25 mA through all its pins so if you plan to connect 5 leds to a shift register, so if you think 5mA will be enough for each led, you could skip the transistor for each led.If you want more current through each led, you'll have to use transistors or mosfets like he showed in his following videos. If you get the right kind of leds (common cathode i think) you could use transistor arrays like ULN2803A that pack 8 transistors and 8 base resistors in a simple package so you can tie this directly to the shift register outputs.However, you'll have to be aware that this transistor turns on and off a bit slower than a plain transistor or mosfet, so if you quickly turn it off and on, it takes slightly more time until individual transistor actually turn off. This can cause 'ghosting' or blending effects on the cube, but they can be avoided if you code everything right (add some delays at some points).

author: SteveThing
author_rank: Newbie
timestamp: April 15, 2014, 04:26:27 am
content: All great points. The reason I'm going for the TLV431 option is to allow for me to expand this to an 8x8x8 later on without replacing a ton of resistors. I was planning on using the shift register to trigger the LEDs. Doing 3-5mA per LED will not be good enough so I don't want to go straight through that. Also I noticed that if I drive multiple LEDs on the same register, the brightness varies dramatically. Not optimal for my project. Instead I'm looking into a register chain and working out some type of way to speed up writing to them (writing to them simultaneously possibly). I'll elaborate upon this on MkII of my circuit.Thanks for the info and please keep the comments coming!

author: mariush
author_rank: Super Contributor
timestamp: April 15, 2014, 06:00:33 am
content: There are some very simple diode like led drivers out there... they'll basically restrict the current to a fixed amount +/- a few percent.. like these ones:10mAhttp://uk.farnell.com/on-semiconductor/nsi50010yt1g/ic-led-driver-50v-0-01a-sod123/dp/1794979RL20mAhttp://uk.farnell.com/on-semiconductor/nsi45020at1g/ic-led-driver-45v-0-02a-sod123/dp/1794973So you could forget about resistors (and you won't care about input voltage) but these are slightly more expensive.Some colors will be much brighter than others at same amount of current though, you'll have to see the specs of your RGB led for that. Either way, it's nothing that can't be controlled through pwm at later time.

author: TMM
author_rank: Frequent Contributor
timestamp: April 15, 2014, 09:20:23 am
content: I was making a 5x5x5 RGB led cube but never finished it because i got bored of soldering LEDs haha.375 individually wired LEDs is good in theory but an absolute mission to do in a way that doesn't look like a wiring disaster.I was going to use common anode RGB LEDs and connect all the anodes together for each layer of the cube.All the Red cathodes for a vertical column should be connected together, ditto with the green and blue.Using this method you can construct the entire cube without any additional wiring, just soldering the LEDs legs together. You'll probably have to make some jigs so you have consistent spacing between all the LEDs.You'd have 5 mosfets driving the anode for each layer, and 75 (5 hoz row x 5 hoz col x 3 colours) cathodes that need to be driven with shift registers. You shift all the data into the registers for a given layer, latch the data into the storage registers and turn on the mosfet corresponding to that layer. Then you start shifting the data into the registers ready for the next layer, turn off the previous layer, latch the data, turn on the mosfet for the next layer and so forth.You can use common cathode LEDs instead if your shift register/driver sources current instead of sinking.Ideally you display each layer at 20% duty cycle and be able to scan the entire cube upwards of 25 times a second for it to seem like the layers are all lit concurrently. If you are able to scan much faster you can implement PWM for the individual colours and be able to display gradients.74HC595 shift registers can only reliably provide about 7mA of current on each output, and given that using the above scheme each led can only be driven at 20% duty cycle it won't be incredibly bright. You can add transistors to the outputs to boost the current capability but that is a lot of work when..... off the shelf dedicated LED drivers provide much more current per output. I was going to use 6 of these:http://www.ti.com/product/tlc5925As an added bonus, it is easy to make brightness adjustable for all the LEDs connected to a given driver.Two drivers for each colour (25 outputs used, 7 outputs unused) means you have individual control of the current for each colour therefore being able to tune the white balance (important for cheap RGB LEDs!).If the LEDs have good white balance you can get away with just 5 driver ICs.