Top Banner
http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/ Food Living Outside Play Technology Workshop 4x4x4 LED Cube Arduino by jtmanders on August 5, 2012 Table of Contents 4x4x4 LED Cube Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: 4x4x4 LED Cube Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: Prepare The LED's . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 2: Solder the LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 3: Build the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 4: Connecting the Cube To Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Step 5: Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
10

4x4x4 LED Cube Arduino - Instructables

Feb 08, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Food      Living       Outside        Play        Technology       Workshop

4x4x4 LED Cube Arduinoby jtmanders on August 5, 2012

Table of Contents

4x4x4 LED Cube Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   4x4x4 LED Cube Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   Prepare The LED's . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 2:   Solder the LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 3:   Build the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 4:   Connecting the Cube To Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 5:   Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Page 2: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Author:jtmandersI like Arduino :)

Intro:  4x4x4 LED Cube ArduinoAfter seeing all the different instructables for Led cubes i was still left with a lot of unanswered questions. So after reading everything i could find this is what i got. Idecided to make the instructable after building it...so ill try to recreate the process the best i can.

This cube is different from others for many reasons:1. It connects directly to your Arduino.2. It uses few components, so its relatively inexpensive.3. Runs on code that's easy to write. or you can use the ones provided.4. Everything can be bought at your local Radio Shack

