LEDs and Multiplexing
Topic: LED Cube
(Read 1 time)
Sep 20, 2012, 12:50 am
: Sep 20, 2012, 12:56 am by dceodhz
I'm building an 8x8x8 single color LED Cube. I fully get the whole build concept and powering of LED's so as to not power the whole level.
My problem lies in the actual hardware and programming that I need to do. I'm pretty savvy so if someone could point me in the right direction so I can teach myself to code this thing, and if anyone knows exactly what kind of components im looking for to power the cube.
64 LED per Layer
So I need to find a way to control the ground of each LED individually. But collectively as a layer...ugh, I should have paid better attention in those IT classes.
So HELP is greatly appreciated.
*EDIT* Just found Search here on the forums...still though if anyone has any helpful links or know how please feel free to chime in
Gammon Software Solutions
Re: LED Cube
Sep 20, 2012, 01:18 am
The search function on this forum isn't too great, but lots of people have done LED cubes.
Try Googling: led cube +arduino
Please post technical questions on the forum, not by personal message. Thanks!
Re: LED Cube
Sep 20, 2012, 01:51 am
Thanks for the google idea, but I've spent a few hours deciphering what I can.
I'm looking for people who know about multiplexing and the code required to function.
Unfortunately I don't quite understand what's exactly necessary.
I could manually control each LED but its the ARDUINO and hardware part I dont understand...the code I am clueless.
Re: LED Cube
Sep 20, 2012, 03:13 am
There are many ways to control the LEDs.
You could have 513 wires the computer (aka pinouts), 1 ground 512 control. Another method is called multiplexing, this technique also used in LED matrixs (like the kind you see on scrolling led signs).
With multiplexing, you can greatly reduce the number of pins needed to control each led individually, but you have to flash the leds individually, not in a group, but in a sequence. The sequence happens so fast, that our brain perceives this happening at once. The concept is called "Persistance of VIsion" and its what makes movies look like moving pictures, rather than a series of still images.
Im working on a 64 led cube (4x4x4), I could build it with 65 wires, but that would be more than an arduino can handle.
Ok, so if you use multiplexing you can actually multiplex in a variety of ways. I chose to break my cube up into 16 columns and 4 planes which requires 20 pinouts (16 columns, plus 4 planes = 20), which is exactly how many an arduino has, so the way i have it setup. I could have also set it up as 8 by 8 matrix, its the same number of LEDs, but that arrangement uses 8 positive, and 8 negative, totalling 16 pinouts.
Now things get really gooey, there is this thing called charlieplexing. Charlieplexing, named after a dude named charlie, is a method of getting even more complex, but also reducing the pinouts required to control large numbers of LEDS. In the case of my 4x4x4 cube, I think I need a total of 9 pinouts to control all 64 LEDs! Its actually quite the clever little trick that only works with LEDs.
Those are all ways of controlling many leds, with few control lines. but there is more...
There are components called shift registers, they are ICs that convert serial to parallel, and vice verse. They come in sizes like 8, 16,32,64, bit, and they can be chained together to create huge large registers, for controlling many many pinouts, each 8 bit chip is 8 pinouts, all of these pinouts are controlled by 3 pintouts on the microcontroller (its sending the data in serial, then the shift register delivers in parallel.)
Now, if thats not complex enough for you, there are special chips that are kinda like fancy shift registers, that have all the good stuff LEDs like in one package, and those are called LED drivers.
OK, so... If you are going to try to control 512 LEDs, you will need some shift registers or LED drivers multiplexing and charlieplexing will not be enough, you will probably want multiplexing and shift registers.
I just converted my cube over from 20 pins to about 8 or 9 wires, but I havent tried it out yet.
heres a good start:
http://www.instructables.com/id/Led-Cube-8x8x8/ it was the first link when I googled 8x8x8 led cube arduino
Solder is electric glue
Re: LED Cube
Sep 20, 2012, 02:01 pm
'm looking for people who know about multiplexing and the code required to function.
For the fundamentals of multiplexing see:-
Re: LED Cube
Sep 21, 2012, 05:25 am
An AtMega32 controls 8 8bit Latches. These 64 bits control, via a PNP Transistor, the anodes of 8 LEDs, each. There are also 8 N-Channel MOSFETs connected to the AtMega32. They each control the cathodes of 64 LEDs on a Y-Plane. It can talk to a PC via USB with a FT232RL. A 1Mbit FRAM is accessed over TWI (or I2C). There's also an AtMega8 which acts as a TWI Slave and sends audio data to the AtMega32.