LED Cube.jpg

Here is my 3x3x3 LED Cube project. It runs using a PIC16F690. Along with the brief explanation of how to make it, I have also included the .asm file for the PIC and a piece of software written in VB.NET that you can create your own LED patterns. These can be exported as .asm files and put into the main .asm code.


 
Remove these adsRemove these ads by Signing Up

Step 1: Building

Drawing.jpg
LEDs on Wood.jpg


Each layer of 9 LEDS are connected with all of the cathodes together. The cube is multiplexed, meaning that only one layer is on at any one time. It happens so quickly that the whole cube looks like it is illuminated. RB5, RB6 and RB7 controll which layer is being illuminated.

From the picture you can see the connections to the top layer. I have only connected RC2 to show you how the connection should be made, the rest of the LEDs are connected the same way.


The easiest way to connect the LEDs together is to drill 9 holes into a piece of wood (picture 2), then place the LEDs into the holes, bend the legs and solder the cathodes together. After 3 of these are created, simple stack them and solder the anodes together. You should end up with 9 anodes and 3 common cathodes to connect to you circuit.


All you need to build this cube is:

1 x 5v regulator
1 x switch
1 x PIC16F690
3 x NPN tansistors
3 x 330 ohm resistros
9 x 220 ohm resistors
1 x 220uF capacitor
27 x LEDs

oh, and MPLab PIC programming software. (Other software may work, but my .asm file may have to be changed a little)
1-40 of 199Next »
Robbiezxc says: Jan 24, 2013. 4:12 PM
i have made made the HEX file for this cube if any one would like it e-mail me robbiezxc@me.com or if you don't have a programmer i will send you a per-programmed 16F688 for a small fee
Robbiezxc says: Jan 23, 2013. 4:06 PM
could one some please please send me the HEX code robbiezxc@me.com
rkshirsagar says: Jan 18, 2013. 10:25 PM
Hi origami_roast, Once you have made your pattern.You have to insert the generated code in the given ASM file ,Lable the sub routine and then open the saved ASM file in MPLAB to generate the HEX code.
origami_roast says: Jan 11, 2013. 10:25 PM
Hi, Craig! So I made my pattern using the VB software and opened it on MPLAB and I was wondering if the VB software generates a code that is ready for compiling to .hex? Or do I still need to modify the code? Define the labels, include pic16f690 etc.? Thank you!
fehera85 says: Dec 11, 2012. 6:17 AM
Hi there I would like to attach this picture might be helpful!http://www.instructables.com/files/deriv/FOZ/OPB2/HAFHLHW3/FOZOPB2HAFHLHW3.THUMB.jpg
3x3x3.JPG
GeArGuY says: Dec 19, 2011. 8:21 PM
Does anyone have a website where you can get all of this????
antoon in reply to GeArGuYAug 8, 2012. 2:41 PM
radioshack
eagletech201 says: Aug 5, 2012. 11:13 AM
When i unzip the vb code file I get a "temp" file. what opens it?
OrciTheOrca says: Jul 23, 2012. 3:47 PM
http://www.youtube.com/watch?v=_cEJHCtgkok

My cube.

Also I etched my own PCB's. Files can be found in the description of the video.

I used:
3mm Blue LED's
PIC16F690
PICkit 2 programmer
3x 330ohm resistors
9x 220ohm resistors
16V 220uF Capacitor
PN2222 Transistors
L7805CV 5V regulator
Power connector
Male and female pin connectors

Also a 20 pin easy release thing for the chip that I never remember what is called....
ride on toy dude says: Jul 20, 2012. 6:48 AM
How many volts does the capacitor need to be?
midknight5000 says: Mar 12, 2012. 3:46 PM
how many i o pin are needed to control this cube?
tboultwood1 says: Feb 19, 2012. 1:58 AM
Hello, thank you for the very good software. It successfully outputed a asm file but is there any way to put this on an arduino? Thank you very much Trevor B
hrpearl01 says: Feb 1, 2012. 9:18 AM
COULD SOMEONE PLZ TELL ME:

Which type of PIC16F690 do I need:

PIC16F690-E/P
OR
PIC16F690-I/P

OR ELSE SEE: http://bit.ly/zWPoZC

PLEASE TELL ME WHICH ONE OF THESE ON SITE LINK.

THANKS IN ADVANCE
dbirky says: Feb 18, 2011. 10:56 AM
Thanks for the instructable. Built it on perf board. No issues. Works well. Programmed with PICKIT2. I really enjoy assembly programming and this was a fun little project!

LED Cube.JPG
fsfshsyhh in reply to dbirkyDec 3, 2011. 12:28 PM
Can you help me please? i want to have LED lamps in serial

power supply 3V
forward voltage 3.2-3.4
20mA

How many leds can i light up with 3V? Do i need a resistor for that, and how many OHM? Im a really beginner and i need help.
SanticN4N says: Nov 26, 2011. 3:03 PM
When i compile the software in the velleman provided MPASM v5.20 i get a "and" parameter error.....

I am using the velleman K8048 to program the PIC.

Help PLEASE!!!

Thanks,
SanticN4N
swoc says: Oct 22, 2011. 12:22 PM
Hi! Thank you for the tutorial.

if anyone is still having questions, then things that I used:
3mm white LEDs (27), 8500mcd 20deg
PIC16F690, asm written in MPLAB, programmed with MicroPro
Resistors as said
16V 220uF Capacitor
small slide switch (3 pins (on-on))
bc547c transistors
L7805cv 5V regulator
9V battery + connectors

