The World's Smallest 4x4x4 RGB LED Cube





Introduction: The World's Smallest 4x4x4 RGB LED Cube

I believe this is "currently" the world's Tiniest 4x4x4 COLOR LED Cube. There are smaller ones but are usually single color and made up of fewer LEDs (3x3x3).

The actual LED cube is less than 1 inch square. It uses sixty four 3.2mmx2.7mm SMD RGB LED (Surface Mounted Device, Red+Green+Blue, Light Emitting Diode).

In this Instructable, I will share with you how I built it.

Credit where credit is due:
Original design and code is by Asher Glick and Kevin Baker.

I "simply" made a super tiny version of it. :-)

Step 1: Parts

These are the exact LEDs that I used, but you might want to shop around for square profile LEDs. It would make soldering easier. You'll see why in later steps.

1 x Arduino
I used an Arduino Nano clone. However, most Arduino with 16 or more I/O pins should work.
Unless you're comfortable modifying code with PORT commands, I'd recommend staying with a true ATMega based Arduino (do NOT use ESP8266, Arduino M0, Arduino Due, etc)

Custom PCB
Due to the insanely tiny dimensions that we're dealing with, soldering wires for the point to point connections is too complex to do by hand, so I designed a PCB for it. It would be cool to see more tiny cubes in the world so I've shared my custom PCB.

Step 2: Soldering LEDs Into Pillars

The cube consists of sixteen pillars.

Each pillar consists of four rotated LEDs such that powering any two of the four leads would turn on only one color of one of the LEDs. The Arduino switches the LEDs so quickly that our eyes are fooled into thinking that multiple LEDs are on at once.

After trying many different jig ideas to hold the LEDs while I solder them, my final jig is made of three layers of cardboard. This is where it would have been simpler had I used LEDs with symmetrical square profile. To keep the symmetry as I rotate the LED at each layer, I had to create a jig that hold the LEDs at different depths!

Please see the photos and video for more detail.

This project, as with any LED cube is very labor intensive, so I took every precaution possible to ensure success. I test all the LEDs at every step to catch mistakes as early as possible.

Step 3: Designing the Custom PCB

First photo above is the bottom wiring of my normal sized CharlieCube. There was a lot jumper wires that cannot short each other. Difficult, but doable at that scale.

I had naively thought I would be able to do the same thing for this cube. However, due to the tiny size of the cube, running wires in around all the 64 pins at the bottom of the PCB (and not create a short) is pretty much impossible. So, I learned Eagle CAD (mostly from YouTube :-)) and designed my very first custom PCB. It is one giant sorry mess, but it works! lol

Step 4: More Soldering :-)

The distance between pillars is only about 1 milimeter! To be safe, I painted the solder joints with clear nail polish so the pillars would not short out even if they accidentally touch each other.

I decided to solder the pillars onto the top of the PCB instead of the bottom because I was worried that I would not be able to keep the pillars straight and even with the other pillars if I could not see them as I solder. The side effect of that decision is that sometimes I had to put the iron tip between the wires. Despite that extra challenge, I think it was the right decision. I soldered the inner pillars first and worked circularly outward to minimize the obstruction.

Step 5: Minor Code Tweak

The original CharlieCube uses common Cathode LEDs. However, my LEDs are common Anode!

Thankfully, Asher Glick did an awesome job isolating the code that controls the LEDs. I only had to invert the bits in cubeplex.h so what used to be High is now Low and vice versa!

// Original Common Cathode(-) version
PORTB = pinsB[pin1];
PORTC = pinsC[pin1];
PORTD = pinsD[pin1];
// Modified Common Anode(+) version
PORTB = ~pinsB[pin1];
PORTC = ~pinsC[pin1];
PORTD = ~pinsD[pin1];

Original code is available here.
Modified code is available here.

I truly hope that your would build this or even smaller ones! However, please realize that as with any LED cube build, there are many opportunities to make mistakes that would be impossible to fix. I will share the joy of your success, but sadly I would not be able to help you debug your cube. :-( So, take your time and test every step.

PS: If you succeeded in building one, please post a link to yours at this Instructable and/or my YouTube channel.
Good luck!

PPS: I used the lasercutter at my local MakerSpace, but it would be awesome to have one at home. If you think this is a cool project, I could use your vote to win a lasercutter. Thanks!!! :-)

