Вы находитесь на странице: 1из 8

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

3x3x3 LED Cube


by portreathbeach on June 20, 2008 Table of Contents 3x3x3 LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro: 3x3x3 LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 2: The software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 3 3 4 4

http://www.instructables.com/id/3x3x3-LED-Cube/

Intro: 3x3x3 LED Cube


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.

Step 1: Building
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)

http://www.instructables.com/id/3x3x3-LED-Cube/

Step 2: The software


Now that you have an idea of how to build the cube, here is the software that you can use to generate the LED cube patterns. Along with the software is the .asm file, in this file, there are already some patterns loaded in and it is pretty straight forward to see how to insert your own patterns. The second picture shows you how the software saves the binary info for the patterns. Layer 1, Layer 2, Layer 3 and Layer 4 are 4 registers used in the PIC. Obviously Layers 1,2 and 3 represent the top, middle and bottom layers, but they are only 8 bits, so another register is used Layer 4, which holds the 9th LEDs data for the 3 layers and the brightness and time the LEDs need to be on. Hope this is a good enough explanation of the project. It's not too hard to build, just takes a bit of time to arrange the LEDs. I have also added a zip file with the source VB code as someone asked for it!

File Downloads

http://www.instructables.com/id/3x3x3-LED-Cube/

Software.zip (23 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Software.zip']

VB Code.rar (140 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'VB Code.rar']

Related Instructables

8x8 LED matrix by hemmikarl

All pic programmer by nedim155

LED Cube and Arduino Lib by gzip

The Bucky "Disco" Ball by tqwerty

LED Cube 3x3x3 MAKE a with ATMEGA8 VOLUMETRIC PROJECTOR by G7Electronica.NET from JUNK by VIRON

Comments
50 comments Add Comment view all 166 comments

jimy268 says:

Jan 16, 2011. 8:59 AM REPLY 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

Make a Pocket LED Cube.pdf1 MB

LED 3x3x3 PIC16F84A.asm21 KB

brunder says:

Mar 4, 2011. 9:03 AM REPLY 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 says:
with my 3V leds with what volts I need to replace a 220om resistors?

Mar 4, 2011. 9:00 AM REPLY

jimy268 says:
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

Mar 4, 2011. 1:16 PM REPLY

http://www.instructables.com/id/3x3x3-LED-Cube/

vvaidya says:
hey can u send me pcb schematics and source code on my email plzzzzzzzzzzzzzzz vaidya.vaibhav91@gmail.com

Mar 12, 2011. 11:16 PM REPLY

brunder says:
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?

Mar 4, 2011. 1:36 PM REPLY

jimy268 says:
That is correct. Though if you place a major resitor the led was illuminating less.

Mar 4, 2011. 3:57 PM REPLY

brunder says:
I willl try first with 200 OM resistor iff the lef light low I will change with 80 OM resistrors what do tou tink?

Mar 4, 2011. 11:00 PM REPLY

brunder says:

Mar 5, 2011. 2:24 AM REPLY 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 says:
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.

Mar 5, 2011. 8:09 AM REPLY

brunder says:
I dont understend please send me the fail?

Mar 5, 2011. 9:04 AM REPLY

brunder says:
Please jimy telll me what voltage arre yours leds.My leds are 3V ?

Mar 3, 2011. 11:27 PM REPLY

jimy268 says:
Since you see I use led red of 5mm, the voltage is 1.9 approximately. Green Led is 2.1V.This project works with 5v Look at this link http://es.wikipedia.org/wiki/Circuito_de_LED If it has another question do not hesitate to ask

Mar 4, 2011. 7:54 AM REPLY

jimy268 says:
New schematic

Mar 1, 2011. 5:58 PM REPLY

http://www.instructables.com/id/3x3x3-LED-Cube/

kkcg says:

Mar 5, 2011. 10:36 PM REPLY new schem? Why? Your first schem worked only on breadboard but by the time we do the ckt it doesn't work. How can that be? How will this new schem help us?

jimy268 says:

Mar 6, 2011. 9:58 AM REPLY The new schematic is to show you where the 22 pF capacitor y crystal are place. Should be a wrong connection or wrong track. If you want sent me de the PCB schematic.

kkcg says:
Big thank you! :D hmm, the cathode of the top layer doesn't connect at the cathode of the middle layer right?

Jan 19, 2011. 3:25 PM REPLY

jimy268 says:

Jan 19, 2011. 8:38 PM REPLY Not, every cathode connects with his corresponding transistor. Top cathode layer connected to the Transistor of the RA3, cathode middle layer to the transistor of the RA2 and cathode bottom layer to the transistor of the RA1.

kkcg says:

Feb 17, 2011. 7:11 AM REPLY hi again! my teacher wanted me to use an RBG LED for this project. Can you help? Please. :) If you have any idea if we could still use a PIC16F84A, so as the circuit diagram you've given so is the program.

