OctoLED3 Cube: Part 1

Programmable 8 x 8 x 8 Blue LED Cube

Johann Wyss

Issue 35, June 2020

This article includes additional downloadable resources.
Please log in to access.

Log in

Create dazzling lighting effects with this programmable LED cube with 512 blue LEDs. In this issue, we design the LED matrix, and next issue we will complete the electronics.


This is the second of a few LED cube projects we’re developing in conjunction with our friends at Jaycar. As with all DIYODE projects, individual parts are available, however, you should also be able to find kits for this project in Jaycar stores from early July.

In issue 34, we designed and built a 4x4x4 LED cube on a shield that plugged into an Arduino Uno board. In this issue, we’ll start working on an 8x8x8 cube.

Going from a simple 4x4x4 cube with 64 LEDs to this 8x8x8 (i.e. 512 LEDs) is quite a step up in soldering, and also how we control them. Yes, that’s 1024 LED legs to solder. For this reason, we have split this build across two issues. In this issue, we may describe how to build the LED cage with techniques to keep the LEDs straight for a fantastic looking appearance.


Following on from last issue’s 4x4x4 LED cube, this issue we are going to start constructing an 8x8x8 cube. This is a bit of a momentous task as each and every layer will have as many LEDs as the entire 4x4x4 cube.

This project requires us to control a total of 512 LEDs simultaneously. Naturally, this will require much more circuitry than the barebones 4x4x4 cube, which we were able to control with as little as an Arduino Uno microcontroller and four resistors.

Whilst we have not fully settled on an electronics configuration, we are leaning toward using the ATmega328P microcontroller in conjunction with a shift register and flip flops as the control circuit.

Unlike the 4x4x4 cube, we are going to make this cube a common cathode variety where each of the LEDs in a layer have their cathode connected. We will use an NPN transistor connected to each of these layers which will allow us to power them at their full brightness / forward current. This will ensure that the LEDs will have a much more consistent apparent brightness.


Before you rush off and heat up the soldering iron, we’ll discuss how you’ll first need to prepare and test the LEDs and what you will need to help ensure the LEDs solder together perfectly. There could be a few days work in this, so take your time.

To ensure that your LED cube appears square and appealing, we’ll discuss various jigs you can use to ensure that each and every layer is as consistently spaced as practical. If you have a 3D printer we’ll go into how we designed an LED jig and provide you with the necessary files to print one for yourself. If you are handy with woodworking and have the tools, we’ll also show you how to make an LED jig using a piece of timber (we recommend 6mm MDF).

The following jigs are designed based upon the 5mm blue LED available from Jaycar, which have a cathode lead length of 26mm and an anode lead length of 27.5mm.


Instead of just providing you with a 3D print file to download from our website, we’ll describe how we designed it. This will give you an idea how the jig works, and how you can modify it to suit your needs if you need to.

We need to create a grid of 64 LEDs in an 8x8 arrangement with each sharing a common cathode connection. The easiest way to do this is to have the anode lead vertical and the cathode horizontal. This way, the cathodes can all connect together, and the anode can be used to connect to the layer below. Therefore, to figure out the maximum spacing, we need to bend the leads of an LED in a similar fashion. This will show us the lead lengths available when soldering in place.

With each of the LED leads bent to their respective positions the lead length drops to about 22mm. This means we have a maximum lead spacing of about 20mm, which will leave 2mm for soldering.

To create the template, we used Fusion 360. We simply created a 150mm x 150mm box and added a 5.25mm diameter circle which we replicated using the pattern tool to create the 8x8 grid of 5.25mm diameter circles.

Note: The LEDs have a diameter of 5mm ± 0.05mm. We have made the template diameter 5.25mm to adjust for the tolerances of your 3D printer. We will include an .stl for the following hole diameters 5mm, 5.15mm, 5.25mm and 5.5mm. We recommend you print the file that best suits your printer’s abilities.

