4x4x4 RGB LED Cube using Arduino

Arduino RGB LED Cube

A while ago, when I first started using Arduino, my first project was a 4x4x4 LED cube, I built it from a Guide I found here in Instructables, I didn’t know anything about programming, and little about electronics, yet I was able to build it and make it work, I didn’t know how it worked but it did!
That success made me like this page a lot and also made me want to make guides like that one, well documented and properly explained, enabling people to make cool things, at first without them knowing how they work, and from there, from a working piece, start learning and understanding how it works.

Arduino RGB LED Cube

Step 1: Materials

For the most basic cube you will need;

  • 1x Atmega328 (With arduino Optiboot bootloader)
  • 3x TLC5940
  • 4x P-Channel MOSFETs
  • 3x 4K7 Resistors
  • 3x 16 pin Male and Female headers
  • 1x 4 pin Male and female header
  • 1x 28pin IC socket
  • 1x 1000uf 10v capacitor
  • 1x 0.1 uf ceramic capacitor
  • 2x 22pf capacitors
  • 1x 16Mhz crystal oscillator
  • 64x RGB common ANODE LEDs (it is very important that you check your LEDs are common ANODE, or else, the cube won’t work!!)
  • a LOT of Solder!

for more advanced functions;

  • 3x 8k2 resistors for optional, low power mode.
  • 3x 3pin male headers for jumper selection of the power mode
  • 3x jumpers for selecting the power usage/brightness setting
  • 2+x 64KB EEPROMs for storing custom animations
  • 1x DIP switch for selecting different modes (random, serial, music responsive, random2, custom animations, etc.)
  • 2x MSGEQ7 chips for audio analyzing and music response.
  • Black paint

Tools;

  • An Arduino to use as a USB to Serial converter for programming
  • An USBTinyISP if your Atmega chip is not pre-Bootloaded
  • A Multimeter for troubleshooting and checking connections
  • Some way of cutting PCBs, I used a Circular Saw, but you can use whatever you have in hand.
  • Diagonal cutters
  • A Sharpie or any kind of marker
  • A Drill/Drillpress
  • A Cutter or Xacto knife

Step 2: Planning

First you’ll need to decide the size of your cube, it can be any size you want to, but nothing bigger than what the leads on the LEDs allow, my LEDs had 28mm leads, so I decided my spacing was going to be 25mm between LEDs. THis is usually a good size.

Step 3: Make a grid

To be able to make all the layers with the same spacing and keed all the LEDs “Snapped to Grid” we need to actually make a grid, for this we will need;

a piece of scrap wood bigger than the size of your cube
a Bit of the right size for your LEDs, its better to measure it with a caliper, but if you don’t have one, just trust your maths and the LED Manufacturer’s specifications.

F9FZ7BXH0P1KOW6

 

my drill press has a table with 2 axis control, it has handles and moves 1mm per revolution, so I just counted 10 turns between each hole, make sure to make your holes at 0 on both Axis (x and Y). Also make sure to set the stopper for the Z axis or you will drill all the way thru your drill press.

I made my grid bigger, 5×5 in case I, in the future want to build another bigger (or smaller) LED cube.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]

  • 1x Atmega328 (With arduino Optiboot bootloader)
  • 3x TLC5940
  • 4x P-Channel MOSFETs
  • 3x 4K7 Resistors
  • 3x 16 pin Male and Female headers
  • 1x 4 pin Male and female header
  • 1x 28pin IC socket
  • 1x 1000uf 10v capacitor
  • 1x 0.1 uf ceramic capacitor
  • 2x 22pf capacitors
  • 1x 16Mhz crystal oscillator
  • 64x RGB common ANODE LEDs (it is very important that you check your LEDs are common ANODE, or else, the cube won’t work!!)
  • a LOT of Solder!

[/box]

Step 4: Layer by Layer

Once you have your grid ready, you can start making the layer, one by one and testing them as you go, to be able to repair them in case of a faulty LED or solder joint, it’s better to take a few extra seconds on each layer than to risk destroying your complete cube trying to replace a faulty LED in the middle.

I figured out an easy process to build the layers quickly and all the same, just follow my steps;

  1.  First off, mark your grid as mine (see pic 1) so you don’t get confused about the orientation of the LEDs and as to which pin goes where.
  2.  Now place your 16 LEDs (See pic 2), make sure they are in the correct orientation (flat part to the left).
  3.  Start bending the leads (the Rightmost lead goes to the bottom left at about 45 degrees) (pic 3).
  4.  Keep on with the bending, the 2nd lead from right to left goes to the top right corner at about 45 degrees aswell (pic 4).
  5.  Now bend all the longer leads straight to the top, ONLY for the top row (You’ll see why) (pic 5).
  6.  Proceed to trimming all the remaining standing leads from the TOP ROW ONLY! (pic 7).
  7.  Now bend them all to the left (pic 8) they should not touch the neighbor LEDs.
  8.  Repeat steps 5 to 7 for the NEXT ROW, soldering each of the leads that reach the top LED’s to the leads of those LEDs that go to the top as you go (pics 9 & 10).
  9.  Repeat step 8 for the rest of the rows (pic 11).
  10.  Trim down all the excess leads (pic 12).
  11.  Now proceed to joining the columns, for this, grab a 10 cm long wire and make a small half-loop at the end (pic 13).
  12.  pull it so the lead of the LED from the FIRST column id inside the half-loop and solder it down, use a gentle amount of solder (pic 14).
  13.  solder the remaining columns to the wire and trim the excess off (pic 15).
  14.  add another 3 wires in the same way (pic 16).

Now repeat all steps 3 more times to get all the layers, this might seem a bit tedious, but with some good music, it goes real quick!

Make sure to test your layers as you go.

Read more: 4x4x4 RGB LED Cube using Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *