+ All Categories
Home > Documents > LED Cube 4x4x4

LED Cube 4x4x4

Date post: 22-Nov-2014
Category:
Upload: bigdesha
View: 26 times
Download: 15 times
Share this document with a friend
Popular Tags:
21
http://www.instructables.com/id/LED-Cube-4x4x4/ Home Sign Up! Browse Community Submit All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech LED Cube 4x4x4 by chr on March 24, 2008 Table of Contents License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Intro: LED Cube 4x4x4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 step 1: What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 2: Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 step 3: Making the cube, template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 step 4: Making the cube, solder the layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 step 5: Making the cube, connecting the layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 step 6: Choosing resistor values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 7: The controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 step 8: Wire up the cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 step 9: Compile and program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 step 10: Program the microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 step 11: Go large - 8x8x8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Transcript
Page 1: LED Cube 4x4x4

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

Home Sign Up! Browse Community Submit All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science TechLED Cube 4x4x4by chr on March 24, 2008Table of Contents

License: Attribution Non-commercial Share Alike (by-nc-sa) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

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

step 1: What you need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 2: Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 3: Making the cube, template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 4: Making the cube, solder the layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 5: Making the cube, connecting the layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 6: Choosing resistor values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 7: The controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 8: Wire up the cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 9: Compile and program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 10: Program the microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 11: Go large - 8x8x8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Page 2: LED Cube 4x4x4

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

License: Attribution Non-commercial Share Alike (by-nc-sa)

Intro: LED Cube 4x4x4Amazing 3 dimensional LED display.

64 LEDs makes up this 4 by 4 by 4 cube, controlled by an Atmel Atmega16 microcontroller.Each LED can be addressed individually in software, enabling it to display amazing 3d animations!

Page 3: LED Cube 4x4x4

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

step 1: What you needFirst of all, you need quite a bit of time to solder together 64 leds ;)

Knowledge list:

Basic electronics and soldering skillsKnow how to program an AVR microcontroller - I will not cover that in this instructable.

Component list:

Protoboard. The type with copper circles.Atmel AVR Atmega16 microcontrollerProgrammer to program the Atmega1664 Leds2 status leds. I used red and green. (optional)Max232 rs-232 chip, or equivalent.16 resistors for leds. (100-400ohms) will get back to this.2x resistor 470 ohm. for status leds1x resistor 10k4x resistor 2.2k4x NPN transistor BC338 (or other transistor capable of switching 250-ish mA)1x 10uF capacitor1x 1000uF capacitor6x 0.1uF ceramic capacitor2x 22pF ceramic capacitor1x crystal 14.7456 MHz2x tactile buttonoptional pwr switchconnector for 12v poweroptional connector for 5v power

Image Notes1. A lot of leds!

step 2: MultiplexingHow to control 64 LEDs without using 64 individual wires? Multiplexing!

Running a wire to the anode of each led would obviously be impractical, and would look really bad.One way to get around this, is to split the cube into 4 layers of 16x16 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.

If i only want to light up one led at a time, or only light up more than one layer at the same time.. this works fine.

However, if I also want to light up the bottom right corner in the front (3,3,0), I run into problems. When I supply GND to the lower layer and VCC to the front left column, Ialso light up the upper right led in the front (3,3,3), and the lower left LED in the back (0,0,0). This ghosting effect is impossible to workaround without adding 64 individualwires.

The way to work around it is to only light up one layer at a time, but do it so fast that the eye doesn't recognize that only one layer is lit at any time. This relies on aphenomenon called Persistence of vision .

Each layer is a 4x4 (16) image.If we flash 4 16 led images one at a time, really fast, we get a 4x4x4 3d image!

Page 4: LED Cube 4x4x4

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

Image Notes1. All the LEDs on this layer share cathodes (-)2. All the LEDs in this column share anodes (+)

