• moekoe

PIKOCUBE - is it the smallest LED cube?

Updated: Dec 28, 2019

A very cute LED cube from just five PCBs soldered together

A funny weekend project for the LED lovers. I don't know if someone have already seen the RGB-Brick which I've created almost 4 years ago, but this one here is nearly the same, just the size is somehow different. One pixel of the RGB-Brick is bigger then four of the Pikocubes. And there are over ten times more LEDs on the brick. Well, the Pikocube is almost 10x10x10mm.








Parts you will need

27 LEDs for just three PCBs
  • 5x PCB

  • 45x WS2812 2020 LEDs

  • 5x 0.1µF 0603 capacitor

  • 5x 10 µF 0603 capacitor

  • 5x 0 ohms 0603 resistor









Within the circuit of the PCBs there isn't any magic. It just connects the DINs of one LED to the DOUT of the other. And it contains two capacitors between 5V and GND. According to the datasheet of the WS2812, one capacitor for each LED is recommended, but the area for the nine LEDs is very small and the LEDs are not far away from each other, that's why I have used two capacitors only.



To connect the five PCBs together I added some solder pads on all four edges which contains 5V, GND, DIN, DOUT. Some are equipped with jumper pads because especially for the top PCB you should't connect all of the pads - 5V would be soldered to GND and that would't be good... Admittedly, the pads are way too small with its size of just 0.635x0.635mm, but with some patience it will work somehow.




Coding

This project is just about connecting 45 LEDs so can simply be creative while programming the Pikocube. I am using the FastLED library for most of my LED projects, but the Neopixel library works in many cases as well. I wrote a simple function which maps a circular (?) matrix onto the cube, resulting in a 12x5 matrix where the fifth row (y=4, because first row is y=0) is just the middle pixel on top, no matter which x coordinate is used.

int get_pixel(int x, int y){ int num = -1; int mat = x/3; if(y < 3){ //bottom matrix 3x12 if(x<3){ //matrix 1 if(y==1) num = 5 - x; else num = y * 3 + x; } else if(x<6){ //matrix 2 if(y==1) num = 17 - x; else num = y * 3 + x + 6; } else if(x<9){ //matrix 3 if(y==1) num = 29 - x; else num = y * 3 + x + 12; } else if(x<12){ //matrix 4 if(y==1) num = 41 - x; else num = y * 3 + x + 18; } } else if(y == 3){ //top matrix 3x3 if(x==0 || x==11) num = 38; if(x==1) num = 39; if(x==2 || x==3) num = 44; if(x==4) num = 43; if(x==5 || x==6) num = 42; if(x==7) num = 41; if(x==8 || x==9) num = 36; if(x==10) num = 37; } else if(y==4){ //top middle led num = 40; } return num; }

Moulding in epoxy resin

It was just a nice little idea because I thought maybe it holds all the five PCBs together and makes the cube somehow stronger. Yeah, the result is really awesome heh?

I took a 20x20x20mm silicone moulding block which works pretty good in my case. The surface is really even and there is no need to sand the resulting block. By the way, I put a short piece of rigid cable into the block so that I have more possibilities later on (e.g. for a stand or something like this).


Final Result

The final build doesn't look really completed when you see the rigid cable at the bottom, but it was the first test for another great project. The next cube will be build out of six PCBs, equipped with a LIPO battery inside the cube and a MCU. (Some electrical dices are coming...)



0 views
Follow me
Moritz König

Electronic enthusiast,

Maker, Electrical engineering student, Creating things with electronics, PCBs, 3DPrinting, lasercutting and all I found in the garage

© 2019 by Moritz König