Sie sind auf Seite 1von 8

Home Sign Up!

Explore Community Submit


All

Art

Craft

Food

Games

Green

Home

Kids

Life

Music

Offbeat

Outdoors

Pets

Ride

Science

Sports

Tech

3x3x3 LED Cube


by portreathbeach on June 20, 2008

Table of Contents
intro: 3x3x3 LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

step 1: Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

step 2: The software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Customized Instructable T-shirts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

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.

Video

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

MAKE a
VOLUMETRIC
PROJECTOR
from JUNK by
VIRON

Make a "real"
tesseract - 4D
cube. by VIRON

LED Projector
The Arduino
by
LED Cube!! by
PuffMag1cDrag0n robotkid249

3D LED
Charlieplex
Cube from
Chrismas Tree
Lights by rgbphil

My Awesome
A SciFi
Led
Scanner/Ray
Cube.......................Gun movie prop
(slideshow) by
by whitish
blckthng

Cylon pumpkin!
(slideshow) by
ukavu

Advertisements
Customized Instructable T-shirts

Comments
50 comments Add Comment

Rigas says:
My 3x3x3 Led Cube assembled : )

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

view all 59 comments


Jan 4, 2009. 5:35 PM REPLY

portreathbeach says:

Jan 5, 2009. 9:16 AM REPLY

Nice Work!

Rigas says:

Jan 7, 2009. 12:49 AM REPLY

Thanks!! : D

forte1994 says:

Jan 6, 2009. 7:15 PM REPLY

can i use any other micro controller or will it not work or maybe arduino?

hellow123 says:

Jan 6, 2009. 6:26 PM REPLY

how would i use your VB probram with an arduino?

forte1994 says:

Jan 2, 2009. 7:47 PM REPLY

how do you import data on to this cube do you just hook it up to a computer or do you have to have some other hardware?

Rigas says:

Jan 4, 2009. 5:06 PM REPLY

Yes, you have to use Pickit 2 or other Pic programmer compatible with pic16f690

forte1994 says:

Jan 5, 2009. 7:16 PM REPLY

Thank you I will try to find it!


nice Instructable!

hy9hsc9 says:

Jan 4, 2009. 8:57 PM REPLY


Sweet project, I managed to adapt the code from this and got it to run on a PIC16F873A (you might be wondering why that chip and not the one in the
example the reason I had an extra one lying around from another project) The only issues i ran into were config registers, and I/O initialization. also since this
chip does NOT have an internal Oscillator I have selectable speed without re-compiling the code ( swap 4MHz for 8 or 16 it looks really cool) it's still on a
bread board right now will post when done in box

Rigas says:

Dec 30, 2008. 5:41 PM REPLY


hi!
I have a little problem with my 3x3x3 cube... I can't program my pic16f690 with your software.. I make the .asm file, then I open it with mplab and export to
.hex... then I use pickit 2 software to program, but it doesn't work. the chip is always empty...

Rigas says:

Dec 30, 2008. 5:52 PM REPLY

PROBLEM SOLVED!!!! AWESOME CUBE!!

Rigas says:
My 3x3x3 cube on a breadboard

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

Dec 30, 2008. 7:56 PM REPLY

sorry for crappy video quality...

user18 says:

Dec 30, 2008. 9:50 AM REPLY

Hi, it's a nice project! You might be interested to check a similar one with an open C code:
http://mcs.uwsuper.edu/sb/381/Projects/2008/3x3x3/

wiskas140 says:

Dec 25, 2008. 11:33 AM REPLY

Hi . I'd like to build this cube and i have a question, How is the cube connect with computer?

GregorN says:

Dec 8, 2008. 10:05 PM REPLY

Hi, I make this, it's very cool. Tnx for this Instructable!

stark08 says:

Nov 17, 2008. 4:59 AM REPLY

Snapshot from Circad98

stark08 says:

Nov 14, 2008. 6:38 AM REPLY

Very very nice!


A little question...the RC2 led is connected on RC1 PIC pin or RC2 pin??
From bottom of the pic to the top RB6-RB5-RB4-RC2-RC1 there is an error?

portreathbeach says:

Nov 14, 2008. 7:56 AM REPLY

Yes, you are correct. I have drawn the wire from RC2 LED to the RC1 pin, it should be on the RC2 pin.

stark08 says:

Nov 15, 2008. 2:27 AM REPLY

Thank you PORTREATHBEACH.


I have begun to draw the electric scheme.
If you are interested I can post it or I send you him for mail.

portreathbeach says:

Nov 15, 2008. 3:08 AM REPLY

Just post it up if you want.

twenglish1 says:

Aug 13, 2008. 1:47 PM REPLY

do you have the microcontroller code in c i want to take a look at the code but i dont know assembly

portreathbeach says:

Aug 13, 2008. 2:32 PM REPLY

Sorry, I havn't got the code in C. I only know assembly language and VB.NET

twenglish1 says:

Aug 13, 2008. 3:21 PM REPLY

ok thats fine

supra_2009 says:
Search in google that translated from vb.net to C##

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

Nov 4, 2008. 2:59 AM REPLY

damasta says:

Oct 20, 2008. 11:21 AM REPLY

I have an idea, switch the normal leds with rgb leds, add some buttons and a program so you can make a led rubik's cube

homius says:

Sep 7, 2008. 5:48 AM REPLY

Do you think I can use PICAXE-40X instead? I have some sitting around.
It needs Basic language and doesn't need programmer.

portreathbeach says:

Sep 7, 2008. 9:22 AM REPLY

I have no experiance with that device, but I am sure it can be used, you may have to change some of the code though.