Image Notes1. This wire supplies GND (-) to layer 1 of the cube.2. This wire supplies GND (-) to layer 0 of the cube.3. All the leds in a layer have their cathodes connected together4. All the cathodes connected together5. All the leds alligned directly above each other have their anodes connectedtogether6. Each of the 16 vertical columns have a resistor to avoid frying the LEDS and themicrocontroller7. This wire supplies VCC to all the leds in this corner...

step 3: Making the cube, templateSoldering grids of 4x4 LEDs freehand would look terrible!To get 4 perfect 4x4 grids of LEDs, we use a template to hold the them in place.

I wanted to make the cube as easy as possible to make, so I chose to use the LEDs own legs as much as possible. The distance between the lines in the grid wasdecided by the length of the LED legs. I found that 25mm (about an inch) was the optimal distance between each led (between the center of each led that is!) to enablesoldering without adding or cutting wire.

Find a piece of wood large enough to make a 4x4 grid of 2,5cm on.Draw up a 4x4 grid of lines.Make dents in all the intersects with a center punch.Find a drill bit that makes holes small enough so that the led will stay firmly in place, and big enough so that the led can easily be pulled out (without bending thewires..).Drill the 16 holes.Your ledcube template is done.

Image Notes1. You want 90 degree angles!2. Acurate measurements3. Draw up the grid4. Punch holes so the drill doesnt travel sideways when you start drilling out theholes

Image Notes1. Nice and square

Page 5: LED Cube 4x4x4

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

Image Notes1. Holes punched out

Image Notes1. LEDs fits nicely

Image Notes1. The distance of 25mm between the center of each hole, enable the pins to justbarely overlap. just perfect for soldering.

step 4: Making the cube, solder the layersWe make the cube in 4 layers of 4x4 leds, then solder them together.

Create a layer:

Put in the LEDs along the back and along one side, and solder them togetherInsert another row of LEDs and solder them together. Do one row at a time to leave place for the soldering iron!Repeat the above step 2 more times.add cross bracing in the front where the led rows are not connected.Repeat 4 times.

Page 6: LED Cube 4x4x4

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

Image Notes1. Start by aligning and soldering the outer edges2. anode3. anode4. anode5. cathode6. Bend the cathode leg (the short one) of the LED 90 degrees to one side.

Image Notes1. cathode2. anode

Image Notes1. All the cathodes (minuses) have been soldered together.2. Since we bent all the cathodes in the same direction, there will be one stickingout to the side. just leave it for now.3. The layer is pretty flimsy in this end, and would be bent out of shape ifremoved from the template like this. See the next image..

Page 7: LED Cube 4x4x4

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

Image Notes1. Add a barcing to this side to make the layer more robust. Take a straightpiece of wire and solder it to all 4 cathodes.

Image Notes1. The finished product

step 5: Making the cube, connecting the layersNow that we have those 4 layers, all we have to do is to solder them together.

Put one layer back in the template. This will be the top layer, so choose the prettiest one :)

Put another layer on top, and align one of the corners exactly 25mm (or whatever distance you used in your grid) above the first layer. This is the distance between thecathode wires.Hold the corner in place with a helping hand and solder the corner anode of the first layer to the corner anode of the second layer. Do this for all the corners.

Check if the layers are perfectly aligned in all dimensions. If not bend a little to adjust. Or re-solder of it's the height distance that's off. When they are perfectly aligned,solder the remaining 12 anodes together.

Repeat 3 times.

Page 8: LED Cube 4x4x4

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

Image Notes1. Start with the corners2. Start in the corners

Image Notes1. then solder the rest.

Image Notes1. cathodes connected to layer2. Anode3. Same anode wire connects to the led directly above..4. Again, be carefull with the soldering iron when soldering this close to the LED.Be fast. If you make a mistake. Let the led cool down before applying heat again.

Page 9: LED Cube 4x4x4

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

step 6: Choosing resistor valuesThere are two things to keep in mind when choosing a resistor value for your leds.1) The LEDs2) The AVR

