PIC 3x3x3 LED Cube




About: I love electronics and all about DIY.

Here´s my 3x3x3 LED cube, it's controlled by a PIC16F628A microcontroller.
This is my first microcontroller project that finally works, so i suppose is not that difficult to make for beginners.

I hope you'll enjoy that instructable and even make your own LED cube!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials

The PIC drives the cube without external IC's and with very few extra components.
To make your own LED cube you'll need:

-A PIC16F628A Microchip microcontroller ($2 ebay)

-27 diffused LEDs ($3.50 50pcs ebay)

-7805 voltage regulator ($0.99 3pcs ebay)

-9 330ohm resistors ($1.14 ebay)

-12 male + 12 female headers ($2.59 ebay)

-18 pin DIP IC socket ($0.99 10pcs ebay)

-Controller and cube circuit boards (make them yourself)

-16v 100uF electrolytic capacitor (recycled from old boards)

-100nF ceramic capacitor (recycled from old boards)

-Plug and small heatsink (recycled from old boards)

Step 2: The Controller

First, make the controller board (instructions here), drill the holes and tin the pads carefully.
Place all the components as shown in the picture and solder them in place.

Step 3: The Cube

Mark a 3x3 1 inch grid in a corck and hole the places for the LEDs, this will keep them aligned while you bend and solder the leads.
Place them diagonally so the leads won't touch, solder the cathodes to one side and then bend the anodes above the cathodes. Solder the anodes 90º away from the cathodes.

Repeat the process to make two more grids and place them on each other making anodes and cathodes be in the same side.
Bend the 9 protuding cathodes down and solder them in 3 columns.

I've bent the 9 anodes so they came arranged in three groups of three, you can simply solder a ribbon cable, but it won't hold the cube up as a structure.

Use the pictures to guide you.

Step 4: The Base

To plug the cube in the controller i made a base board.
It's useful for unplugging the whole cube from the controller board so you can access to the microcontroller and stract it for re-programming.

Use the circuit stencil to make your own board.

If you prepared you cube like mine, you have to solder the heathers, insert the cube in the PCB holes and solder it from upside.

Make sure the cube module fits in the controller board.

Step 5: Programming

Time to program the microcontroller!

Open your favourite programming program,
plug your PIC into the programmer,
choose the file ''LED cube HEX'' and upload it,
configure the right fuses
and program your microcontroller.

More programs can be made for different light patterns, but i don't know how to do easily.
If you know how to do it, how make your own patterns, please, tell me.

Step 6: Final Details

As finishing details i added four PCB mounting bolts to make it stand on them, that will avoid short-circuits if the cube is placed on a metal surface.
You'll also need to connect the cube to a power supply so solder a plug cable in the input pads.

I noticed that the lm7805 i trimmed off was overheating when i use a 12v power supply due to the input and output voltage difference.
It couldn't sink all that heat with the small surface i let, so i cutted a small piece of aluminium heatsink and i thermally-glued it to the voltage regulator.

Step 7: Enjoy It

The cube is finished and working, it looks great and does not overheat at all.
There may be bigger, more coloured and brighter cubes, but i'm proud of how my first LED cube looks and works.

I hope you enjoyed that instructable and even made your own cube.

IF you liked this project, please vote it for the make it glow and microcontroller contests

And don't forget to ask your doubts!

Make It Glow Contest

Participated in the
Make It Glow Contest

Microcontroller Contest

Participated in the
Microcontroller Contest

3 People Made This Project!


  • CNC Contest

    CNC Contest
  • Make it Move

    Make it Move
  • Teacher Contest

    Teacher Contest

37 Discussions


Question 3 months ago on Introduction

Hi. Would you make and sell a completed version. If yes, for how much please? I just want to use one as an effect in a mad scientist console, but I’m not really interested in making one myself. I don’t have any of the skill. Thanks.


1 year ago

please give me a code of this project,who know please


2 years ago

hello, can you send me source code C of the hex file ?
Tks very much


3 years ago

Hey this is great! Can you send me the,schematic the source codes and hex to my email? hama.lama1997@gmail.com


ali rifaat

3 years ago

Bonjour Est-il possible de travail LED sous la forme de lettres (A , B , N , M ...... ) s'il vous plaît envoyer


3 years ago

Hi I little speak English

please send to good circuit, schematic,program



3 years ago

send to davidotaku1@gmail.com pls


3 years ago

send to ivanctr8@gmail.com pls


4 years ago on Introduction

Hello, about the circuit for this proj, I noticed a difference in your schematic and the control board you made. I assume that the resistors are in order and in your schematic R5 is connected to PIN10 but in the control board as shown in the photo R5 is connected to PIN11 and R6 in PIN 10. Are your R5 and R6 interchanged in the board? thanks :D

4 replies

Reply 4 years ago on Introduction

You're probably right, i designed the PCB with photoshop long before i started using eagle, it's pretty easy that i made a mistake designing the PCB manually.


Reply 4 years ago

But it works this way right(the one in your pcb design)? If so i should connect R5 to pin11 and R6 to pin10 right? or should i follow the schematic?


Reply 4 years ago on Introduction

You should follow the schematic. In my cube, a row of LEDs apears to not light up, so it's probably because of the PCB and not the program