Introduction: 8X8X8 3D RGB LED Cube

About: Just getting into the microcontroller craze. I used to do this sort of thing building circuits for 8 bit microprocessors back in the early 80s, so this is kind of like reliving a bit of my childhood. Back then…

It's been a long time coming, but my Universal RGB cube is finally ready!

Now we can run the animations and use the code by both Kevin Darrah and Nick Schulze (slightly modified, but basically identical - minor timing and layer control tweaks were all that was needed). Plus Doug Domke made a whole new set of code from scratch that makes creating your own animations easy!

Although the majority of the code written is for the ChipKit UNO32 and uC32, Kevin's code for the Arduino UNO, and the version I ported to the Arduino MEGA2560 work on the same cube just by adding a couple jumper caps.

TO THOSE THAT CAME HERE BECAUSE YOU FOUND THE PARTS KIT FOR THIS PROJECT ON eBay - NO the parts kit does NOT include the circuit board - it's the parts kit FOR the circuit board. Inbox me for direct board pricing and availability or go to www.TheLEDCube.com . I do ship worldwide. Please make sure you get your parts kit from the links there - don't use the cheaper kits offered by sellers other than WKWS20 .

Once you select the circuit board, you will see links down the right for any parts kits etc you might need.

To those that got the Mini Music Module before Feb 2015 - due to a change in the parts kit, the USB port MUST BE MOUNTED TO THE BOTTOM OF THE BOARD!!! The V4.X music modules fix this, as well as an input sensitivity issue.

ATTENTION: If you ordered a board months ago and have NOT received a refund - CONTACT ME IMMEDIATELY. There are a few boards left for the "back order club" but those who have been waiting the longest get their boards first!!!
Backorders and new orders are finally shipping again!



We currently have code for the Arduino UNO, the ChipKit UNO32 (PIC32MX processor), the ChipKit uC32, The Arduino MEGA2560, and my UNO Eliminator boards [discontinued except by special order in favour of the bridge boards] (which get rid of the last of the wires)

Jerry Lesnefsky and Karl Moeller made a great little music module that fits onto the base / driver board, and allows the PIC ChipKit Eliminator to plug right onto it - and in the process, noticed the the I/O Aux header has A2 and A8 labelled backwards on the eliminator board !!!! If you are hand wiring a music module to your ChipKit Eliminator, please make note of this!

SPECIAL THANKS to Doug Domke who is making firmware templates for the PIC32 (ChipKit UNO32) which work much more like standard Arduino code so that we can more easily create animations on the PIC.

See his page at http://d2-webdesign.com/cube for information and downloads. I will add code here as I create more animations using his template.

This was originally inspired by the project by Nick Schulze, and then added to using the project by Kevin Darrah.

You can use the cube assembly method Nick Schulze at HowNotToEngineer.com uses, however I did develop my own assembly method. Nick's method is great if you enjoy woodworking, or you can use mine if not.

CLICK HERE TO JUMP TO MY CONSTRUCTION OF THE CUBE

When I first started looking for my Next Big Project (after the original 8X8X8 LED mono colour cube) my searches came overwhelmingly to two.

Nick Schulze and Kevin Darrah.

My problem is that I don't get along well with wood. It's just a medium I haven't mastered.

That's why my previous cube assembly method used a cardboard motherboard box for the LED layer template.
It did work extremely well though, and I was quite happy with the results!

So, with that in mind, I WILL show you how I built mine (steps 9 to 15 currently) but initially we will go on the assumption that you will build Nick's assembly rig modified to a 26.5mm spacing to fit my board.
If you'd rather just build it the way I built mine, go directly to step 9. It seems others are finding my assembly method to be favourable to the big wooden rigs. Once you have your notched rulers made, you never need make another measurement with my method.

Please also see the original projects if you want schematics or theory of operation etc. I am not here to re-invent the wheel. I am here to bring these projects to those that:
otherwise couldn't have made them;
tried to make them and failed;
cannot read a schematic;
are overwhelmed with the magnitude of wiring involved;
are (like myself) not good carpenters ;
want a portable or "neat" looking project;
require the cube to be portable;
or a plethora of other reasons.
If you are looking for schematics and the technical info on how it all works, please go to these links:

How Not To Engineer - RGB Cube project by Nick Schulze

Dedicated To Design - RGB Cube project by Kevin Darrah

All the theory and design and schematics that I used to base this circuit on are there. For the most part, my circuit very closely conforms to Nick's except that I use through hole chips rather than SMT.
My chips are just a touch slower, so I had to modify Nick's code to widen a couple pulses, but other than that, his code is stock.

Feel free to ask questions about my design other than "do you have schematics" or "can I have the Eagle files".

I don't design with Eagle, and I also don't make schematics. I design the PCBs in my head, and go right to design on the fly. I don't know why I work this way, I just always have, and it works for me...at least eventually...

I almost always have flaws in the initial designs that do not present themselves until I start building the project.

That's when a new version is made. Minor tweaks or additions are the revisions within those versions.

It took me until Version 3 Revision 4 of the PC Board before I was ready to make an instructable for it.

I am happy to clarify anything you don't quite get about the way it all works etc. (assuming I fully understand it myself enough to explain it better than the original explanations. The hardware I can easily explain - the software is better explained by the authors).

