Introduction: PIC 3x3x3 LED Cube



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!
 
 

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!

Comments

author
PhongT11 made it!(author)2017-06-08

hello, can you send me source code C of the hex file ?
Tks very much
nguyenthienphong072@gmail.com

author
AmitB70 made it!(author)2016-09-24

pls mail hex file, schematic and if possible pcb layout pdf to amitbandekar78@gmail.com thank you

author
wirelessfuture2016 made it!(author)2016-05-19

I made it! Very good instructable, except I think your cathodes and anodes are mixed up, my animation looks more correct when I turn it on:

https://youtu.be/llCNM3N2xgE

Complete.JPG
author
pinomelean made it!(author)2016-05-19

Very cool!

author
hamal made it!(author)2016-03-12

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

Thanks!

author
ali+rifaat made it!(author)2016-02-27

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

author
Kenay made it!(author)2015-12-11

Hi I little speak English

please send to good circuit, schematic,program

janekd69@gmail.com

author
%C4%B0smailA8 made it!(author)2015-12-10

good

author
davide83 made it!(author)2015-11-06

send to davidotaku1@gmail.com pls

author
Mark15 made it!(author)2015-10-18

send to ivanctr8@gmail.com pls

author
Kriszti%C3%A1nT made it!(author)2015-06-16

hy send me .lay file my email: kriszrap@gmail.com

big thx

author
Kriszti%C3%A1nT made it!(author)2015-06-17

or eagle file :)

author
pinomelean made it!(author)2015-06-23

I made the circuit using photoshop, all i got is the image file. Sorry.

author
EuniceSaldi made it!(author)2015-05-17

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

FRGLPNZHN4ZV89P.LARGE.jpg
author
pinomelean made it!(author)2015-05-18

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.

author
EuniceSaldi made it!(author)2015-05-19

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?

author
pinomelean made it!(author)2015-05-19

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

author
EuniceSaldi made it!(author)2015-05-19

Thank you, thank you so much! I'll make sure to post what I did once I've finished :D

author
EuniceSaldi made it!(author)2015-05-17

also, would I need a heat sink if I'm only using a 9volt source? :D

author
pinomelean made it!(author)2015-05-19

I'm using a 7v supply and the little heatsink only warms up, but it doesn't feel that hot.

For 9v, you could use a heatsink a little larger or improve airflow.

author
Hambito made it!(author)2015-04-20

Hi, very good instructions, I did it in the protoboard but the first row of LED lights not.(this is a wire mess, but then I´ll pass to the final plate hahaha). So, do you have the code in C language ? Or do you know what is the problem? Thanks

IMG_20150420_194414_1.jpg
author
pinomelean made it!(author)2015-04-21

I picked the code from a webpage a long time ago, it was just a Hex file and they didn't provide an asm file. If you don't like the animation or want to change it, you'll have to make a new progam.

author
Hambito made it!(author)2015-04-21

I loved the animation , however when I turn on, the first row of LED lights not. Do you have any idea of what can be ?

author
pinomelean made it!(author)2015-04-21

Check if you have a signal output in the right row pin at the PIC. If you have something, you've connected something wrong. If there's no signal, probably the code was made they way.

author
mhack.camano made it!(author)2015-03-27

hi very nice instructions but it is possible to run this program using superBRIGHT LIGHTS LED ?? TIA :)

author
pinomelean made it!(author)2015-03-27

If you want to use LEDs that consume more than 10mA, You need to put a transistor buffer in each output of the microcontroller.

author
CK101 made it!(author)2014-12-14

What is a 16v 100uf

author
pinomelean made it!(author)2014-12-15

It's an electrolytic capcitor rated for a maximun voltage of 16v and a capacity od 100 micro farads.

author
CK101 made it!(author)2014-12-14

What plug do I need and hot sink

author
CK101 made it!(author)2014-12-14

100nf and

author
soemoe made it!(author)2014-03-14

I made it but I have to join the 10K resistor connects together with Pin4-MCRL and +5V supply.

author
pinomelean made it!(author)2014-03-15

Use the I made it! button and ad some photos!

author
asimobot made it!(author)2013-12-23

Hey, What is programmer called that you pluged the microcontroller into?

author
pinomelean made it!(author)2013-12-24

Is the PIC K150

author
I_build_cool_stuff made it!(author)2013-11-06

If I run this on 5V off of a USB port do I still need a 7805 regulator?

author
pinomelean made it!(author)2013-11-06

If you use a 5v power supply you won't need the 7805, you can solder the wires to the capacitor traces.

author
Ini+Cepero made it!(author)2013-10-27

One of your best instructables so far! Keep amazing us with your projects!

author
pedramd7 made it!(author)2013-10-25

very very nice :)

author
window.close made it!(author)2013-10-24

Great step by step Instructable! And I love your assembly line :-)

About This Instructable

39,358views

127favorites

License:

Bio: I love electronics and all about DIY.
More by pinomelean:IN-12 nixie clockLi-ion battery chargingMini line tracer
Add instructable to: