See step 17 for more info regarding the music input mode for non-RAMP boards.
There are now 7 music modes in the posted code, and I am looking for more ideas for animations or music triggered effects !
SKIP DIRECTLY TO STEP 1 if you just want to get to the improved build instructions
I want to acknowledge that so many here contributed ideas and support, and although there are too many to name now, I did want to acknowledge my gratitude for all that contributed to the project.
I am so happy that the printed circuit boards I developed helped those that wanted or needed them, whether they had put in months of work, and just couldn't get the circuit working,just wanted to eliminate all those wires, wanted a PC Board but didn't know how to design them, designed a circuit board and then realized how expensive they can be to have fabricated, didn't know how to read schematics, were up against a school project deadline, or just loved the added features like the music input and remote control - I am happy that so many were able to benefit from them.
I myself was so taken with the original project, that if I didn't have the knowledge or skill or resources to design a PCB, or wire up the circuit myself,I would have gladly bought a board if they were available.
Unfortunately, none were in the original instructable by CHR when I had first seen it. If you couldn't hand build it, you were on your own, and I felt very sorry for those that tried and failed, or didn't even know where to start.
PLEASE DON'T ASK FOR EAGLE FILES for the PCBoards. It wasn't designed in Eagle, so there aren't any.
Now...on to the instructable.
I was immediately enthralled with the LED Cube instructable by CHR .
I am going to give a piece of advice I saw there that made a lot of sense. READ EVERYTHING including all the comments.
Often there is information and answers to questions that may answer a question you might have.
I thought "I COULD MAKE THAT" (and I did, making little improvements along the way) - but I took it a step further, and decided that I would try to make it so that almost anybody could make it as long as they could solder and could tell the difference between the different parts.
That is the reason I created the PCBoards to control the cube, and eventually even a Cube Base Board which all but eliminates the point-to-point wiring from the project. I loved the project but hated all the messy wires everywhere.
I have also supplied demo code (both the original code and many of my modifications), and clickable AVR initializer and code uploader utilities to get the code onto the board quickly and easily for those that aren't comfortable with dos-prompt based utilities like AVRDude.
There is also a pinout / connection chart that you can use to design and troubleshoot your own board using the Arduino, ATmega328P, or the more capable ATmega32 microcontroller for extended functions.
The hardest part is building a cube that is straight and square. I will be addressing this first.
If you use my construction methods, your cube should be as straight and square as in photos above.
I have a good electronics background, so I immediately wanted to build one of these cubes the second I saw it.
The more I got into it and read the comments on his well documented instructable, the more I thought I might be able to help people with less of an electronics background understand exactly how this thing actually works, and troubleshoot problems.
People were asking all kinds of questions long after people that really knew the circuit stopped answering them, and I found myself answering questions in his instructable on a fairly regular basis.
Finally, I knew enough to make what I hoped would be an easier to understand instructable.
Not only that, I have made a few improvements along the way as well, and eventually even PC Boards for myself, and got extras for those that might also want them
As I start out, I realize I will be "winging it" a lot here, so forgive me if I am unclear at any point, and feel free to ask questions.
If you see ANODE written where you know it should be CATHODE - or vice-versa - let me know. Sometimes I get tired when writing and get electronic dyslexia, and mix them up. I have tried my best to proof read my instructions to make sure this hasn't happened.
Try to keep in mind during construction that there is one cathode connection per layer, and 64 anode connections.
I will ask however that if you are getting ready to build one of these, Especially if you want to build your own circuit, that you go through CHRs well documented instructable FIRST, and then read through this one.
Try to build his controller circuit if you can, and feel free to contact me if you run into trouble (which almost everyone does).
THIS can be a VERY daunting task. Many people find they can build the physical cube, and are able to solder connections easily enough, but when it comes to constructing the actual circuit, that's where it all usually falls apart.
Troubleshooting a point-to-point hand wired circuit is not easy, even if you know what you're doing.
FEAR NOT ! As this instructable progresses, I will be working on a number of circuit boards that will include features requested by people here, and at varying levels of soldering expertise all the way from simple through hole soldering to completely surface mount technology boards.
You will be able to purchase these boards when they are available, and prices drop as more requests for boards come in due to volume discounts. Just don't expect them to be five bucks - I won't be mass producing them which makes my cost a lot higher.
Watch for board revisions if you have made a recommendation or request for a board feature that I liked
Music triggered modes for those with my circuit boards... (I'll be working on more as suggestions come in) - LATEST CODE IS NOW posted on STEP 10
Sorry about the video quality on this one, but I was in a hurry to get these posted and didn't take the time to adjust the camera well.
Just hit the MUSIC button on your board (Black Edition V3.5 and higher, ARMS series or RAMP series) or wireless remote (ARMS and RAMP series boards only) to cycle through the music modes.
Previous 5 mode code is on STEP 12 so you guys with the new boards can play with it! I will be adding to it though!
The code works with both wired input as described in step 17 ,built onto the board (RAMP boards only), or using the Mic Module in the parts list (3.5A and above, ARMS or RAMP boards)
If you are thinking "Big deal, I have seen cubes react to music in other videos" - well, we are doing it WITHOUT a PC hooked up to the serial port! That's right, the ATmega32 is doing this on it's own. What is more, with the Mic module option, this means you could take your cube to a party and set it somewhere (that nobody can touch it) and let it react to the music without even hooking anything up to it.
This instructable has mutated over the past few months, and you'll see a bunch of end results before we get into how to make the cube, and the improvements that have been made over the original construction techniques and original circuit, as well as improvements made on the PC Boards over time.
A couple quick videos of my cube in action are above.
The first video is the cube as a standalone device, and the "Cube Perry" video is under PC control via the TTL Serial port and a script written in Processing.
The serial port is key to allowing it to be controlled by things like a PIC, another Arduino or PCDuino or PC computer .
Stand-Alone Music Input! The video below demonstrates this addition to the circuit,
The schematic is on step 17 for connecting an audio source to previous board versions.
By the way - come back here every few days to check up on this instructable. I tend to add to it without notice!
This includes additions and revisions to the code.
If you have tried to make your own controller - or just know you couldn't build one from scratch, but COULD solder a PC board, then ask me about what boards are available.
Send me a private message for details.
NOTE: If you downloaded the 5 mode music hex file before Jan 12, you need to download the latest code.
The music modes originally used up a little too much RAM in the AVR, and when the Fireworks effect would try to initiate, the cube would reset. This has been fixed by reducing the firework sparkles from 60 to 40. The new 5 music mode HEX file does not have this problem now when running in animation mode. Fortunately I first ran into this issue with the Arduino when porting over the same routine. Since the fonts go into RAM rather than EEPROM on the ATmega328p, there was a lot less RAM to utilize, and this is why there are only 30 sparkles in the fireworks routine that was ported to the Arduino portable code.
The ARMS and RAMP series boards have an area marked off where the wireless remote module goes. If you are NOT going to use the wireless remote module, none of the parts in that area need to be put on the board, and you don't need to purchase the remote module. Likewise, if you don't want acoustic music response, you don't need to purchase the Mic module.
And now on to our regularly scheduled program (How To Make The LED Cube)
Step 1: There's got to be a better way...OR "Building the perfect cube".
I thought "If the LED leads were on the edge of the LED, it would be a snap to line them up.
So it hit me...MOVE the anode to the outside of the LED. If the anode coming from the LED above was on the outside edge, the LED below could sit directly under the LED above it. And if the legs were on the outer perimeter, they would line up easily to be soldered. Not only that, it takes care of measuring because if you solder the leads at the point where they meet, it would always be the exact same distance every time!
So I started bending the leads in this manner, but I was soon suffering from finger fatigue, and it was hard to make the bends precise. Once again, I was thinking there had to be a better way. I tried to think of how a machine programmed to do this automatically would work, and how I could emulate that machine manually. After much thought, I had an idea.
So I made a small jig out of an old X-Box heat sink, but you could use almost anything you can drill a precise hole into that won't easily wear.
Drill a hole the exact size of the LED you are using. If the hole does wear or is a bit big, stick some tape over half the hole, and shove in an LED, and then stick the tape down good. The LED will bring the tape inside the hole and make it a tighter fit. Once the tape is nice and secure, remove the LED. You want the fit to be snug, but not so tight that it's hard to remove the LED.
Mine would be snug enough that I added an aluminum "eject" lever as well to help pop the LEDs out of the jig.
I tried to loosen the hole up a bit, but then had to add tape because I widened it too much! LOL.
Wnem I moved up to the "hat top" LEDs, sticking in the hole no longer seemed to be an issue.
Step 2: The Better Way...put away the tape measure.
BEFORE YOU START - make sure the leads (legs) on your LEDs are 27 and 28mm or 28 and 29mm in length. If they are shorter, your cube will be too small to use on the base boards you can get from me. The sellers in the list of links to cheap parts guarantee that you get the long lead LEDs
Also, if you simply build the cube smaller and make your own base, if the leads are the 17mm ones, you may find that you cannot see the LEDs in the back well, and animations that go all the way through the cube won't look right because too many LEDs are in the way of the ones behind them.
If your LEDs are too short, see if the supplier will exchange them, but it's best to check before paying for them first.
So the trick here is to take the Anode, which sits underneath the LED, and bend the anode out so it is at the outer edge of the LED.
This means that the Anodes will all line up perfectly underneath each other when you go to solder them.
I won't lie to you, this goes against what manufacturers and others will tell you about bending the leads on an LED because of the risk of damaging the LED in the process - however I have never damaged more than I can count on one hand building a cube this way.
The LED goes in the hole you drilled in your bending jig with the anode away, cathode close (anode opposite side from you, cathode closest to you) when you insert it in the hole.
Once the LED is firmly in place, bend the cathode directly to the right til it's horizontal.
bend the anode straight forward (away from you) til it's also laying flat.
use snub nosed pliers and slide them down the anode til they JUST hit the outer edge of the LED (the LED's rim should be sticking above the aluminum block if the hole is fitted correctly, and you want the pliers to STOP at the rim of the LED).
Grip the anode, and bend straight back up, making sure the part against the LED stays against the LED by applying downward pressure as you make the bend - meaning the anode should now be in an "L" shape, with the lower part of the "L" going from the edge of the LED to it's origin under the LED.
The LED is now ready to be soldered into it's layer - but for now, put it in a pile/box/bag with the rest of your pre-bent LEDs.
Don't forget that down one side (the right side) of the layer, you will want the cathode bent from the edge of the LED into a laying down "L" shape with the long top of the "L" pointed towards you (t'll be an upside-down L, or a "7" if you will) so that the row it is in can connect to the row below it.
These will interconnect the rows in the layer down one side of the layer, and the last LED will have it's lead sticking out the end of the layer (unmodified from the way it was originally bent). This will be a convenient place later to connect the layer select line from that layer's transistor.
NOTE: these leads when bent may not meet the ones they need to connect to. If you need to, add some wire or cut-off resistor leads or something to bridge the gap when you go to solder them. Making a solder bridge is not a good idea as you may overheat the LED and cause it to fail. Also solder bridges can be weak, and break later.
In the magnified view, you can see how the anodes line up perfectly when soldered together in a column.
You solder them where they MEET when joining one completed layer to another - DO NOT overlap them at all. This way you don't have to measure anything because they will always meet at the length of the anode from the outer rim of the LED. This means perfect spacing if the LEDs are bent properly.
Step 3: Assembly of the cube - Layers first!
This goes pretty much as CHR's assembly, just with my improvement on how to bend the leads.
PLEASE CLICK ON THE SMALLER PHOTOS so you can read the notes on them. If you don't click the photos, you will miss the attached notes !!
The other thing I did out of laziness, and lack of carpentry skill, was to use cardboard for the rig to solder the layers together.
Since my leads were 28 and 29 mm long...I figured take off a mm for bending, and maybe one more for good measure.
Well, I forgot to take the 1 more for good measure off, and had problems with gaps when soldering! LOL!
The idea would have been (and is), make a grid with 26 mm spacing, and print it out. The cathode leads should meet up when soldering them pretty much perfectly, or with a very small amount of overlap.
If your LED cathodes don't meet up (there is a gap) then make another template and get another piece of cardboard. Print out the template with the grid spacing reduced by 1mm.
If you make solder bridges to cover the gap, you may find the cube breaks easily.
The other option is to use bits of trimmed off resistor leads or something like that to help bridge the gap.
Only do this if the gap is 1mm or less. If the gaps are larger, make a smaller template and start over.
Tape the grid to what will be your cardboard template. I used an old motherboard box.
NOTE: I HAVE NOW INCLUDED A PDF FILE OF THE TEMPLATE GRID FOR YOU TO PRINT OUT
Print 2 copies. You will need 1 for the template itself, and another to make the holes for the cube base.
Poke a pin at each intersection. This is like drilling a pilot hole. I used a large sewing needle.
Then find a Philips screwdriver with a shaft about the diameter of your LEDs.
Poke this through each hole.
The first time you poke LEDs into these holes, they may be very tight when you first insert an LED - don't worry, the rest of the layers will be easier afterwards.
It's better the holes be a bit too small than too big.
CROSS BRACES - you need structural braces on the opposite side that you bent the cathodes down on, and down the middle of each layer.
Since I bought 1000 LEDs and only needed 512, instead of straightening out some form of wire for the mid and left braces, I cut the leads off 7 (new unused) LEDs per layer and used the 14 cut leads as support braces.
Solder these in place before removing the layer from the cardboard template.
TEST THE LEDS BEFORE REMOVING THE LAYER FROM THE CARDBOARD TEMPLATE by connecting negative of your power supply to the cathode grid, and put a 100-330 ohm resistor to your 5V power supply, and touch the other lead of the resistor to each of the 64 anodes to make sure each LED lights. Replace any LEDs that don't work if the problem isn't a solder joint.
Once a layer is completed and soldered, and your braces put in place as well and all the LEDs are tested and working, you can poke the LEDs out of the holes from the bottom side of the cardboard. Do it gently and gradually - individual layers are fragile.
I included a photo of one of these layers compared to a spare layer I made for my original prototype cube.
Put the base board on the cardboard instead of the paper template, and put a needle in two opposite corners to secure it, and poke another needle through each of the holes in the base board through the cardboard to make your "pilot" holes. This will ensure perfect spacing between the pilot holes for your template, and guarantee that the completed cube will fit the base board.
Step 4: Assemble the layers
You do need to of course line up each anode so it meets the top of the anode below it while soldering them together.
I don't like joint stress, so I would bend and adjust each lead til it lined up with the lead below it without having to be held in place, then I would solder them together.
Line each anode so it just touches the anode below it. This eliminates any measuring or need for spacers to get the same distance from LED to LED (layer to layer) every time.
NOTE: I actually connect the layers with the anodes pointed towards me (cube on it's side) so that the leads were at the upper edge of the LEDs, making them easy to see and solder (not to the right like in the photo - I just did that because it photographed better that way). The reason I keep saying "the layer BELOW it" is that you build the cube from the top down. Each layer you solder on, is the next layer down once the cube is upright.
I found that soldering the layers together while it's on it's side, I didn't require any clamps etc. I would just tack the 4 corner anodes in place, then proceed to solder them row by row.
Also included is a photo of box of pre-bent LEDs. I got into a groove and bent up all the LEDs I would need at one time (plus some), and then I would just pull them from the box and put them in the template to make a layer. It took me about 2 and a half hours to bend enough for the whole cube.
I made spares because you do run into the odd bad LED during testing.I find it much easier and faster to test the LEDs once they are bent and soldered in, simply from a time factor point of view.
Testing each LED before soldering it in is pointless, and gives you a false sense that all your LEDs are fine.
Some may fail when you bend the leads, and others may fail from the heat of soldering. You will almost never see an LED fail right out of the box/bag. Bend, solder, THEN test, otherwise you will be testing them before AND after, which is a waste of time, especially when soldering this many LEDs.
IMPORTANT - remember to test each layer while it's still in the template, before soldering the layer it to the others.
I do this by connecting my power supply ground to the layer grid, and connecting a 100 ohm resistor to the positive, and basically sweeping the other resistor lead from anode to anode. This makes for a quick and easy test of all the individual LEDs in the layer.
Once the layer is soldered to the cube (the layer above it), re-test it like we did above, then connect the ground of the power supply to the cathode grid of the TOP layer, and touch each anode in the bottom layer to make sure your column (anode to anode) connections are all good.
If the anodes aren't all connected from the current layer to the top layer, the top layer LED won't light when you strike it's column with the resistor.
IF this happens, then move the ground from layer to layer from the top down until an LED lights. The break will be between that LED and the one above it. IF the LED in the row below the top layer works, but the top one doesn't, and the solder connection is good, then the LED in the top layer (or layer above the one being tested) may be burned out. test it individually, and replace if necessary.
Some LEDs may burn out during soldering, and some column connections may not get soldered properly, or even may have been forgotten or accidentally skipped when soldering all the connections, or the connection may have broken during the assembly process. If an LED doesn't light, test it individually in the cube before replacing it - it may simply have a bad or broken or skipped / forgotten solder joint. Make sure you didn't bridge the LED leads together during soldering if it doesn't light.
After the cube is completely assembled is NOT the time to find out you have a bad solder joint or burned out LED!!!
Step 5: Make Your Own Base and attach the controller connectors
If you aren't going to purchase a base board, here is how to easily make your own cheaply!
Make a PCboard or use perfboard to mount a set of two 40 pin connectors to. This allows you to easily connect and disconnect your cube from the controller.
I hated the mess of one 8 wire cable per layer running to the control board, plus layer select wires.
Again, there had to be a better way.
I figured I needed 64 wires for the anodes, plus at least 8 for the cathodes. I used 2 pins per cathode on the controllers I designed because I was worried about the current - but we now know that's not really an issue. The design still uses 2 pins per cathode though because it makes it an even 80 pins/wires, and 40 pin connectors are plentiful, and it lets you use old CD-ROM cables to connect the cube to the base. This also accommodates for 40 pin connectors that have one missing "key" pin, because the missing pin is one of a set of layer cathode lines.
NOTE: 40 conductor cables are actually getting more and more rare! if you are ordering IDE cables online, make sure they are 40 conductor and not 80 conductor. Both cables will have 40 pin connectors, but the 80 wire cables won't work!
Check the link in the parts link page to see if the supplier still has 40 wire cables.
NOTE: Many 40 pin male connectors will come with 1 missing pin. This pin will be on layer 2 or 6 depending on which connector.
Since the layer pins are doubled though, it won't actually matter, so you can go ahead and use these connectors anyway.
This also applies to cables with one blocked hole where the missing pin would normally be.
If your cable has a blocked hole, either open up the hole with an exacto knife, or clip the pin where the blocked hole goes.
Since they are layer select lines which are doubled, losing one won't affect the function of the cube.
I created a standard that I adhere to when wiring these up so I can use any of my boards with any of my cubes.
This will let me design other boards using this standard, and be able to easily switch from one controller to another.
Again, not being a carpenter, I turned to cardboard and spray paint for the cube base.
I re-printed the same template I printed to make the holes for the LED layer soldering template.
I poked holes just as I did for the "pilot" holes into the base with a large pin. I widened them a bit with a much smaller screwdriver than before (not nearly as large as the one I used for the LED soldering template, but large enough that I don't have to be a machine to get the leads into them). Then poked one more hole for the cathode wires to go through, which I simply ran up one corner of the cube.
Remove the template after all the holes are poked into the spray painted cardboard.
Getting 64 leads to line up in the holes was the next challenge - I made a "gaff" out of mechanics wire, but coat hanger or something like it would have worked as well. I bent an "S" at the end of the wire so that I could hook a lead and pull it, or snare a lead and push it to where it needed to go. It took some patience, but eventually each lead found it's home.
Once EVERY lead was in, I flipped up the cube so it was upside down. Then I would grab each lead from below about half way down the lead with the pliers, and keeping the pliers vertical, pull the lead towards myself until the bottom half of the lead was flat against the cardboard. The lead was now firmly in place and when I hooked it's column wire to the lead, I would bend the top half of the lead against the bottom half, holding the wire firmly until it was soldered.
It's nice to have the cube be detachable and to not have dangling cables everywhere, so each anode and layer select is connected to it's appropriate contact on a connector. My cube uses 2 X 40 pin connectors (like for IDE / PATA hard disks) as shown in the photos and discussed at the top of this step.
Once everything was soldered, a little hot glue held the board with the 40 pin connectors to the outside of the cardboard after it was folded closed.
The cardboard base itself can then be taped or glued shut.
Eventually I thought there had to be an even better way than this, so eventually I invented Step 14 which is the printed circuit cube base boards. The connectors are aligned perfectly with the controllers so you can cable them to each other or directly connect them together by making one set of connectors male, and the other set female - whichever works best for you.
Step 6: What goes where...MAKING YOUR OWN CONTROLLER? YOU NEED THIS CHART!!!
I created this Excel chart which will tell you which pins hook up to where when constructing the controller circuit for either microcontroller.
I have found this chart indispensable when designing my own circuits for this project.
I actually used this rather than a schematic once I had the chart made up.
NOTE: I don't really discuss the "SUPERTECH HEADER" that is in the Excel chart because during the course of making this instructable, I moved all the components to one board, eliminating the header between the AVR and driver boards completely. I made the chart when everything but the AVR was one board, and each type of AVR had it's own board that connected via a 26 pin header.
If things have gone wrong during the construction of your circuit, it gives you an easy reference to do continuity checks with from pin to pin of your components.
If you want to make your own circuit board or hand wire the circuit, you really should make a copy of this!
I am also including the schematics from CHR's original instructable.
My PC Boards pretty much adhere to this schematic, with the header and power supply circuits eliminated.
Also, I am including my cube wiring standard for dual 40 pin headers.
I find 2 cables so much neater than 9 or more.
If you want to use one of my boards and are building your own cube, this is the way to wire it to your connectors.
Because the Arduino (ATmega328) only has the 20 I/O lines we need to drive the cube, some pins serve dual function, because they are not only a cube output, but are also things like TTL Serial lines, or ICSP connector lines. For this reason, you may see some pins listed more than once or a single pin listed with more than one function.
Step 7: Troubleshooting in breif
I'll be using the USBTiny as the example in these troubleshooting tips, because that's what I have.
NOTE: IF YOUR PROGRAMMER CANNOT FIND THE DEVICE ON ONE OF MY MULTI-AVR BOARDS contact me for the workaround. Some versions of the USBTiny have low current outputs and may fail, but the board can be modified to allow even these programmers to work. RAMP series PC boards will have optional "compatibility jumpers" that you can install IF you have this issue.
So far there has only been one reported case, but that was enough for me to change the RAMP series design, just in case it happens to someone else.
If you have a new ATmega32A AVR, and can't figure out why you can't upload to the AVR, you may have forgotten to set the fuse bits. Also, if your cube is running slow, you may also have forgotten to set the fuse bits. You onloy need to do this ONCE to the AVR.
Here are the AVRDude commands to set the fuses on your 32A AVR.
avrdude -c usbtiny -p m32 -U lfuse:w:0b11101111:m
avrdude -c usbtiny -p m32 -U hfuse:w:0b11001001:m
NOTE: substitute your ICSP (for example "usbasp") for "usbtiny" if you have a different programmer
Also my clickable initializer MAY not work under X64 windows. I'll see if there's a fix for that. Some say it doesn't work, others had no issues. Nobody has had a problem under 32 bit Windows so far.
You have uploaded the code to the cube - but where it's supposed to be animating letters, all you get are squares...what gives?
>first make sure the font file is correctly compiling.
>Then make sure you are actually uploading them to the 32A AVR's EEPROM.
>Either execute the following manually:
avrdude -c usbtiny -p m32 -B 1 -U flash:w:main.hex
avrdude -c usbtiny -p m32 -B 1 -U eeprom:w:main.eep
>OR add this to the end of your Makefile
avrdude -c usbtiny -p m32 -B 1 -U flash:w:main.hex
avrdude -c usbtiny -p m32 -B 1 -U eeprom:w:main.eep
>Then you can type
>and it will do it for you. I love being able to just type "make install" and not have to deal with remembering all that syntax.
This is the alternative if the clickable code uploader won't work for you.
>If you like playing with the cube's code, but don't have a C language program (I don't have one either), then use wordpad. If you want to have help with "Did I close enough brackets?" and so on, there's a nice program called "Programmer's notepad".
It can help you keep track of those pesky brackets, and a lot more.;
My AVR keeps resetting in the middle of running patterns:
>find the furthest component from the power input, and put a 100uF capacitor across it's power input.
My AVR doesn't run the script, even though it seemed to upload fine:
Make sure you have a pullup resistor on the Reset line. 5-10K is usually fine. Tie it from the Reset line to the 5V.
This most often happens to people using an Arduino to run the cube.
Some LEDs aren't lighting in some patterns, but I know they work because when the whole cube is lit, they light up...WTF?
This is all now covered in step 16 (which didn't exist during the initial draft of this)
I've set the fuses on my AVR, and now it won't respond:
>Once the fuses are set, it selects the external crystal as the clock.
>Check your external crystal, and the 22pF capacitors on it.
>Try disconnecting the capacitors or replacing them, or replacing the crystal.
>Make sure the crystal is on the right pins, and not shorted together or to ground or other pins beside them etc.
Step 8: ICSP (ISP) USB PROGRAMMER BOARD ISSUES.
The first confusion that hit me was the whole 6 pin VS 10 pin thing.
It turns out they are the same thing - the 10 pin just has extra ground wires to help prevent signal issues at longer cable lengths.
My improvement was to put both headers on one end of the cable.
I also had issues with it disappearing from the OS (Windows doesn't see the programmer). This seems to be a fairly regular thing.
I finally figured out that if I disconnect it from the USB and the AVR (ICSP header on the circuit board), wait about 10 seconds, and reconnect to the USB - wait for it to be recognized and then connect it back up to the AVR, then it's all good.
Just unplugging and reconnecting the ICSP to the USB port rarely corrected this issue if you left the circuit board connected to the ICSP.
If AVRDude isn't working, there's a good chance you just need to reset your programmer unless there is a wiring issue.
Oh ya, my green LED on my USBTiny burned out , so I just soldered a regular one over it in case you were wondering why it looks a bit odd..
6 pin 10 pin WTF it is
1 9 MISO
2 2 +V
3 7 SCK
4 1 MOSI
5 5 RESET
6 3,4,6,8,10 GND
Pin 3 on the 10 pin is sometimes not connected or used as a key pin.
I have had one person who simply could not program the AVR in circuit with his USBTiny no matter what on one of my PC Boards.
The RAMP series boards have Compatibility Jumpers to take care of this issue, and I have a workaround for other boards.
Hand built boards won't have this issue.
If you aren't able to program your AVR in the circuit, contact me, and I can discuss the best way to modify your board to allow the ICSP to work, or we'll figure out what's wrong with your circuit.
Step 9: What do I power it with ?
If this sounds wrong because you calculated the current to be something else, you have forgotten that these LEDs are not being driven by DC current.
They are actually operating at a frequency of about 744Hz or about 1.42 KHz depending on whose code you are running. This is derived from the 16MHz / 128 prescaler / 21 (or 11) "ticks" per interrupt, / 8 layers.
This is good news though. This means we don't need huge transistors (a 2N2222 will handle 800mA) or huge power supplies.
Thus, the answers as to what to power it with are as follows...
Answer #1 - your USB port or portable chargers like my other project here or plug in iPhone/iPad type chargers.
I actually power mine off the USBTiny when I am programming it.
Anything capable of supplying 3-5V at 500mA or more works fine without a regulator.
If you are going to use more than 5V, you need to use the regulator, and if you've got one of my boards, you should use a 7.5V input or less.
I suggest you get one of these iPod/iPad/iPhone chargers pictured above (the blue cube with prongs).
They work great! Either hack a USB cable (cut off one end and attach the 2.1 inch male adapter shown in the parts links) or run it through your programmer via the ICSP connector..
Answer #2 - Batteries.
It will actually run off 2 "Triple A" (AAA) batteries, or 2 penlites (AA), but 3 is better (if using one of my boards, regulator needs to be in bypass mode).
Do not to use 4 AA or AAA batteries (6V) unless it's through a regulator. If you are using one of my boards, enable the on board regulator with the regulator / bypass jumper by putting it in the 5.5-9V or 5.5-7.5V position.
If you are using one of my boards, you CAN use a 6V - 9V, but 6 - 7.5 is best because the regulator heats up quite a bit at 9V source through the DC in jack.
If your board has a connector marked 3-5V wired input pad, never use more than 5V through the 3-5V connector as it's unregulated regardless of the jumper. Also ensure that when using more than 5V through the DC IN jack, that the regulator bypass jumper is not in the 3-5V (bypass) mode!
The above of course only applies to my AIO and Micro boards above V2.6 and earlier black edition boards.
The less voltage you put in, the less current it draws - and the current drops pretty dramatically as LED current draw with respect to voltage is a logarithmic relationship, not linear. You do lose some brightness around 3.3V, but in reality, it's hardly noticeable.
It uses a surprisingly small amount of power until you get up around 5V or more.
So forget what you learned in CHR's instructable regarding power supplies and power usage.
I explain this more in step 13.
Step 10: How do I modify the software? Questions, Answers, and Firmware repository
This is going to be left as an open forum for specific questions since there are too many aspects of the software to cover in a step, hoping I hit on the one you want to know about.
NOTE: If you downloaded the 5 mode music hex file before Jan 12, you need to re-download the latest firmware.
The music modes used up a little too much RAM in the AVR, and when the Fireworks effect would try to initiate, the cube would reset. This has been fixed by reducing the firework sparkles from 60 to 40. The new 5 music mode HEX file does not have this problem now when running in animation mode.
I've put up the main.hex and main.eep (you need to rename that to main.eep because Intructables doesn't allow uploading of the EEP extension) for the ATmega32 that you can upload to your cube controller using AVRDude
If you have a USBTiny AVR Programmer, the syntax to install these on your ATmega32 is:
avrdude -c usbtiny -p m32 -B 1 -U flash:w:main.hex
avrdude -c usbtiny -p m32 -B 1 -U eeprom:w:main.eep
Or you can add these 3 lines into your makefile as the last 3 lines so that at the very end it reads:
avrdude -c usbtiny -p m32 -B 1 -U flash:w:main.hex
avrdude -c usbtiny -p m32 -B 1 -U eeprom:w:main.eep
Then you can just type
from the dos prompt in the directory where the HEX and EEP files are.
and AVRDude will upload the codes to your AVR
(substitute "usbtiny" for your programmer type if you have a different programmer, for instance "usbasp")
I include a clickable code uploader on the Mini-CD that ships with my controller boards for the ATmega32 microcontrollers that works under 32 bit Windows with either the USBTiny or USBasp programmers.
Someone said it doesn't work under 64 bit Windows, but I haven't had a chance to verify this personally.
And there is a cut/paste text copy of the Arduino code - just paste it into the Arduino IDE and save or upload it to your Arduino or AIO cube controller board.
NOTE: These codes all include my POST (Power On Self Test) for diagnosing your cube.
You can bypass the test with a button press on the ATmega32A or by removing the test from the code on the Arduino (ATmega328)
The POST is exactly that too, POWER ON self test - it only runs once at power on or reset. After that, it doesn't bother you anymore.
I find it handy to always have there, as just recently ONE of my LEDs burned out, and I had to replace it.
Without the POST, I probably wouldn't have even noticed it!
The most common thing I hear is "How do I use that serial port?"
Here is a brief explanation of that.
If you are using CHR's code from his instructable, his code is compiled for a microcontroller at 14.7456 MHz, and a serial rate of 38400 baud.
My code available here is compiled for a 16 MHz crystal, and also sets the baud rate at 38400. I used to set it higher, but everyone seems to make their software for the original 38400, so I set it back.
Complete cube frames are sent to the cube via the RS232 (or in the case of my PCBoards, TTL serial).
Each LED is a bit, therefore each row is a byte, each layer is 8 bytes, and as such, the whole cube is 64 bytes.
There are some minor things to know when sending the data to the cube.
Character 255 (decimal...FF hex, or 11111111 binary) is used as an "escape" character, telling the cube that the next character is a command.
For instance, sending the set FF, 00 (255 then 0) tells the cube to reset coordinates to 00. This way if there was a data error or something, the computer and the cube both know they are starting a new frame.
The problem this presents is when sending a byte of "all lights on" which obviously is also 255. So, in escape mode, if the next character is also 255, it uses it as cube data rather than a command.
So, in order to turn on all the lights in the cube, you would have to send it 255 128 times (255 puts it into escape mode, the next 255 it takes as data, the next 255 puts it in escape mode again, and the next 255 it takes as data again, and so on)
So any time you want to send 255 as data, you must send it twice.
At the moment, unless a zero is received immediately after the 255 (FF) then the next character is assumed to be cube data.
Otherwise, it takes each byte as data, and once it has enough data to draw a frame, all the data is transferred to the cube.
Once the cube has received 64 bytes of DATA (non command code data that is) it puts the data into the current display buffer, and it appears on the cube, and stays there until another full frame is received.
How you get the data to the cube is your own decision.
Some use "Processing" (the language) or C language, Python, .
My first attempts at this I did in QBasic.
Anything that can send serial data can be used - even an Arduino, Raspberry Pi, PIC, iPod, anything with a serial port that you can program yourself to send the data to the cube.
Personally I intend to extend the escape sequences so that the PC can execute the patterns and routines stored in the cube.
For instance, FF, 01 might represent shift cube X axis positive, and FF, 02 might represent shift cube X negative, and FF, 05 might be shift cube Z positive.
Other commands might be like FF, 21 could represent smiley_spin - and then the next 3 characters would be the character to spin, the delay, and the iterations.
In this way, you could run the pre-programmed routines with differing variables without having to program the cube itself each time.
This is in the works though, and isn't something I have yet.
The reason for extending the escape character set is I intend to make a slow serial input so that I can send escape sequences to the cube from something like a Commodore VIC-20 or Commodore 64. Why? Because I loved the Commodore VIC 20. It was my introduction to 8 bit microprocessors, which is basically what we are playing with here.
If I ever find a copy of SuperVicMon on the internet (machine code assembler for the VIC-20) I may actually attempt controlling the cube directly from the VIC, and bypassing the AVR altogether. The VIC has enough digital I/O to do it if I hijack the keyboard inputs and reassign them as outputs.
Back when I was making hardware to hook up to the VIC-20, I didn't have the internet. Nobody did really. In fact, anyone with a home computer was in a fairly elite group. People that interfaced them to home-made electronics were rare.
So I'd like to marry the 2 technologies since they actually aren't that far apart from each other.Believe it or not, building this cube was a great little trip down memory lane back to the early 80s. It's interesting how it has all come full circle.
Step 11: A better way - again
My first controller board and driver board were a bit of a mess looks wise, and I wanted to make a board with everything on it, but without it being huge.
So I thought it would be best to make a printed circuit board.
Not only would this help me, but would make the project much more accessible to those less adept at point to point wiring.
With that in mind, I made spares in case someone wanted to buy one.
Some people were making code for the Arduino, others for the ATmega32, and I didn't want to have 2 different AVR boards anymore just to be able to run all the cool animations.
I figured if I am going to make a PC board, I'd make one with a socket for either AVR.
I put ICSP connectors for them right on the board so you wouldn't have to remove them to program them.
The serial connectors, buttons and status/diagnostic LEDs are all on board too.
YES - IF YOU PUT THE ATMEGA328 FROM YOUR ARDUINO ON THE BOARD, YOU CAN UPGRADE THE CODE USING THE ARDUINO IDE. I suggest uploading using your ICSP Programmer (File > Upload using programmer) but if you want to use the serial connector, you can without removing the chip. Just hit the RESET as soon as you see the IDE trying to connect.
Just remember that if you upload code to the AVR with the ICSP, it blows out the bootloader! (fortunately, you can also use my boards to upload the bootloader with the Arduino IDE)
The board uses TTL SERIAL, not RS232. Again, this is an improvement because USB to TTL serial adapters are about 2 bucks on ebay. It eliminates the MAX232 from the design, and since almost no PCs have an RS232 serial port on them anymore, if you have to buy a serial adapter, it may as well be the cheaper more popular ones. All you need is Ground, RXD and TXD wires.
So now, everything is all on one board, regardless of which AVR you want to use. (One board to rule them all! LOL!)
Otherwise, you can program the cube directly on your arduino, and then move the chip to the board.
On the Ver. 2.X and above boards (not pictured), there is a voltage regulator bypass, so you can run them at as low as 2.9V through the power adapter input.
Also the secondary ICSP connector is gone - one ICSP can program either AVR. The serial connectors are still separate.
Then I made a smaller one.
See the end of the instructable for the most recent boards available and demo videos of the latest features on them.
The SMT boards don't allow for the Arduino type ATmega328 AVR
Step 12: Smaller is better too...
This is taking the place of the pictured 3.7D controllers.
They are basically the same size, just way more functions.
As before, there is no Arduino type microcontroller option. It only takes the ATmega32TQFP.
the ARMS Rev.3 is due to arrive the first week of March, and pre-orders are being taken.
Step 13: More Improvements - the 2N2222 !
The basic explanation for that is here.
There are a few explanations for the dramatic current drop, and the low usage in the first place.
Some of them are beyond the understanding of even advanced electronics university grads.
Most are pretty basic though, and I'll try to put them in laymans terms here.
The #1 factor is that current draw by an LED increases exponentially as it approaches it's maximum allowable voltage (pre-breakdown voltage).
This is actually a good thing, because it means we don't have to be real picky about what value we use for current limiting resistors. As the LED draws more current, more voltage drops across the current limiter, and it pretty much balances right around the LED's maximum brightness.
This also means that the current drops exponentially if we reduce the voltage slightly.
The "drivers" can only supply a maximum of 20mA to begin with, at which point it starts to drop voltage.
Of course this isn't a big deal for us because the brightness difference between where the LEDs are drawing 20mA and when they are drawing 40mA is actually negligible.
The other is that the LEDs in the cube aren't on full time.
In fact they aren't even on for 1/8 of a duty cycle.
The cube is only drawn during an "interrupt" which occurs once every so many milliseconds. This is when the processor stops what it's doing, and executes the routine that "draws" the cube.
In this circuit, a layer is "drawn" into the latches while all the latches have their OE lines (output enable) in the OFF state. The routine then enables all the outputs at once, lighting up that layer for a set fraction of time. It then disables the outputs, and draws the next layer into the latches, and then enables the output for the next layer on the next interrupt.
Our POV (Persistence of Vision) allows us to perceive the LEDs as being ON, when in fact they are being pulsed (modulated) very quickly. The end result is that each layer, and by the same token, the entire cube, draws considerably less current than CHR's initial calculations indicate.
I suspect that when he first tried a single 2N2222 per layer, and noticed brightness drops, he may have not had resistors on the transistor bases, and introduced them when he doubled up the transistors -the end result being more of a happy accident that this was fixed by using 2 transistors, rather than the doubling of the transistors actually fixing the issue.
The other possibility is that during his development stages, his routine for drawing the cube may not have been interrupt driven yet or left the layers on for extended periods of time. If a layer were left on, it would be more than a 2N2222 could handle - or 2 of them for that matter - but being a low voltage circuit, we're not too worried about a failure burning down the house. A 1A fuse in the power supply line would cover that, so it might not be a bad idea to fuse the power supply output if the power supply is capable of more than 1A.
Because the current draw of an LED increases rapidly as it approaches it's breakdown voltage, even slight voltage drops on the LEDs dramatically reduces their current draw, so putting any semi-conductor in line with them also decreases the current quite a bit.
You can see my Mini board in that video is using the 2N2222 transistors now rather than the 2SD882 transistors I used initially.
The empty socket is where the ATmega328 (Arduino) microcontroller would be if I was using that instead of the ATmega32A.
Well, that's it for now. If you have any questions, or want me to add some detail to this, please let me know!
If you enjoyed this instructable, please see my others, and check out my contest entries (if any are active), and please VOTE on any I might currently be entered into. Thanks for visiting, and have a great day!
YUP - this is where the instructable USED to end....Told you I tend to add to it without notice!!!!
Step 14: Printed Cube Base
This board serves as a guide to create your LED Cube soldering cardboard template, and as the connection base for the LEDs themselves once the cube is soldered together.
No longer available in green.
This has been replaced with the Black Edition V2.0 base boards currently available.
Step 15: Links to cheap parts
Above are photos of the workaround if you happened to get the wrong size buttons for your V3.5A board.
If you do decide to get one of my boards, your parts list is basically silkscreened to the top of the board. (see photo above of a section of board with parts silkscreened onto it)
PLEASE NOTIFY ME OF DEAD LINKS OR PRODUCTS NO LONGER AVAILABLE
SO I CAN SOURCE OUT ANOTHER LINK TO REPLACE THE DEAD ONES !!!
I get almost everything on ebay. Here are links to the vendors I have used. When possible, multiple parts are from the same vendors, and shipping is free on almost all items.
NOTE: not all parts are used on all boards. The board you have will determine which parts to get.
NOTE2 - being ebay, these links may expire if the vendor runs out or if the listing ends. If you come across a dead link, PRIVATE MESSAGE me, and I will try to find an alternate source.
If I find a great deal on something - I will try to post it here at the top of this page!
This will change often - possibly daily - so keep coming back!
LAST UPDATED JANUARY 19, 2015
NOT ALL PARTS LISTED ARE NEEDED BUT ALL NEEDED PARTS ARE LISTED - CHOOSE ONLY THE PARTS REQUIRED FOR YOUR CIRCUIT OR PC BOARD !
Flat top wide view angle BLUE LEDs 28mm lead length This link has changed as a result of talks with the supplier, and are now guaranteed to be the long lead LEDs.
Flat top wide view angle WHITE LEDs 28mm lead length These are also guaranteed to be long lead, and have tracking. If you want to save on shipping, contact the supplier before payment.
Cubes made with shorter leads will not fit the cube bases!!!
PCB mount mini potentiometer (RAMP board only) The pins are right-angled - just straighten them. These also work for the music input part of the bridge board for the RGB cube
RCA female jack for line input audio (RAMP boards only) Mine finally arrived, and are a perfect fit (if you clip the plastic nibs off the bottom)
4 channel RF remote module (ARMS and RAMP boards only)
7 pin socket for above module
Active Mic Audio Trigger Module (Black Edition Hybrid V3.5A, 3.6X, 3.7A and higher, RAMP Beta V4.0, RAMP V1.0E Rev.3 or higher or ARMS 1.0 Rev.3 or higher boards)
3 pin socket for above module
ATmega328 (Arduino) microcontroller
ATmega32TQFP microcontroller (SMT)
100 to 330 ohm resistors (whatever is cheaper or needed for your LEDs)
100 ohm SMT resistors
1K SMT resistors
5K ohm SMT resistors22pF ceramic capacitors
22pF SMT capacitors
.1 uF electrolytic capacitors
.1uF Ceramic capacitors (100nF)
.1uF SMT capacitors
10 uF electrolytic capacitors
100uF electrolytic capacitors
100uF SMT Tantalum Capacitors
assorted T1 LEDs
assorted SMT LEDs
2SD882 transistor (not used in the 2.X and higher boards - for replacement reference only)
MMBT2222A SOT23 transistor
FZT851 SOT-223 transistor (for 2.7XX Micro SMT boards only)
40 pin header strips (for jumpers)
40 pin shrouded male cable connector
40 pin female header (for cube base "snap on" connection to black edition boards)
40 pin cable with female connectors (if you want to cable the controller)
10 pin shrouded male cable connector
assorted IC sockets (for Atmegas and demultiplexer)
20 pin IC sockets (for the 574's)
micro N/O momentary contact push buttons These buttons WILL fit the 3.7A and higher or ARMS SMT and RAMP hybrid boards.
5V 1117 SMT regulator.
USBTinyAVR programmer with 10 pin cable
USBasp USBISP 3.3V / 5V AVR Download Programmer (CHEAP!!! and also now supported - and 3X faster than USBTiny !)
USB TTL serial adapter
14.7456 MHz crystal (for CHR's code. My code is all compiled for 16 MHz)
16 MHz crystal (conforms to my compiled code for serial communication)
25MHz crystal (for those that just love to overclock everything. You'll need to recompile the code for serial to work)
2.1mm power input connector
2.1mm male power adapter connector w/ screw terminals (great to put on the end of a cut USB cord or battery pack)
5V 2A power adapter (these things work GREAT and are under $3)
5V USB output power adapter (iPod charger capable of 1A. Works great for this circuit)
solder paste (for heat gun soldering)
CD Audio type connector (which I use for the TTL Serial Input connection. You have to pull out 1 pin) and the wired audio in. NOTE: this is just a personal preference because they lock in place. You can just use header pins if you want to. WATCH THE SHIPPING cost on these! (OUCH)
PLEASE NOTE - HARD DISK CABLES that are 80 WIRE (80 conductor, 40 pin) WILL NOT WORK. they don't connect to all the pins. if you go looking for hard disk cables to save money, remember to look for ATA33 cables. ATA66, 100 & 133 cables DO NOT WORK!
Step 16: The Power On Self Test Diagnostic: TROUBLESHOOTING YOUR CUBE
The red plane is plane 8, the plane where column 1 is, is plane 1. The blue layer is layer 8, layer 1 is the bottom layer.
Typically, your controller board would be on the left side facing the left plane.
In my RGB build, I will be referring to the planes as "panels" because the construction is done panel by panel rather than layer by layer.The power on self test diagnostic I wrote is to help you diagnose possible problems with your cube.
IT IS ON THE BONUS CD that came with your board as part of the demo code, and is also in the code posted here in the instructable.
The POST should light up each column on its own, one by one until it gets to column 64.
The POST will then light each LED filling the cube, starting with the bottom LED of column 1, then 2, and so on filling layer 1.
It fills each layer in order from bottom to top until the cube is full.
In the ATmega32, the POST can be terminated by a button press (except reset).
If everything is working, you can press a button to run the animations, or the POST will eventually time out and the animations will start on their own. The POST will not repeat once it's running patterns or serial input or music response modes.
Pressing a mode button will put the cube into that mode, terminating the POST immediately.
If after pressing a mode button, the mode LEDs start alternating, press the mode you want once again.
The DIAG light will flash during the POST.
With the ATmega328P, you cannot terminate the POST, and animations begin immediately after the cube is full.
Here is one of the most odd cases you may run into:
*** The test starts, but neither columns 2 or 3 (for example, but always adjoining columns) light up during the column test.
When the cube starts filling, columns 2 and 3 seem to work perfectly
This is a short between the column 2 and column 3 outputs.
What happens is when it tries to light column 2, column 3 is off. Being shorted to column 2, it holds column 2 low.
When it moves to column 3, column 2 holds column 3 low.
when the cube fills, since the LED in column 2, and the one beside it in column 3 are both on, nothing holds either one low, and they both light up.
The short can be at the cube itself, the connectors on either the cube or the board, or between the current limiting resistors, or the pins of the 74HC574 itself for that plane (in this example, plane 1)
Remember, each plane has it's own 74HC574 controlling it, which is why the entire column that are shorted are affected.
***Only the bottom part of a specific column lights up.
This is a nightmare if it's in the middle of the cube! This means the anode of one LED has come unsoldered from the one below/above it.
My suggestion in this case is the "easy" fix of running some wire-wrapping (thin hard to notice) wire up through the anode hole in the base of the cube up to the top LED in that column. Solder it to the anode of the LED at the top, and to the LED anode under the base of the cube.
This will act as a shunt, bypassing the break.
IF you can reach the break with your soldering iron, by all means, fix the break itself.
***An entire plane is either lit or off all the time.
Something isn't connected right on the 574 for that column. Check all solder joints to that chip.
If that doesn't work, remove the chip and replace it - it may be damaged.
***Only one single column (and no adjoining ones) won't light up or is always lit.
If it's not lit, it's probably a bad connection between the chip and the column. Do a continuity test starting at the 574 output pin for that column, and check from the chip to each point going towards the cube.
So with one lead on the output, check the output to the resistor, then to the other side of the resistor. The other side of the resistor should measure 100 ohms. Now keep that lead on the resistor, and check resistor to connector on the board, then connector on the cube, and finally the LED anode rail for that column. When you find the break, fix it.
If there are no breaks, check the data lines going into the 574. This is easiest done by checking continuity between pins on one of the other chips. Check pins 2 through 9 one by one on the 574 for the defective plane for continuity with pins 2 through 9 on any other working 574. resolder any that require it.
If that fails or the column is always lit, change the 574 for the plane which that column is in.
***A layer doesn't light.
Check the transistor for that layer. Do a continuity test from the cube going back to the transistor.
Do a continuity test from the transistor base to the resistor on the base, then to the other side of the resistor. The other side of the resistor should read 100 ohms.
if there is a break anywhere, fix it. If not, keep the meter lead there, and do a continuity check to the 74HC138 pin for that layer.
check the solder joints on the 138. If everything looks fine, replace the transistor. If that doesn't work, replace the 138.
***One LED doesn't light
The LED is damaged, and will need to be replaced.
I simply have not found an easy way to do this.
In a worst case scenario, going from front to back, cut the braces between the plane the LED is in, and the one beside it so that you can separate the planes enough to get at the LED you need to replace.
re-solder the front and rear braces - chances are you may not be able to get to the middle ones, but solder all the ones you can.
The middle braces are structural only, and it won't affect the running of the cube if you don't reconnect them, as long as you resolder the ones in the front and rear.
If anything else is wrong, check everything! You screwed up big somewhere! LOL
Below are 2 videos. The first one is a "defective" cube, and the second is the "repaired" cube.
In this example, column 17 (third plane, closest column to us) doesn't light up, but 18 does.
This tells us that something is wrong with that specific column.
In this case, pin 2 of the 574 had a bad solder joint - discovered when checking continuity between pin 2 of that chip against pin 2 of the adjacent chip.
Plane 7 front-to-back wasn't lighting in the video. Resoldering the power, ground, OE (output enable) and CLK (clock) lines for 74HC574 #7 fixed the problem, since that chip specifically controls that entire row of pins regardless of what layer it's on.
But what if it was plane 7 going left to right (from the perspective of the FRONT) that wasn't working?
Normally in this case you would check the output of the microcontroller from PA6 (ADC6, pin 34 on the ATmega32A, pin 12 on the ATmega328P, digital output 6 on the Arduino) since this is the output that goes to LED 7's input on pin 8 of all the 74HC574 chips - and a side-to-side plane failure means NONE of the 574's are getting the 7th bit of data.
Chances are, if a whole plane isn't working, those are the ways to check.
CUBE WITH DEFECTS shown in POST
CUBE REPAIRED - POST is normal
Step 17: What Next? Beta Addons and Updates
I want people's opinion on this.
Would you like a board that has a USB connector on it, so that you can program the cube without additional hardware other than a USB cord (since it would already be on the board) ?
Basically I would be putting the USBtiny or USBasp hardware right on the board.
Would you like music with that?
I am working on an active music module that we can add on to our 32A powered cubes (Sorry Arduinoites!) and may build it into my next PCBoard release - but that may be at least a month away. Right now, it's just in the "proof of concept" stage. It looks promising, but there's a ton of work to be done yet and many circuit designs to try out. I'd like to basically make something that's all analog but I haven't done any analog in a while, so at the moment, my prototypes are an Arduino or ATTiny85 feeding the music triggers to the cube. I think it's too much fun tweaking code on 2 controllers to get the results I want, so I want to eliminate the external controller and just hard-wire everything. The other issue is that the only remaining inputs on the 32A are digital pins on PORT D, and I really don't want to recode everything to free up a pin on PORT A. They are all happily serving as Data output to the latches.
Anyway, enjoy the demo - it's just a short one. Sorry for the camera going in and out of focus. Next time I'll use the manual focus if I can find it (if it has one).
JAN 2014: SNEAK PEEK INTO UPCOMING MUSIC RESPONSE ROUTINES I AM WORKING ON
And now back to your regularly scheduled program...
Ideas for other additions to the board or it's code are welcome! I may not be able to do it, but they are welcome anyway.
This video was made using an all passive circuit hooked into the Black Edition V3.7A AIO Multi-AVR Cube Controller board. Chances are, you already have the parts to make the passive input circuit. No op-amps, no microcontrollers, no chips of any kind (and for that reason, you cannot use a MIC with this mod).
Takes about 10 minutes to make it...if that.
I may be busy for the next while folks - I have decided to build another cube entirely on one of my base boards.
Also my Raspberry Pi and tri-colour LEDs arrived today, so I will also be making a new template and jig for that.
The colour cube will be on a PCB Base because I just couldn't fathom wiring up the 192 wires to a controller board.
The colour cube will be using serially loaded LED controller chips - the DM13A constant current driver IC - so no more annoying current limiter resistors. Each chip has 16 outputs, so I only need 12 for the whole cube (4 for each colour 64 outputs).
It looks like I will be going with the PIC32 microcontroller initially, but I may port it over to the ATmega chips after. If done properly, the Arduino may even be able to handle it.
Since most of the data will be transmitted in a serial manner, this means few outputs are actually needed, but it does increase the frame load time. We'll see if the Arduino has enough processing power to do anything useful with it.
Keep looking back here for updates, as I hate clogging up the comments sections.
I've decided to make a (virtually) wireless (you still need 8 wires for the layer lines) cube.
Taking one of my LED Cube Base Boards, I put FEMALE connectors in place rather than male.
Since the board layout exactly matches the Black Edition controller, I can literally plug the boards together.
I put up a few photos to show you what it'll look like.
I don't have enough LEDs to make another cube at the moment, but I'll show it off once it's done!
Stay tuned for news on the RGB cube I am starting.
Sept. 27: I decided to move my cube to a base board - but am now realizing my cube wasn't made to the measurements of the base board exactly - so it's not going so well...LOL! I may just put it back on the cardboard base and build another cube.
OCT 20: InitAVR and Flash_AVR have been updated to allow for both USBTiny and USBasp programmers. The ZIP file below has the updates or you can contact me for your updates if you have one of my Bonus CDs that came with your board and have any problems with this update.
Copy the content of your bonus CD to a folder on your hard disk, and replace the files in the root of the folder with the files in the zip file.
NOV 21: SMT Micro 2.7D, Black Edition 3.5A multi-AVR, and black edition base boards are all in stock.
NOV 27: Working on the next black edition board.
DEC 06: The 3.7A has gone to fabrication. The 3.3V option is gone due to lack of demand. A power source has been added to the music input terminals so it can power an active music trigger circuit. The SMT transistor glitch is fixed. Redundant LEDs were removed, making it look more like the Classic Black Edition.
DEC 30: Finally found a nice cheap oscilloscope, so work on the active music trigger circuits should go a lot faster. Found a nice 4 channel 100MHz storage scope for under $200 delivered. Can't wait for it to get here!
With the 3.7A gaining popularity, I thought it was time to publish at least the basic passive music trigger circuit it was designed for.
When I complete them, the active circuits I am working on will allow for wireless response using a mic rather than having to run a wire from your audio source to the board.
In the diagram, we are using basically one channel of an iPod or similar amplified device (a mixer line out maybe), connecting the shield or negative or common to the same ground the controller is using, with the signal line going into the capacitor. I recommend a 1 to 10uF electrolytic bi-polar cap. If you only have polarized caps, put the signal into the + side of it.
You can experiment and see what value of potentiometer works best for you, but I wouldn't go less than a 1K since it has to go across the +V and GND of the unit. NOTE: I have found that 1K may load down mixer outputs etc. so if you want to be sure not to load down the equipment (which reduces the signal level not only to the board, but possibly at the equipment as well) I have found that the pot should be 100K or more. This can make adjustment a bit more touchy, but it is better if the signal splits from where you are connecting it. Different values will determine how precisely or loosely you can dial in the setting that works best for you. It's best to adjust the threshold level while playing music into the board at the level you intend to be using.
DO NOT use speaker outputs from power amplifiers or anything that may go over 5V peaks or you may damage your AVR.
JAN 10: Taking suggestions for improving the boards.
SMT 2.7D is now discontinued. The new Black Edition SMT AMS boards are in the prototype stage.
Jan 16: working on implementing an on-board condenser mic circuit for music response. The circuit will be an option that can be disabled if you don't want to put in the extra parts. Connector for wireless remote module and front panel board. Again, these will be optional addons that you can choose not to connect if you want to run the board the way the boards run now.
I may have to revise the design so that less power line noise is generated to the 5V sent for active audio circuits.
This board will probably be a couple months off at least as I also want to get some work done on the colour cube circuit.
JAN 19: New SMT prototype design completed - Introducing the SMT Black Edition Controller !
Implements music function and is meant to clip or solder onto the top of the Black Edition base board (can still be cabled too).
Black Edition Multi AVR Hybrid PC Boards are in stock.
Black Edition Base Boards are now in stock
The NEW SMT Black Edition 1.X AMS boards are in the works. These have Audio Trigger input, Mic module connector and are all SMT chips (Thus the AMS) - A SNEAK PEEK AT THE PROTOTYPE IS ABOVE with my Arduino and PIC UNO32 near it for size comparison. Basically it's about the size of 2 Arduino Uno boards side by side.
The zip file below is replacement files for the fuse fixer / AVR initializer and the clickable code uploader for people that have the mini-CD that came with your board. They have been updated to allow either the USBasp or USBTiny programmers.
The PC Boards for my RGB cube base+driver, and my PIC32 MCU controller board have gone to fabrication.
Construction of the RGB cube has begun.
Guess it's almost time for a new instructable!
Step 18: SHOW OFF YOUR CUBE
The first few photos are of my early boards as they neared completion. I still have them and it still works, but what an undertaking!
The cube was even made with round top 17mm lead length LEDs back then because I didn't know better.
Many of you are nearing completion of your cubes now, and a fair number were able to do so with the use of my boards, tips and code from this instructable.
This is a place for you to post videos or pictures of your cube!
There is a great feeling of accomplishment and pride when you complete something this difficult and time consuming, so go ahead and show the world here!
FEBRUARY 7, 2014:
I have decided that I want one cube on one of those classy looking black bases that so many of you now have.
So, I am building another cube for myself on one of my Black Edition base boards, this time with white LEDs.
So far I have made 4 layers, and checked the alignment by putting each layer into the cube base until all the LEDs were flush with the base. All have fit so far without any issues, other than a couple solder joints breaking during my "alignment test" on the base board. That's OK though, because it lets me make the repair while it's still on the base to ensure good alignment.
This will probably be an even more accurately aligned cube than my first one because I used the base board for my template when making the pilot holes in the cardboard box (as described in the instructable) rather than poking holes into a cross-hair in paper taped to the box.
I'll post a few photos as I go along, but since it's basically all been done before, I'll keep the photos to a minimum.
You will see one photo of a single layer in the base board. This is just to check the alignment of the layer, adjusting by heating the solder joints where necessary to allow the LED to line up right if it was too tight a fit.
All 8 layers are made, and 6 layers are soldered together, but it's half past midnight, and I don't know if I have the energy to finish it tonight! LOL!
FEBRUARY 13: (5:30AM)
The white cube on the Black Edition V2.0 base board is complete.
Aside from a minor scare that turned out to simply be a single semi-burned out LED (detected when I finally ran the Power On Self Test) it all went fairly smoothly.
I'll be making videos and taking pictures soon. But now I must sleep.
I would have finished a lot sooner, but I only did it a piece at a time, and some days didn't touch it.
So at this point, I can say with confidence that with the use of my techniques and PC Boards, this is a project that CAN be completed in a week or less, depending on your skill level. I was able to pre-bend about 200 LEDs an hour, so it only took about 2 and a half hours to pre-bend all the LEDs I needed.I didn't check to see how long it took me to build a single layer, but attaching one layer to the bottom of the stack took me about an hour per layer.
I probably spent about the same amount of time making each layer.
Here's the video demos of my cube on the V2.0 base.
This is a test running on one of my prototype controllers.
I had to adjust the exposure quite a bit on the camera to prevent the cube from just blinding it. Unfortunately it makes the LEDs look not quite so white, but you can see it better at the end of the video where I set the exposure back to Auto so you can see when I zoom in to show the "V2.0" on the base board and the controller.
If I figure out how to video the thing without blinding the camera, I'll make a new video.
MARCH 10: The ARMS SMT V1.0 Rev.3 board is released.
Currently, the RAMP 1.0e Rev. 4 will be the last iteration of my mono cube boards.
I am now dedicated to the RGB project.
Step 19: ANNOUNCING...
Introducing the ARMS SMT Black Edition 8X8X8 LED Cube Controller V1.0 Rev.3
Click photos to see important notes.
This board allows for a condenser Mic module for music response, and also has a wired input connector for the circuit posted in step 17. Wired input works better, but of course is not nearly as portable, and you have to watch for overdrive with the wired input, whereas you don't with the Mic module. The Mic module does need to be tweaked for the sound threshold level though.
The remote has poor range, I won't lie to you.
It gets worse the busier the microcontroller is too, because that generates both RF noise and noise on the power bus.
Your power source will dramatically affect your range. Since these modules are not crystal controlled, voltage fluctuations (caused by current draw variations) will cause frequency drift, dramatically reducing it's range.
The alligator leads that come with lower end "laboratory" variable voltage power supplies actually tend to have a fairly high resistance, and will allow for significant voltage fluctuation on the device end.
I replaced my power supply leads with a heavy duty cord that used to be an extension cord. I got much better response from the remote after that.
If you are powering the cube from your USB port, be prepared to have the remote only work from a foot away, or only when the cube is not using many LEDs.
The remote header connects to all 4 buttons on the board, and is active high.
The keyfob remote is assigned as follows (from parts list)
Button A = Music Mode / Next Music Mode / Skip current animation (if animation is programmed to allow skip)
Button B = Enter TTL Serial mode
Button C = Enter Animation Mode
Button D = Reset.
The connector can be used by any remote though that provides a logic high when active, and low when inactive.
Of course the remote is just an option too, and does not affect the cost of the board itself. You don't HAVE to get one!
Above is the Hybrid Black Edition 1.0E Rev.3 RAMP board (Remote/Audio/Mic/Panel) which takes all through-hole or a combination of through-hole and SMT components. It has an RCA jack for Line In from a music source, can take the same Mic module as the ARMS, can take the same Remote module as the ARMS, and also has a connector for a remote wired or Front panel for people that want to enclose their cubes, but still have access to the LED indicators and buttons and Audio input. This board is going to be slightly more than the ARMS board simply because the board is larger and costs more to make.
As always, the original code from CHR's original instructable works 100% on this board (both the ATmega32 and the "Arduino" ATmega328P code.
The wireless remote works better than it does on the ARMS board because of added electrolytic caps.
The remote buttons are different on the RAMP from the ARMS.
So far nobody has BOTH boards, so I don't see this as an issue.
On the RAMP series, the buttons are as follows:
Button A = Enter Animation Mode
Button B = Reset.
Button C = Enter TTL Serial mode
Button D = Music Mode / Next Music Mode / Skip current animation (if animation is programmed to allow skip)
I have found a secondary use for the front panel connector - LINKING CUBES TOGETHER!!!
PERSONAL NOTE! If you aren't using the front panel connector, I suggest not putting a 10 pin connector on it, as it is easy to confuse with the ICSP connection.
Having taken the cube this far, I have decided to scrap my old RGB cube design and start over with what I have learned while making this cube to make a better RGB cube base and controller board. I am also working out an easy way to construct the actual LED cube itself.
In one day I have gotten the basic base board laid out and all the LEDs are connected to the chips.
I just need to run the data buses, power and clocks.
I am unsure, but at the moment, I think I may be able to run it all to a 10 pin header, and we'll be able to hook up just about any microcontroller to that header and control the cube.
Good news too, no current limiting resistors on the LEDs with these chips, so build time will be a lot less.
Wish me luck folks!
The connector will be a 20 pin, as there are additional grounds between the data lines, and the 8 layers all run back to the microcontroller. The initial design is for the PIC32, but I am sure people will make code for the Arduino and the ATmega32A after things get going. The first boards have gone to fabrication. Time to start building the cube!