t.spinner12919 says:

Feb 19, 2011. 10:24 AM REPLY 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

dbirky says:

Feb 18, 2011. 10:56 AM REPLY 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!

bulis says:

Feb 9, 2011. 12:03 PM REPLY Hi where is connect krystal in elektric circuit? and how connecting elektrick circuit with pc and how programer this is pic please write to me and post complete schema zapojeni thanx bulissys@seznam.cz Jan 9, 2011. 3:23 PM REPLY

jimy268 says:
I have maked using PIC16F84A. PORTB (RB0 ..RB7) Led1..Led8 PORTA RA0 Led9 RA1 BOTTOM (bajo) LAYER RA2 MIDDLE (medio) LAYER RA3 TOP (alto) LAYER

SAM_0968.AVI7 MB

kkcg says:
what program did you used? can i ask for it? HEHEHE did you also used the schematic diagram above? krishna08gonzales@yahoo.com

Jan 16, 2011. 1:09 AM REPLY

http://www.instructables.com/id/3x3x3-LED-Cube/

kkcg says:

Jan 16, 2011. 1:08 AM REPLY HI! does your program code that you posted can be used in a PIC16f84a? or is there any changes? Are all the components also compatible if using a PIC16f84a? please reply THANK YOU krishna08gonzales@yahoo.com < email me! HAHA thanks :D

dark clerick says:


and where did you get your leds?

Aug 20, 2009. 4:21 PM REPLY

zane20062 says:
try leds australia their real cheap aroun 15 cents each theres a discount in bulk buying too

Jan 3, 2011. 3:16 PM REPLY

erod998 says:
cuold you post a cuople of pics or vids to show how to wire it im having some trouble

Nov 14, 2009. 8:57 PM REPLY

electro13 says:
me too, i cant tell from the pictures, please post a few more pics or something!!!!!!!!!!!!!!!

May 8, 2010. 4:33 AM REPLY

zane20062 says:
same here

Jan 3, 2011. 3:14 PM REPLY

zane20062 says:
great job but could you please send me connections between the PIC16F690 and the anodes ( what pins on pic to which anodes on cube ) email : zane20062@gmail.com

Jan 3, 2011. 3:06 PM REPLY

domdomgin says:
can someone please give me the hex file at domdomgin@yahoo.com.please help..

Dec 15, 2010. 9:43 AM REPLY

TECH GEEK says:


Hi I'm trying very hard to make a LED 3x3x3-Cube that works with the program that you made, but Ive run into some trouble. Basically I'm unable to obtain the following or any equivalent: ~ PICKit ~ ANY "PIC" Chip (Besides the one PIC16c57c I already have) As for what I do have: ~ 1x PIC16c57c Integrated Circuit ~ "A lot of computer cables that can be modified" << (Alternate way to connect? ** ) ~ "A finished 3x3x3 LED cube" (Wired, assembled, tested & ready to connect) ~ My Laptop (Yes, the program you made is compatible with it)

Nov 23, 2010. 3:24 PM REPLY

Sooo, can you or anyone please explain to me how to get my PIC16c57c to work with the program that is provided at the end of this instructable? Want Help with: ~ Wiring & connetions between Laptop & the PIC's pins ~ Other stuffs Anyone who helps me... THANK YOU!!!! THANK YOU!!!! THANK YOU!!!! THANK YOU!!!! -TECH GEEK-