The final result: With the LED.asm code, author provided: http://www.youtube.com/watch?v=oLhOLdcUf5k Synced to a track: http://www.youtube.com/watch?v=JnAD9y2kCf4 NB! When programming


PIC16F690 or any other PIC on MPLAB, then you have to set your Device (Configure - Device) to exactly your PIC! I had a lot of problems before I found out the solution.

Than You portreathbeach!
t.spinner12919 says: Feb 19, 2011. 10:24 AM
im confused about how to program the chip do i need some sort of external piece? how do i get the .asm programmed onto the chip
eriknyquist in reply to t.spinner12919Oct 21, 2011. 7:48 AM
yes, you need a PIC programmer.
http://www.microchipdirect.com/productsearch.aspx?Keywords=DV164120
dasty80 says: Sep 24, 2011. 5:08 AM
Thank You very much for "VIsual Basic Source Code".
I'm a newbie of Visual Basic and your Code is been very helpful for me.
Best Regards,
Dany...
asickrishna says: Apr 4, 2011. 11:04 PM
Hi!

If you are interested, here is my PicAxe project, which i haven't completed yet. Please comment.

The code (in basic):
http://dl.dropbox.com/u/17683377/LED_CUBE/Code2.1.1.txt

Schematic:
http://dl.dropbox.com/u/17683377/LED_CUBE/LED%20CubeRev2.1.1.jpg
Phoenix78 in reply to asickrishnaSep 8, 2011. 2:04 PM
LOL. Searching on the net for a schematic for a led cube.Bought 3x 74hc595 for in use with the picaxe 18m2 but did not how to do this, and then came to this.

Great example.THNX...I'm interested ;-)
bhargav.sg says: Aug 5, 2011. 6:58 AM
hi can u mail the report of the 3*3*3 led cube to bhargava.sg@gmail.com.
thanks for the info it was really helpful
77omar says: Jul 29, 2011. 3:52 PM
quiero el software de el pic 16f84 me pueden ayudar mi correo es lainezmenjivar7@hotmail.com
jlenert says: Jun 14, 2011. 1:52 PM
How do you calculate a value of 330 ohm resistors to be used with the transistors!?
albinvadakkekara says: May 12, 2011. 9:18 PM
can i have use the pi16f623a insted of the pic16f690
mhps0519 says: May 12, 2011. 8:12 AM
HI!NICE TO MEET YOU!
Do you have 4x4x4 LED CUBE's software?
Tank you very much!!!
shanakaplus says: Apr 7, 2011. 9:06 AM
um looking for elevator pic program. Do you have example program ?
Weepet says: Apr 6, 2011. 8:29 PM
What about doing this project with a PIC16F872 ? Anyone would know how to change the code to fit in it ?
jimy268 says: Jan 16, 2011. 8:59 AM
I attach the improved photo, the schematic graph and the modified ASM. I DID MY OWN PATTERNS AND DELAYS. You can use the " LED Cube pattern generator " to create his own patterns. Remember that the PICF84A has a limit of 1024 words whereas the PIC16F690 of 4096. " Make to Pocket LED Cube " it is the manual of how to construct the Led Cube
Foto.JPGDiagrama 3.PNG
cesar correia in reply to jimy268Apr 1, 2011. 6:47 AM
can you send me the instructions via email?

correia7cesar@hotmail.com
brunder in reply to jimy268Mar 4, 2011. 9:03 AM
IM from bulgeriq and here 5mm leds are 3V(red,green,yewoll,blue and other)Please tell me whit what I need to replace a 220 om resistor?Can I replace with 80 om resistor?OR with 200?please tell me with what resistors I need to replace?
brunder in reply to jimy268Mar 4, 2011. 9:00 AM
with my 3V leds with what volts I need to replace a 220om resistors?
jimy268 in reply to brunderMar 4, 2011. 1:16 PM
R = (Vbattery - Vled)/ I of the led
Vbattery =12V  
Vled = 3V
I Intensity of the current in ampere (A).
If your led works with different I you must change it.
If you work with different voltage you must change it.

I
of the led = 20mA = 20/1000 = 0.02A

R = (12-3)/0.02 = 450 Ohms

http://mx.answers.yahoo.com/question/index?qid=20100703021150AAzGxqT
vvaidya in reply to jimy268Mar 12, 2011. 11:16 PM
hey can u send me pcb schematics and source code on my email
plzzzzzzzzzzzzzzz

vaidya.vaibhav91@gmail.com
brunder in reply to jimy268Mar 4, 2011. 1:36 PM
MY leds are 0,025A(I)
wait vbattery are 5v? in the picture you show 5V?
it follow R=(5-3)/0.025=80 OM resistors right?IF IM not please tell me what resistors?
jimy268 in reply to brunderMar 4, 2011. 3:57 PM
That is correct. Though if you place a major resitor the led was illuminating less.
brunder in reply to jimy268Mar 4, 2011. 11:00 PM
I willl try first with 200 OM resistor iff the lef light low I will change with 80 OM resistrors what do tou tink?
brunder in reply to brunderMar 5, 2011. 2:24 AM
Hey jimmy can you send me the soursecode for the programing? the .hex fail right?My email is beam124@abv.bg or on skupe naruto.u2 please sedn me the fail...
jimy268 in reply to brunderMar 5, 2011. 8:09 AM
The downloading file : FM2PAY6GIYWWDPW.TEM
You have to change it : FM2PAY6GIYWWDPW.ASM
If you want, you can change the name. (Led3x3x3x.ASM)

To obtain the file hex, you can use MPLAB.
1-40 of 199Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!