I have made two different led cubes, one which is 4 by 4 by 4 and one which is 5 by 5 by 5. They both work using a microcontroller, shift registers, and multiplexing.
This was my first attempt at an electronics project this big. Each layer connected all the anodes in rows, and all the cathodes in columns. This resulted in 8 outputs per layer. All the layers had their rows connected, allowing 4 pins to control every LED anode.
The cathodes columns were all individually connected downwards, resulting in 16 cathode connections at the bottom. These 16 connections were controlled by two shift registers, and the 4 anodes were controlled directly by the microcontroller.
In theory this idea worked very well, with the minimum amount of pins being used. In practice is was very hard to build and solder the led cube with the anode rows and cathode columns not touching. The reason the first cube looks so messy is that many LEDs had to be bent at weird angles to avoid shorts.
This is a redesign of the original led cube, with physically building it in mind while designing. In this version, the anodes are all connected on one layer, and the cathodes go straight down. This means there are 25 cathodes to be connected to at the bottom, and 5 layers to connect.
Due to the speed the LEDs are multiplexed at, there is no need for resistors.
This redesign worked out very well. After making sure every led was working correctly, I wrote software to control them. This can be found on my github (link at the top).
In the video only a 4 by 4 by 4 grid of leds is being used for the pattern. This is because I borrowed the pattern from my 4 by 4 by 4 LED cube design, because of the amount of time it takes to create patterns. Right now the pattern is short, because of the low memory in the microcontroller I am using. Each frame takes an enormous 125 bytes, so very few frames can be stored.
In the future I hope to write code to allow the microcontroller to get frames over a serial connection to my laptop, meaning the number of frames won't be limited.
I also want to make a 3d editor in python to make it faster to create animations.