I read a few 3x3x3 LED tutorials, e.g. let us take this one:


As far as I understand, you can address any of the 3x3 light columns:

*  *  *       1  2  3
*  *  *       4  5  6
*  *  *       7  8  9

and each of the three vertical layers:


But can I address each of the 27 leds separately? In other words, can I light up:

1+  2   3         bottom layer
4   5+  6
7   8   9

1   2+  3         middle layer
4+  5   6
7   8   9
  • The link to the code in the Instructables article doesn't work - can you please edit your question to include it? Feb 4 '16 at 17:33
  • 1
    @DenisKulagin You should also take a look at "addressable" leds. You chain them, can address each of them individually and are RGB. Instead of 3 cathodes and one anode or vice versa, they all have their own little chip aboard and they can be "programmed". You can chain their data pins so you would just need 1 pin of the arduino to control them.
    – larzz11
    Feb 5 '16 at 7:34
  • @larzz11 Those are totally cool. But if you want to play around with Arduino, cubes are good as well) Feb 5 '16 at 8:55
  • @DenisKulagin Not sure what you mean, I would think that making a cube out of addressable leds would be easier than making it with regular LEDs.
    – larzz11
    Feb 5 '16 at 8:59
  • @larzz11 Are you talking of a led strip or individual addresable LEDs? Feb 5 '16 at 9:15

3 * 3 * 3 = 27

The easy/overkill way

You could do this by assigning a pin to every LED (on an arduino Mega)

The overkill way

Use shift registers, almost any arduino will do. The shift register will set it's outputs according to the amount of high/low signals being clocked in. In theory, you can address an infinite amount of LED's (only limited by space, time or funds).

Breaking it down

You can break it down, so that you control each layer at once. Effectively you only drive 9 LED's (1 layer). And attach a transistor to the negative side of the layer. This way you can choose a LED with the positive side, and a layer with the negative (per layer) control.

Switching these layers rapidly, will make the changes invisible to the eye. So it seems that the LED's are on all the time.

To infinity

Combine the overkill way (shift registers) with breaking it down (to reduce cost/size) and you'll be able to create a (somewhat) scalable design.

There are an awfull lot of tutorials, I suggest you choose one you can understand, try to make a smaller cube, and scale up from there!

Scaling issues

  • You'll need a better powersupply for each series of LED's you add.
  • Costs.
  • Processing time, the arduino might not be able to clock the signals fast enough, making it visible for eyes. (depends on the amount of LED's)

Be sure to check/measure/calculate these things along the project.


No, the three transistors are there to select the layer you want to control. At every moment only ONE layer can be on. But if you switch through controlling these layers fast enough, you can create the illusion of having multiple leds on even across layers. THis is because the human eyes are just not capable of seeing lights flashing at a high rate.

TL;DR No you can't address them individually, but you can create the illusion that you can.

  • I got the idea, it might work! Feb 4 '16 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.