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












note: the last 2 videos are not from my cube, but it works in the same way and gives the same result.

Step 1: Materials

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

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

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

Step 2: Planning

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

Step 3: Make a Grid

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

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

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

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

Step 4: Layer by Layer

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

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

Make sure to test your layers as you go.




Step 5: Make a Mess

Now we need to add the wires for the columns, for this we will need 48 wires (pic 3) that are about 12 cm long, then, with the help of a helping hand to hold them in place (see pic 2), start soldering one wire to each lead from every LED.

Step 6: Inserting the Rest of the Layers

Here comes the tricky part, joining the 4 layers, as we have 48 wires sticking out which have to fit in the correct square of the layer grid. To accomplish this we need to be organized, so first we are going to divide all the wires by sections, look at pic 2 for where your wires should be and at pic 3 for where you're aiming to put them.
then insert the next layer, making sure all wires fit into their correct "Sections".
To properly add the layers, we need a way to space them correclty, luckily, 9 vlot batteries are just the right size, so get ahold of 4 of them and place them like in pic 4.

Step 7: Repeat for the Rest of the Layers

just place the remaining 2 layers as you did for the second one. You should now have a complete LED cube, now we can start with the electronics, but, just to be sure, test all the cube one more time, you know, it's best to find out of a dead LED now and not later.

Step 8: The Control Electronics

To begin with the electronic circuitry, we need all the components shown in pic 1 and 2 PCBs the same size or bigger than your cube.

Step 9: Mark and Cut the PCBs

Mark your PCBs just a little bit bigger than the cube (pics 1 & 2) and cut them, I used a circular saw for this but you can use just about anything, even n X-acto knife (pics 3, 4 &5).

Then proceed to sanding all the edges (pic 6).

And finally paint them black with some matte spray paint (pic 7), remember to ONLY paint the top side black, not the copper!

Step 10: Add the Headers to the Top PCB.

get 3 rows of 16 MALE headers and 1 row of 4 MALE headers, we'll be mounting these on one of our PCBs.

First off we need to modify them a bit, pushing the black plastic piece that holds all the pins together right to the very end of the pins, make sure they don't fall off.

Once you've done that, find a proper place to put them in the top board, the exact place is not critical, but try to place them near the edges and make sure they won't obstruct any hole needed by the cube (see next step for more on this) and then push them all the way in and solder ALL the pins from the other side, the 4 pin header will be positioned right at the edge of the board, but don't do that just yet, as we are going to place it in any free space we find left (more on this later).

Step 11: Start Mounting the Cube.

We now need to start mounting the LED cube on the top PCB, I'm using 2 PCBs to keep all the electronics hidden while still having access to them, the boards will be plugged together like an Arduino shield.

To mount the cube we need to make 48 wires fit in their proper holes, to make this easier we are going to trim the leads of the cube as in pic 1 (in an angle) I used some heavy duty stainless steel scissors for this but you can use your typical wire snippers if you don't have access to stronger tools.

start inserting the leads of the cube to the top PCB, the longer leads first, once you have all the leads from the first row in, bend them a bit to prevent them from going back out, then proceed to the next row, I used a pair of modified doctor's thongs (hemostats) (the long, thin ones) to aid me in getting all the leads to the right place, once you finish a row, bend the leads a bit and proceed to the next one, DO NOT SOLDER ANYTHING YET!

Step 12: Finish Mounting the Cube

once you have all your leads in, proceed to soldering the four corner leads to hold the cube in place, BEFORE you do this push the PCB as far in as it will go without damaging anything and make sure all corners are at the same height (pic 1).

Once you have soldered the four corners, check again the height of the corners and, if it's all the same, proceed to soldering all the remaining leads (pic 2).

When you finish soldering all the leads, trim all the excess (pic 3).

Step 13: Connecting the Columns

Now we need to connect all the columns to the nearest pin in one of the 3 MALE headers, it doesn't matter what do you connect where, you can help yourself by dividing the PCB in sectors with a marker, leaving 16 leads for each sector and corresponding header. to connect them all together I used a solder tracing technique (pic 1), I love it as it saves tons of wiring and it is fast, easy and reliable, but it requires a bit of practice, so I would recommend you to do some test traces in one of the pieces of scrap PCB we have left from the cut. also, a PCB with square pads works better with this technique.

