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 ads by
Signing UpStep 1Building
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)
| « Previous Step | Download PDFView All Steps | Next Step » |






































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
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.
I am using the velleman K8048 to program the PIC.
Help PLEASE!!!
Thanks,
SanticN4N
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!
http://www.microchipdirect.com/productsearch.aspx?Keywords=DV164120
I'm a newbie of Visual Basic and your Code is been very helpful for me.
Best Regards,
Dany...
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
Great example.THNX...I'm interested ;-)
thanks for the info it was really helpful
Do you have 4x4x4 LED CUBE's software?
Tank you very much!!!
correia7cesar@hotmail.com
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
plzzzzzzzzzzzzzzz
vaidya.vaibhav91@gmail.com
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?
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.
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
I appreciate if you can help me thanks.
This is a simple program (Test LED 3x3x3) which test (lights) the layers one by one
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST P=16F84A
INCLUDE
cblock 0x0C
PDel0
PDel1
PDel2
ENDC
; Main program starts here
;-----------------------------------------------------------------------------------------------
Start
BSF STATUS,RP0 ;SELECCIONAMOS EL BANCO 1
CLRF TRISB ;LIMPIAMOS EL REGISTRO TRISB
MOVLW B'11110000' ;ENTRADAS RA4-RA4, SALIDAS RA0-RA3
MOVWF TRISA ;PONEMOS EL VALOR DE W EN TRISA
BCF STATUS,RP0 ;SELECCIONAMOS EL BANCO 0
CLRF PORTA
CLRF PORTB
Loop
MOVLW B'11111111'
MOVWF TRISB
BSF PORTA,0
BSF PORTA,3 ;ACTIVA TOP LAYER
CALL DEMORA
BCF PORTA,3
BSF PORTA,2 ;ACTIVA MIDDLE LAYER
CALL DEMORA
BCF PORTA,2
BSF PORTA,1 ;ACTIVA BOTTOM LAYER
CALL DEMORA
BCF PORTA,1
Goto Loop
; Generado con PDEL ver SP r 1.0 el 21/11/2011 Hs 03:47:41 p.m.
; Descripcion: Delay 700000 ciclos
;-------------------------------------------------------------
DEMORA movlw .17 ; 1 set numero de repeticion (C)
movwf PDel0 ; 1 |
PLoop0 movlw .47 ; 1 set numero de repeticion (B)
movwf PDel1 ; 1 |
PLoop1 movlw .218 ; 1 set numero de repeticion (A)
movwf PDel2 ; 1 |
PLoop2 clrwdt ; 1 clear watchdog
decfsz PDel2, 1 ; 1 + (1) es el tiempo 0 ? (A)
goto PLoop2 ; 2 no, loop
decfsz PDel1, 1 ; 1 + (1) es el tiempo 0 ? (B)
goto PLoop1 ; 2 no, loop
decfsz PDel0, 1 ; 1 + (1) es el tiempo 0 ? (C)
goto PLoop0 ; 2 no, loop
PDelL1 goto PDelL2 ; 2 ciclos delay
PDelL2 clrwdt ; 1 ciclo delay
return ; 2+2 Fin.
End;