The AVR has a maximum combined current rating of 200 mA.This gives us 12mA to work with per LED.

You also don't want to exceed the maximum current your leds are rated to.

I used 220 ohm resistors on my cube. This gave me about 12mA per led.

step 7: The controllerThe circuits controlling the led cube is described in the attached schematic image.

The RS-232 interface is optional. and can be omitted. That is IC2 and all the components connected to it. Future firmwares will enable PC communication..

Start by laying out all the components on you circuit board in a layout that enable all the components to connect with a minimal amount of wires. If everything fits, solderthe circuit.

I won't give any more instructions on this, as the circuit probably will look very different from cube to cube, depending on the size of the circuit board etc..

Information on how to wire the cube to the controller circuit is in the next step.

Image Notes1. Pins 15 and 16 on the MAX232 are used for power. Pin 15: GND, pin 16: VCC.2. This capacitor should be placed as close to the GND and VCC of IC2 as

Page 10: LED Cube 4x4x4

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

possible. It's job is to stabilize power to that ic.3. 5V voltage regulator

Page 11: LED Cube 4x4x4

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

step 8: Wire up the cubePictures explain this better than words. Please see the pictures.

Image Notes1. C02. C33. C44. C75. A76. A07. A38. A49. C110. C211. C512. C613. A114. A215. A516. A617. Port A18. Port C19. Front20. Back

Image Notes1. Transistor array for ground wires2. Port D bit 7 controls layer 03. Layer 34. Layer 25. Layer 16. Layer 07. Yes this is a picture of another cube. I didn't have the original available whenwriting this.

Image Notes1. Ground for level 32. Ground for level 23. Ground for level 14. Ground for level 0

Image Notes1. Ground wire for level 12. All the cathodes on this layer are connected together

Page 12: LED Cube 4x4x4

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

Image Notes1. Ground for layer 02. Layer 13. Layer 24. Layer 3

step 9: Compile and programYou now have a led cube. To make use of it, it needs some software.I have made a driver for rendering a 3d data space on the cube, and functions to display some cool visual effects on the cube.

You can use my code, write your own or build on my code and make more effects.If you make your own effects, please send me the code. I'm eager to see what you guys make!

To compile the program. Just open a command promt,enter the directory with the source codetype "make" on the command line.

If you want to use an ATMega32 instead of the ATMega16, just change the mcu setting in the Makefile and recompile (type make). If you use the m32 and don't do thisstep, the cube won't boot properly (the red and green lights will keep blinking forever).

You should now have a file named main.hex in the source directory.The next step will show you how to get that code into your cube.

File Downloads

4x4x4_ledcube-0.2.zip (14 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to '4x4x4_ledcube-0.2.zip']

4x4x4_ledcube.hex (19 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to '4x4x4_ledcube.hex']

step 10: Program the microcontrollerIf you are experiencing problems with speed and/or some LEDs not lighting up. Please read this step carefully.

To program the microcontroller, I use avrdude and the USBTinyISP programmer.

http://savannah.nongnu.org/projects/avrdude/http://www.ladyada.net/make/usbtinyisp/http://www.adafruit.com/index.php?main_page=index&cPath=16

My examples will be on an Ubuntu Linux system. The procedure should be pretty much identical on Windows, but I can't help you with that. If you use anotherprogrammer, read thet manual for that programmer and avrdude.

First off, Let's just see if we can make contact with the AVR.

Connect the programmer to your cube and your computer.

The command is "avrdude -c usbtiny -p m16", wherer -c specifies the programmer, and -p the AVR model. You can see the output in the images below.

Now, upload the firmware: "avrdude -c usbtiny -p m16 -U flash:w:main.hex".

By now, the cube should reboot and start doing stuff. It will be running at 1mhz (very slowly) using it's internal oscillator. And some of the leds won't work, because someGPIO ports are used for JTAG by default.

To enable the external oscillator and disable JTAG, we need to program the fuse bytes:run "avrdude -c usbtiny -p m16 -U lfuse:w:0xef:m"and "avrdude -c usbtiny -p m16 -U hfuse:w:0xc9:m".

Page 13: LED Cube 4x4x4

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

Be carefull when doing this step! If you get it wrong, you can permanently destroy your microcontroller! If you are using another microcontroller than the ATMega16, besure to read the datasheet carefully before changing the fuse bytes!

After writing the correct fuse bytes, the cube should reboot and start operating at regular speed with all leds operational.

Enjoy your new cube :D

Image Notes1. Success2. Check if programmer and uC can communicate

Image Notes1. Write firmware If you downloaded the file 4x4x4_ledcube.hex, it should be -U flash:w:4x4x4_ledcube.hex2. 9KB to spare! You have lot's of space to write new effects or storeanimations.

Image Notes1. Write lower fuse bits

Image Notes1. Write higher fuse bits

Page 14: LED Cube 4x4x4

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

Image Notes1. USBTinyISP2. 6pin cable3. 10pin cable. This cable has one GND lead for each data lead, making it morestable.

Image Notes1. USBTinyISP connected to the cube2. Green lights comes on when connected to the USB port3. Red light comes on when programming4. No need to connect to external power. The USBTinyISP supplies the cubewith 5V via the ISP cable.

Image Notes1. When the cube boots up, it flashes the red and green status leds a couple oftimes. If the leds doesn't do anything else than flasing it's status leds, you haveprobably flashed it with the wrong firmware. I flashed an m32 with firmware for anm16 once, and got this problem.

Image Notes1. It work!

step 11: Go large - 8x8x8After making this quite fancy 4x4x4 cube, I have also made an enormous 8x8x8 cube. I'll make an instructable for that one when I have time. Meanwhile, see pictures :-)

Please rate this instructable if you like it! :)

Page 15: LED Cube 4x4x4

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

Related Instructables

4x4x4 LEDCube! by joewp

Beginner'sGuide - AVRProgramming bycl97

Memory ledcube by Radobot

How to fix deadatmega andattiny avr chipsby manekinen

Help: AnAbsoluteBeginner'sGuide to 8-BitAVRProgramming-AVR Dragon byPopSci

Getting startedwith ubuntu andthe AVR dragonby itch

Page 16: LED Cube 4x4x4

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

AdvertisementsComments50 comments Add Comment view all 484 comments

FFNN says: Nov 27, 2010. 8:30 AM REPLYcould u explain a bit more on choosing the resistor values?

In my understanding the resistor value should be obtained using this equation( Source Voltage - LED Voltage Drop ) / Amps.

So for a blue LED with forward current 30mA and forward voltage:3.6VThe resistor shoud therefore be (5v-3.3v)/30mA = 56ohm?

FFNN says: Nov 27, 2010. 8:42 AM REPLYJust saw this below

"Yeah, but if you light up all 16 LEDs in a layer at 25mA, you'd be pulling double the AVR's max rated curren"

isn't that avr is coded to light up the led one by one very quickly?So that it seems to be lighted up at the same time?

Hardwyre says: Nov 8, 2010. 6:13 AM REPLYI can not find any 22pf capacitors, but I do have 33pf caps.. can I use those in place of the 22's?

Also, if anyone wants the schematics, I created some.

Schematic:https://docs.google.com/leaf?id=0BzXyjatQnrrLNDlmZmNlYmMtY2MyNy00OWQ4LWIyNTItNzliYTJlMDFmYTMw&sort=name&layout=list&num=50

Board:https://docs.google.com/leaf?id=0BzXyjatQnrrLYTJmZjVkZmUtOTg1Yy00NjkwLTliMTYtMTVjNTBmODFmMTQy&sort=name&layout=list&num=50

You'll also need the "con-dinkle" library for one of the connectors I used for the main power terminal.A large zip file of libraries can be downloaded here (the con-dinkle library is under the 'connectors' sub folder):https://github.com/niccodes/Eagle-Libraries