Step 14: The Second PCB

Place the 3 FEMALE 16 pin headers on the male ones and then place the second PCB on top of that (pic 1), make sure you align them correctly and proceed to soldering all the pins in place (pic 2).

Step 15: Begin Placing Components

the first thing we need to place in are the 3 TLC5940 PWM ICs, we are going to place one aside each header (pic 2), centered and with the outputs facing the header. (see pic 3 for Pinout of the TLC5940).

After you have placed them, flip the board and solder all the outputs to the headers (pic 4).

Don't worry about the connections just now, we will first place everything and then connect what we can via Solder traces and connet what's left via small wires.

Step 16: Arduinize It.

Now we are going to add the Atmega328 chip, the brains of our cube.

Place it somewhere near the center of the board, use a socket for this one as it is possible that you may need to replace it.

In this step, we'll also add the 3  3-pin headers and 2 resistors for each, the 4k7 ones and the 8k2 ones, place those near the center of each TLC5940 leaving a 1 pin thick gap between the two (pic 1).

Step 17: Adding the Oscilator

Add the crystal oscillator and caps for the Arduino Chip, see pic 2 for the pinout and where you should connect the crystal (the 2 pins that say crystal), then each pin of the crystal goes through a cap to ground.

Step 18: The MOSFETs

find a nice, free space to place your MOSFETs, remember that it needs to be enough to fit them all bent down plus the 4 pin FEMALE header.

If you decided to add some EEPROMs to the cube, now is a good time to add those sockets too, find a small free space and place them there.

Step 19: The Programming Header

VERY IMPORTANT! don't forget to add a six pin right angle male header somewhere near the edge of the board, this will enable us to program our chip with an Arduino or USB to serial adapter and not have to remove the chip every time.

Also, add now the DIP switch, in the same side of the board on where you placed the programming header, in the picture it is tanding up, but I later changed it to a flat position because it is way too high.

Step 20: Connecting the ICs

begin connecting everything together, solder all the TLCs as shown on the picture, joining the 2 pins that go to ground together and the two that go to Vcc, also solder the jumper selector and resistors as shown in pic 1.

From now on, downloading a high resolution version of the schematic will help you a lot, I would print it if I were you.

Step 21: Pull Up's

add some pull up resistos to your MOSFETs, this is to default them to the Off state. they go between the first and last pin of each MOSFET.

Step 22: Getting the Atmega328 Ready

From now on we'll be working with the main chip, so print a copy of this Arduino compatible labels and stick one in your chip to make your life easier and prevent all that nasty de-soldering and head slapping.

Link: http://dl.dropbox.com/u/2295566/BLOG/arduino label/ARDUINO BREADBOARD 28 PIN LABELS.pdf 

Step 23: Connect All the TLCs

Connet all the wires that go between the Arduino chip and the TLCs, remember that all but one wire go to all the chips, the only one that doesn't connect to all of them is the serial one, which goes Arduino->(SIN[TLC1]SOUT)->(SIN[TLC2]SOUT)->(SIN[TLC3]SOUT).

See pic 2 for the wiring.

Step 24: Do What You Can

Now connect what you can directly on the bottom PCB, with solder traces and leave space for adding wires where you couldn't solve a path.

What you need to connect;
 
your EEPROMs (if you have any).
3 of the 4 pins on the dip switch.
the 2 1000uF caps from Vcc to Gnd
the 2 100nF caps from Vcc to Gnd
the 6 pin programing header, the leftmost pin goes to Arduino's Reset, 2nd pin to Arduino's RX, 3rd to Arduino's TX 4th to VCC and 6th to Gnd, the 5th pin is left unconnected.
Your MOSFETs, the Rightmost pin goes to VCC and the center pin goes to a pin on the 4 pin FEMALE header.
Gnd and VCC to all ICs, try to get at least Gnd done on the bottom side.

Step 25: Do What You Couldn't

Finish up connecting everything on the top side with thin wire wrap, connect each MOSFETs Leftmost pin to a free arduino pin, connect the EEPROMs and connect all the remaining VCC connections, the PWM ICs and the Arduino chip need little current so you can use thin wire, but the MOSFETs need a lot of current so connect them with a thick wire.

Step 26: Troubleshooting.

