3x3x3 Led cube
Britannicus
Posts: 98
I've been tackling a very simple project building a 3x3x3 led cube and running it from a 555 timer and a 4020 binary counter, this provides outputs which essentially switch on and off strings of 3 LEDs in patterns. I thought this was cool for a couple of hours and a £2 investment.....
then I looked at youtube and got jealous !
I now want to build a larger matrix - or at least a 3x3 where each LED is able to be operated independantly of the rest (instead of 3's) . I'd like my BS2 to do this, but the little rascal of course has only 16 pins! .
So here's the question - I'm seeing people building much more complex arrays and wondering - my original thought was to have a series of 3 buffers, each get the same 9 pin outs, but then I use 3 further pins to decide whether the buffer is on or not. Of course this doesn't work well enough to give me all 27 variables - most permutations would not be available. This would allow me to at least have any one single LED illuminated, and have planes and strings though, bu tnot the full 134,217,728 variations from all off to all switched on.
How can I drive any permutation of LEDS (from say 27 for a 3x3) from only 16 pins. Is there a cheap IC that I can, for instance, that would take a serial input and create a parallel 27 bit output ??
I'm looking at LED sceens and thinking these use far more options so there must be a way to crack it ?
C'mon guys - you've never let me down for brilliant solutions in the past - what can be achieved here. I was stunned by some of he 3d renditions on the 100 x 100 x 100 cubes - but that's a bit beyond my budget
then I looked at youtube and got jealous !
I now want to build a larger matrix - or at least a 3x3 where each LED is able to be operated independantly of the rest (instead of 3's) . I'd like my BS2 to do this, but the little rascal of course has only 16 pins! .
So here's the question - I'm seeing people building much more complex arrays and wondering - my original thought was to have a series of 3 buffers, each get the same 9 pin outs, but then I use 3 further pins to decide whether the buffer is on or not. Of course this doesn't work well enough to give me all 27 variables - most permutations would not be available. This would allow me to at least have any one single LED illuminated, and have planes and strings though, bu tnot the full 134,217,728 variations from all off to all switched on.
How can I drive any permutation of LEDS (from say 27 for a 3x3) from only 16 pins. Is there a cheap IC that I can, for instance, that would take a serial input and create a parallel 27 bit output ??
I'm looking at LED sceens and thinking these use far more options so there must be a way to crack it ?
C'mon guys - you've never let me down for brilliant solutions in the past - what can be achieved here. I was stunned by some of he 3d renditions on the 100 x 100 x 100 cubes - but that's a bit beyond my budget
Comments
If you Charlieplex (http://en.wikipedia.org/wiki/Charlieplexing) you can drive n*n-n pins, but the wiring can get pretty hairy. I used a combination of row column addressing with charlieplexing for my LED Marquee to drive 192 LED's. Here's the thread:
http://forums.parallax.com/showthread.php?136152-LED-Marquee-Module-for-Gadget-Gangster-Platform-%28w-video%29&highlight=rgb+matrix
An LED cube isn't that much different, just a different topology.
This will drive me crazy now trying to think of a way to get this working. With my marquee I Charlieplexed alternate columns by alternately biasing the diodes. Couldn't you do the same thing with levels in a cube?
Whatever you do, don't become obsessed by this. Do NOT allow it to become your singular-focus object of fixation. I forbid it!
Curse you Erco!
Zoot, this is what I'm thinking:
As always loads of help .....
Charlieplexing seems a wonderfully elegant solution, but I figurethat the shift register seems simpler for a very small investment in this case .
However Charlieplexing is so elegant I want to understand it better ... I'm kinda still trying to get my head areound the permutations involved - I'm still looking at the wikipedia article and thinking to myself - If Pin 1 is High and Pin 3 is 0V - won't LED 1,3 and 6 all light whatever the state of PIN 2 ? - I'm missing something very obvious
.
Charlieplexing confused me at first too. It works because a pin can have three states: output high, output low, and input. In your three pin example two pins will be set to output high or low state, while the third will be set to input. When a pin is in input state it and the LED's the source or sink from it effectively drop out of the circuit. The more pins you add the more complex the wiring, but the concept remains the sample. The LOL shield is able to drive a decent size matrix using this technique. The downside is complex wiring and you can only light one LED at a time, so you sweep through the LED's quickly to display your image.
But you don't have to go all in line the LOL shield does. In the marquee and my example above I used it as a way to half the number of pins used in one axis of a row column scheme. I'm pretty sure I could pull off a 4 x 4 x 4 cube with 12 pins.
In a regular LED cube where the led pins themselves form nearly all wiring and structure for the cube, all cathodes of a layer are tied together, and then the anode of each led in a layer is tied to the anode of the led above/below.
Each cathode layer is brought low (one a time) and the appropriate anode(s) for the leds lit in that layer are brought high. Then the cathode for that layer is brought high (to turn it off) and the next layer is done.
In some of my cubes (depending on the controller and how many leds in a layer) I sometimes add a transistor on each cathode pin to handle current consumption. For a 3x3x3 you need 12 pins. For a 4x4x4 you need 20 (though at that point shift registers for the anodes is a better idea as it brings the pin count down to 7 pins and makes current consumption a trivial issue.
Martin_H -- charlieplexing is a great schema, but I'm still not sure it lends itself to LED cubes, where the structure of the cube *is* the wiring. The wiring for cplexing would be complex enough that I don't see how you would get a clean looking cube?
In my diagram above I alternately biased the levels, so a single level pin controls two levels. Otherwise the wiring is like a normal cube. If you didn't do the alternate biasing by levels, but within a level I think it would have more impact.
cheers A
HI Zoot - just trying to get my head round this, as I think there's something I dont understand - from what you say I don't think you would be able to get every combination to light.
If i connect every layer to a common cathode ( A top, B middle, C bottom) then I number each vertical from 1 to 9 I can refer to each LED by 1A 9B etc.
So if I want 1B only to light - I set anode 1 to Hi and cathode B to low leaving A and C at high - this will light only 1B, I can get my head round that.
So if I want 1B to light at the same time as 2 A I have a problem - Anode 1 and 2 have to be high, and Cahode B and A have to be low, BUT - in that case 1A and 2B should also light shouldn't they because they share common cathodes / anodes?. 1C and 2C won't light of course, because I keep C at High.
So I can't have every one of the various options from 1 on to all on and every permutation between. Have I missed something very obvious ? (I ususally do !)
You don't light two leds in different layers at once (you can't). Basically, each layer is active 1/3 of the time (for your 3x3). The trick is to all this fast enough so that the eye is fooled into thinking all layers active at once. I generally try to get the rate to at least 300 hz to avoid "flicker".
This article may help: http://en.wikipedia.org/wiki/Multiplexed_display