4x4x4 led cube (arduino uno) - instructables

12
http://www.instructables.com/id/4x4x4-LED-Cube-Arduino-Uno/ Food Living Outside Play Technology Workshop 4x4x4 LED Cube (Arduino Uno) by KyleTheCreator on July 1, 2014 Table of Contents 4x4x4 LED Cube (Arduino Uno) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: 4x4x4 LED Cube (Arduino Uno) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Watch The Video: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: What You Will Need: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Parts/ Materials: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Tools/ Adhesives: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 2: Making The LED Jig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 3: Making The LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 4: Installing The LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 5: Wiring The Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Connection Setup: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Step 6: Installing The Arduino/ Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 The Code! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Upload: khangminh22

Post on 08-Feb-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

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

Food      Living       Outside        Play        Technology       Workshop

4x4x4 LED Cube (Arduino Uno)by KyleTheCreator on July 1, 2014

Table of Contents

4x4x4 LED Cube (Arduino Uno) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   4x4x4 LED Cube (Arduino Uno) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Watch The Video: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   What You Will Need: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Parts/ Materials: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Tools/ Adhesives: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2:   Making The LED Jig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 3:   Making The LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 4:   Installing The LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 5:   Wiring The Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Connection Setup: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 6:   Installing The Arduino/ Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

The Code! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

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

Intro:  4x4x4 LED Cube (Arduino Uno)In this tutorial I'll show you how to make a 4x4x4 LED cube for around $15.00. The cube has 64 green LEDs which make up it's 4 layers(positives) and 16columns(negatives). These are all wired to a Arduino Uno. An Arduino is a single-board microcontroller, intended to make the application of interactive objects orenvironments more accessible. The hardware consists of an open-source hardware board designed around an 8-bit Atmel AVR microcontroller, or a 32-bit Atmel ARM. Iprogramed code(sketches) for the Arduino Uno to controll the individual LEDs to display patterns for this captivating desktop light show.

Watch The Video:

Step 1: What You Will Need:Parts/ Materials:

64 Diffused LEDs $2.001.4 100 OHM Resistors $0.992.Pin Header $0.503.Slide Switch $0.994.Wire $0.755.Craft Wire $0.256.Perf Board $2.007.Project Box $8.508.9V Power Supply $1.009.

Total Cost: $16.98

Tools/ Adhesives:

Arduino UnoDrill1/16" Drill Bit5/16" Drill BitKnife

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

Straight EdgeNeedle Nose PliersSoldering IronSolderHot Glue Gun

Image Notes1. 64 Diffused LEDs2. Wire3. Pin Header4. Slide Switch5. 4 100 OHM Resisters

Image Notes1. Project Box2. 9V Power Supply3. Craft Wire4. Perf Board

Image Notes1. Arduino Uno(yes, it is a fake "Arduino")

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

Image Notes1. Needle Nose Pliers2. Knife3. Straight Edge4. Drill5. Drill Bits

Image Notes1. Solder2. Hot Glue Gun3. Soldering Iron

Step 2: Making The LED JigFirst, Start by printing out my 4x4x4 LED Cube Template and paste it to a cardboard box.Make sure that the printing settings are set to actual size and landscapeorientation. Next, punch out all 16 LED holes(grey dashed circles) using a pencil. Insert a LED into the individual holes to test the fit.

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

File Downloads

4x4x4 LED Cube Template.pdf (21 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to '4x4x4 LED Cube Template.pdf']

Step 3: Making The LED CubeTake the 64 LEDs and test them to insure that they all work using a button cell battery. This may sound tedious but in the end this will safe-guard your your project!Next, insert 16 LEDs into the holes and bend the leads to the direction of the arrows using needle nose pliers. The red arrows represent the positives(anodes) likewisethe blue arrows represent the negatives(cathodes). Solder all of the positive leads together and trim off the access of the leads. Now, you might have noticed that thereare two gaps in the layer of the positive leads. This can be solved by straightening a length of craft wire by pulling both ends of the wire with pliers and trimming two 1"sections that are then soldered in place. After the hole positive layer is soldered together, flip the box over and start pushing the tips of the LEDs out of the holes in the jig.Make sure to do this evenly to avoid bending or damaging the layers structure. Now your first LED layer is finished! Follow this step three more times to end up withfour layers. Next, take the four LED layers and solder the negative leads together by stacking the individual layers on the top of each other. Start by soldering the leadsin the center, then work out to the leads on the edge. The 4x4x4 LED cube is starting to take shape! Straghten another length of craft wire and cut and bend foursections that will later connect the four layers to the perf board. Finally, solder them in place.

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

