Introduction
This idea came to my mind spontaneously, until the autumn of this year I could not guess that people were doing something similar in life. In fact, about the fact that such "cubes" exist, told the teacher circuitry and offered to take this topic as a course.
Looking ahead, I want to say that you do not need to think about the amount of work as something colossal. On the contrary, I had to do quite a bit, but those who think: "Ha, I will do it in a couple of days," - get ready for the opposite. Yes, and the process itself involves in the work no worse than writing some software code ...
Observing the small works, 3x3x3, and 4x4x4, and 5x5x5, I slowly understood that the more - the better.
')
Milestone # 1:If you didn’t work with a soldering iron before, realize first that all the legs of the LEDs will need to be soldered, this is 2 * 512, not so little. Therefore, practice on any cats.
The Internet is full of instructions on this topic. But from the beginning to the end, I saw it seems only on instructables.com, and I will immediately say, somehow there is too much detail in terms of everything. I personally used the components in two times less. Naturally equipment was easier. As a result, for our
small toy we need:
- 512 LEDs ($ 6 - aliexp)
- 5 special chips for LEDs STP16CPS05MTR ($ 9 - aliexp)
it is more profitable to take such details in batches naturally
- 8 BD136 pnp transistors (domestic analogs will also work)
- 5 1kOhm resistors (working power 2 W)
- 5 10µF capacitors (operating voltage 35-50 V)
- connecting wires (about 10 m left, taking into account failures), solder and all those who are high
Time to start making layout
We take a drill, a ruler, we make a 8x8 mesh (the main thing is not to do 8x9, like me) on anything, whether it be foam plastic, wooden board or something else. And gently drill holes for LEDs.

Milestone # 2:The key word is “neat”, a couple of millimeters left or right, and you’ll already have a curve cube in the end.
After this step is completed, we insert the LEDs into the cells and observe the following rule:
a) All anodes should be on the left and cathodes on the right. Or vice versa. As you prefer.
b) The very first row at the top must contain LEDs at an angle:

According to this principle we connect the cathodes (-). Where there is a dotted line - attach some kind of wire to keep the layer firmly on both sides.
Holding this gentle interlayer, it may seem to you that it is about to fall apart, but in fact, when you start to fasten the layers, then you can safely throw this construction on the floor, and most likely nothing will fall apart.
The result of the first layer

Before you begin to solder the second layer, you need to take and bend all the anodes as follows:

We combine several layers

Milestone # 3:Beginners, please use a special solder paste (flux) if you are dealing with wires, so save yourself a lot of nerves (not the first time).
When you are a little tired

So, having soldered 64 wires to the anodes, which we got “at the bottom”, we can proceed to the electronic circuit itself.

We see that the outputs of our microcircuits on both sides are transferred to the common anodes of the cube columns, and in the 5th we multiplex the layer control through transistors. It seems that everything is not difficult: a signal is sent to certain columns and layers, and we get a pair of luminous LEDs.
In fact, it works like this:

There are 3 inputs: clocking, data and latch. When 8 bits have been processed, the latch goes in, and the data is placed in a register. Since our chips are made on shift registers, in order to render our cube 1 time with different bits of information, we need to write 1 byte (8 bits with layer numbers to which voltage is applied), then there will be empty data, since for the fifth chip, our left pins are not connected to anything. Next, we write 1 byte for each of the group of eight columns. The corresponding bit will determine which column should be lit, and where it intersects with the activated layer, the LED at their intersection and should receive a voltage.
Below is a diagram of the developer’s datasheet for general reference:

How we will write 1 byte of data:
void CUBE::send_data(char byte_to_send){ for(int i = 0; i < 8; i++){ if(byte_to_send & 0x01<<i){ digitalWrite(SDI, HIGH);
I used the Arduino UNO (I picked it up), but any model would be suitable here. Both nano and mini, since only 3 digital inputs and vcc + gnd are used.
Take care of the additional power supply unit separately (I used the 12V 2A adapter); it seems that such a power is needed to display all the layers.
All source code in the form of a sketch for Arduino will be
here .
- You can do this thing yourself in a week, the main thing is to buy all the components;
- You can put extra. real time clock module, and this cube will work without being connected to a PC;
- You can, of course, customize this item with various buttons and radio controls, but I did not;
- Having trained on this version of "simpler", I plan to soon assemble an RGB cube.
Many thanks are expressed to the author of this idea and the spiritual leader Nick `s Shulze. Materials taken from the site hownottoengineer.com. Good luck and success in all your creative endeavors!