randyray says: Nov 18, 2010. 8:31 AM REPLYHI,I can't seem to get to the schematic and board (assume it's Eagle).Can you email me the files?Thanks,Randy [email protected]

chr says: Nov 11, 2010. 3:37 AM REPLYThis definitely sounds like a transistor problem.

Did you use the same transistors as I did? If not, did you make sure to use a transistor designed for signal switching, not signal amplification?

Some transistors are so good at amplifying signals that the logical 0 from the avr IO pin is enough to partially switch the transistor on. This could becounteracted with a pull-down resistor connected between GND and the transistor base.

The problem is definitely related to your transistors. I would suggest soldering on wires from the avr io pins and connect them to a breadboard so you cantest different transistor configurations.

I think BC547 should work fine with the led cube, or BC337/BC338.

Hardwyre says: Nov 10, 2010. 6:59 AM REPLYGot a small problem. My LEDs will not light up unless I short the layers to a column. Here's a video of my problem. Help please?

http://www.youtube.com/watch?v=oPyax3aVnnE

chr says: Nov 10, 2010. 7:49 AM REPLYIf you have the ability to disconnect the cube from the circuit without de-soldering it, you can also try the following:

3) Connect a single led between a column driver (anode) and a layer driver/transistor (cathode). This should blink randomly, depending on the effectrunning at the moment.

4) Test each led in the cube.Connect GND to layer 0 via a resistor. Take a wire with VCC and poke it at all the columns. Check that every led lights up OK. same for layer 1, rinseand repeat.

We did this while soldering the 8x8x8 cube, for each layer, and actually found a couple of bad leds.

eBay isn't the best source of quality leds ;)

Page 17: LED Cube 4x4x4

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

-chr

chr says: Nov 10, 2010. 7:42 AM REPLYHi Hardywyre!

Love your PCB!

I think this looks like a transistor issue.I have a couple of debugging suggestions:

1) Short one of the ground/cathode layers to GND. Does the layer light up?

2) Disconnect a ground/cathode layer and connect the wire to VCC via a led and resistor. Does this led blink at 1/4 duty cycle? You can look up anddown really fast, or take a camera while moving the picture to confirm.

Maybe you soldered in the transistors the wrong way? :p

-chr

Hardwyre says: Nov 10, 2010. 3:00 PM REPLYThank you for the suggestions. I ended up shorting the transistors and found that the columns would illuminate, so I turned them around. I have light!

And then I noticed the problem.

It doesn't appear to be multiplexing. Now the file I used to program it was the "4x4x4_ledcube.hex" and I just renamed it "main.hex" because Icouldn't get my windows-based C compilers to compile the code .zip you had. I don't know if the pattern in this file is different from the one you usedin your video, but what I'm noticing is that its lighting up entire columns instead of individual LEDs in the columns as seen here:http://www.youtube.com/watch?v=sNRKnUqhKKc

There is a point where the whole cube is illuminated and I can barely make out some flickering. I need to punch of hole in my ceiling for a duct vent,but I'll be back later.

I'm curious though. In your original schematic, the transistors emitter went to ground and the collector went to the cathodes, but the way I have itnow.... actually my schematic program had the silk screen wrong :/

Okay, so now I have columns lighting up, but no multiplexing.

chr says: Nov 11, 2010. 12:35 AM REPLYWhat do you mean by shorting the transistors?

It sounds to me like you just shorted them together.

Its hard for me to help if I can't get a clear picture of whats going on.I might be able to give you a better suggestion if you try all my previous suggestions 1 through 4.

I think there is only one little bug standing between you and a fully functional cube.

Hardwyre says: Nov 11, 2010. 3:29 AM REPLYI FIGURED IT OUT!

It was the transistors!

I don't know what the deal was with them, but I swapped them out for 4401's (which coincidentally match up with the silk screen/ the emitterand collector are reversed on these ones from the other ones I had) and now I'm getting the full animation. I'm thinking I'm going to swap outmy 220ohm resistors for some 150s and see how it looks because it's sort of dim at the moment.