Image Notes1. Gap In The Layer2. Gap In The Layer

Image Notes1. Craft Wire2. Craft Wire

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

Step 4: Installing The LED CubeStart by marking an outline of a square with a Sharpie that is slightly smaller than the interior sides of project box on the perf board. Use a straight edge and a knife toscore the outline along the lines, then break off the access material by placing the perf board in a vise or on the edge of a table, then apply pressure till the scored sidessnap off. Next, drill 20 holes with a 1/16" drill bit for the leads on the top of the project box. An easy way of doing this is by marking the holes where the leads poke out ofthe perf board and then taping the board to the top of the project box. Next mark the 20 holes on the top of the box through the board with a sharpened pencil. Take theperf board off and drill where the markings are on the project box. Then glue the perf board inside of the box with some hot glue. Make sure that all 20 holes line upwith the holes on the perf board. Next install the LED cube by carefully inserting each lead through the holes on the project box. Finally, solder the leads in place, thentrim off the access wire.

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

Step 5: Wiring The CircuitFirst, snap the pin header in to 3 pieces that fit the Arduino Unos digital and analog plug-ins. Strip and start soldering wires to the 16 digital leads(columns) on the perfboard. For the 4 analog leads(layers), solder 100 OHM resisters to the leads then solder wires to each resisters lead. Next strip and solder the opposite ends of the wiresto the 3 pin headers. The wiring is setup to resemble a graph with a 3rd dimension. For the columns, there are two axes X and Y. In addition, the layers serve as the Zaxis. If you look straight down from the top of the LED cube it looks like the 1st quadrant on a graph except that the origin is (1,1) on the cube. Likewise each LED can benamed using the fundamental graphing technique. Lets try an example; look at the demonstrational picture and find A(1,4). "A" means that it is on the first layer and"(1,4)" is X=1,Y=4 on the graph.

Connection Setup:

Columns

[(x,y)-Pin]

(1,1)-13(1,2)-12(1,3)-11(1,4)-10(2,1)-9(2,2)-8(2,3)-7(2,4)-6(3,1)-5(3-2)-4(3-3)-3(3,4)-2(4,1)-1(4,2)-0(4,3)-A5(4,4)-A4

Layers

[Layer-Pin]

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

a-A0b-A1c-A2d-A3

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

Step 6: Installing The Arduino/ Power supplyTake the sliding switch and cut the mounting tabs off with the wire snips on the needle nose pliers. Next, cut and strip the positive wires of the power supply and solderthe switch to the positive leads. Drill a hole on the side of the project box with a 5/16" drill bit. Make sure to work up to the 5/16" hole in increments of bit sizes.Carve away the plastic ribs in the interior of the box near the hole with a knife, then hot glue the switch in place. Next, plug the pin headers and the 9v power supply intothe Arduino Uno. Lastly, upload the code(sketch) to the Arduino then tighten the bottom lid on to project box. Now the 4x4x4 LED cube is finally finished!

Enjoy!

Want more instructables? Please favorite, follow, and comment for more creative builds, hacks, and more.

Thanks, KyleTheCreator

The Code!

I found this sketch online, then I edited it to work for my LED cube. Soon, I'll have my own sketch that will be posted right here, on this 'ible. But for now, if you have anyimprovements or add-ons to this current sketch, let me know so I can keep it updated:)

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

Related Instructables

DIY FunkyNightlight: The4x4x4 LED Cubeby Analogue-Chick

LED Cube bywiscdoledino How To Write

Your Own 4x4x4LED Cube ShowFor Arduino byjtmanders

4x4x4 RGB LEDCube by rojm

8x8x8 led cube(build) byfallinsquirrel Demystifying 4

pin RGB LEDS(Radio Shack276-0028) byDain Unicorn

Advertisements

Comments

2 comments Add Comment

 seamster says:  Aug 18, 2014. 7:57 AM  REPLYNice project! Thanks for sharing with the community!

 Grisling says:  Aug 17, 2014. 11:32 PM  REPLYgreat instructable...I will make this when my order of LED's come in :)