Parts Needed:64 diffused LED Lights (it cost a lot less to order 1000 off ebay for around $20) (Also i used 3mm LEDs, but 5mm or 8mm would work to)16 220 resistors4 22k resistors4 NPN type Transistors1-2 Perfboard (The kind with the little copper circles) (you only need one if you are good at compacting your soldering unlike me....)1 Arduino (I went ahead and bought a MEGA so there's room to expand fro future projects, however UNO has just enough i/o ports)Insulated 22 gauge Wiresome craft wire

Knowledge Needed:Basic electronics and solderingbe capable of following directions

Image Notes1. Every thing connected to arduino

Page 3: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. Craft Wire to construct the cube with2. Craft Wire to construct cube with

Image Notes1. 1000 LED lights (Not necessary, but much cheaper than Radio Shack) Buythem in Bulk from China on ebay...

Page 4: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Step 1: Prepare The LED'sThe first thing you must do is make the cube.

If you look at the pictures of mine the LED's are not all just soldered to each other. This is because I actually made all the wiring and circuitry when i was waiting for myLED's to get here from China....(Note that it takes about two weeks for the lights to get to you).Therefore when Finally got the LED's they were a lot smaller than i anticipated, and i did not want to redo my circuit board, so i just made frames out of craft wire to hookall the cathodes to. After i started to do that i then realized that it would the be shorter than it is tall making it a rectangle rather than a cube. So that's when i added thevertical columns of wire to solder the anodes too.

The cube is split into 4 layers of 16 LEDS.

All the LEDs aligned in a vertical column share a common anode (+).All the LEDs on a horizontal layer share a common cathode (-).

Now if i want to light up the LED in the upper left corner in the back (0,0,3), I just supply GND (-) to the upper layer, and VCC (+) to the column in the left corner.

To begin the Construction of the cube use a drill with the proper size drill bit to make holes in a piece of wood. draw a grid to the size of the cube you want. (this isdetermined by how long the leads are on your LED's.

Your going to want to test you LED's before you solder them into place because it would be sad if you put your cube together and had one in the middle that didn't work.I'm sure they would be pretty hard to replace. So just use a 3v battery between the two legs of the LED. (long leg is positive, short is negative)

Image Notes1. Cathode (Short) Negative2. Anode (Long) Positive

Image Notes1. anodes make the columns2. cathodes make up the layers

Page 5: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. Test your LEDs!!!2. 3v Battery

Step 2: Solder the LEDsTo solder all the LEDs together i used alligator clips to help hold everything together.As i said before, i decided to to this after i built it, so i don't really have any pictures of the building process.However the pictures below are excally what it should look like. These are from Chr's instructable for his 4x4x4 cube . Also there is additional information on his that maynot be included on mine. So go read his too.

First make all four layers, then solder the layers together.

Image Notes1. Use alligator clips to Hold the LEDs while you solder them....the clip gets hotafter a while!!

Image Notes1. all the anodes should stick up, and all the cathodes should be solderedtogether.

Page 6: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. One finished, just make three more

Image Notes1. After making all four layers, Solder them all together

Image Notes1. Close up Of joint

Step 3: Build the CircuitThe circuit is pretty simple. Each of the 16 columns will connect to a pin on the Arduino through a current limiting resistor. Each of the four levels connects to ground via aNPN transistor when activated by an Arduino pin.

I drew these drawings if you can understand my way of labeling.

First Make the Transistor arrays:

Its made with 4 NPN type transistors. and 22k ohm resistors. In a nut shell connect all the collectors together, theses all go to a ground pin on the Arduino. Then all fourbases should go their own pin on the Arduino. Lastly the Emitters should go to the layers on the Cube. (Look at picture 2 and it will make since.

The first picture is of both boards to understand how they connect to each other and the Arduino.The second picture is my drawing of the transistor array controlling the 4 ground layers.The third picture is the actual Transistor ground board. (The Bottom)The Forth picture is the actual Transistor ground board. (The Top)

Second Make the main cube board:All that really happens on this board is that all 16 columns are connected to the Arduino through a 220 ohm resistor.Also all four layers come into this board and then leave to the transistor Board.

The fifth picture is of the entire Cube board. As you see all columns are connected to a 220 ohm resistor the another wire comes out the top of the board and goes to theArduino. Also you will notice that the wires are kinda on the resistor backwards to common since. this is because the first time i did this i completely forgot theresistors....so i did some improvising and it is kinda backwards to normal thinking. Therefore you be smart and do it right the first time. so if you do it right it does not haveto look like mine however you can if you want.

The sixth picture is a close up of all the connections. The four big solder trails are the 4 ground layers that leave the board to the transistor board.

The seventh Picture is of the top of the board showing where the wires leave and go to.

The eight picture shows where the Layers enter the board. Just connect a piece of stripped wire to the layer and then bring it down to the board. make sure these wiresdon't touch any other wires .... this would cause a short. however take all the insulation off so that you cant really see them in the cube.

The ninth picture shows the connection between the two boards. As i said before, i am not that good at soldering yet. if your good you could cram all this on one boardrather than two.

Page 7: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. This is everything on the main board2. this is the ground Board3. Key:Blue: Where columns are soldered on board.Green: WiringRed: where Layer wires enter board.Purple: Where wires leave BoardOrange: ResistorsBlack Transistors

Image Notes1. Base2. Collector3. emmiter4. All of these are 22k ohm resistors5. Layer 1: Bottom layer on cube, Pin 16 on Arduino6. Layer 2: the secound form bottom layer, Pin 17 on arduino7. Layer 3: 3rd from bottom, pin 18 on Arduino8. Layer 4: Top Layer, pin 19 on Arduino9. These are all NPN type transistors10. To Ground pin on Arduino11. To Layer 1 on cube12. To layer 2 on cube13. To Layer three on cube14. To layer 4 on cube

Image Notes1. Wires from cube2. Wires to arduino

Page 8: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. The 16 Columns2. Layers 1-3layer 4 is over there <-----3. Wires From cube into resistor4. Wires leaving resistor to wires on top of board connecting to Arduino

Image Notes1. From th2 16 colums2. From resistor to arduino3. If your smart you will flip this around so that the wire coming from the cube areon top and the wires going to the arduino are closer to the edge of the board4. the 4 Ground Layers

Image Notes1. Wires going to Arduino2. Tape to prevent pulling a wire out of the board3. Wires leaving to the transistors

Image Notes1. Layer 1 entering board2. Layer 2 entering Board3. Layer 3 entering board4. Layer 4 entering board5. The red dots show the solder trails on the bottom of the board

Page 9: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. The connection between the two boards

Step 4: Connecting the Cube To ArduinoThe cube is connected as follows:

column # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 L1 L2 L3 L4Pin# 13 12 11 10 9 8 7 6 5 4 3 2 1 0 14 15 16 17 18 19

Pictures explain better than words.....

Image Notes1. Column numbers

Image Notes1. To arduino pins in order left to right13 12 11 10 9 8 7 6 5 4 3 2 1 0 14 152. From Columns

Page 10: 4x4x4 LED Cube Arduino - Instructables

http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/

Image Notes1. Base2. Collector3. emmiter4. All of these are 22k ohm resistors5. Layer 1: Bottom layer on cube, Pin 16 on Arduino6. Layer 2: the secound form bottom layer, Pin 17 on arduino7. Layer 3: 3rd from bottom, pin 18 on Arduino8. Layer 4: Top Layer, pin 19 on Arduino9. These are all NPN type transistors10. To Ground pin on Arduino11. To Layer 1 on cube12. To layer 2 on cube13. To Layer three on cube14. To layer 4 on cube

Image Notes1. Every thing connected to arduino

Step 5: ProgrammingFirst i wrote a few simple codes just using simple digitalWrite commands to turn lights on and off...then i found a few different codes on the internet.

4x4 LED sequence 1 and 2 are very simpleLED Show 1 is a full show that found on the internetLED Show 2 is another one that is different but it does really the same thing over and overLedcube 3x3x3 show is one i found. as the title says its only 3x3x3 however it still works on the cube, it just doesn't use all the lights....

im currently writing my own code for it and i will put it on here when i finish....

Comment if you have any questions or would like to share ideas or creations!Thanks for Reading!!

File Downloads

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

Related Instructables

Led Cube 4x4x4(video) by bajgik

Arduino 4x4x4LED Cube byPhogie7

4x4x4 LED-cubebased Arduinoand Flowerprotoboard byElecFreaks

4 x 4 x 4interactive led-cube (Photos) bykenyer

My 4x4x4 LEDCube byDYSeow

The4x4x4 LED cube(Arduino) byforte1994