Demonic_Crow says:

Sep 5, 2008. 6:19 PM REPLY

Very cool, can you use a USBtinyISP to do something like this.

portreathbeach says:

Sep 6, 2008. 3:44 AM REPLY


Hi, I have just looked on the internet for USBtinyISP, and it looks like it can only program AVR chips, not PICS. If this is the case, the entire code would
have to be re-written. But in answer to your question, as long as the AVR chip you would use has enough outputs, you should be able to make one of
these.

beakman02 says:

Aug 10, 2008. 9:13 AM REPLY


hi, nice project! the software is very usefull, do you have the code in VB to send me?? cos i need to do it for 4x4x4 cube. Thanks!

the_burrito_master says:

Jul 12, 2008. 8:49 PM REPLY

oooooo pretty! this gives me an idea.


you/them could make something out of this concept.
you could make a very big one of these like as tall and wide as the average person.
then we have got to find some way to pick up the shape of a person with cameras or something and some how get the right leds to light up the persons
shape.
you have one of these things when you talk on the phone or talk on IM whatever you want that it shows a hologram of the person your talking to. sorta like
star wars :P
total noob just one of those dumb noob ideas that are totaly impossible.

portreathbeach says:

Jul 13, 2008. 7:20 AM REPLY


Nice idea, but you would have to use something other than a PIC16F690, probably a PC multiplexing hundreds of thousands of LEDs. Would be nice to
make one, would take a long time i expect!

the_burrito_master says:

Jul 13, 2008. 9:21 AM REPLY

yeah I know it would take a LOT of programing and thousands of color changing LEDs.
but it be a very nice to have one it would be like your talking with the person and he is right there!

Notbob says:

Jul 28, 2008. 6:34 AM REPLY


that is a good marketable idea. If you think about it after the first one is programed and done all of the hard stuff is done. All you would need to do
would make copies of the first one.

the_burrito_master says:

Jul 29, 2008. 8:47 PM REPLY

do you think it is even possible?

Notbob says:
According to your drawing you are using 2 cells that add up to a total of 9v, could I use a single 9v battery instead?
What do you use to connect the PIC16F690 to your computer? and how much would one cost?
What was the Amp rating on the 5v regulator?
What was the specs on the NPN transistor.

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

Jul 29, 2008. 11:35 AM REPLY

portreathbeach says:

Jul 29, 2008. 12:14 PM REPLY


Yeah, I actually used a 9 volt pp3 battery, not 2 separate cells. I used the PicKit 2 programmer, it connects to the USB socket and is available from
www.microchip.com.
The 5v regulator is rated at 1 amp, but the circuit uses nothing like that amount of current. The NPN transistor is rated at 0.5 amps.

Notbob says:

Jul 29, 2008. 1:39 PM REPLY

is this http://www.microchipdirect.com/productsearch.aspx?Keywords=PG164120+ what you used?

Notbob says:

Jul 29, 2008. 1:25 PM REPLY

Thanks, I need the specs for the LED's that you used still.

portreathbeach says:

Jul 29, 2008. 11:54 PM REPLY


For the LEDs, just use get the brightest ones you can. And make sure you use the correct resistor for the LED. eg. If the LED has a maximum of
20mA then you need to use : 5 volts divided by 20mA = 250 ohm resistor.

imarzouka says:

Oct 23, 2008. 12:34 PM REPLY

You can also use this led calculator for resistor value
http://ledcalculator.net

justj2 says:

Jul 1, 2008. 4:02 AM REPLY


I really like this cube, as said before it looks and is much better than others out there. My old electronics teacher constantly set me challenges to make things
as small as possible and has suggested to try this, so i was wondering what the minimum operating voltage of the cube is.
As at the moment you have a 9v with a regulator, with a smaller battery e.g. 3.6v and get rid of the regulator, would it run on that?
Facinating lil cube, very well made .

portreathbeach says:

Jul 1, 2008. 8:48 AM REPLY


The PDF document for the PIC16F690 says that I will operate from any voltage between 2.0 and 5.5 volts. So yes, You should be able to use a 3.6 V
battery and make the whole thing smaller.

szechuan53 says:

Jun 28, 2008. 7:26 AM REPLY

hmm... i think I will use other things instead of LEDs...


hehehe

homius says:

Jun 22, 2008. 3:45 PM REPLY


I should say that this one looks better than all other 3D LED cubes on NET (personally, I prefer single color of these rather than RGBs).
I am not really expert in those PIC programming parts. Since you are saying you are using MPLab, is that mean I need to have one of those expensive
microchip.com programmer to program? or I can get one of those $25 USB versions from somewhere?
I have couple of those PICAxe micro around. Do you think I can use any of those instead?

portreathbeach says:

Jun 23, 2008. 3:54 AM REPLY

I use the PICKit2 programmer, which isn't too expensive and also MPLAB is a free download from Microchip.com

Zorink says:

Jun 21, 2008. 10:28 PM REPLY

What project case did you use?

portreathbeach says:

Jun 22, 2008. 10:22 AM REPLY


Its a black plastic case, about 115mm x 65mm x 30mm with 4 screws in the lid. You can get this sort of case from Maplin, RS and Farnell. There's also
loads more places to get these sort of cases.

darkmuskrat says:

Jun 22, 2008. 11:07 PM REPLY

I got one just like this at Circuit City for $1 (normal price was $4)

comodore says:
Great project! I really like it!
You could have done the Instructable in more detail, but other than that it is great!

view all 59 comments


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

Jun 22, 2008. 3:31 AM REPLY

Das könnte Ihnen auch gefallen