I really appreciate the help.

As for the transistors I got we 2n3704-ND. I have no idea what the deal was with them :/

Actually it doesn't loo like 150ohm is going to make a whole lot of difference as compared to the 220ohm.

chr says: Nov 11, 2010. 3:43 AM REPLY2n3704 seems to be a general purpose amplifying transistor. When used to switch binary signals on and off, it might cause your sometrouble.

The AVR's logical 0 isn't necessarily 0.0V. Even a small voltage on the base pin of an amplifying transistor is enough to leak current fromcollector to emitter.

Google the part number of all your transistors until you find one that is an NPN switching transistor. For example BC547, BC337, orBC338.

Hardwyre says: Nov 11, 2010. 4:42 AM REPLYAye. I think I might rebuild the cube using diffused LEDs if I can find them because right now, one LED will illuminate the other directlyabove it and it looks like two are lit.

You are entirely correct. The transistors I was using were wrong and leaving the entire column illuminated.

Here's the semi-final project :)

http://www.youtube.com/watch?v=3S_9xPxSU6M

Page 18: LED Cube 4x4x4

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

Hardwyre says: Nov 11, 2010. 3:29 AM REPLYSorry, I wasn't concise. I originally tested the transistors by shorting pins 1 and 3 (emitter and collector) and got the layer to start lighting up.

**I had my transistors put in in reverse. For some reason, EaglePCB's board maker and the outline for the transistor is backwards what itneeds to be (emitter was going to cathodes and collector was going to GND)**

But here's the results of the 4 tests with the transistors how "fixed" (i.e. emitter to GND, base to resistor, collector to cathodes)

1. Then I short a layer to GND, that layer becomes the only layer to light up and show any effect.

The whole layer doesn't light up entirely, but in accordance to whatever pattern is playing. When none of the layers are being short to GND,all four layers will light up in respect to the pattern playing.