If you’re not quite sure how accurate your printer is, we have included a .stl called Test Print. This very basic print will have each of the aforementioned hole diameters. Simply print it out and test fit your LED into the test jig. You need to pick the best size to print. You want it to hold the LED tight enough to solder but it needs to be loose enough to easily remove. If you pick a hole too small, you may damage the layer when trying to remove it from the jig.

1 = 5.00mm

2 = 5.15mm

3 = 5.25mm

4 = 5.50mm

Note: We will include the Fusion 360 working files for the project which will allow you to modify the design to suit your specific needs if desired.

Once you are confident which size your printer can comfortably print, you can print out the template matching that size.

Note: you must print the test print at the exact same quality setting that you intend to print the template at. In our case, we printed both at 200-micron layer height on our Flashforge Creator Pro.

This test print should help reduce wasted filament if you’re printer isn’t able to print a specific tolerance. Failing that, you can always drill out the template with a 5.5mm drill bit but the LEDs may be very loose. It may be a challenge to bend the leads in place and hold them in position for soldering.

At 200 microns on our Cocoon Create / Wanhao Duplicator i3. the template took around 6.5 hours to print. It should be printed face down on the bed, and the bed being level is of utmost importance. The bed should be as flat and level as possible for best results. An uneven bed will likely mean some key details are not printed clearly as there is quite as significant number of fine details.

Note: As you can see here, we switched between black and white filaments to make the arrows and lines stand out. However, if you don't have a dual filament printer or the knowledge to change filament mid-print, the grid can be painted white or yellow, for example, and then the excess wiped off before drying, or sanded off when dry.

1:1 scale template if you plan to make the wooden jig can be downloaded from our resources file.


Of course, if you don’t have access to a 3D printer, we have designed the jig to fit in the pages of the magazine. You can simply photocopy this template and use it to mark out and drill a piece of timber (eg. 6mm MDF) that you can use as the template.

For best results we suggest you first measure the photocopy dimensions to ensure that it is 100% correct. This will help to ensure that the cube perfectly matches the PCB later.

You can then use a glue stick or similar to physically glue the printed template to the timber you’re using for the jig. This will ensure that the template does not move during the drilling and assembly phase. You will need to use a fair bit of glue and let it dry for a few hours or overnight.

Once the template is dry, you can use a centre punch to create a divot in the centre of each of the marked holes. This will help to ensure that the drill does not wander off course when drilling. If you have access to a drill press, we strongly encourage you use it for the drilling process. If you are drilling with a hand drill, care should be taken to keep the drill as perpendicular to the workpiece as possible. Failure to do this can result in the drill wandering, which may result in the LED being soldered in at a potentially unattractive angle.

Ideally, you should drill pilot holes using a small drill bit around 1.5mm or so. This will help reduce the stress on the final larger drill bit and reduce the chances of the surface of the timber splitting etc. Once you have drilled the pilot holes, you can then drill out each of the holes one more time using a 5 - 5.5mm drill bit.

Building The Array:

Parts Required:JaycarAltronicsCore Electronics
512 x 5mm Blue LEDs*ZD0185-COM-11372
1m x 1.2mm Wire (or similar solid core wire)WB1565--

Parts Required:

OptionalJaycarAltronicsCore Electronics
1 x LED TesterAA274Q2010-


* 512 LEDs are required, however, we recommend you purchase an additional 20 or so incase any LEDs fail or become damaged in the assembly process.

Now that you have a 3D printed or wooden jig ready we can start preparing the LEDs then assemble into the cube.


Along with 512 LEDs (and some spares) and your LED jig, you will need all the usual Maker essentials, including a soldering iron, solder, side cutters, long nose pliers, large tweezers, and a lot of patience. An LED tester will also come in handy to test the LEDs before you solder them into the matrix.

Make sure you have a clean work area with plenty of room. The kitchen table may not be the best place because this build may take a few days or weekends to put together. Building the array is actually quite simple, however, it is a very time-consuming process. On average, each layer took us about 3 hours to build.


Testing every LED before you solder them in is very important. Identifying any LEDs that are faulty at the start will save you the time it takes to remove it from the layer later.

Note: You will need to test the LEDs again after they are soldered in place because they could become damaged either when you bend the LEDs leads or when you solder them into the matrix.


To test each LED we used an LED tester. You simply insert the leads of the LED into the corresponding socket on the LED tester. i.e. Anode to A and cathode to K.

We were using the 10mA output as this is the amount of current we are expecting to use on the final project.


If you don’t have an LED tester you can use a coin cell lithium battery such as a CR2032 to test each LED, however, to avoid exceeding the forward current of the LED and reducing its lifespan (or burning it out), you must put a resistor in series with it. To calculate the resistor value, use the following formula and round it up to the nearest E12 resistor value:

R = (Vbatt - Vf) / If

Vbatt is the nominal battery voltage (eg 3V).

Vf is the measured forward voltage of the LED used.

If is the forward current of the LED used.

Note: You could use these coin cells without a current limiting resistor however, the current is limited by the internal resistance of the battery and can exceed the forward current of the LED by a significant amount thus this is not an ideal practice. Worse still this could weaken the LED causing it to fail prematurely, after you fully assemble the cube. With an LED cube this size we simply can’t suggest you do this as replacing a faulty LED in the centre of an assembled cube would be a horrendously arduous task.


After each LED was tested, we then bent the Anode legs on the layer’s 64 LEDs.

To do this, we used a pair of precision long nose pliers. We used the pliers to hold the anode lead of the LED with the pliers flush against the body of the LED. Holding the lead tight, we simply bent the lead 90°, perpendicular to the cathode lead, then we moved the pliers so they were holding the anode lead on the other side of this bend and created another 90° bend so that the anode lead, once again, ran parallel to the cathode lead.

The Jaycar pliers (TH1887) that we used produced an equal and consistent distance of about 3mm for each bend. Once all 64 LEDs are bent in this orientation you can start to assemble the layer in the jig.


Using the template as a guide, insert an LED into the template’s LED locating hole so that the anode lead you just bent lines up with the dot on the template’s surface. You then need to bend the cathode of the LED so that it matches the arrow on the template surface, as shown in this render.

From this point, it is simply a process of repeating this step and soldering the LED cathodes together until the layer is fully assembled.

Note: We can not stress how important it is that you solder EVERY joint in its resting state. Only solder a connection if it is sitting comfortably in that position without needing to be held or inadvertently being held by stored tension. Do not make ANY solder joints by forcing the components to be soldered together and then soldering. Doing this may cause the cube to bend out of shape upon removing it from the template. If you are unsure, you can reflow every solder joint briefly to ensure that no leads and solder joints have any stored potential energy before removing it from the jig.


Once the layer is complete, add the two layer supporting busses that will give the layer structural rigidity. These busses will be used to sink the current from the entire layer to the PCB and to support the layer’s structure, so it is important to use a thicker copper wire that has been straightened.

Ideally, a 1mm to 1.2mm diameter solid wire should be used as it can comfortably handle the maximum possible current, which could be as high as 1.3A if every LED on a layer is illuminated at their forward current of 20mA, and it will provide the cube with sufficient rigidity.

We originally intended to use a roll of 1.25mm enamelled copper wire. Whilst we originally figured this would be ideal, removing the enamel insulation for just one piece took about 15 minutes of sanding with sandpaper to remove sufficient enamel to allow for soldering. You can use any wire you like but you need to use a single solid core (non stranded) wire with a diameter of about 1mm. Tinned copper would be ideal as the wire will not oxidise / tarnish over time like exposed copper will.

For our cube, we used 2 metres of solid core wire used in household electrical wiring commonly used for lighting. This wire consists of two insulated solid core conductors (used for the live and neutral wires) and a third multistrand insulated conductor used for the ground connection. We simply stripped the insulation back on the two solid core conductors (red and black wires) which provided a total of 4 metres of a solid copper wire with a diameter of 1.2mm.

Whichever wire you use, you need to make it as straight as possible. We achieved this by cutting the wire into sixteen lengths, each about 180mm long.

Once we completed a layer, we stripped the insulation off two 180mm lengths, then straighten them by pulling the wire as tight as possible while holding each end with a pair of pliers. This action will stretch the copper wire slightly and work harden / stress harden it in the process.