Step 1: Eliminating the Wires and Mess

As you may know from my previous instructable "CHR's 8X8X8 LED Cube Revisited with improvements!" the one thing I hate is wires, and the one thing I love to do is take an otherwise daunting or nearly impossible build, and make it so anyone who can solder can build it, even if they don't understand why and how it works.
I felt that the projects these two guys made needed to be more accessible to the more general public.

Many people wanted to make the original 8X8X8 LED cube, but either couldn't read the schematics, had trouble understanding the instructions, or got close, but just couldn't get the darn circuit to work!

Once again, I have taken the mess of wires and circuit building that prevent most people from being able to make these, and made a circuit board to handle it.

After all, who has time to wire it like that???

One of these is the project by Kevin Darrah - it's the one that uses the Arduino and has the hand wired circuit.

The other - and the inspiration for my board - is by Nick Schulze. It uses the ChipKit UNO32 which uses a PIC microcontroller rather than the ATmega328P. He made a circuit board, but one issue is that it takes SMT chips, and a lot of people aren't comfortable soldering those.

The other problem is that there's STILL 200 wires to run to the cube from the board.

Step 2: Universal Driver and Base Board

OK - so we have 2 different guys that made cool projects but they each use a different microcontroller, and therefore completely different codes.

Wouldn't it be cool if we could just have one circuit that could be adapted for either project?
I certainly thought so.
So, introducing, the RGB Driver/Base board Version 3 Revision 4 (I never get it right the first time...LOL)

UPDATE: January 2015 - the final version of the board (Ver.5) is released along with the V2 ChipKit Bridge board, V1 Arduino UNO and Arduino MEGA2560 bridge boards, and the V3 Mini Music Module.

FINAL: 2016 - OK, I thought the V5 would be the last, but the V6 Rev.2 has stood the test of time, and will not be added to. THIS is the absolute final. It has mounting holes, a jumper to disable or limit the brightness of the main board LED indicators and other little mods. The V4.5 music module is the final version. The gain is now microprocessor controlled using the position of the gain control, rather than having the control actually modifying the signal.
The V2 chipkit and Arduino UNO and original Arduino MEGA boards are all now final version as well.

The other thing of course is to eliminate all those wires from the driver board to the cube.
So, this time, I combined the driver circuitry with the base board so the LEDs mount right to it.

Bye bye wires - we shall NOT miss you!

Step 3: Put the Parts on Your Board

Just in case the links change -

To get a COMPLETE parts kit and/or RGB LEDs for this project, I thought I'd make things easy on everyone by working with a Hong Kong supplier.

They have put together a complete parts kit for the driver/base board CHEAP!

Simply go to eBay, and put SuperTech-IT into the search window and hit search.

You will see the parts kit, and the LEDs.

The parts kit does NOT include microcontrollers or parts for the UNO Eliminator boards.
Don't forget to snap the eliminators off your board!! LOL!!!
UPDATE: to save cost, the V4 boards do not have eliminators attached. If you want an UNO Eliminator, you need to ask for one at the time of payment/order.

It also does not include the optional KIM-055L regulator.

This is because I highly suspect most people will not be using them. Those that do want to use them can either contact me, or find the parts on eBay for themselves. They aren't hard to find.

Step 4: But...there's Still Wires....

Yes, whether you have an Arduino UNO, or a ChipKit UNO32, you still need to wire it to the base/driver board.

So, the next thing I made were UNO Eliminators. Yes, the eliminator for the ChipKit UNO32 might be beyond the soldering skills of many, and it's easy to mess it up. The Arduino eliminator is much easier to make. In fact, if you can't build it, you can't build this project because it's all through hole just like the main board.

The boards are perforated, so all you need to do is take a box cutter and score a line down the perforations in the board, and snap them off. You may separate them from each other as well, but I enjoy being able to switch microcontrollers by just turning the board 180 degrees and using the other connector.

So, if you wish, you can eliminate all but the power wires from the project.

One small issue - to use my UNO eliminators, you'll need an ICSP programmer for the Arduino Eliminator, or a PicKit3 for the ChipKit eliminator.

Wait...I lied...if you have an Arduino UNO, you can program the chip in your Arduino, then move the chip to the Eliminator.

UPDATE: Please remember that because so few were using the eliminators, they are no longer part of the board to save manufacturing cost. You may request an eliminator when you are getting your board. Just specify which you want.

BRIDGE BOARDS will soon be or already are available. These do pretty much what it sounds like - they connect to the proto-board and the cube base without wires, forming a bridge between them.

They will also connect easily to the mini music module.

Step 5: Power

The board uses surprisingly little power in comparison to what the original project engineers originally calculated they would. If this sounds familiar, it's because this happened with the mono cube as well.

A simple 5V 2A wall wart easily obtained on eBay will provide enough power for the cube once it's complete.

These are about 5 bucks.

If you are worried though, there is a spot for a KIM-055L regulator on the board, which can provide up to 5A at 5V with a 12V 2A input - again, a cheap wall wart will do. The added plus here is that if you have an old laptop power supply that has one of those barrel type ends on it, you can use that too. The KIM-055L allows for 10 to 35V DC input which covers pretty much the range of laptop adapter voltages that are around.

