I had built a "normal" 3x3x3 LED cube some years ago, kinda free-wheeling the manner in which I soldered the LEDs: http://youtu.be/Re5svahvZuo . My goal for my cube code was to get the person looking at it to somewhat ignore the individual LEDs and instead just see a 3x3 array moving around the cube. Its art meeting technology.
The idea for a smaller version came about when I saw the TinyDuino Kickstarter (http://tiny-circuits.com/). So for this build I used the TinyDuino Processor board (it has an Atmega328P processor - same as is used on the Arduino Uno), a "TinyShield" Proto3 prototyping shield and for programming, a TInyShield USB (not shown in most of the photos). A 3v button battery mounted on the back of the TinyDuino board powers the whole thing! After 5 hours or so I can tell the LEDs are starting to dim, but it's still running! [Note to self: See how long a fresh battery will run it 'til it stops].
The overall hardware design is typical for a 3x3x3 LED cube: the anodes for the 9 LEDs in each horizontal layer are tied together. The cathodes for 3 LEDs in each column are tied together. The arduino code can turn on any one LED by knowing which of the 3 layers and which of the 9 columns the LED is on. Setting the corresponding layer HIGH and the column LOW turns on the LED. [unfortunately, compared to my earlier blue LED cube, I had the LEDs arranged in the opposite orientation. So much for a common code base).
The other parts are green LEDs and current-limiting 100 ohm resistors which are SMD 1210 (3225 metric). They are 0.126 × 0.098 in (3.2 × 2.5 mm). I bought them from http://element14.com (http://newark.com). I needed a bit more space and component layout flexibility than the Proto3 TinyShield provided, so I mounted headers on the Proto3 and built the cube on a perfboard.
BTW, I wanted the perfboard to be no larger than the TInyDuino boards, so the layout and build (esp the resistors) was tricky.. With a little trimming the whole thing fits in a standard (US) prescription bottle!
Before I get to the build description, I have few post-build thoughts:
* Having a workbench magnifier was essential to this project!
* I'd reverse the LED polarity to match the blue LED cube
* I'd use slightly thinner wire (I used what I had on hand, since I wanted to use silver-ish wire and not copper)
* I'd use a lower profile header; these are way too tall. Again, its what I had on hand.
* I'd build the cube more precisely. I rushed it a bit so I could meet the deadline for Adafruit's 6 Second Electronics Film Festival. My cube's entry: http://youtu.be/ak4x3ifr6x0 . My hope was to have it complete earlier for RobotFest (http://robotfest.com) but I got too busy helping origanize the event. [[[Shameless promotion: See us 4/12/2014 near Baltimore-Washington AIrport at the National Electronics Museum and at the USA Sciences & Engineering Festival, a HUGE STEM free event 4/26/2014 at the Washington DC Convention Center.]]]
The LED cube build in brief:
* Start by carefully soldering the cathode end of 3 LEDs to a column wire (secured in a vice), spacing them about 3/16" apart.
-- You have to be quick with the iron, since holding it on a wire too long will cause previously soldered LEDs to droop or fall.
-- Lightly dabbing the end of each LED in flux helped a great deal.
* Before proceeding, test to make sure each LED is oriented correctly and works.
-- Use an available external power source with an appropriate current limiting resistor !!
* Build 3 columns (9 total LEDs)
* Horizontally solder a wire across the anodes of 3 LEDs. Thats one wire for each layer. Now you have one 3x3 array of LEDs.
* Build 2 more of those.
-- You REALLY don't want to discover a mistake after the cube is built!!!.
* Using some static-resistant foam to hold all 3 of the 3x3 arrays in position, solder a wire horizontally across the 3 3x3 arrays. Thats one wire for each layer (actually, for stability I used 2 wires on opposite sides of each layer).
* Trim wires from the top and sides of the cube. NOT the bottom!
* Mount female headers on the top side of the Proto3 TinyShield
-- I put headers on all 18 breakout points and 3 power/ground points, though I only need 12 I/Os for the cube
* Cut perfboard to size and add male headers to the underside of the perfboard (the pads are on the top side)
-- I only need 12 I/O for the cube, so I don't mount the unnecessary male headers.
* Mount 3 wires in the appropriate place (which ties them to 3 header pins) on the perfboard.
-- Each of these wires corresponds to a layer
-- Some fancy bending necessary to touch the header pins but nothing else!
* Carefully solder 9 SMD current limiting resistors (one for each column) to the appropriate positions on the perfboard.
-- It was a lot of "fun" figuring out how to arrange these (look closely at the photo and you'll see short jumper wires, diagonally mounted resistors and some that are soldered on top of header pins).
-- Each resistor is positioned so one end will be soldered to a column wire once the cube is mated with the perfboard. That is, only one end of each resistor is soldered at this point, tying it to the appropriate header pin.
* Carefully mate the cube's 9 column wires into the perfboard.
* Solder the column wires to its resistor.
-- Yeah, including the very hard-to-reach center resistor.
* Bend and solder the 3 wires to its appropriate layer.
* Trim the various wires.
* Stack all the boards!
-- The perfboard mounts on the Proto3 TinyShield via the headers
-- Tinyshield mounts on the USB shield (to be removed after programming the arduino)
-- USB shield mounts on the TinyDuino Shield
* Insert the 3v button battery (ok, ok, this can be done after you finish programing it, since it can draw power from the USB's 5v.
* Load/program the arduino via a USB connection to your PC/Mac/Linux machine.
* Run it.
* Be happy.
* Question your sanity.