My first Arduino completed – 4x4x4 LED cube

As I talked about in this post, I ploughed on with making a 64 LED cube controlled by my Arduino Uno.

I was planning on fully documenting the process but I honestly couldn’t make a better guide than the one I followed in making it. Hats off to Matt who made this guide over at ‘Tech Made Easy’…
http://www.techmadeeasy.co.uk/2013/01/21/make-your-own-4x4x4-led-cube-with-an-arduino

It did take me WAY longer than I thought it would. Probably about 30 hours all in but it has totally been worth it. I would recommend this project as a starter for anyone thinking of having a go at hobby electronics. This project is complex enough that it held my interest and wasn’t just a trivial ‘turn this LED on and off’ (aka Hello World) project, but not too complex as to leave me floundering.

My 30 hours has been taken up with:

  • reading various guides and deciding what project to do
  • reading all the 4x4x4 LED guides I could find (about a 1000 of them!) to understand the theory and work out what I needed
  • sourcing the components at a cheap price with quick delivery so that I could work on it over my free weekend. All the components specifically used in the project probably cost about £10 at most although I did have to spend over £30 to get it all but I have lots of left overs for the next project:, LEDs, resistors, stripboard,…
  • learning some electronics theory, most of which was a reminder of GCSE physics (V=IR).
  • Learning how to solder. This is much harder than it looks. I have slightly shaky hands which doesn’t help. All in all I think there were around 300 points which needed soldered.
    There was a noticeable improvement in the quality of the soldering between the start of the project and the end. My first completed row of 16 LEDs was wonky and probably took nearly and hour and a half for 16  joints!
    By using ‘helping hands’ (crocodile clips on stands which hold components) and heating the wire instead of applying solder to the iron the whole process became MUCH neater and quicker. My last joints were clean, quick and solid.
    Remember: Only use the minimum amount of solder you can get away with. A joint with a lot of solder can actually be less electrically conductive and weaker due to the extra flux which gets trapped in there.
  • Installing the Arduino IDE and playing with the Arduino programming language. Loading some basic programs, tweaking the code, and putting together simple circuits to test the Arduino.

Here is a lousy video of my finished product:

Now the fun part happens. I can start playing with the patterns output by the Arduino. The programming of these patterns is done in a REALLY REALLY basic way with a line for each ‘frame’ and each listed per frame with a 0 or 1 indicating on or off. There must be a more refined way of doing this to make the code more concise and to make the patterns easier to code.

For example, can I make a ‘snake’ of lights in the cube and make the lights chase each other? At the moment all I can do it work this out on a frame by frame basis and list each LED’s status. Perhaps I can amend the code to make it work by doing something like this:

  • Frame X – we know which LEDs are on and the location of the ‘head’ of the snake
  • Count number of unlit adjacent LEDs, n
  • Any adjacent LEDs have 1/n chance of being lit in frame X+1
  • Turn off the ‘tail’ LED for frame X+1Anyway, I’m sure there are various options for handling the lighting of the LEDs in a slightly more ‘programatic’ fashion. I’ll give it some thought and see what I can come up with.

Leave a Reply

(email optional)


Warning: Undefined array key "rerror" in /home/public/blog/wp-content/plugins/wp-recaptcha/recaptcha.php on line 291