I did run the board on a single 3.7V 2200mAh NiMH cell from a laptop battery. After 8 hours running, I decided I needed my workbench back.

DO NOT FORGET to set the power jumper to 5V or 10-35V correctly. If you don't install the jumper at all, nothing will work. If you put it in the 5V position and put in 12V, something will likely blow - so be extra sure you don't ever make that mistake. If you put the jumper in the 10-35V position, anything under about 9V will shut down the regulator. At exactly 9V, the circuit tends to malfunction, so always put in at least 9.5V

Step 6: ASSEMBLY

If you go to http://www.hownottoengineer.com/projects/rgb-led-cube.html you will see Nick's original writeup on the project I based my circuit board on.

I don't need to completely re-invent the wheel, so I encourage you to go there for the information on how it all works, and mostly for how to construct the cube panels (planes) unless you decide to use my method.

This time we don't assemble by layers, finally hooking up the completed cube to the circuit. Instead, each panel is connected to the PC Board as it is completed.

We start with the panel closest to the transistors. This is the MASTER panel, as it gets all the layers connected to it as well as the RGB lines - so you can actually test the panel the moment it's soldered onto the base. This is a great advantage as we can see any issues immediately. JUST DON'T FORGET to connect the layer lines to their respective layers of the panel. They go from the bottom up, meaning Layer 8 is the top layer.

You will of course need the modified code to install onto your UNO. Don't worry about the ChipKit code on Nick's site if you are using the Arduino, just pay attention to the construction method.

The 2 main differences between what he does, and what we do is that we are using 5mm LEDs, not 10mm like he does - and we need to adjust the spacing to 26.5mm in all dimensions from center to center of the LEDs.

Test your panels as each one is added until your cube is complete. To do that though, you'll need the modified code, and you need to know how to connect your prototyping board to the base. That's next.

Step 7: DOCUMENTATION and Firmware for Programming and Connecting Your Boards

On the chipkit, there's a chart on Nick's page of what goes where, but here it is again anyways.

On Kevin's site, you need to be able to read the schematic (and do some interpretation) to know what goes where. I figured I'd make it easier for everyone and just make this handy chart.

When I went to write the FIREWORKS effect, I kept running out of space, and had to delete an animation to make it fit - so instead of that, I ported the Arduino code to the Arduino MEGA2560. Now it all fits. Also, now we have code for the MEGA2560 !!

Chipkit / base&driver / Arduino UNO / Arduino MEGA2560

3 / ENABLE / D3 / PWM3

5 / LATCH / D2 / PWM2

6 / CLOCK / D13 / D52

7 / RED / Not connected

8 / GREEN / Not connected

9 / BLUE / D11 / D51

26-33 / Layer 1 to Layer 8 / D4 to D10 and A5(D19) / PWM4 to PWM11

GND / GND / GND / GND

5V / 5V / 5V / 5V (do NOT connect your 5V to the VIN - VIN is a reference voltage for the A/D converter)

The layer pins for the Arduino UNO were selected specifically to leave A0 to A4 free, and to leave the RX and TX of the serial free for future expansion. Since analog pins can also be digital, I thought it best to leave as many analog pins free when I took the layer data out of the SPI stream and made it parallel.

There are 2 different codes for the Atmega328P. One is for the Arduino as standalone or Arduino Eliminator without the extra shift register, and the other is for the Arduino UNO Eliminator which has an additional shift register on it.

The eliminator was made this way because what Kevin does to make the Arduino fast enough to handle the vast amount of serial data is brilliant. He uses the hardware SPI instead of manually bit-banging the data out. This originally meant that he also sent the layer data out the same stream - so the shift register on the Arduino UNO eliminator handles that.

So the code WITH SPI layer control requires the UNO Eliminator (or the eliminator requires this code) and the code without the SPI layer control runs on a stock Arduino UNO.

The Arduino eliminator with the extra shift register and the code for it, I will be phasing out.

The source code for the ChipKit requires the MPIDE for the ChipKit to upload it to the board.

The HEX file requires a PicKit3 programmer to upload the code to the ChipKit Eliminator.

Please remember, the eliminators are optional, and not needed if you want to wire your proto-board directly to the base/driver.

Your master panel should look like this video with the ChipKit UNO or the PIC UNO eliminator programmed and connected.

http://www.youtube.com/watch?v=xecPxVD7WPk

DO NOT FORGET to jumper the data stream configuration jumpers if you are using the Arduino or Arduino UNO Eliminator! There must be a jumper over the green-in and blue-out pins, and the red-in and green-out pins. Otherwise you will only see the blue sequences, and possibly random red and green in the mix.

In fact, chances are you can always leave these jumpered as I have not noticed this affecting the PIC controller, but I am sure the odd bit might be off once in a while if you left them on.

I do highly suspect though that if you never plan on controlling more than one cube, you could permanently put a 1K resistor across each pair of pins listed above, and that would basically make it auto-switch so you can run either processor without having to reconfigure the board each time.

YOU MUST USE THE CODE FROM THIS PAGE to run on the universal boards. Small modifications were necessary to ensure full compatibility.

We have also fixed the red / blue reversal in the original code.

If you build the board the way they say on HNTE he has the red and blue pins reversed - so the easiest fix for us is rather than fixing the board, simply fix the code. IF YOU DOWNLOADED THE PIC FIRMWARE BEFORE AUGUST 29,2014 THEN YOU NEED TO DOWNLOAD THE REPLACEMENT CODE HERE.

Special thanks to Doug Domke for not only finding this error, but for pointing out exactly how to fix it.
He is also writing some new code for us that hopefully will be much more intuitive for making our own animations.(now available)

*******************************************************************************

IMPORTANT NOTE!!!!

*******************************************************************************

If you have linked the Reset lines together between the base/driver board and an Arduino UNO, the Arduino will FAIL TO PROGRAM using the USB ! This is also true of the Arduino MEGA2560.

Alternate method: When you go to send new code from the IDE, hold the RESET button on the Arduino UNO/MEGA2560 (or on the Base/Driver board ) until the IDE starts trying to send the program, and then release the reset. You may also need to remove the music module.

Otherwise, you can just disconnect the line to the reset from the Arduino to the base/driver until programming has been completed. Likewise, if you have the RESET LINK jumper in place on your bridge board, you may need to remove it to program your board.

To save these files from this page to your computer system, remember you may need to use the SAVE LINK AS in your browser. (or you may get a "FOBIDDEN" message). Remember to rename the file to something relevant, as Instructables tends to rename the files to a hex number.

I now have Doug Domke's ChipKit "RGB_8x8x8_CubeAppTemplateV3_0" firmware plus a few demos that he wrote and a few I wrote. This includes the new Text functions. Keep checking back here though for bug fixes or new versions!.

UPDATE - I think he's up to V9 now.

The V4.5 Music Module code for the ChipKit UNO32 / Arduino MEGA2560 is finally DONE.

Based on the V4 code, this uses the Virtual gain / noise limit / Beat threshold potentiometer that connects to the A5 input rather than limiting the actual signal itself. This is most helpful for lower signals, but can boost the signal response to the point that it responds to ambient line and circuit noise. Generally speaking though, with signals at levels that it was meant for, it works great! Variables like VUtop[x] which only go from 0 to 8 allow easy programming without having to check if the incoming signal is driving past the 8 LED limit. You can still use VU[x] to read the actual value from 0 to 1023. This is aptly named the V4_5 template.

Step 8: ENJOY!

If you have one of my mono cubes on one of my base boards already, you will now have a pair of cubes that look almost like twins!

Yup, they are the same size!

This is deliberate, as I may later wish to sync them together !

If you don't have one of the mono-cubes, and came here without ever seeing my previous work, have a look here and enjoy that as well.

Now - just for the heck of it, I am going to show you how I made my cube since I suck so badly at woodworking.

Step 9: How I Made My Cube (because I Suck at Woodworking)

My assembly rig was 2 stainless / aluminum rulers with notches every 26.5 mm on center and an XBOX heat sink with a mount hole slightly drilled (then tape put in because I made the hole too dang big) If you need to tighten up your drilled hole to snug up the LED, put scotch tape over about 3/4 of the hole, and push in the LED - then press the rest of the tape firmly to your "bending jig".

One major advantage of my build process is we only have to fish 3 leads into their holes at a time during panel construction, as my build is sort of column by column, and the columns are put in one at a time, then joined into an eight column panel. Then the panel is connected to the rest of the cube. The cube base acts as the foundation for the whole build until the cube is finally complete.

First we have to prep the LEDs

This takes a lot of time...I would bend up 64 at a time, then build 8 columns, and assemble those into a single panel on the base and then (with the exception of the master panel) connect the panel to the rest of the cube before going back to bend more LEDs.

Approximate times for me were (per completed and connected panel)

2 hours bending / prepping the 64 LEDs

4 - 5 hours soldering the LEDs into 8 LED columns

3 hours connecting the eight columns into a panel on the board, and completing panel assembly by connecting the panel to the rest of the cube by the soldering of layer lines and braces to the layer grid.

Be prepared - this takes process is time consuming!

I used my old bending jig from a previous LED cube project, which was an X-Box heat sink - but anything with a hole in it close to the edge will work, as long as the hole fits the LED nicely and is about 1.5X the thickness of one of your rulers from the edge. Drill the hole if it's too small, insert tape if it's a bit large. Remember, once the hole is the right size the hole should be about 1.5 times the distance to the edge of whatever you drilled it into as the thickness of one of your metal rulers. I got my rulers at Wal Mart. They were pretty cheap, and it's a metal the solder doesn't stick to. It also acts as a heatsink, preventing damage to the LEDs during soldering.

Start off by putting the top of an LED in the hole so the longest lead (anode) is LEFT of center pointing up.

Step 10: Get Bent!

Pull the longest of the 4 leads (the anode) towards yourself and get it as flat to the LED base as you can.

I personally then used the flat side of the pliers (near the hinge point) to push the anode flat against the LED, and then "rolled" the pliers forward so they pushed the 3 cathode leads flat against the LED, but pointing in the other direction (away from you).

Then grab the 3 cathode leads with the pliers at the point where the pliers meet the bending rig. This ensures the bend always is at the same distance from the LED. Bend the 3 cathode leads straight up.

The cathodes now need to be evenly spaced from each other, and parallel to each other...

Place the leads into 3 holes of a perfbboard/protoboard all the way around the bend in the cathodes until the side of the LED is against the board on one side, and the leads are flat against the board on the other side.