However, there is never any moment when only a single LED in a column is lit up (like in your video where the LEDs "slide" up and down acolumn". I get solid columns of 4 lit LEDs only.

2. Disconnecting the cathode wire and connecting it to the 5v out of the power regulator it does not appear to blink at all. It appears entirelysolid even with moving my head back and forth past it or waving the LED past my eyes.

3. Using an LED across a anode column and cathode layer causing the LED to light up whenever that column is lit.

4. I did a couple things here...

4a. cathode wire connected (all other layers still connected)

GND+Resistor jumper disconnected

-----When Vcc is applied to the column, the whole column lights up.

4b. cathode wire connect (all other layers still connected)

GND+Resistor jump connected

-----The layer with the jumper is dimmer than the others, but still lit.

-----When power is applied, the whole column lights up.

4c. **CUBE COMPLETELY DISCONNECTED FROM BOARD**

Only wire connected is the resistor+jumper to a layer.

----- When Vcc is applied only the one LED illuminates!

It seems like the transistors are not switching at all and are all just acting like shunts to the ground.

Now when I try reversing the transistors back the way they first were (emitter to cathodes, collector to GND) the layer stops lighting up. Applying Vcc to the column will not illuminate LEDs on layers where I just tried reversing the transistors.

This is where I'm at right now. :/

Deep C says: Oct 22, 2010. 12:43 AM REPLYdoes any one have Arduino code for this, I'm totally unfamiliar with the PIC, and There is another instructable for an arduino in 8x8x8 but it's common Anode,I'm more familiar with common cathode, I think I could modify the schematic from the other one using NPN transistors to control it without modifying thecode. Like I said, I'm just learning arduino code and would like a jumping off point.

Hardwyre says: Oct 21, 2010. 5:29 PM REPLYDoes anyone have the Eagle PCB file for this schematic? It would be greatly appreciated.

TheBlade says: Oct 16, 2010. 1:44 PM REPLYIm haveing a problem, i build this cube and hooked it up to the arduino. it all worked fine but now after a while it starts to dimly lit the bottom row if a ledabove it is on. i resolderd the entire board and its stil not working. any ideas?

TheBlade says: Oct 16, 2010. 3:59 PM REPLYalso, it even dimly lits the bottom row when i take out the ground pin, couseing all the other leds not to work.

ybahman says: Sep 21, 2010. 4:52 PM REPLYhttp://www.youtube.com/watch?v=RoDaowjoRBo

I took the original design and modified it a little bit, then interfaced it w/ a GameCube Controller and built a 3D snake game. I used a PIC18F4520. Ifanyone's interested I could put together an instructable. Just let me know.

Page 19: LED Cube 4x4x4

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

ab_ab says: Oct 8, 2010. 3:24 AM REPLYI want to make a led cube 4x4x4. In cube I want to see some equalizer blink. I want some idea can you pass me thank you.

Pittfall3 says: Oct 7, 2010. 11:27 AM REPLYthat is super cool ybahman you really need to put 1 up

222222222539 says: Oct 3, 2010. 9:16 AM REPLYDoes anyone know if i would be able to do this with an arduino duermilanove? And if it is possible how?

Void Schism says: Oct 4, 2010. 8:04 AM REPLYAn arduino is just an atmel on a board with a few basic components.Connect the LED lines to the ports and program the controller.Though TBH, I would just use an atmel avr as it is far cheaper than an arduino.

222222222539 says: Oct 4, 2010. 2:54 PM REPLYoh okay thanks

saulyx says: Sep 12, 2010. 4:23 PM REPLYhey guys, anyone actually have a diagram of this circuit that is clear? read all the comments and I cant find the one that MasterRed mentioned, and the onethat CHR made is hard to read, anyone could help? Thanks!

Void Schism says: Oct 4, 2010. 8:14 AM REPLYhover over image and a box appears in the top left corner, click it and on the menu at the left select original size imageor as I am so kind, click here http://www.instructables.com/file/FMYFND2FEAHE8UU/?size=ORIGINAL

idezilla says: Sep 26, 2010. 7:58 PM REPLYI made mine 5x5x5 and 8x8x8. With pic16877a. Has full editor, playback, text file download, eeprom storage and random number playback. Small 3.8" x 2.5"board controls all. Cheers, Later.

msik9a2platinum says: Sep 12, 2010. 10:01 AM REPLYi just wanna ask if someone can give me the voltages of the capacitors.... i tend to get a lot of problems with the voltage problems

joaopsl99 says: Aug 30, 2010. 11:38 AM REPLYi found this cheap USBtinyISP in ebay.http://cgi.ebay.co.uk/USBtinyISP-AVR-ISP-Atmel-Programmer-Arduino-bootloader-/170474128004?pt=LH_DefaultDomain_0 Since I live in Europe its a lot cheaper to buy this one than the one from the site. do you think this is compatible with avrdude. it seems to me that thecomponents are the same, only in a different layout. thanks for the instructable

gck24 says: Aug 21, 2010. 8:23 AM REPLYdoes all the code and stuff work for a 6x6x6 cube?

poogemister says: Nov 20, 2008. 4:49 PM REPLYNice code! I really like the way you did it! Just a heads up, in your definition of ioinit, you made a small typo in one of your comments explaining the DataDirection Registers. // Data Direction Registers // Bit set to 1 means it works as an output // Bit set to 1 means it is an input If I'm not mistaken, to configure aport for input requires the bit to be set to 0. Just a heads up. I really like how clean your code is! Nice work! -- Alex DeLand

chr says: Nov 21, 2008. 6:46 AM REPLYThanks, glad you like my code. To be honest, I'm actually a total noob when it comes to C :p I'm going to to get myself a "How to code C" book and learnthe basics properly :)

darlingvt says: Aug 18, 2010. 7:43 PM REPLYhi... im making a disco ball...using leds (max of 70 leds)... but i will be using zilog... i like your codes... can that be use in zilog?... and what shiftregisters did you use? thnx,,.. ill be waiting for your reply...

