Author Topic: 8x8x8 LED cube  (Read 13808 times)

0 Members and 1 Guest are viewing this topic.

Offline BrainfarthTopic starter

  • Newbie
  • Posts: 9
  • Country: us
8x8x8 LED cube
« on: September 08, 2015, 04:07:56 pm »
I recently finished a LED cube project that I purchased from Ebay http://goo.gl/Ahw0Xc Then 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
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2735
  • Country: us
Re: 8x8x8 LED cube
« Reply #1 on: September 08, 2015, 06:05:52 pm »
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.
 

Offline BrainfarthTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 8x8x8 LED cube
« Reply #2 on: September 24, 2015, 04:50:09 am »
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>
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #3 on: September 24, 2015, 05:33:54 am »
The problem is that there's a single resistor on the common cathode side of the matrix
:palm:

Of course that means you need 64 resistors instead of 8, which is why they didn't build it that way.
Yes, I can see how that would be a problem when you're soldering 512 LEDs into a cube shape...   |O
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: 8x8x8 LED cube
« Reply #4 on: September 24, 2015, 11:29:56 am »
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.
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline jwm_

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
    • Not A Number
Re: 8x8x8 LED cube
« Reply #5 on: September 24, 2015, 02:35:51 pm »
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.

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #6 on: September 24, 2015, 07:34:36 pm »
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.
That 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...)


Any particular reason why you placed the LEDs on their sides?
Yep. That's weird, never saw that before.

I am thinking about building one too, but with RGB LEDs and PWM chips...
There's new(ish) LEDs out there with built-in WS2811. They can save you a huge amount of work, it's almost cheating.

eg. http://www.alibaba.com/product-detail/ws2811-IC-5mm-8mm-rgb-pixel_60027168205.html
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2735
  • Country: us
Re: 8x8x8 LED cube
« Reply #7 on: September 24, 2015, 09:29:59 pm »
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.
 

Offline BrainfarthTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 8x8x8 LED cube
« Reply #8 on: September 25, 2015, 03:22:44 am »
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.md
I dunno if my ADD would allow me to put together a 8x8x8 RGB model.
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: 8x8x8 LED cube
« Reply #9 on: September 25, 2015, 04:38:21 am »
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
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: 8x8x8 LED cube
« Reply #10 on: September 25, 2015, 06:29:15 am »
I don't see PWM on the STP16DP05..? I was thinking of using the TLC5940 - 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 handy  >:D
It'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.
« Last Edit: September 25, 2015, 06:34:44 am by obiwanjacobi »
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #11 on: September 25, 2015, 10:33:01 am »
LED cubes with odd numbers have a better 'artistic' form as there is a true center row and column.

Definitely 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.
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #12 on: September 25, 2015, 11:14:42 am »
I don't see PWM on the STP16DP05..? I was thinking of using the TLC5940 - already ordered a couple to experiment with.
Ah, the venerable TLC5940. I killed a lot of those in my youth.

I know about smart LEDs but as you said, that's cheating - what will I learn from that?
Only 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:  :popcorn:



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  :D (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.
« Last Edit: September 25, 2015, 03:12:25 pm by Fungus »
 

Offline jwm_

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
    • Not A Number
Re: 8x8x8 LED cube
« Reply #13 on: September 25, 2015, 03:06:41 pm »
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.
That would make it very dim. You'd have to divide the brightness by 256 and it's already multiplexed 8:1.

No, 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.

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2735
  • Country: us
Re: 8x8x8 LED cube
« Reply #14 on: September 25, 2015, 06:02:43 pm »
No, 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.
Still 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.
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #15 on: September 25, 2015, 06:56:42 pm »
the technique is quite common.
That doesn't make it OK.

(And one software glitch could wreck all that soldering in a millisecond)
 

Offline jwm_

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
    • Not A Number
Re: 8x8x8 LED cube
« Reply #16 on: September 26, 2015, 12:53:18 am »
the technique is quite common.
That doesn't make it OK.

(And one software glitch could wreck all that soldering in a millisecond)

I 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

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2735
  • Country: us
Re: 8x8x8 LED cube
« Reply #17 on: September 26, 2015, 03:43:24 am »
I 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

You'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.
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: 8x8x8 LED cube
« Reply #18 on: September 26, 2015, 04:52:32 am »
We should get @mikeselectricstuff in on this - he does this stuff for a living (I think)...  :D
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #19 on: September 26, 2015, 06:58:07 am »
I 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.

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.

Yep, 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.

 

Offline jwm_

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
    • Not A Number
Re: 8x8x8 LED cube
« Reply #20 on: September 29, 2015, 02:12:55 am »
I 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

You'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.

That 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. :)

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17240
  • Country: 00
Re: 8x8x8 LED cube
« Reply #21 on: September 29, 2015, 03:53:52 am »
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. :)
And don't worry about the 'persistence of light' as you step between the layers. Just think of all the resistors you saved!
 

Offline BrainfarthTopic starter

  • Newbie
  • Posts: 9
  • Country: us
Re: 8x8x8 LED cube
« Reply #22 on: October 06, 2015, 11:13:39 pm »
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?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf