3x3x3 LED Cube

254,693

233

206

Introduction: 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)

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!

Participated in the
The Instructables Book Contest

Be the First to Share

    Recommendations

    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge

    206 Discussions

    0
    jwzumwalt
    jwzumwalt

    2 years ago

    Your Code.rar file actually downloads as a *.tmp file and looks like an incomplete download. I suggest you get the file name corrected to .rar

    0
    SokHaN1
    SokHaN1

    4 years ago

    I need code cube 3x3 can u help me .need all code

    0
    Qsonic2014
    Qsonic2014

    6 years ago on Introduction

    Merci jimy268, je vais commencer avec le test des led. j'espère réussir.

    Jimy268 thank you, I'll start with the test LED. I hope to succeed.

    Kyno Québec (canada)

    0
    hkerr
    hkerr

    6 years ago on Introduction

    can you please post a pic of bottom and top of the circuit

    0
    dark clerick
    dark clerick

    10 years ago on Step 1

    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?

    0
    dark clerick
    dark clerick

    Reply 10 years ago on Step 1

    could somone post a better picture of how to wire it?

    0
    Gasburner
    Gasburner

    Reply 10 years ago on Step 1

    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

    0
    portreathbeach
    portreathbeach

    Reply 10 years ago on Step 1

    You need a PICKit 2. Plugs into a USB and then you can program the PIC

    0
    GeArGuY
    GeArGuY

    8 years ago on Introduction

    Does anyone have a website where you can get all of this????

    0
    vanvan67
    vanvan67

    6 years ago on Introduction

    Help.,!!!!!!!!!!! can anybody tell me where can i see the program of this.?

    0
    PH0t0G3N1US
    PH0t0G3N1US

    7 years ago on Introduction

    can anyone direct me to website or video that makes the 3x3x3 led cube that uses 4pin Leds??? Thanks

    0
    mcruz27
    mcruz27

    7 years ago on Introduction

    http://www.youtube.com/watch?v=BBa0B99A610&list=FLOhEsbZGGzNAmJ6jLGZzL1g&feature=mh_lolz

    0
    Robbiezxc
    Robbiezxc

    7 years ago on Introduction

    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

    0
    Robbiezxc
    Robbiezxc

    7 years ago on Step 2

    could one some please please send me the HEX code robbiezxc@me.com

    0
    rkshirsagar
    rkshirsagar

    7 years ago on Introduction

    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.