Raspberry Pi Contest 2016

Runner Up in the
Raspberry Pi Contest 2016

3 People Made This Project!


  • Clocks Contest

    Clocks Contest
  • Woodworking Contest

    Woodworking Contest
  • Oil Contest

    Oil Contest

We have a be nice policy.
Please be positive and constructive.




If you use 1206 RGB LEDs, you can make it smaller. :-D Maybe it is more difficult to solder them. But your article makes me feel I would like to try it.

6 replies

Oh yeah... :-) I am researching smaller SMD LEDs.
Let me know if you know of any inexpensive source of symmetrical RGB leds.

The smallest RGB LEDs I've used so far are in a 0606 case, which is as large as two 603 LEDs side by side. They aren't expensive at all, currently you can get 100 for less than 4$ on aliexpress, shipping included.

If I had the time I'd take the challange, but there are still a bunch of projects waiting to be completed :(

Anyway, this is your chance to make an even smaller LED cube. Not that your current cube istn't amazing as it is, with 0606 LEDs you would absolutly get the worlds smallest RGB LED cube. I'll be patiently waiting :)

nqtronix, thank you for the tip! I've been looking for symmetric (square) RGB leds with pads in the corner (rather than on two sides). I think that would make soldering easier because then the wires could be straight instead of having to zigzag. So far I've only seen them at places like DigiKey for quite a bit more money :-(

Never mind, I found a pretty interesting offer:

These are 0404 RGB LEDs, which measure 1x1mm. They even have pads at each corner! I assume they are difficult to solder even on a professional PCB, so stacking them free air is definitly a challange. At 0.25$ each they are not the cheapest, but if you manage to turn them into a cube, I'd be impressive as hell.

I've never seen LEDs like that. Can you post a like to a product you have in mind? I'll try to find a seller on aliexpress for parts in that or a similiar case.

Since I am in China, it is easier for me to buy them through Alibaba or Taobao or even 新赛格. I did buy some sample of 1206 type. And it seems 0805 is available too, which it is used for LED screen. :-P Maybe I can try 0805.

About the 1206 type on ebay, you can search keywords 1206 rgb

Hi,i want to get a pcb done for the cube wich pcb in the files you posted is the final working pcb as there are lots of brd files,i want to make sure i order the right working pcb as they are verry expensive for the size,due to a few layers i expect?

1 reply

Yeah, sorry about the file mess. I tried a lot of different things. :-(
The best path is probably to order or download it from OSH Park. This is the actual board that I ordered. The holes for the headers are a bit too small, but other than that the board worked perfectly. Good luck!

Thank you! Hope your LEDs arrive soon ;-)

Still waiting on the LEDs. From what I can tell they finally shipped out on 22 FEB (ordered 30 JAN). This may be a record :-/ The resistors I ordered long afterward arrived last week.

I've poked around online and haven't really found any suitable LED alternatives that have a square format AND could be soldered into a charlieplex column. Can you tell me what you used for vertical spacing between the LEDs in the column?

3 weeks before they even shipped?! That sucks...

For the jig, I recycled cardboard from a snack box. Maybe you've seen it already, but I talked about it in this video:

Thanks, I've watched that video many times. I'm probably going to have to come up with something different than the jig you used. Looking back at my previous post, I probably wasn't specific enough with my question. What is the measurement (in or mm) between LED's in the vertical column. I want to get the cube cube-shaped in all three dimensions.

On my cube, the distance between the top of one LED to the top of the LED above it is 5mm. That is also the distance between the left side of an LED to the left side of an LED to the right of the first LED.

I answered your question indirectly because the distance between LEDs depends on the orientation of the rectangular LED. Hope that helps.

5mm is the number I needed, thanks!

:-) Thanks Ron!

So you laser cut your stencils that you used for soldering and you had your PCB manufactured in low quantity. Too much time and money for a simple LED cube.

OK, I'm getting older, have an above average IQ, and have been a Marine Vet for the last 31yrs. What the heck is this for? I understand that it lights up, but I don't know why I would want to make one, and what I would use it for.

BTW... Marine is an acronym for Muscles Are Required, Intelligence Non-Essential.

Thanks in advance,