8x8x8 LED cube - Page 1
Forum section: electronics / projects

author: Brainfarth
author_rank: Newbie
timestamp: September 08, 2015, 04:07:56 pm
content: I recently finished a LED cube project that I purchased from Ebayhttp://goo.gl/Ahw0XcThen I made a Plexiglas enclosure for it. It's a pretty cool show, but it's a little disappointing in the brightness category when you have a few dozen LED's lit at the same time. Has anyone tried to bump the voltage up on one of these, and how would you go about it? I've attached a PDF schematic of it to this message.And here's my finished project:http://po.st/7GIIFI

author: ajb
author_rank: Super Contributor
timestamp: September 08, 2015, 06:05:52 pm
content: The problem is that there's a single resistor on the common cathode side of the matrix (at the outputs of the ULN2803), so there's a fixed amount of current available to each layer that must be shared by all of the active LEDs in that layer. It would be better to eliminate the resistors at the ULN2803 and instead have resistors at the output of each '573, then the amount of current available to each LED in a given layer will be independent of hoe many total LEDs are active. Of course that means you need 64 resistors instead of 8, which is why they didn't build it that way. You could probably modify the cube, but it'd be a lot of bodging. If you decide to modify it, the LEDs will have a maximum duty cycle of 12.5%, so you should be able to drive them with a fair amount of current, but you'll need to watch the total current in each layer as that has to come from a single channel of the ULN2803.

author: Brainfarth
author_rank: Newbie
timestamp: September 24, 2015, 04:50:09 am
content: Thanks for the insight. I think I'm going to buy another one for $24 and try a swing at using resistors at the end of each row. Modifying this one would be an ugly mess.On another note, I put together a video of me assembling it and the cube in action.<iframe width="560" height="315" src="https://www.youtube.com/embed/iU45qLsP0-Y" frameborder="0" allowfullscreen></iframe>

author: Fungus
author_rank: Super Contributor
timestamp: September 24, 2015, 05:33:54 am
content: Quote from: ajb on September 08, 2015, 06:05:52 pmQuote from: ajb on September 08, 2015, 06:05:52 pmYes, I can see how that would be a problem when you're soldering 512 LEDs into a cube shape...

author: obiwanjacobi
author_rank: Super Contributor
timestamp: September 24, 2015, 11:29:56 am
content: Nice video! Any particular reason why you placed the LEDs on their sides?I am thinking about building one too, but with RGB LEDs and PWM chips...Any ideas on how to quickly generate cube-pattern animations for the software?Thanx.

author: jwm_
author_rank: Frequent Contributor
timestamp: September 24, 2015, 02:35:51 pm
content: You might be able to do something in software, use pwm to control the current and change the duty cycle based on how many are active in a plane to even out the brightness.

author: Fungus
author_rank: Super Contributor
timestamp: September 24, 2015, 07:34:36 pm
content: Quote from: jwm_ on September 24, 2015, 02:35:51 pmThat would make it very dim. You'd have to divide the brightness by 256 and it's already multiplexed 8:1.There has to be a way to redesign just the base without having to resolder all those LEDs.(Unless you enjoy that part...)Quote from: obiwanjacobi on September 24, 2015, 11:29:56 amYep. That's weird, never saw that before.Quote from: obiwanjacobi on September 24, 2015, 11:29:56 amThere's new(ish) LEDs out there with built-in WS2811. They can save you ahugeamount of work, it's almost cheating.eg.http://www.alibaba.com/product-detail/ws2811-IC-5mm-8mm-rgb-pixel_60027168205.html

author: ajb
author_rank: Super Contributor
timestamp: September 24, 2015, 09:29:59 pm
content: My assumption from looking at the PCB and schematic is that the LEDs are arranged with the anodes common in each (Z-axis) column, and the cathodes are common in each (X-Y plane) layer, with the common anodes dropping straight onto the PCB. It also looks like the whole LED cube is socketed into the PCB with individual machine pins? So if you can unplug the cube from the PCB it should be fairly straightforward (if extremely tedious) to either bodge an SMT resistor onto each of the anode traces or solder a TH resistor onto the bottom of each anode leg. The ULN2803 driving the cathodes is only good for 500mA, so you'd need to size the resistors for ~7mA per LED if you want to be able to have all of the LEDs in a row on at once.And yes, if you wanted to do an RGB cube, I'd be really tempted to use WS2812 LEDs. Common up the Gnd and +5V in each column, dropping straight onto the PCB at the bottom, and then just chain together the Din-Douts.

