Half-Inch LED Cube: Arduino Controlled 3x3x3 With SMD LEDs!

29K25517

Intro: Half-Inch LED Cube: Arduino Controlled 3x3x3 With SMD LEDs!

Taking on the task started with me thinking 'Hey, I could make a smaller LED cube using SMD LEDs".   Yes, the idea was to solder the surface mount LEDs in space!    And yes I did it (the "Why" question remains).  Unpolished video:  



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)

* Test.

* Horizontally solder a wire across the anodes of 3 LEDs.  Thats one wire for each layer. Now you have one 3x3 array of LEDs.

* Test.

* Build 2 more of those.

* Test 
-- 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).

* Test.

* 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.

* Test

* Bend and solder the 3 wires to its appropriate layer.

* Test

* 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.

17 Comments

Hi can you please post the code to this thanks

someone should sell these... I'd buy

What size are the LED's. Also I have found that the numbering system for SMD sizes corresponds to 1/4mm sizes. So a 1210 would be 12X1/4 or 3mm and 10X1/4 would be 2.5mm. I have some LED's that are 0402 and are 1 by 1/2 mm.

These are 1206's. which is .12" x .06", equivalent to metric 3216, 3.2mm x 1.6 mm. Wikipedia has a nice chart with both systems:

http://en.wikipedia.org/wiki/File:SMT_sizes,_based_on_original_by_Zureks.svg

Hi, possible to add another array of 3x3 on top of this? what should be adjusted? The resistors, more?

The current design requires 12 I/O ports on the Arduino (or with modification, any capable microcontroller). That is, one for each of the 9 columns and one for each 3 layers. So to add another 3x3 layer/array on this would require one additional I/O port. The current limiting resistors are serially connected to each column (I/O port to resistor to column), with value is selected to protect the LED in the case when all LEDs in a column are lit. The value is also a guess, since you are trying to balance lighting the entire column vs just one LED. To really do it right, your code should accommodate both cases, using software to dim LEDs that are too bright. You want the LEDs to all be the same intensity no matter if all are lit or just one. NOW, as to how I selected 100 ohm for this -- I don't precisely recall! I'll have to dig for my notes. But remember here that the power source is a 3v coin cell and the green led forward voltage is about 2.2v! Its certainly possible not to have resistors IF you carefully program.

Love it. You have my vote. You need to make a kit.
Awesome job.
Awesome soldering skills.
Thanks for the kudos!
WOW!! Were's the video????????
I just uploaded a video to youtube and embedded it within the text. This is same video I uploaded to instructables when I first published this. The video was still in "processing" mode this morning. So I went with the embedded youtube approach.

I also added a photo of the exploded board arrangement.
Gollllllllllly! Tedious!
I pride my self on some tiny work, but
that takes the cake, wow!
I m a through hole dinosaur and
i Hate SMT, but these days
its where its at.
Absolute madness! You sir, are way too talented. OMG SMD LEDs FTW!!!
Instead if using wire you could just solder the legs together by bending a bit
Surface mount LEDs don't have legs.