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)
<p>Merci jimy268, je vais commencer avec le test des led. j'esp&egrave;re r&eacute;ussir.</p><p>Jimy268 thank you, I'll start with the test LED. I hope to succeed.</p><p>Kyno Qu&eacute;bec (canada)</p>
can you please post a pic of bottom and top of the circuit <br> <br>
hey how do you plug it in the computer? like do you use a usb or some sort of wire or what? also what powers it?
could somone post a better picture of how to wire it?
through the serial port on your computer i imagine, with a PIC, on the pic circuitboard there will be what looks like a headphone jack. When you acquire a serial lead, it will have a stereo 3.5mm jack on one end, and a plug with two layers of holes on the other. plug one end into the PIC board, and one into your computer, assuming you have a serial port in your PC. If not, then buy a serial to USB and do the same. You can get software to program PICs all over the internet, just search :D you also need a 5V regulated power supply, which you can buy from most hardware stores, im british so i would go to maplin, if you are american go to Radioshack, hope i helped :D
You need a PICKit 2. Plugs into a USB and then you can program the PIC
Does anyone have a website where you can get all of this????
cheaper from ebay
radioshack <br>
Help.,!!!!!!!!!!! can anybody tell me where can i see the program of this.?
can anyone direct me to website or video that makes the 3x3x3 led cube that uses 4pin Leds??? Thanks
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
could one some please please send me the HEX code robbiezxc@me.com
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.
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!
Hi there I would like to attach this picture might be helpful!http://www.instructables.com/files/deriv/FOZ/OPB2/HAFHLHW3/FOZOPB2HAFHLHW3.THUMB.jpg
When i unzip the vb code file I get a &quot;temp&quot; file. what opens it?
http://www.youtube.com/watch?v=_cEJHCtgkok <br> <br>My cube. <br> <br>Also I etched my own PCB's. Files can be found in the description of the video. <br> <br>I used: <br>3mm Blue LED's <br>PIC16F690 <br>PICkit 2 programmer <br>3x 330ohm resistors <br>9x 220ohm resistors <br>16V 220uF Capacitor <br>PN2222 Transistors <br>L7805CV 5V regulator <br>Power connector <br>Male and female pin connectors <br> <br>Also a 20 pin easy release thing for the chip that I never remember what is called....
How many volts does the capacitor need to be?
how many i o pin are needed to control this cube?<br>
I attach the improved photo, the schematic graph and the modified ASM. I DID MY OWN PATTERNS AND DELAYS. You can use the &quot; LED Cube pattern generator &quot; to create his own patterns. Remember that the PICF84A has a limit of 1024 words whereas the PIC16F690 of 4096. &quot; Make to Pocket LED Cube &quot; it is the manual of how to construct the Led Cube
New schematic
as did his scheme and wanted to test it so a lower layer but the LEDs do not blink, you can test only one layer? <br> I appreciate if you can help me thanks.
<br>This is a simple program (Test LED 3x3x3) which test (lights) the layers one by one <br> <br> __CONFIG _CP_OFF &amp; _WDT_OFF &amp; _PWRTE_ON &amp; _XT_OSC <br> LIST P=16F84A <br> INCLUDE <br> <br> cblock 0x0C <br> PDel0 <br> PDel1 <br> PDel2 <br> ENDC <br> <br>; Main program starts here <br>;----------------------------------------------------------------------------------------------- <br> <br>Start <br> BSF STATUS,RP0 ;SELECCIONAMOS EL BANCO 1 <br> CLRF TRISB ;LIMPIAMOS EL REGISTRO TRISB <br> MOVLW B'11110000' ;ENTRADAS RA4-RA4, SALIDAS RA0-RA3 <br> MOVWF TRISA ;PONEMOS EL VALOR DE W EN TRISA <br> BCF STATUS,RP0 ;SELECCIONAMOS EL BANCO 0 <br> CLRF PORTA <br> CLRF PORTB <br> <br>Loop <br> MOVLW B'11111111' <br> MOVWF TRISB <br> BSF PORTA,0 <br> BSF PORTA,3 ;ACTIVA TOP LAYER <br> CALL DEMORA <br> BCF PORTA,3 <br> BSF PORTA,2 ;ACTIVA MIDDLE LAYER <br> CALL DEMORA <br> BCF PORTA,2 <br> BSF PORTA,1 ;ACTIVA BOTTOM LAYER <br> CALL DEMORA <br> BCF PORTA,1 <br> Goto Loop <br> <br>; Generado con PDEL ver SP r 1.0 el 21/11/2011 Hs 03:47:41 p.m. <br>; Descripcion: Delay 700000 ciclos <br>;------------------------------------------------------------- <br>DEMORA movlw .17 ; 1 set numero de repeticion (C) <br> movwf PDel0 ; 1 | <br>PLoop0 movlw .47 ; 1 set numero de repeticion (B) <br> movwf PDel1 ; 1 | <br>PLoop1 movlw .218 ; 1 set numero de repeticion (A) <br> movwf PDel2 ; 1 | <br>PLoop2 clrwdt ; 1 clear watchdog <br> decfsz PDel2, 1 ; 1 + (1) es el tiempo 0 ? (A) <br> goto PLoop2 ; 2 no, loop <br> decfsz PDel1, 1 ; 1 + (1) es el tiempo 0 ? (B) <br> goto PLoop1 ; 2 no, loop <br> decfsz PDel0, 1 ; 1 + (1) es el tiempo 0 ? (C) <br> goto PLoop0 ; 2 no, loop <br>PDelL1 goto PDelL2 ; 2 ciclos delay <br>PDelL2 clrwdt ; 1 ciclo delay <br> return ; 2+2 Fin. <br> <br> End;
can i use avr studio 4 to programatize this pic with this code?
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?
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.
can you send me the instructions via email?<br><br> correia7cesar@hotmail.com
with my 3V leds with what volts I need to replace a 220om resistors?
<strong>R</strong> = (<strong>Vbattery</strong> - <strong>Vled)/<em> </em></strong><strong>I</strong> of&nbsp;the led<br> <strong>Vbattery</strong> =12V&nbsp;&nbsp;<br> <strong>Vled</strong> = 3V<br> <strong>I</strong> Intensity of the current in ampere (A).<br> <strong>If your led works with&nbsp;different I you must change it.<br> If you work with different voltage you must change it.<br> <br> I</strong> of the led = 20mA = 20/1000 = 0.02A<br> <br> <strong>R </strong>= (12-3)/0.02 = 450 Ohms<br> <br> <a href="http://mx.answers.yahoo.com/question/index?qid=20100703021150AAzGxqT">http://mx.answers.yahoo.com/question/index?qid=20100703021150AAzGxqT</a>
hey can u send me pcb schematics and source code on my email<br>plzzzzzzzzzzzzzzz<br><br>vaidya.vaibhav91@gmail.com
MY leds are 0,025A(I) <br>wait vbattery are 5v? in the picture you show 5V?<br>it follow R=(5-3)/0.025=80 OM resistors right?IF IM not please tell me what resistors?
That is correct. Though if you place a major resitor the led was illuminating less.
I willl try first with 200 OM resistor iff the lef light low I will change with 80 OM resistrors what do tou tink?
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...
The downloading file : FM2PAY6GIYWWDPW.TEM <br>You have to change it : FM2PAY6GIYWWDPW.ASM <br>If you want, you can change the name. (Led3x3x3x.ASM) <br> <br>To obtain the file hex, you can use MPLAB.
I dont understend please send me the fail?
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?
Please jimy telll me what voltage arre yours leds.My leds are 3V ?
Since you see I use led red of 5mm, the voltage is 1.9 approximately. <br> Green Led is 2.1V.This project works with 5v <br> <br> Look at this link http://es.wikipedia.org/wiki/Circuito_de_LED <br> <br> If it has another question do not hesitate to ask
Big thank you! :D hmm, the cathode of the top layer doesn't connect at the cathode of the middle layer right?
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.
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.
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
COULD SOMEONE PLZ TELL ME:<br><br>Which type of PIC16F690 do I need:<br><br> PIC16F690-E/P<br>OR<br> PIC16F690-I/P<br><br>OR ELSE SEE: http://bit.ly/zWPoZC<br><br>PLEASE TELL ME WHICH ONE OF THESE ON SITE LINK.<br><br>THANKS IN ADVANCE
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! <br> <br>
Can you help me please? i want to have LED lamps in serial<br><br>power supply 3V<br>forward voltage 3.2-3.4<br>20mA <br><br>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.

About This Instructable


221 favorites


More by portreathbeach: Cheap PIC controlled Helmet Camera using Sony LANC (Good for Extreme Sports) 3x3x3 LED Cube
Add instructable to: