Build your own 4x4x4 LED Cube

LED light cubes are a hugely popular and fun project and with the help of the Hobby Components kit you will have all the parts to build your very own. Building on the popular 8x8x8 cube kit (HCKITS0022), we decided to create a through-hole version for those of you who are better suited to this kind of soldering. The kits we sell include all the necessary components to build the driver base board and 64 3mm LEDs to build the 4 x 4 x 4 cube. The kit is offered in several colours.

Demonstration Video

Some familiarity with soldering is required to construct the kit.

So, let’s get started! The guide is split into two parts, the first covers creation of the base board, and the second covers the LED cube creation.

The first thing you need to do is check that all the components are enclosed in your kit. If you’ve purchased components elsewhere, be sure to check you’ve ordered the correct values for each component.

Contents

4 x 4 x 4 Cube Kit PCB

3 x 100nF Ceramic Capacitors

2 x 20pF Ceramic Capacitors

1 x 5 Pin Connector

4 x 5mm White LEDs

1 x Pin Header Strip

1 x 10K Resistor

16 x 100R Resistors

4 x 220 ohm Resistors

1 x Tact Switch

1 x ULN2803 8-Channel Darlington Driver

1 x ATMega328-PU

1 x 16MHz Crystal

64 x 3mm LEDs (Available in Blue, Green, Red and White)

Plus: A USB to serial interface cable that can be used to power and reprogram the completed cube*.

*Please see the diagram at the bottom of this guide for how to connect the cable to your cube.

Required Tools

In order to built the cube, you will need a few tools:

Soldering Iron (Ideally with a fine tip)

Solder

Recommended Tools

A piece of perspex or plywood which will be used as a jig for soldering the LEDs that make up the cube

3mm drill bit and drill

A pair of small long nose pliers

Part One – Building your LED Cube: PCB

Soldering tip: When soldering components to a circuit board it is always best to start with the smallest components first. This helps keep the board flat and stops access to pads from being restricted by larger components. The first step is to start by soldering the resistors and capacitors. In your kit these will be marked appropriately. The orientation of most of the components doesn’t matter. We will point out any components where the orientation does matter. In these cases it is important to make sure you have them inserted correctly.

Components

Edit 10/04/17: Please note that the latest PCBs shipped within our kits have a reversed silk screen print. Therefore the component side will have white text on a black PCB as opposed to the black text on a white PCB as shown in the build guide images below.

Resistors

Locate the following pads on the PCB and solder the appropriate resistors in place.

Locate the following pads on the PCB and solder the appropriate capacitors in place.

Pads C4 and C5 – Capacitor Value: 20pF

Pads C1, C2 and C3 – Capacitor Value: 100nF

Tact Switch

Locate the following pads on the PCB and solder the switch in place. Note that the switch is a tight fit, but it does push through and sit correctly on the PCB. Note that the orientation of the switch is important – the legs of the switch should be on the left and right hand sides of the components as in the picture below.

Pad SW1 – 4 pin Tact Switch

ICs

Locate the following pads on the PCB and solder the appropriate IC in place. Note that the orientation of the IC’s is important – at one end of each IC you will notice a semi circle cut into the case. When the IC’s are inserted into the board these should be on the left as in the picture below.

Pad U1 – ATMega328-P IC

Pad U2 – ULN IC

Edit: If you have a version V1.1 PCB (marked V1.1 in low right hand corner) you can skip this next step and move on to the connector…

On the opposite side of the board (black side) use some solder to bridge pins 8 and 9 of IC U2. Reference the image below for the correct pins.

Connector

Locate the five holes shown in the image below on the lower edge of the PCB and solder the right-angled header pins in place. You can solder the connector on the top or bottom side of the board. It’s up to you!

5mm LEDs (Feet)

Locate the relevant pads and solder each of the four 5mm LEDs in place. Note that the orientation of the LED’s is important – the short leg of the LED (called the cathode) should be oriented to the outside of the PCB.

Pads D1, D2, D3 and D4 – 5mm LEDs

LED Sockets

The LED connectors are each stripped from the enclosed male to female header strip. Carefully snap off each pin and solder to the black side of the PCB as shown below. There are a total of 20. Note that whilst creating our demonstration cube, we stripped off the black plastic from all headers (by lightly squeezing pliers around the plastic until it came away), this isn’t a requirement, it just gives a slightly better look to the finished PCB.

So, you’ve managed to complete all the electronics – Now time to move on to the cube part of the guide.

Part Two – Building your LED Cube: the Cube

After soldering LEDs for the 4x4x4 LED (all 64 of them!), this one was a doddle! 🙂

To build your LED cube you will need to solder the 64 LEDs supplied in your kit in to four sets of 4 x 4 grids. This will take a little time and so it is important that you understand how to construct these grids before starting.

Whilst with a little care you can construct the grids by hand, it is recommend that you first construct yourself a jig/template as this will allow you to construct the grids quicker and with more accuracy. To do this you will need a piece of perspex, plywood, or any stiff material you can drill holes into measuring at least 5cm x 5cm (in this example we just used a piece of thick cardboard). You will need to drill a set of 3mm holes arranged in a 4×4 grid. The centre of each hole can be marked easily by placing the PCB on top of your jig material and using a fine pen/pencil, or if using cardboard, pushing a pin through. The holes will then all be exactly where needed to create the jig.

Before you start…

Tip 1: Before you start soldering your LEDs together we strongly recommend testing each LED first. You can do this by using your newly built PCB as an LED tester! Simply power the PCB up by connecting the supplied USB cable. Connect the RED cable to the pin marked 5V on the PCB, and the black cable to the pin marked GND. No need to connect the green and white cables, they are just for if you want to reprogram your cube. Next check each LED by inserting it into the two sockets shown in the image below.

Testing the LEDs

Make sure to connect the LED to the two sockets shown in the image and with the shorter leg of the LED inserted into the outer socket. With the PCB powered the LED should randomly turn on and off as the cube runs through its demo.

Tip 2: When bending the legs of the LEDs we recommend using a pair of long nose pliers. This will help to avoid applying mechanical stress to the base of the LEDs when bending their legs.

Don’t worry if any of your LEDs don’t work or you make a mistake – we provide extra LEDs in the kit to help cover for any problems.

Step One:

Insert one row of 4 LEDs into your template as shown in the image. Note the orientation of the LED legs with the short legs at the top and the long legs at the bottom. Carefully bend each long leg at a 90 degree angle at the base of the LED so that it points down.

Then carefully bend the short legs by 90 degrees near the base of the LED so that each short leg is touching the short leg of the LED to its left. Note that when bending the short leg, bend it a couple of millimetres higher than the long leg so that it can pass over the long leg of the LED to the left without touching it (see above left diagram).

Make sure these legs to not touch the longer legs of each LED and then apply a small amount of solder to hold them in place.

Step Two:

Repeat step 1 for the other 3 rows. The result should look like the image above with each short leg soldered to the short leg of the LED directly to its left and no short legs should touch a long leg.

Step Three:

You have now completed one 4 x 4 grid of LED’s. Carefully remove this grid from your template and set it aside. Now repeat steps 1 to 3 to create 3 more identical grids.

Step Four:

Your cube grids are now constructed. All the LEDs of each grid should be pointing in the same direction. Now insert each grid into the controller board. Please make sure you disconnect the controller board from your computer before proceeding. Be careful when inserting the legs of the LED’s into the sockets. They are a snug fit but don’t apply too much force otherwise you may bend the leg or break the socket. You will find it easier to insert the legs using a pair of long nose pliers.

Step Five:

Solder the remaining unconnected short legs of each of your 4×4 grids to the short legs of the grid directly to the right. Start with the top row of legs and work your way down. Before soldering make sure each 4×4 grid is evenly spaced so that the entire cube is square.

Repeat for each layer.

Step Six:

The final step is to connect the short legs of each horizontal 4×4 grid to the 4 additional row driver pins on the edge of the controller board. Reference the red lines in the above image for the order. Each of the 4 controller pins should be connected to one of the horizontal rows with a piece of wire. If the wire you are using isn’t insulated then you will need to make sure that it is slightly bowed out so that it doesn’t touch any of the LEDs it runs past.