Note: Don’t strip the insulation off in advance because the copper will rapidly oxidise without the insulation. This could make it difficult to solder.

Once the wire is straight, you can use the two lines on the template to align the wire on top of the LED array layer.

You can then solder these copper wires to each of the intersection points and cut the ends flush with the edge of the LED array.

Note: Just like the LEDs, it is important that the busbar is soldered into place without any tension on them. If you need to hold wires in place while soldering, then your cube will likely bend itself out of shape when removing the layer from the template. Think of it as stored elastic potential energy that will provide a constant force, even with these busbars in place. Reflow the busbar joints if necessary before removing from the jig.


The final step for the layer is to verify that each LED in the layer is still functioning. Bending the leads and improper soldering could result in the LEDs becoming damaged. In our build, we had eight LEDs stop working after soldering them into the layer.


Note the ball of solder on the end of each of the anode leads.


This is the partially constructed LED array.

This is the partially constructed LED array.

If you have a laboratory power supply with current limiting, attach the negative of the power supply to the common cathode bus of the layer. Attach another wire to the positive of the power supply (we used a length of copper wire). Set the power supply’s voltage to 3V and the current to 0.10mA to limit the output current to just 10mA to avoid damage to the LEDs. Next, touch the end of the wire from the positive of your power supply to each of the LED anodes, one at a time. Each LED should illuminate as you go.

If your power supply does not have a current limiting ability you will need to attach a current limiting resistor to either the positive or negative wire to protect your LEDs.

If any LEDs don’t illuminate it’s much easier to remove them now than waiting until after the entire LED cube is constructed. Once you have replaced the LED, repeat the testing procedure to ensure that no subsequent LEDs were damaged in the replacement process.

Congratulations, you have now completed a layer of your LED cube. You only have to repeat this exact process another seven times(!) before your 8x8x8 cube is complete.


To connect each layer, we added a small ball of solder to the end of each of the LEDs anode leads. This tins the lead and provides extra solder to the lead. This is recommended as we need one hand to hold the iron and the other to hold the array layer. Naturally, we are missing a free hand to add solder with.

We also tin the 90° bend point of the anode leads where the leads join. This way, all we need to do is touch the hot soldering iron to the joint, which will cause the blob of solder to flow from the end of one lead onto the tined 90° lead of the next.

You should start by first soldering the LEDs in all four corners, making sure that the layer is even and parallel to the layer beneath it.

Note: Taking your time here will produce a much nicer result. Like previous solder joints, these joints must be made in their resting state. Most of the leads will not automatically align with the point they need to join too and thus it requires quite a lot of patience to bend each lead until it rests in its desired position. We recommend that you use long nose precision pliers for this task and be slow, methodical and precise.

Bend the wire to its required position, making sure it holds in place without the need for any force. Solder that joint and repeat with the next LED.

This is by far the most time-consuming part of the construction process, largely due to the limited room and difficulty in positioning the leads to sit correctly in a resting state. However, with patience you will get all 64 joints soldered connecting two layers.

Once the layers are connected you should test every LED in the tower once again. We did this by again attaching the negative of our lab power supply to the cathode bus of an individual layer (starting from the bottom layer) and touching the anode to the topmost anode lead of each of the LEDs. If the bottom LED illuminates you know that the anode solder joint is making good electrical connection.Repeat this process for every LED. After which, move the negative wire to the next layer up and repeat the process. This will verify that no LEDs were damaged in the anode soldering process.

Note: Again, we need to stress that this LED testing is important. Failing to do this could mean you have a faulty LED in the centre of your LED cube, which can only be fixed by tearing it down to rectify. A little patience here could save you a world of suffering later.

Once all eight layers are soldered together you have finished assembling the LED array that will form your 8x8x8 LED cube! Well done for achieving soldering greatness!


Next month, we will describe the PCB and the electronics required to operate the cube. This will include the code, and how you can program your own animations.

Part 2

Part 3

Johann Wyss

Johann Wyss

Staff Technical Writer