My Arduino Uno LED Cube

Snazzy light show, but bye bye fingerprints!

I was so enthralled in my recent review of the Arduino Uno starter kit from RS Components that I started scouring the net for other interesting projects that I could try.

That’s when I stumbled across this post by James Bruce which gave a fantastic step by step guide on how to make an LED cube.

Not only does James show you exactly what you need to do, but he also takes time to demonstrate the electronic principals behind it in some depth.

I found it a great read, so decided to have a crack at it myself, going one step further and fabricating it into a nice case so that it can be used as a display piece.

The LED Cube

It would be pointless repeating everything that James wrote in his original walkthrough, so for a step by step guide I’d encourage you to check out his original post on the link above.

What I’ll show you here is how I took his design on a step into a complete unit.

Lets start with a straight shot of the cube.

As you can see, I’ve opted to enclose the Arduino board and the main circuit board inside a black plastic case.

The original plan was to make a black acrylic container for the cube from sheet acrylic.  However, I was dubious of my own abilities when it came to cutting the acrylic sheet neatly by hand, so in the end I opted for a pre-formed plastic case that I picked up in a local electronic store.

The cord that you see protruding from the back of the case is the USB cable that’s used to program and power the Arduino board.  I managed to cute a reasonable size hole in the back of the case for the USB connector to poke through.

If I were to make another of these (and believe me, people have asked) then I would also cut a hole for the circular power jack to poke through.  That way people have the option of using a USB power supply or a 9-12v power supply.  It’d also be possible to mount a 9V battery inside the case and power directly off that, but I digress.

Inside the case you’ll find the Arduino Uno board, stuck to the bottom of the case using silicone adhesive.  The jumper leads are then soldered onto machine wire, which is then soldered onto the prototyping board which makes up the rest of the circuit.

There was really no reason for doing this other than I didn’t have long enough jumper leads to hand.  I wanted to make sure that I left myself enough room to be able to connect everything up without the short leads causing the lid to be an obstruction.

In truth, having longer leads would have been a real help when it came to connecting the different columns to the Arduino inputs, as it stands I had to chase each wire as I didn’t have any sort of colour code for the PCB.

I could have also used a ribbon cable which would have been a lot neater, but a little trickier to solder onto the prototyping board.

The initial plan was to solder the connecting wires to the top of the board, as you’re supposed to.

The problem is, when I did that, I couldn’t then see well enough to push the LED legs through the top of the plastic casing and then through the specific holes on the circuit board.  That was, by a long way, the most difficult part of the build.

In the end, I had to resort to connecting the wires to the underside of the board.  In this case, it was a must, but generally it’s a bad idea.

Once all the wires were soldered on and connected to jumper cables, it was just a case of connecting them to the Arduino board and using more silicone adhesive to hold them in place.

This type of adhesive is great because it’s completely inert.  It won’t affect any components on the Arduino board, nor will it interfere with the circuitry in any way.  Also, although it does a fantastic job of holding things in place, it can be peeled off really easily if you ever need to change anything.

In this project it was the ideal solution to keep the Arduino board in place inside the case, and to keep the jumper cables securely connected to the Arduino.

The prototyping board, on the other hand, is held in place by the solder joints of the LED legs.  Trust me, it’s not going anywhere.

It Lives!

Once I’d gotten everything connected and the lid on, it was time to fire it up and take a look using the basic program that James showed on his walkthrough.  The program isn’t very long but it did give me an opportunity to make sure that everything was working properly.

As it turned out I had four LED’s that weren’t working.  Three of them turned out to be bad solder joints, but the fourth was an actual duff LED, so it needed to be swapped out.

As a side note; it’s important to check that your LED’s are working as you construct your cube.  You can do this using the basic “Blinking LED” program on the Arduino board, use pin 13 as this has a built in resistor.

Luckily, the duff LED was on the outer layer of the cube, but it could have been a much bigger problem had it been in the middle.

In daylight the cube doesn’t look that impressive, but in darker environments it becomes much more impressive as the LED pins are less visible.

I was really happy with the look of the cube, though the short program led me to look into how the thing works.

Programming

If you load the code that’s been provided into the Arduino environment then you end up with something that looks like this.

In this block of code, each of the lines is an individual frame in the cubes animation.  Each block of “Bxxxx” refers to a strip of LEDs, with the numbers 0,1 indicating whether individual LEDs on that strip are lit

So, if the line starts with “B0001″ then in that frame the fourth LED in the first strip is lit.  The state of the other 15 strips is then declared using the other 15 sets of information on the line (in order).

Using this principal you can gradually build up your own designs, though it does take some serious thinking to get your head around what it is you’re trying to show.

Each frame will display for one second by default, but you can adjust this by changing the multiplier at the end of each line from “10″ (10x100ms) to whatever you like.

Next Time

As much as I loved making this project, there are several things I’d change if I were doing it again.

To start with, I’d make some sort of jig for putting together the LED cube itself.

In this version I assembled each line by hand, and then connected the lines together into layers, and then the layers into the cube.

Unfortunately, it becomes painfully obvious that I’d done the whole thing by hand when you look at the cube from certain angles:

I really should have created a former from some scrap acrylic or wood so that I could get each LED into position before soldering them together.

Not only that, but I’d handle the whole thing with a bit more care, it’s very easy to turn your cube into a misshapen mess by being too rough with it.

I’d also give a bit more thought into the four connecting wires for the different layers.  You can see them stuck out to the right hand side in the photo above, and on the left in the photo below.

I’ve no idea why I felt the need to space them so far away from the cube itself.  In reality, as long as they don’t touch the frame they can be as close as you’d like.

As they stand, they do make the whole thing seem a little lop-sided and untidy.

Conclusions

I had an absolute ball putting together this project.  Major thanks need to go to James Bruce for the original post.

Yeah, it’s not the prettiest cube that’s ever been made, but it’s a good prototype from which to learn from and make bigger and better versions.

Am I happy with the end result?  Generally yes.  It could be a lot neater, but this is the first serious soldering work that I’ve had to do in about five years so it’s been a bit of a learning curve.

At the end of it, I’m left with a product that I can continue to work on in terms of new software.  The challenge now is to come up with new ideas for display animations and then transposing those into code that will make the ideas a reality.

I’ve definitely caught the LED cube bug, I’m now off to source parts for an 8 x 8 x 8 version, that’s 512 LEDs to solder together.

Leave a Reply