At this stage the cube is complete! If you built one, well done! If you are thinking about building one, you now know how easy it is. Pop on over to Hobby Components and order your kit to get started. The order codes are HCKITS0041, HCKITS0042, HCKITS0043 and HCKITS0044.

Powering your cube with the supplied serial USB cable:

Supplied with the kit is a serial USB cable. To apply power to your cube connect the cable as shown in the above diagram.

The contents of this guide are copyright Hobby Components Ltd and may not be copied, reproduced, or reused elsewhere without permission.

About The Author

Anita

In the 4x4x4 cube when I solder the capacitors, I found an error between the position C1 e C2 20 pfarad capacitors and the immage where the position is C5 and C6 . I am waiting for your answer in my email address. Thank you very much.

Just finished this over a weekend, The pins were little tricky to solder around the large LEDs, might be easier to do those afterwards. I used a cardboard jig which started to wear out after the third grid, but it did work. I’m really pleased with the end result, the kit is a bit of a bargain.

Im on my second one and like you i agree, put the feet led in last. Dont try push them in so they are flat, have them leaning at an angle outward. This spreads the light better. I did not get edge power connector in this kit but i just soldered wires direct to board. I added a longer wire too so i can have it on display on the shelf. The supplied lead is a bit short and too heavy for the kit. Second time round the build is going well. Another note in this kit i have had no LED failiures but on red on had 6 dead led. Maybe blues are tested better before dis[patch to supplier.
Before you solder anything grab a sewing needle and mark out the led jig by pushing a thin needle through circuit board and marking the cardboard. I use the box supplied with kit. After that gently poke a small hole with a sharpened pencil into the pin holes you have in the box.

I’ve finished mine but only the 4 “feet” LEDs light up. Due to my own ideocy I think I ruined the holes and stripped the pads for R1 (don’t ask!) so I “think” this might be the reason. I figured I might be able to manually wire up the resistor legs to the next components but I don’t know what it should be connected to! Is there a diagram somewhere of what components are connected to what to help me trace the issue? Also, should the cube just light up immediately when plugged in? What is the function of the switch?

As you might have guessed I’m new to electronics and soldering so please go easy!! Thanks in advance.

You can indeed reprogram it. The kit comes with the Arduino Nano bootloader already flashed into it so it will work fine with the Arduino IDE. Just download the IDE from here: https://www.arduino.cc/en/Main/Software
For the board type (Tools->Board) select ‘Arduino Nano’, for the processor type (Tools->Processor) select ATMega328, and for the COM port (Tools->Port) select the appropriate COM port for the serial cable supplied with the kit. You can then upload sketches as you would with any other Arduino compatible development board. If you are using the supplied serial cable to program it there is one extra step you need to do as the cable doesn’t have the ability to auto reset the the microcontroller which is a part of the normal programming process. To get around this you just need to press the reset button on the underside of the cube when the Arduino IDE finishes compiling your sketch and starts to upload it. You can find more information including links to an Arduino library and the example demo sketch the cube comes pre-flashed with in the first post of our support forum here:

Hi, just want to say what a great little project, I did it, and it’s been a while since i did any soldering.
I have 4 LEDs perm on, otherwise it works fine, not sure why the set are on, as i double checked, and cant spot it, but still enjoyable to do.

Which LEDs are they? If the are the 4 white feet they are supposed to be permanently on. If they are part of the cube could you describe which ones they are and I may be able to suggest where to look for the problem.

There is a verticle strip, which is odd – with usb pointing away from you, the lefthand side of the cube, 2nd LED from top on each of the 4 layers is permanently on.
It’s not real massive issue, especially given my first build in a lng while, I am happy with it, and want to progress it, it’s just a niggle 🙂

If I’ve correctly understood which column is causing the problem you may have a solder bridge between pins 19 and 20 on the bigger of the two IC’s.

If you look at the big IC you’ll see a notch at one end. With this IC orientated so that this notch is at the top, pins 19 and 20 are the 5th and 6th pins counting upwards from the bottom right of the IC.

JonathanNovember 13, 2015

Andrew that all looks OK, as I say I am not to worried, as it’s the first build I have done in a long time, so the fact it works at all is a bonus.

I’m going to get some more LEDs and re-do the cube, as to be honest this one is a mess. but now I the ability to better bend the pins in the right way, using this one as a template.

Thanks for taking time to answer this, it’ much appreciated, and getting me back into electronics and programming.

We do normally put about 5 extra in the kits so that you have some spare so you may need less then you think. However if you send an email to sales (at) hobbycomponents.com with your order number and reference this blog post we’ll sort it out from there.

I found the cardboard jig really handy, I noticed some people mentioned that it was starting to ware out by the third grid, so I covered my jig with electrical tape which worked a treat, even once the fourth was done, it was still in great shape, might keep hold of it if I decide to make another 😀

Hello, Please could you confirm/clarify that the white lead is Rx and the Green is Tx? I do not seem to be able to connect to the com port, yet when I use another non-cube kit nano with a different lead I can. Is pressing the reset button timing time critical?
Many thanks.
William.

If you have the updated V1.1 cube (it should say V1.1 on the PCB) the screen print has been updated for the serial port with Tx and Rx labeling swapped around. We’ll get the diagram updated in this post to match it. So:

Connect the white (RxD) cable to the pin labeled Tx on the cube.

Connect the green (TxD) cable to the pin labeled Rx on the cube.

Timing of the reset button is a little critical, you need to press it within one to two seconds of the Arduino IDE saying it is attempting to upload the sketch.

Just arrived in post. A note included in package for panikers like me, saying instructions are online. I opened the package and was omg hoiw can I make this without instruction. PS this will definitely not be my last purchase. The website and products are amazing.

Quick tips. Check each led before soldering. I used a |UT30B multimeter and the test voltage was perfect for lighting led. Test again after you solder each 4×4 grid.
plug device into usb point after completing circuit board population. if you put feet led in backwards they wont light.
use the flux!
dont expect your cube to be perfect unless you do ocd on the bending and jig. im happy with a cubish.

Built the blue 4x4x4 led cube today and everything went perfect. was missing the power edge connector. Last kit was missing the single strand wire. O well no prob as have soldered a longer usb lead to blue one and had spare wire for red one. I definetly reccomned making a second one if you can learn from your mistakes as they look quite stunning on the side. My next one will be the 8x8x8 cube, i just hope i dont mess up the board. Be much nicer if it had through hole components as thats what im good at. Surface mount is going to be tricky.

Sorry about the missing parts, not sure why they weren’t in your kits but if you still need them just email sales [at] hobby components dot com.

With regards an 8x8x8 cube we are right now putting the finishing touches to our own kit. Like the 4x4x4 kit this will be a standalone cube and will only have through-hole components so will be much easier to build. We’re hoping to have it on sale within the next week or two. The forum post is still under construction but you can get more information from it:

awesome can you email me when its ready. I sure will be buying a few kits for christmas present. Im ok with the odd bits missing. Im sure it a one off. Not worth the postage really. I put link to youtube video i made of the red and blue kit. Its good to see how a beginner can improve after making one. We still like the red on with all the bodge wires to get a few more leds lit. The kits are great fun to make.

Will do. Like the video, I don’t know what you used to record it but it seems to have very good low light capabilities. I’ve been looking at the video for your red cube but for the life of me I can’t figure out what could cause it to behave like that.

Hi Andrew. I used a Canon Legria Mini in its lowest data rate recording. It can do awesome 1080p but it takes hours to uploads as i barely get 1.5mbps up.
the red one has patch wires as i seem to have killed some of the connections. Whats styrange is I replaced the top right led and it flashes for about 10 seconds then dies. I obviously destroyed something. Im ordering a couple more for friends and will attach 2 meter usb leads that i make myself. Not got into programming the cube as it looks good out of the box. When I get tyhe big 8x8x8 through hole ones I will hook them up to pc if possible. Kinda hoping a simple pc interface is available rather than arduino. thanks for watching the video. Its quit hard to get close without video saturation.

When I power it up I get one column illuminate brightly/normally, it then begins the demo pattern – but all the LED’s are extremely dim (can barely be seen even in total darkness).
The only anomolie I can spot is that IC U2 supplied has 16 pins, whereas the PCB “expects” an 18 pin chip. I have installed it with the chip to the far left, leaving the far two RH pins unused.

It definitely sounds like you have the wrong IC. I can’t locate your order in our system from your name. Could you email sales at hobby components dot com referencing this blog post and try and resolve the problem from there.

The diagram needs updating. With the latest version of the cube PCB (V1.1 which is the one you should have) the labeling for the Tx and Rx pins have been swapped around. The pins themselves have not changed. So you should still connect the the cable in the same order as shown in the diagram.

im glad i read these comments and checked all my leds before I started building, would have been pretty annoyed to build it with the 11 dead red leds inside the cube, I can probably find the 5 I need in my garage to finish it, but it does seem a shame to spoil such a nice kit with leds with such a high fail rate, makes me worry about how long they will last,pcb looks very good quality, and quick delivery.

We’re going to run through our current stock of RED LED’s to see if we can pin down what exactly the issue is. I’ve added an update to the guide to include a section on testing the LEDs before construction and a tip on avoiding mechanical stress when bending the legs. We’ll also look into increasing the number of spare LEDs within the kits to cover for any potential problems.

If you send an email to sales at hobbycomponents dot com we’ll see what we can to resolve your current problem.

Wondering if you could help me – just finished my cube! Took me the better part of today Soldering the led’s together is really fiddly got there in the end though. For the most part it seems to work buy for some reason all of the leds on the bottom and second row work. Not sure why the 1st and third row not working. Doesn’t seem to be anything loose soldering wise – any ideas? Thanks for your help!

There’s nothing particularly special about those two layers and the fact that the other to layers are working helps rule out a lot of possibilities so hopefully its something minor.

By not working do you mean none of the LEDs are not lighting or that they are not lighting in the expected pattern? Also is it running the default demo that’s pre-loaded into the cube or have you reprogrammed it?

Hi there,
thoroughly enjoyed making this as a complete noob! am now pondering creating my own sketches and have followed instructions. however the arduino IDE doesn’t seem to be able to detect the board. checked system properties and it says “The drivers for this device are not installed. (Code 28)

There is no driver selected for the device information set or element.

To find a driver for this device, click Update Driver.” where would I find this driver?

Hi
I’ve just received the kit and I’m looking forward to building it. I’m impressed with the value for money and the support it has.

However, I’ve been a bit confused by the circuit board. All reference to this in the build instructions show the component side as white and the reverse as black (including a picture of a v1.1 board from a contributor). Mine is a v1.1 board but the colours are reversed – what I take to be the component side with the text on it is the black side and references to the “black” side seem to mean my plain White side!

I’m sorry if this sounds a bit nerdy but it’s confusing. I’ve not done much of this sort of construction and it has caused much head-scratching and wondering whether I’m interpreting the instructions correctly.

Perhaps a clear statement of these changes, along with the Rx / Tx issue (which is still incorrect on my board), should be placed at the top of the instructions.

Is there some reason for this change? I would have thought that having the white side uppermost on the completed project might cause undesirable reflections from the LED’s.

Sorry for the confusion. We use an external PCB manufacturer to make the PCBs in our kits. Currently shipped PCB are reversed simply because the manufacturer made a mistake when applying the silkscreen to the latest batch. After building one up we didn’t find any issues caused by the silk screen being reversed. At one point we where offering a choice of PCB but we are currently sold out of the older version.

>Perhaps a clear statement of these changes, along with the Rx / Tx issue (which
>is still incorrect on my board),

Thanks for the suggestion. A comment has been added to the start of the build guide and the serial cable diagram has now been updated.

> I would have thought that having the white side uppermost on the completed
> project might cause undesirable reflections from the LED’s.

Actually there is not much difference as the black PCB is glossy and causes reflections anyway. In fact, personally I think it looks better with the white base.

>Finally, should it be OK to use chip holders for the 2 IC’s?

Yes it will work fine. With standard IC holders the ICs shouldn’t protrude above the height of the 5mm LED feet.