
I would suggest you start with a "simple" 8x8 display before you tackle an 8x8x8 one, especially if you want gray shades.

In other words, while it might be easy(ish) to get it from the brightest to more dim, I imagine the hardest part would be from that "more dim" point to to completely off (if that made any sense). Also, given small differences in this threshold region between "identical" LEDs, it would be difficult indeed to get multiple LEDs evenly lit. It is like a typical diode curve with a threshold voltage to turn it on. Even if the light output might be somewhat linear to the electric current through it (but probably not quite, which further complicates matter, depending on the LED of course), the voltage-current relationship is not. Ok, I'm not saying using some DAC scheme to make different shades of LED light is impossible, but I would say it is "not likely"! That is an unusual, or rather impractical way to dim LEDs because it is difficult to get right (as in linearly increasing light output with each DAC step). That should clear that up (by circumventing PWM at the cost of using more digital lines for the d-to-a) and allow me to get shades of "grey" on my matrix. Now, my next goal is to use a D-to-A converter to send the true voltages to the 4051. IE make your own PWM multiplexing, don't use the built-in PWM (unless you can sync it somehow). To multiplex PWM signals, they should be syncronized to the display. It could work (maybe) if if the PWM frequency was "really fast", compared to the display multiplexing, AND if the frequency difference is not within something visually noticeable (again causing flicker).īut that's not how it's normally done. More likely the PWM is not synchronized to the display multiplexing, causing no end to flicker. Not that I know what you did and how you did it, but that's probably not what happened. The problem is not with the 4051, but rather that the PWM (pseudo analog out) isn't fast enough to render a "true partial voltage" to each LED in the time you need to scan across them to keep persistence of vision intact. More discussion of the 4051 here: Arduino Playground - bitchen Hope makes sense and helps someone out there. (I'm going to step up to an 8x8, once I get this mastered.) I do, however, recommend using the PORTD register to send the addresses to the 4051. You have to put a "delay(1)" after each analogWrite to makesure the votage renders to the LED that you've selected. I was just feeding Pin 3 analog to the 4015 and no dice unless your refresh rate is mind-numbingly slow. I was playing with this tonight on an 8X1 LED matrix. to allow a maximum of 64 outputs is the the correct path?
#Arduino led cubes free
If you have any more question feel free to ask.I have been looking at 4051 MULTIPLEXING an extending the analog. I'd suggest finding a well documented build from someone else that you like and follow that. There are quite a few ways of making a 8x8x8 cube. That's quite a bit of wire, which might ruin the aesthetics of the cube. So you need 1 chip for each level, and more problematically you need to run 8-row and 8-culumn wires for each level to the bottom.

There are specialized multiplexing IC, but those only support rows and colums (not level).

But you'd need some additional circuitry to combine row- and level-selection. That way you only need 24 outputs (8 for the leds, 8 to select which row, 8 to select which level). You could also choose to only light one row at a time. Also note that since you only need one level to be on at a time, some people prefer to use a decade counter IC for that. Please note that because of the way humans perceive light, it will look more like 1/3rd the brightness, instead of 1/8th (so that's great). Since only one level is lid at a time, the leds have a duty cycle of 12.5%. That way you only need 72 outputs (64 for the leds, and 8 for selecting the level). You can choose to light up only one level at a time. That way the leds are lid with a 100% duty cycle. You can wire the cube to use less digital outputs, but you'll end up with a less bright leds. But it depends on how you are wiring the leds. The multiplexing is just done on the microcontroller. Those are just chips to give you more outputs than your arduino has.