test that all places which should be connected to VCC are indeed connected, do the same for the Gnd pins, and check that Vcc is not shorted with Gnd.

Step 27: Connecting the Layers.

At this point, you can now add the 4 pin male header to the top PCB and connect, with a wire, each pin to one of the layers, make sure the header aligns with the one on the bottom.

Step 28: The Code.



Congratulations! you have successfully built an RGB LED CUBE! all that's left it to configure the code so it works properly with your cube, so start by plugging the bottom PCB and the Cube PCB together.

The first thing you need to do is find out which pins are your layers connected to, once you've done that, you need to tell the code which pin goes to which layer.

Download the zip file below containing the 2 sketches you'll need and open the main sketch.

Go to the functions tab (pic 2) and then scroll down to the function called "Void CubeUpdate(int layerNoVal)", in there, scroll down untill you see something like this (pic3);

    PORTC |= _BV(PC1);  //layer 4
    PORTC |= _BV(PC2);  //layer 1
    PORTD |= _BV(PD2);  //layer 3
    PORTD |= _BV(PD4);  //layer 2
   
    Tlc.update();

    PORTC &= ~_BV(PC2);  //layer 1

Change the lines to the Proper ports and port numbers for each layer, see pic1 for the corresponding ports and port numbers for each Arduino pin.

Once you change that, scroll down more and you will find it again, make it look exactly the same as the one you edited above, but instead of layer one pin at the bottom, add the layer 2 pin, repeat this 2 more times for layers 3 & 4.

Finally upload the sketch, your cube should look something like the one on the video, don't worry if it looks all random, we are going to solve this problem on the next step, as long as all the LEDs light up, you are fine.

Step 29: Mapping the LEDs

Now we are going to map the columns to the correct LEDs in the software so it looks like the one on the video from last step.

Upload the Mapping sketch and note down the order in which the LEDs turn on, i would recommend you to make a 4 by 4 table to note down the number in the series in which each LED is lit up, keep in mind that each LED has 3 colors and that you have to note them down aswel, I used different colored pencils for each color, now label all the columns from A to D and the rows aswel.

Now go to the main sketch and, in the Declarations tab, change each LEDs column to the prober number (see pic 2).


Step 30: Enjoy

Congratulations! you now have a working RGB LED cube to show up to your friends, so sit down for a while and enjoy the show.

NOTE: this is not how it should look like, I'll upload the correct video as soon as youtube lets me.

Step 31: (Optional) Make a Nice Base

I machined a nice wooden base for my cube on a friend's CNC, it looks great!





Step 32: Future Updates.