gck24 says: Aug 16, 2010. 3:53 PM REPLYwhere did you get your LEDs?

Page 20: LED Cube 4x4x4

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

railrun says: Apr 8, 2010. 12:06 PM REPLYHeyCool project.Actually I'm trying to build this for my girlfriend.Can you upload the eagle-file of the circuit?

chr says: Apr 8, 2010. 12:09 PM REPLYNice. Hope your girlfriend likes it! :)I don't think I have the eagle file any more. Sorry.

Please post pictures/video when you have finished your cube! :)

Good luck with the cube building.

-chr

monkey99 says: Aug 15, 2010. 8:14 PM REPLYhy chr ;) it´s a very nice cube i like it !!!!!! i would the cube trying för my daughter but don´t understand the plan not who what where pins to whatcome .Can you help mi by this plan ? i where very very nice hopefull !!!!!!!!!!!!!! ;) sorry but my english is not better ihope do you understand me. Whenyou can and would help me please send a email to me thank you !!!!!!!!!! Ahh i fogot the cube for my doughter must be in a plexiglass ok ................here is my email [email protected]

tjlusco says: Jun 15, 2009. 12:39 AM REPLYFOR ANYONE INTERESTED IN 8X8: Going from 4x4 to 8x8 is a simple expansion of the same basic principle (POV, lighting up each layer at a time). Theonly difference is you will need 64 pins for the anodes, and 8 for the cathodes. To do this you can use daisy chained shift register ics as an output expanderto get the number of pins you need (8pins per chip, so 9 ics, which is what this setup appears to be doing). For information on how to do this, check out thetutorials in the playground section on arduino.cc (in the output and multiplexing sections) Also for working out resistor values, you would use the maximumcurrent ratings of the shift register IC. This will net a max current per led of around 9mA. Something else that also has to be considered is the maximumcurrent going through the cathode transistor (worst case 64 leds x 9 mA is nearly 600mA). It might be worth using mosfets instead of transistors as theygenerally have a higher current rating and are better suited for this purpose.

ybahman says: Jul 7, 2010. 1:36 PM REPLYCouldn't you use some decoders? What I mean is, instead of using the nine daisy chained shift registers, get one 2-to-4 decoder, and four 4-to-16decoders, that way you can reduce the number of IC's by 4? And it'll be really simple. Just a thought, let me know if you think it'd work.

ybahman says: Aug 12, 2010. 9:30 AM REPLYI lied. Although the decoders would work. you'd still be limited to lighting only 8 LEDs per row. It would work, you'd just need to code it differently andprobably use a faster clock to make it look right... now that I think of it. a 40 MHz clock w/ PLL would probably do the trick.

randomness72.5 says: Jul 30, 2010. 6:21 PM REPLYHey what is the wattage rating for the resistors because that is an important part of a resistor when buying, and the same goes with the voltage rating of thecapacitors used. Any information on this topic would be greatly appreciated.

randomness72.5 says: Jul 30, 2010. 4:43 PM REPLYThis may sound stupid but what is the ground connected to?

grampafish says: Jul 25, 2010. 8:12 AM REPLYany way to make work with atmega 328 arduino

junits15 says: Jul 23, 2010. 11:47 AM REPLYI wish I understood how this works, but its still very awesome!

naamhin says: Jul 19, 2010. 11:13 AM REPLYthanks a lot chr. i finally understand multiplexing. couldn't find any other multiplexing description as clear as yours.... thanks again for sharing... : )

miphz says: Jul 19, 2010. 5:17 AM REPLYnice, very cool led art design, i wonder if that could be 1000 led for a kind of interior design ... nice chr ... nice led ... thanks for the instruction :)

robert.allpublic says: Jul 14, 2010. 9:17 PM REPLYhey guys, do you know what is the main purpose of this project. im doing this for final yr project. u guys have any ideas??


Recommended