author: Brainfarth
author_rank: Newbie
timestamp: September 25, 2015, 03:22:44 am
content: I think that if the led's were aimed upwards, it would be more difficult to construct the whole cube because the LED would be in the way.Also, for those who want to put together the chinese cubes found on ebay, I have a link for all the information you need for programming them (based on the STC12C5A60S2 chip)https://github.com/tomazas/ledcube8x8x8/blob/master/README.mdI dunno if my ADD would allow me to put together a 8x8x8 RGB model.

author: retrolefty
author_rank: Super Contributor
timestamp: September 25, 2015, 04:38:21 am
content: I built a 5x5x led cube and give a few tips I came away with.Best way to drive the led columns is with special serial in, constant current sinking driver chips. I used two 16 bit drivers in series to drive the 25 columns. These chips need just a single resistor to program the desired current for all their output pins.LED cubes with odd numbers have a better 'artistic' form as there is a true center row and column.Driver chip datasheet:http://datasheets.picprojects.org/stp16dp05.pdf

author: obiwanjacobi
author_rank: Super Contributor
timestamp: September 25, 2015, 06:29:15 am
content: I don't see PWM on the STP16DP05..? I was thinking of using theTLC5940- already ordered a couple to experiment with.I know about smart LEDs but as you said, that's cheating - what will I learn from that? I was thinking of doing some sort of hybrid - using the same driver chip to drive multiplexed colums (or rows - whatever) - but keep that number small (2-4).Interesting remark on the odd number of columns/rows... I'll keep that in mind.I gave the problem of how to program the cube some thought. I think that maybe a domain-specific-language could come in handyIt's (almost) like 3D graphics where you have transformations (rotation, sizing, translation) combined with a timeline that scripts the animations... This part could be generic for all 'Cube-matrix' problems. The driver (hardware specific) would have the wonderful job of translating the generic format to the stream of data while multiplexing the cols etc.

author: Fungus
author_rank: Super Contributor
timestamp: September 25, 2015, 10:33:01 am
content: Quote from: retrolefty on September 25, 2015, 04:38:21 amDefinitely this^. eg. 7x7x7 is much better than 8x8x8 IMHO.9x9x9 would be even better but chips all work in multiples of 8 so it's a pain in the ass.

author: Fungus
author_rank: Super Contributor
timestamp: September 25, 2015, 11:14:42 am
content: Quote from: obiwanjacobi on September 25, 2015, 06:29:15 amAh, the venerable TLC5940. I killed a lot of those in my youth.Quote from: obiwanjacobi on September 25, 2015, 06:29:15 amOnly cheating on the soldering side. Getting it nice and square is still a challenge and the programming will still be difficult.Watch this before deciding:And ... updating 512 of them at a decent frame rate will be interesting - for 30Hz you'll have to split the cube in two and update each half separately. Maybe even four parts (I can't be bothered to do the math...) with an individual Arduino for each part.PS: Don't underestimate the power requirements. 512 LEDs set to RGB(255,255,255) is 30 amps(And probably too bright to look at...)Multiplexing helps with power, but...watch that video again before you think power is a good enough reason.

author: jwm_
author_rank: Frequent Contributor
timestamp: September 25, 2015, 03:06:41 pm
content: Quote from: Fungus on September 24, 2015, 07:34:36 pmNo, you get rid of the resistors and rely solely on pwm. Right now it is dim because the resistor needs to be sized to not blow out a single led so that is your max current to divide up, without the artificial limit of the resistors, you can triple the current when you have three actives for instance.It is a bit more dangerous in that a software bug can hurt your LEDs, so you may want to debug with resistors still installed, but the technique is quite common.

author: ajb
author_rank: Super Contributor
timestamp: September 25, 2015, 06:02:43 pm
content: Quote from: jwm_ on September 25, 2015, 03:06:41 pmStill not a great idea. The current during the on-time is going to be limited only by the impedance of the high- and low-side driving devices. The ULN2803 will probably be okay at first (driving a ~3V LED from 5V it'll hit ~500mA before it's limited by its own saturation voltage, not accounting for high side impedance), but the ratings of the 74ALS573 on the high side will certainly be exceeded. The LEDs might or might not be okay, it depends on what the output VI curve for the '573 looks like and what your on/off times are like. Once an LED fails short, though, the other parts will quickly fall over as well.

author: Fungus
author_rank: Super Contributor
timestamp: September 25, 2015, 06:56:42 pm
content: Quote from: jwm_ on September 25, 2015, 03:06:41 pmThat doesn't make it OK.(And one software glitch could wreck all that soldering in a millisecond)

author: jwm_
author_rank: Frequent Contributor
timestamp: September 26, 2015, 12:53:18 am
content: Quote from: Fungus on September 25, 2015, 06:56:42 pmI can totally understand not wanting to do it as it can be risky.but calling it not okay is a stretch when it is pretty much how every commercial motor/LED driver actually works. PWM control of current is a well established technique and vastly superior than resistive limiting when you can pull it off.It is what lets us use nice small 3V nominal stepper motors instead of huge 24V ones in the reprap project since you are not relying on the internal resistance of the windings to limit your current, your PWM driver is what does it.Back at the begining it was thought we needed 4 $90 each motors because those were the only ones we could find that met the spec at 12V, of course, turns out motors are made assuming real PWM control which is why we had issues finding the right ones.John

author: ajb
author_rank: Super Contributor
timestamp: September 26, 2015, 03:43:24 am
content: Quote from: jwm_ on September 26, 2015, 12:53:18 amYou've only got half the story here. A PWM stepper driver relies on the inductance of the motor windings to slow down the rate at which current through the motor increases and decreases. When the driver first applies voltage to the winding, the current rises slowly enough due to the winding inductance that the driver can turn its output off when the current hits its internal comparator's top hysteresis point. Then the current decays (cycling through a freewheeling diode or synchronous switch) slowly enough that the driver can switch the output back on when the current hits the bottom hysteresis point. So the current going through the winding slowly (for varying definitions of "slow") bounces between the two hysteresis points at a rate determined by the inductance of the winding. Buck-mode LED drivers do exactly the same thing, but because LEDs are not inherently inductive to any appreciable extent, an external inductor must be connected to control the slope of the current waveform.If you just PWM an LED with no inductor and no resistor, the rate of change in current is limited only by the parasitic inductance and capacitance in the circuit, which is likely vanishingly small. So a very short time after the on-time of your PWM cycle begins, your LED will see the full current current your circuitry is capable of providing, which will be determined by the impedances of the top and bottom drivers and ohmic losses as mentioned above.

author: obiwanjacobi
author_rank: Super Contributor
timestamp: September 26, 2015, 04:52:32 am
content: We should get @mikeselectricstuff in on this - he does this stuff for a living (I think)...

author: Fungus
author_rank: Super Contributor
timestamp: September 26, 2015, 06:58:07 am
content: Quote from: ajb on September 26, 2015, 03:43:24 amYep, and high power LED drivers have an inductor added to them for the same reason (to act as a low pass filter on the current).LED connected directly to a transistor? Not so much. It will be hit with whatever the power supply can provide.

author: jwm_
author_rank: Frequent Contributor
timestamp: September 29, 2015, 02:12:55 am
content: Quote from: ajb on September 26, 2015, 03:43:24 amThat is really interesting, I have done the trick with led displays and micros without issue, perhaps there was enough parasitic inductance to make it not an issue. I am curious now what my peak currents are. I measured my current with a decent meter, but the inherent low pass filtering would have likely hidden these current spikes.What would be the best way to measure that, scope across a sense resistor inline with the circuit? I'll dig out one of my old blinkies and see how it is actually performing.Okay, new idea, replace the resistors with inductors and try not to create an accidental step-up boost converter pwming those inductors while multiplexing the outputs.

author: Fungus
author_rank: Super Contributor
timestamp: September 29, 2015, 03:53:52 am
content: Quote from: jwm_ on September 29, 2015, 02:12:55 amAnd don't worry about the 'persistence of light' as you step between the layers. Just think of all the resistors you saved!

author: Brainfarth
author_rank: Newbie
timestamp: October 06, 2015, 11:13:39 pm
content: I got another china kit in the mail today and was wondering what was decided to be the best way to brighten things up. Do I bypass the 470ohm resistor that feed the 2803's and place one on each collector output? And would that be 470ohm as well?