Make sure the LED leads are straight and parallel by using the perfboard holes as a reference. Each cathode should travel across several holes in a row, parallel to the other two cathodes.

Remove the LED, and make any minor adjustments by eye, and set it aside for assembly.

If the LED is slightly angled, that's OK - we can fix the LED angle after it's soldered into a column, before we remove the column from it's ruler.

Step 11: Be Their Ruler

To avoid possible math errors, mark a stainless / aluminum ruler using the circuit board LED holes as a guide, and use a thin saw or Dremel tool to cut 8 notches in each of the 2 rulers at your marks approximately 1cm deep. If you don't want to rely on the circuit board to make your notch markings, remember - it's a ruler - start at about 4cm and make notches that are 26.5mm from each other (center to center of the cuts - do not measure from outside to inside edge etc.)

Hold the ruler vertically, and insert the LEDs in the slots so that the top of the LED points to the ground and the cathodes are on the other side of the ruler pointing up. Gravity will hold them in place during this step. If your notches aren't deep enough to hold the 3 leads and have about 1mm to spare, cut your notches a bit deeper.
From this point forward, we shouldn't have to measure anything else again.

The other ruler's notches should easily slide over the anodes of the LEDs on the other side. Do this coming in from the opposite direction that the notches in the first ruler are going. Hold the second ruler against the LEDs as you bend the anodes in the direction of the top of the LED it's attached to, until it's flat against the ruler. This will secure the LEDs in the "rig" and also creates the elbow that the anode grid wires get soldered into later.

Make sure both rulers are tight against the LEDs.

You can now set the rulers down so that the cathodes are on the top side of the upper ruler, with the LED domes pointed away from you.

I use approx. 20 cm lengths of "flower stem stub silver" 24 gauge wire fluxed by running it under a flux pen (this wire doesn't solder well without flux - but it's shipped in STRAIGHT cut lengths that perfectly each make 2 column wires with enough left over to make a layer brace) -

For those that would rather use a spool of tinned wire, I suggest THIS wire. Tack solder one end of the wire about half way up the bottom LED's lead, and the other end to the top of the top LED lead with the wire being as straight and flat against the ruler as possible, then solder the wire to the leads in between. Pinch the wire against the lead with tweezers to make sure they are touching when you solder them. Solder the entire length of each lead. Do this for all 3 leads of all the LEDs. Don't forget to do the top and bottom LEDs once the wire is secured by the other joints. ALL the leads need to be soldered along their entire length except the bottom one. We do this to ensure the bottom LED leads will fit into the holes in the board.

Soldering the length of the LED leads makes a strong straight bond. This helps the strength of the columns by minimizing the areas that are only wire.

Step 12: Eject the Ruler

Inspect the LEDs and adjust their angle if they aren't straight, and press them against the ruler if there is any gap as well. Pull the anodes out on about a 10 degree angle. This will allow the rulers to be able to slide into the bends when it's time to solder the columns into panels to ensure perfect spacing.

OK, time to eject the LEDs...here's the trick -

Once the cathodes are all soldered, remove the lower ruler from the anodes.

Place the flat side of this ruler against the LEDs along the inner edge, and squeeze the outer edges of the 2 rulers together.

This will straighten any misalignment in the LEDs along the vertical as it pops the completed column out of the slots in the cathode ruler.

Set the column aside, and keep going until you have 8 done.

Cut just enough off the bottom of the very bottom LED's 3 cathodes so that they are even in length.

All 8 columns must be clipped to the same length or as close as possible.
Place the circuit board on a hard flat surface. It may help if there is a wall or something that you can allow the columns to rest against for the very first panel (the MASTER panel). Subsequent columns can lean against the panel behind them

Insert the columns one at a time into the holes for that panel. (the first "Master Panel" is the one that runs parallel to and closest to the transistors). Put the columns in with the anodes facing away from the transistors.

Slot a ruler horizontally into the anodes of the panel about half way up the panel, and solder the LED leads into the board (see photos).

The panel (well, 8 columns) should be able to stand on it's (their) own and support the ruler.

Now start inserting horizontal wires into the elbows of the anodes to start creating your anode grid lines from anode to anode of each layer level. Make sure each wire is fully seated in the bend of the anode when you solder it in place, or your panel to panel spacing will be off later when you connect the panel to the one behind it..

It is also best to start at the bottom row, and work your way up, with the ruler slotted into the layer above the one you are soldering each time. Once you complete a row, clip off the anodes above the grid wire you just put in.

When doing the Master Panel, Don't forget to connect the anode (layer) wires from the circuit board to it's respective layer grid wire in the panel after you have them all in place.

Step 13: Another Wall in the Brick

One way to ensure alignment is to lean an unsoldered column against the one behind it.
This allows you to align the column by sight against the LED in the column behind it.

Solder in the column, and then with your finger at the very bottom of the column at the board, pull the column so it's standing, no longer touching the other panel it was leaning against.

Do this for all 8 columns, and then put in the grid wires on the anodes just like last time - starting with the bottom row first, and then brace it. Then move to the second layer up, connect the anodes for that layer of that panel together, and brace it to the anode grid line in the previous panel. This allows unhindered room to place and solder the braces from above the line without being constricted by the grid line above it.

How exactly you brace them, in how many places, straight or angled wires are all kind of up to you.

In the previous single colour cube, we only braced the outer edges, and the middle of the layers.

For this build I am going to say to make sure you have AT LEAST 2 braces (4 is better) on every anode to the anode grid line of the panel behind it BUT leave the outer edges un-braced until all 8 panels are in - that way you can brace them with a solid piece of wire rather than 8 little braces.

BE SURE TO GO TO THE NEXT STEP after you finish the master panel, but before you start the second panel !!

Once all 8 panels are in place, you can then run a single solid wire across all 8 anode grid lines in a layer close to the outside edges of the cube running front to back. We could put a bunch of single braces in at the edges as we were building, but I like the extra strength a single unbroken wire gives.

USE YOUR SLOTTED RULERS to make sure your spacing is correct between panels any time you are going to solder in a brace. Make sure you are NOT connecting any grid lines to the line above or below them - just to the cathode grid lines in the panel behind them. Mine you will see are at 45 degree angles. This helps to strengthen against shearing forces.

Step 14: Get Testy

Test the cube every time you add a panel. Once a panel is buried behind another is NOT the time to find out it's burned, leaking, shorted or backwards. See step 7 for code to program your microcontroller, and connection information.

If you see a column that is dimly lighting one colour when the column should be off - look for the 1 LED in that column that is actually off at that time. Replace it. It's leaking reverse current. It may works fine in terms of all colours work when they are supposed to, but it affects all it's colleagues when it's supposed to be off.
If you see a layer that's off, you probably forgot to solder in the braces on that layer grid.

If you notice an LED that is red when it should be blue, or blue when it should be red - replace it. You bent the LED backwards (had the anode to the right of center when you bent the LED) and re-bending it correctly is likely to break off the pins.

Watch the "cube" (it's not a cube yet, unless you just put in the 8th panel) running for a while - it's easy to miss a misbehaving, dead or backwards LED.

Keep adding panels til you are done all 8, taking the time to test each panel as soon as it's fully connected.

YOU'RE DONE!

Unless you want to get adventurous and build your UNO eliminators (discontinued). Don't solder your ATmega to the board though - socket it. I soldered mine because I just didn't have a socket. If you want to be able to program your ATmega328P in the Arduino and then move it to the UNO eliminator, you must socket the chip.

Step 15: What Makes It Universal?

I have put in a few things that make the board quite adaptable to differing methods of data transfer.

Also, since the microcontroller is not attached permanently or part of the board, it lends itself to just about any microcontroller or prototyping boards you can find.

Expansion is possible because the serial out of each set of drivers comes to a pin, allowing additional shift registers on another cube to be chained to the cube...this means 16X8X8 or 16X16X8 is possible without any additional hardware other than identical cubes. Additional layers could be added with another slave cube with a microcontroller synced through the clock, or by demultiplexers on the layer outputs to expand the layers from 8 to 16 or more.

The main limitation is how fast we can bit bang the data out of the microcontroller, and that can be solved with additional slaved microcontrollers.

Part of the genius is how the serial out of one chip is strategically beside the serial in of another.

This allows us to string all the drivers on the board together in a single long string rather than having them be 3 separate streams. So if we have a single data stream, like the Arduino code uses, we put the data into the blue input. We then connect the blue out into the green in, and the green out into the red in. Now we don't need to send all 3 colours at once, we can stream them one after the other.

The layer output from the buffer is available to drive another cube without a microcontroller for easy horizontal expansion. In this case, the blue out would go to the next board's blue in, and so on.

Even the UNO Eliminators each have 3.3V, 5V and GND outputs for shields / addons along with 8 additional I/O lines - and each eliminator has the RX/TX of the serial available in the same pin locations, and other analog and digital pins (8 in total) that line up to each other - so an analog pin on one eliminator is also an analog pin on the other. This will allow for universal addons to be developed for multiple eliminator boards.

I am hoping that people will eventually write Raspberry Pi or TI Beaglebone or jumpstarter board code for it.

Since the main board runs on 5V, and the transistors are PNP - we need 5V at the base to turn them off.

There is a 74HC541 buffer/driver between the layer input, and the transistor bases that takes a 3.3V signal from a processor like the PIC, and converts it to a 5V TTL signal. The DM13A drivers can accept anything above about 2.8V as being a "1" on their inputs, so the whole board is 3.3V or 5V microcontroller friendly.

I put a lot of thought into the layout and design of the board, but if you have any suggestions about how it could be made better, I am willing to listen!

If you liked this project, please VOTE for it in any contests you might see it in.

Thanks for visiting!

Step 16: Building Your UNO Eliminators

PLEASE NOTE: THE UNO ELIMINATORS ARE COMPLETELY OPTIONAL (and now discontinued except by special order)

They DO NOT need to be built. They are simply a convenient way to connect an MCU to your cube without any wires.

There are few parts in the UNO eliminators - but a few pointers need to be noted....
PARTS LISTS
Arduino Eliminator:
ATmega328P microcontroller
16MHz crystal
2X 22pF SMT 0603 or through hole
74HC595 shift register
20 pin male shrouded header (2X10)
20 male header pins (for ICSP header, shield I/O header and shield power output pins) <- none needed if you are programming the chip in your Arduino then transferring it to the eliminator.


ChipKit UNO32 Eliminator:
PIC32MX320F128H microcontroller
10uF CERAMIC capacitor - SMT 0805 or 0603, or through hole. MUST BE Ceramic!
10K resistor SMT 0603
2X 100 ohm SMT 0603
5X 0.1uF SMT 0603
20 pin male shrouded header (2X10)
20 male header pins (for PicKit3 programmer header, shield I/O header and shield power output pins) <-shield I/O header and power pins not required

Remember, the 20 pin shrouded header goes on the BOTTOM of the eliminator.

Also be aware that the headers fit together loosely - and that you can be off by 1 set of pins either left or right...so if your eliminator isn't working, make sure you didn't mis-pin it to the board.

If you are using the standalone Arduino UNO wired to the base for easy fast debugging, and you want to use the UNO Eliminator with the SPI Layer control, you need to change a few lines...

//SPI.transfer(anode[anodelevel]);//finally, send out the anode level byte

// ** This routine selects layer without shift register.

lastanode = (anodelevel-1);

if (anodelevel == 0) { lastanode = 7; } // if we are at the bottom, the last layer was the top

digitalWrite(layerArray[lastanode], HIGH); // turn off the previous layer

digitalWrite(layerArray[anodelevel], LOW); // turn on the current layer

To run your code on the SPI layer controlled UNO Eliminator, you need to uncomment the top SPI line, and comment out the two DIGITALWRITE lines. You can of course comment the IF and LASTNODE lines if you wish, but it isn't necessary.

I may make non-SPI layer UNO eliminators later just as boards by themselves, and may include them in future revisions of the board.(these are now available).

Update - the SPI UNO Eliminators have been discontinued - and eliminators must now be specifically requested when placing your order. This is a cost saving measure as only about 25% of you are using the eliminators.

If you aren't programming the ATmega328P in your arduino and then moving it to the eliminator, then you are going to need an ICSP programmer.

To program the PIC32MX320F ChipKit Uno32 eliminator, you will require a PicKit3 programmer.

What I do is connect the ChipKit Uno, play with the code til I am happy with it in MPIDE uploading it to the board each time I want to move it to the eliminator (and saving along the way just in case), and then connect the PicKit3 to my ChipKit Uno and read the code into MPLAB IDE. You will need to put the ICSP pins on your ChipKit in order to do this by the way, because the ChipKit ships without them.

I'll save the code just in case, and then connect the UNO eliminator to the PicKit3 - set the Power Target to enabled, and set the voltage if the eliminator isn't on the base, and upload to it.

NOTE - If you are programming the eliminator while it's disconnected from the base board, you need to power it from the PicKit3. Not only that, you need to jack the voltage to 3.458V or it won't program!

This is found in PROGRAMMER > SETTINGS > POWER
(Don't forget to check "Power Target"

With the Arduino, in the IDE, just save your program, modify it for SPI layer control - RE-save it as the same name plus the letters SPI (or whatever, just so you know which is which) - then connect your ICSP programmer to the 6 pin header on the eliminator, and choose FILE > UPLOAD USING PROGRAMMER

Step 17: Share Your Schtuff! PLUS MY EXTRAS Like the PicBridge and Music Module

Once you finish your cube, post your videos or links to videos here along with photos of your beautiful (or slightly wonky) new cubes!

If you make additional effects or electronic addons, we want to see them! SHARE SHARE SHARE!

I have ported over my favourite effect - Fireworks - to the RGB cube.

Unfortunately I had to remove some other code for it to fit, but I'll look into streamlining things a bit more later.

Right now, just for the Arduino, because Nick's code still baffles me completely for the PIC.

UPDATE!!! Now that we have much easier code to work with, I have been able to do some cool stuff with the ChipKit UNO32! YAY!

The new code by Doug Domke ROCKS - and not only have I ported my fireworks effect, but made others as well, and also was able to easily start making Music Response!

I decided to get a little piece of hardware do all the work for Spectrum Analysis because I think realtime Fourier analysis might be a bit much for the processor...LOL..

So, inside Doug's code, I added a routine to grab all 7 frequency levels and put the values into a global array.
Not only that, it does it EVERY TIME it refreshes the cube layers - so you never have to do anything to grab the data - it's just simply always there and always current!

So, that said, if you are going to want to use my upcoming music effects, you need to know how to wire up this massive and extremely complex circuit. I've put a copy of the schematic here, as well as which pins of the ChipKit UNO32 you need to connect.

I tack soldered my prototype to the prototype of my PicBridge board - which does nothing but let me snap my ChipKit UNO to the cube base rather than having to hand wire the darn thing every time I wanted to use it.

UPDATE: October 8 - I have added function buttons to the MSGEQ7 addon. If you're wondering why I seem to use pins all over the map for my I/O, it's to maintain compatibility with my UNO eliminator boards.

Now you can pop between music response modes and animation/text modes in Doug's firmware with my code. One button takes you out of Animation mode and puts you into Music Input mode. The music input modes will cycle through the effects one by one, each being on for the defined duration in the code. You can then press the button again to select just one effect to lock the music response to.

You ca select one effect, and then select another and leave it, and you can also cycle back to cycle mode where it goes through each of the modes one by one.

Also, at any time you can hit the animation button, and the cube will instantly hop back into animation mode and start running animations and text effects.

Here is a copy of the beta code for you to play with. It is only for the ChipKit UNO32 or the ChipKit Eliminator boards. Maybe after everything is finalized, we may try to port it over for the Arduino, or maybe one of you brave souls could do it.

UPDATE: November 2014 - Doug Domke has released Version 6 of the cube programming template.

Think of it like BASIC programming language for the cube.

It allows for very easy commands to create objects (sprites) and move / bounce / rotate them around the cube with ease. Multiple objects can be created and moved around independently of each other at the same time.

As always, you can get his software and programming guide at

http://d2-webdesign.com/cube/

The work he has done with this project has been incredible, and I know some of you will be able to create some amazing animations using his templates.

He has maintained his older codes too for people that don’t need something this elegant, and simply need some more space or for people that just want some basic music effects.

The bridge boards that allows easy connection of the music hardware to the Arduino UNO, Arduino MEGA2560, or the ChipKit UNO32 as well as easy connection of the proto-boards to the cube are on their way. If tests go well, they may be ready around Christmas.

The Mini Music Modules have been designed. Once a few more base'driver boards sell, hopefully I'll be able to afford to have them fabricated. The music modules will take a mic module, line in, 1/8" headphone input, and USB Bluetooth. All in about the size of an uno eliminator. They will work with or without a bridge board.

Step 18: TROUBLESHOOTING

This does not mean you shoot it if it gives you trouble!

Ask your questions here, and we'll try to get you up and running.

Most answers will be at the top of the comments on the intro page if they aren't on this page.

If you get no power LED upon powering the board from the power input jack:

Check the power supply itself.
Make sure the Onboard LED EN is jumpered.
Make sure the board is jumpered for 5V on the power input select.
Make sure the power LED is working and not in backwards.
Check the 5V fuse (the 4A fuse)

The CHIPKIT sketches were improperly zipped prior to Feb 16, 2015.

I am guessing most of you get them working anyways, but a complaint today brought the issue to light, and the problem is now resolved. If you downloaded the ChiKit sketches before this date, and were having problems, please download them now and try again. It should all be fine.

I have noticed that depending on your equipment, the audio may pick up noise from the circuit which affects the music response. Even with my lab supply, I have run into this.

The KIM-055L regulator seems to eliminate this completely, so I suggest a power supply of at least 10V and using the KIM regulator.

An alternative is to use between 3.3 and 4.5V with the regulator disabled. This however may affect LED brightness.

You only need about 1A at 10V, and less at higher voltages through the KIM-055L. Do not exceed 35V.
And remember that you MUST jumper the regulator enable correctly. Failure to do so will damage both your cube and your ChipKit UNO32 / ChipKit Eliminator.

IF you have one colour missing from TWO ADJACENT PANELS (red for example) then check the RED chip that is between those 2 panels. Make sure it is getting the ENABLE and LATCH signals, and also check that the current limiting resistor has one side tied to the chip, and the other to ground. If there is a bad connection on any of these, the entire colour will be missing from the 2 panels on either side of the chip.

If the red and blue are backwards - you made an oopsie in the construction.
Not a big issue, just reverse which pin is Red and which is Blue in the source code.

ATTENTION: If your layers 5, 6, and 7 are not working on your Arduino UNO, there is a code fix. Please download the new RGB Arduino parallel code!

This is as of yet unverified by myself, however one person has reported that with the ARDUINO UNO ELIMINATOR V 2.0 Rev.4 that pins D2 and D3 are reversed. The fix is to simply reverse these 2 pins in the code itself where LATCH and ENABLE are declared.

PLEASE NOTE: DUE TO A fabrication error - if you have a V4.0 Rev 3.11 purchased on or before December 1st, a small trace repair is needed - PLEASE contact me IMMEDIATELY for info. I'll post more info here as well. Any boards purchased AFTER this date will have this repair already done. ALL V4 Boards purchased before December 8th require another fix where the fabricator made one of the VIA pads too large and it shorts to one of the traces that run past it. A simple cut fixes this.
Earlier on there was a problem with the parts kit from Hong Kong with the 1000uF capacitor. It's not a necessary part when using a switching supply (power brick) but the issue is the supplier switched to a 10V cap from the original 50V cap specified in my BOM to them. You can either leave the cap out completely, or put one in that is rated at at least 35V.

If you have a column of LEDs that are dimly lit when the column should be OFF - look to see if ONE LED is not lit at all. If so, that's the problem. Replace that LED and all should be well.

This happens when an LED is degraded and starts leaking reverse current. It'll still seem to work fine when you forward bias the LED - all the colours will appear to be working just fine - but the damage simply allows the others to get enough current to dimly light when they should be off.

Desoldering LEDs is easiest if you do it like this.
Grab the column wire you are desoldering with pliers, and gently pull it away from the LED as you heat the lead.
Once all 3 column wires are desoldered, grab the LED, and heat the layer grid line to release it.

When putting the LED back in, I find it easiest to place the pre-bent LED in place, and tack solder the layer grid line.
This makes soldering the column lines easier.

If you have a problem OTHER than these, please post them here along with the version and revision of board you are using. This is still an evolving project, so there may be issues that are specific to your specific version/revision of board.

If you have suggestions other than "make it bigger" I'd love to hear those too.