MDxxx says:

Nov 17, 2010. 8:44 AM REPLY Hi, great item and am making one myself. Question can i use a pic16f628a or picf84a-04p as i have them already and if so what do i have to change? Hope you can get back to me.

sanrocks says:
i want to be make 8*8 cube led, so i want source code for this cube in microcontroller 89s51.

Oct 29, 2010. 9:27 AM REPLY

http://www.instructables.com/id/3x3x3-LED-Cube/

compukit says:
hi is it posibal to pot a chip on the 3x3x3 ledcube so it reacts on sound ?

Jul 17, 2010. 1:07 PM REPLY

ironmike828 says:
when you save the output sequence to a file using the program where do you place the code in the program?

Jul 16, 2010. 9:56 AM REPLY

manbearpig001 says:

Jul 9, 2010. 1:44 AM REPLY mind reposting the vb source? it keeps downloading this temp file that i cant open or use :[ also, im confused as to the binary within the sub routines for each animation. for example, there will be something like this; movlw b'01011101' movwf Layer1 now, this means that for layer1, these individual bits are turned on, however, for my layer1, there are both ports from A and B, so how would this work, if there are both RA1 and RB1? Thanks in advanced Jun 3, 2010. 2:49 PM REPLY So i was trying to make this project without the programming...i just want a cube that is lit up... I was confused because if these are all in parallel and i want to use a 9 volt battery would it be possible to make this??? if so how would i implement this?? May 8, 2010. 4:20 AM REPLY

arodri35 says:

electro13 says:
u should post a video on how to connect everything on youtube!!! please

TariqR says:

Apr 28, 2010. 6:00 PM REPLY hey! im a high school student and im trying to learn how to do this cube for a school based project. I ordered the PICKit2 and received it with the PIC16F690 and the MPLab software..the whole sh'bang. I also went to the local Radioshack and picked myself up the rest of the materials necessary and currently the LED's are coming in the mail. However! I'm having some trouble figuring out your diagram (im obviously not too savvy in this area) if you could perhaps either post a picture of your completed circuit (what's inside the box in your vid) or perhaps i can give you my email and you can send it to me that way? Either would suffice, but i would really appreciate a swift response as the deadline is coming ever closer :D Thanks!

rigues21 says:

Apr 16, 2010. 11:03 AM REPLY Also, I have access to a Qwikflash Board with the add-on bread board. Could that be useful in making a cube? Thanks again.

rigues21 says:

Apr 16, 2010. 11:00 AM REPLY Any thoughts on the conversion of this .asm to be used with a PIC18? I know the internal clock on the 18 is 2.5MHz. The port configuration is different, too, right? I've got to do a PIC18 project and this looks pretty interesting. Thanks

Antikythera says:
I could use some sample code to get me started because the VB program gives you a sub routine, nothing to initiate the PIC.

Mar 13, 2010. 5:29 PM REPLY

Antikythera says:

Apr 15, 2010. 12:40 PM REPLY Fixed. I didnt add the entire program so it obviously created some problems. Also I have removed some of the "Call" commands and re-arranged the order of them to change the display sequence. FUN STUFF :)

vdthanhnguyen says:
how make 4x4x4 cube by seam menthol

Apr 7, 2010. 8:48 AM REPLY

2010 says:

Mar 12, 2010. 1:15 PM REPLY im a begginer with programing please explain how to program the pic and onthe u only put 1 terminal on the pic where do the rest go

knektek says:
im doin this but instead of the pic chip, im gonna use temp push switches so you can create a random pattern

Mar 1, 2010. 12:31 PM REPLY

Tokfranz says:
How do you connect the leds to eachother?

Jan 10, 2010. 11:36 PM REPLY

erod998 says:
could u please make a vid and post some pics pleaseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Nov 15, 2009. 5:15 PM REPLY

view all 166 comments


http://www.instructables.com/id/3x3x3-LED-Cube/

Вам также может понравиться