This project is not complete, I still need to;
  • Finish an applet to make it easy for you to make your own animations.
  • Make a set of custom animations in case you don't wanna bother on creating your own.
  • add a Serial mode to be able to control it from a custom app on a computer
  • Make it sound responsive with an MSGEQ7 (the chip didn't arrive on time, I will do it as soon as I get it).

This cube is amazing by itself, but, with the proper code, the possibilities are endless so I encourage you to try and Make your own code, to customize it and make it do whatever you want, this cube makes for a great development platform to learn more advanced coding skills.
I tested it with GreatScottLab's code need few changes but it give a good start to your own animation. I wonder if anyone has managed to implement MSGEQ7 code?
<p>Would you like to share your modified code, so we can make animations together?</p><p>Greets from Germay</p><p>Mike<br></p>
<p>Hey, Mike<br>First of all I have made a little hardware modification taken from GreatScottLab's cube.<br>What I did with Emilliano's cube is to re-group RGB channels separately.<br>Every color is connected with a corresponding TCL.<br>As a result of which a &quot;frankenstein&quot; cube came up :)))<br>But both sketches run successfully with a little changes on Emilliano's one.<br>You can see changes in code from attached files.<br>I'm novice in Arduino programm language and for now I just mixed up code from different sources :)<br>Sorry for my english (a little Google translate).<br>Best regards<br>Milen</p><p>1. </p><p><a href="https://drive.google.com/open?id=0B9ugGjFQzs5ca1lpdkl2VW1GcGs" rel="nofollow">https://drive.google.com/open?id=0B9ugGjFQzs5ca1lp...</a></p><p>2. </p><p><a href="https://drive.google.com/open?id=0B9ugGjFQzs5cMWhWbWNPLVBYbFk" rel="nofollow">https://drive.google.com/open?id=0B9ugGjFQzs5cMWhW...</a></p>
<p>Here are my Code for foldingWalls:</p><p>function:<br><a href="http://pastebin.com/1E8tWHr7" rel="nofollow">http://pastebin.com/1E8tWHr7<br></a></p><p>To Use:</p><p>// FoldingWalls<br>int wiederh = 5; // Speed 5 = slow, 0 = fast<br>if(count==20){ // Number of animation<br> for (int s = 0; s&lt;3; s++) // Number of repeats<br> {<br> for (int a = 0; a&lt;=36;a++) { // Scenes<br> for (int w = 0; w&lt;wiederh; w++) { // Speed<br> reset();<br> FoldingWalls(4000, a); // hue of animation<br> for(int i=1;i&lt;5;i++) {<br> while(micros() &lt; oldMicros) { }<br> oldMicros=micros()+LayerDuration; <br> CubeUpdate(i); }<br> }<br> if (a&lt;36) count--; }} //increment conut only after complete animation<br>}</p>
can i use an arduino uno is this one?
<p>yes, you can.</p>
<p>Work very well, but has anyone programed animations and would share these to get insight of the code?!</p>
<p>should be easiest using an ArduinoOneR3</p>
It seems better to build a arduino tight into the cube so that when you want to use your arduino moard you can use it and still have one operating your LED cube.
Hi there! :) Could someone please explain me the code.Also I'll be very thankful, if someone could email the whole code . It's very important because i'm building a 5x5x5 rgb led cube for my project in college. Please reply as soon as possible. <br>Thanks in advance ! :) <br><br>
<p>hey jimmy, I've spent sometime working on this cube and can tell you a bit about the code. First off, the code is actually posted in a zip file within the instructions but you will also need to download the TLC5940 header which can be found here: <a href="https://code.google.com/p/tlc5940arduino/" rel="nofollow">https://code.google.com/p/tlc5940arduino/</a> . you'll have to place the file within your libraries folder in arduino. Once you have this all you have to do is redefine some of the pins on both the arduino and the TLC's. It's a similiar process described within the instructions. Honestly, once you get a good grasp of what your doing you can rewrite some of the code and take out a lot of it to make things simpler. Another important thing to do within the TLC header is to change the number of TLC's in your circuit. this function can be found within a file called something like &quot;config.tlc&quot;. I hope this helps you out a bit, feel free to contact me if I didn't answer something. </p>
<p>Please, cammace, send me a working code for this cube. The TLC5940 header was installed properly but the program reports a compile-time error: </p><p>\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:65:41: error: 'gsArray' was not declared in this scope</p><p> void tlc_setGSfromProgmem(prog_uint8_t *gsArray)<br>Thank you.</p>
<p>i went to the link but i don't know what to go to get the code. can you help me , i just got done with the cude.</p>
<p>Hi cammace, I am building the led cube but I can't find the zip file within the instructions, could you be able to email me the code? I would be very thankful.</p>
<p>Hello cammace, i've been looking for the zip file within the instructions but I can't find the code, could you be able to email me the zip? I would be very thankful :)</p>
<p>Hi guys! I have any questions.</p><p> Which external EEPROM should I use in this project?</p><p>Here he does not say. it is essential to put it, or I can do without it?</p><p>If in case the EEPROM, then I have to add something to the program code?</p><p>Please help ^^</p><div><div><div><div></div></div></div><br></div>
<p>I didnt use one dude, just ignore it haha</p>
<p>Hi. I have a little problem here. If I try to download LED Cube Sketches I will get .rar file. But I can not unpack files from it. It gives an error after unpacking. Files are unavaileable. Is there any chance to get sketches?</p><p>Second problem is with tlc library. I get lots of errors while uploading main cube scetch to arduino. Something like:</p><p>In file included from C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_animations.h:30:0,</p><p> from Declarations.ino:1:</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:27: error: variable or field 'tlc_setGSfromProgmem' declared void</p><p> void tlc_setGSfromProgmem(prog_uint8_t *gsArray);</p><p> ^</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:27: error: 'prog_uint8_t' was not declared in this scope</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:41: error: 'gsArray' was not declared in this scope</p><p> void tlc_setGSfromProgmem(prog_uint8_t *gsArray);</p><p> ^</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:68:27: error: variable or field 'tlc_setGSfromProgmem' declared void</p><p> void tlc_setGSfromProgmem(prog_uint8_t *gsArray)</p><p> ^</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:68:27: error: 'prog_uint8_t' was not declared in this scope</p><p>C:\Users\Marius\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:68:41: error: 'gsArray' was not declared in this scope</p><p> void tlc_setGSfromProgmem(prog_uint8_t *gsArray)</p><p> ^</p><p>Error compiling.</p><p>Do I have to edit TLC library to get my cube work with 3 TLCs? And if its so, then How?</p><p>Im working on this project for 2 years and still no progress. I have built 3 RGB led cubes and control units for them and even trying to make it work on breadboard. </p><p>I really need some help. </p><p>Waiting for any response.</p>
<p>I made it! I used a PCB instead of the perf board, and I also decided to just keep the chip in there because I do not plan on re-programming it. I made one for myself, and one for my teacher who wanted one as an example. (I bet you can guess which one I kept) This was a fun project!</p>
<p>What code did you use? and did you add a MSEGQ7? if so can you share your code?</p>
<p>I did not use a MSEGQ7 (since I don't plan on adding new programming) I decided I was just going use the code given, just make sure to look in the library settings and change the number of Multiplexers or the program won't work.</p>
<p>I'm new to electronics, but I love them and will defeinitely create this one. Got couple of questions though. Are these mosfets OK to use? <a href="http://www.ebay.com/itm/5PCS-MOSFET-Transistor-IR-IRF-TO-220-IRF9540N-F9540N-IRF9540NPBF-New-/201270060280?hash=item2edca164f8" rel="nofollow">http://www.ebay.com/itm/5PCS-MOSFET-Transistor-IR-...</a></p><p>Also about capacitors - 0.1uf and 22pf capacitors on ebay are 50v. Are they the ones to use?</p><p>Please check this collection http://www.ebay.com/cln/stancheg/rgb-led-cube/234958035011?</p>
<p>This is a very nice and a good project, but I am wondering why didn't you use PCB instead of soldering the whole circuit? It could save a lot of effort and solder.</p>
<p>Because everyone makes their cub a bit different. It's hard to know were the the 50 legs will slide through the board.. </p>
<p>if i don't want music.</p><p>when how can i do it,</p><p>and what I need to prepare material.</p>
<p>hey. when i connect the power my cube do noting...</p><p>when i try to connect the cathode from one led its blinds. so maybe any problem it the TLC?!</p><p>i check the connections and its seems to be fine...</p>
<p>guys.. where do we connect the common anode connections taken from each layer to? i mean to the arduino?</p>
<p>to the drain of the mosfets, while the cathodes goes to output of the TLCs</p>
<p>Hello to those out there that built this cube and only got some of the layers to light,</p><p>My build of the 4x4x4 cube only got 3 layers to light up. After checking all the connections, i then started to look at the code. I started playing around with the pin number that are set for the PinMode command. Here is the code that i was looking at. It is in the RGB_4x4x4_LED_Cube_main_1 at the beginning:</p><p>#define LayerOne 16</p><p>#define LayerTwo 4</p><p>#define LayerThree 2</p><p>#define LayerFour 15</p><p>So, i changed the number for LayerFour from 15 to 17, and presto magic, all 4 layers are lighting up.</p>
<p>Hi bill3780,</p><p>How did you figure <br>out the value of 17 instead of 15? I have similar issue with my cube. I <br>run the main code and my 4th layer isn't lighting up or only very <br>faintly. If I run the mapping code, then it lights up very well... I <br>tried with 17 instead of 15 but then another layer stopped lighting... so <br> it must be related to this but I am not sure... I take that 2 and 4 are the <br>digital pins 2 (PD2) and 4 (PD4) on the ATMega chip and they actually match the layers associated with <br> them... but I used A1 (PC1) and A2 (PC2) for the other layers on a ProMini and I am not sure how they relate to 14 and 15 (or 17).</p><p>Thank you</p>
<p>Would this work with an Arduino MEGA 2560? Please relpy</p>
<p>Here is an updated schematic. with the MSEGQ7 chip added in, and a rest circut for those with out an auto rest programer. </p><p>I'm not sure how to code the MSEGQ7 in to this cube, so any help would be great! </p>
<p>I plan on building this myself. I'll probably start writing the code while I'm waiting for the parts. I have used the MSEGQ7 chip in many projects so I'll be happy to share what I come up with. One question: where did you source the uninsulated wire that supports the structure? Also, what LEDs did you use?</p>
<p>Also, GreatscottLabs built one very similar. http://bit.ly/1vUOasm . His code also works with basic changes. BUT i like This code better. </p>
<p>That would be great! I used 18 gauge Bus wire. but it was a PAIN to fit through bread board, had to dremmel an angle on each wire. I will use 20 or 22 gauge next time i built it, BUT the 18 Gauge makes it super strong. </p><p>I used CLEAR common ANODE LED's, from ebay... <a href="http://bit.ly/1vUMX4h" rel="nofollow">http://bit.ly/1vUMX4h</a></p><p>Hope to see your code soon. I had to make a few changes to his code to make it work with the way its wired up, all of which i found in these comments. I can send you what i have if needed. </p>
<p>Have my Cube built and Atmega programed. It turns on with the Main code and starts to run, But the LED's are Dim and each color flickers as it's fading in and out. as if it's to low on power. After a minute the top layer goes on solid and the rest turns off (like the chip locked up)</p><p>I am using a 5v 2A power suply, have tried two of them. </p><p>Any suggestions? I have looked for shorts, and test connections</p><p>Thank you...</p>
<p>So I have determined the flickering is part of the PWM used for fading by the 5940's. i wonder if there is a way to turn that up so it's not so noticeable. </p><p>Also the cube seams to work fine via USB power from my PC.. so it's just my larger power supplies that cause issue!</p><p><a href="http://youtu.be/zscuqmPN3rM" rel="nofollow">http://youtu.be/zscuqmPN3rM</a></p>
<p>I made a full schematic of the &quot;Basic cube&quot; So you don't have to go back and forth. I</p>
<p>Thanx dude :) Thats what I&acute;ve been waiting for a long time :D </p>
<p>Can someone send me the file that is working on a cube. my cube is built but i cant find a code that works with out any errors? The one in this instructable is having a lot of errors and anything with the TLC5940 name is a error or &quot;not decleared in this scope&quot; . CAN SOMEONE PLEASE SEND ME A WORKING CODE. I NEED HELP</p>
<p>If you didnt solve it by yourself: The code is working, you just dont have the tlc5940.h in your Arduino library folder. Download it here: https://code.google.com/p/tlc5940arduino/</p>
<p>Hi , I build your cube on a breadboard (the electronics, not the cube ...). If you connect the red leads to the first tlc, the green to the second and the blue to the third, with ,starting from left to right on the first row of led's, right to left on the second row, left to right on the third row and finally right to left on the last row, then you can map your leds from 0 to 47...hope this make sense...</p>
<p>How are the mosfets suposed to be wired? I have the layer pin to the leftmost pin center pin goes to actual layer and third pin with 2k resistor to 5v</p>
<p>The leftmost pin comes from the ATMEGA328P chip, The center pin goes to the layer and the left pin you have described correctly.</p>
<p>correction</p><p>and the rightmost (3rd) pin you have described correctly.</p>
<p>I can't seem to be able to have different layers on at the same time.</p><p>Any advice?</p>
<p>Which program are you running? RGB_4x4x4_LED_Cube_main_1 is the program that will light up all layers. If you are running RGB_4x4x4_LED_Cube_map_1 then only 1 layer will light up. This is the program that you use to find out the sequence of the LED lights, so that you can reprogram RGB_4x4x4_LED_Cube_main_1.</p>
<p>Hello! I need some help, i've been looking for the zip file which contains the code but I can't find it anywhere, could anyone email me the code? i'll be very thankful.</p>

About This Instructable

317,525views

347favorites

License:

Bio: Interested in all kind of projects, mainly electronics but other stuff too! I try t publish everything I make, eventhough this is not always possible ... More »
More by Emiliano Valencia:CNC Wall Mounted Desk DIY Modular Guitar Amp! TinyDice: Professional PCBs at home 
Add instructable to: