8x8x8 multiplexed LED cube with an Arduino Mega 2560

For anyone else who might be interested in the future to build a LED cube based on this design, I've put together a component list with prices based on what I have bought for the project. I tried to buy the components as cheap as I could, most of them off eBay, but for many of them I have bought more than actually necessary, because they sell in bulk or because I wanted some spare parts. Here's what I got:

NDP6020P: 14 pcs 33.3 EUR (43.8 USD)
3mm diffused blue LEDs: 1000 pcs 19.4 EUR (25.5 USD)
TPIC6B595N shift registers: 20 pcs 9.3 EUR (12.3 USD)
1K variable resistors: 100 pcs 7.4 EUR (9.8 USD)
5V 3A power supply: 1 pcs 7.1 EUR (9.4 USD)
Craft wire 0.8mm 6m: 3 pcs 7 EUR (9.2 USD)
Jumper cables 40 PCS: 2 pcs 6 EUR (7.9 USD)
Capacitors (0.1 uF) + resistors (82R, 220R): 3 pcs 4.6 EUR (6.1 USD)
PCB 18x12 cm: 2 pcs 3.9 EUR (5.2 USD)
Female pin headers: 200 pcs 3.8 EUR (4.9 USD)
TO-220 heatsink: 10 pcs 3.4 EUR (4.5 USD)
IC sockets DIP-20 for TPIC6B595N: 10 pcs 2 EUR (2.7 USD)
Crocodile clips: 2 pcs 0.8 EUR (1 USD)
Total: 108 EUR (142.3 USD)

Sorry, I just can't get the data into a well-formatted table.

This does not include, of course, the price of the Arduino driving the cube or other miscellaneous stuff like soldering materials or the prices of some tools that you use for other projects too.

Somehow I got lost on the math there DC. 1.28 * 1.28 = 1.6384, divide by 4 and you get .4096.
How do you come up with .5 watt?
He will need 8 mosfets, each one will run 1/8th of the time (12.5%), each one will need to be able to source between 0 and 1.28A. I see the 1.28 in there, and the 4 was from half watt times 8. So I see some of the numbers, and understand where they came from, Im still confused with the math, and where half a watt came from. it seems arbitrary.

I tried crossroads technique, and came up with 7 P-channels, I started by searching "p-channel mosfet", then clicked a link that said Fets-Single, That displayed a page with many options, I selected logic level gate, through-hole, and then I scrolled the package column, and selected the TO-220-3

From there, I notice that all of the parts have many mOhm RDS (way way over .4 ohm), not even close to mOhms.
I dont know what a good/bad gate capacitance is, but I can only find gate charge, and input capacitance.

I can also see that the NDP6020 is rated at 60 watts, and if using 1/2 watt, Im guessing you wouldnt need a heatsink.
How many 20mA LEDs could you run on that mosfet?

Also $150 for the parts for a 8x8x8 cube sounds like a lot, but I havnt built a cube that big.

6 Meters of wire seems like a low estimate to me too, I bet you use over 8. what kind of wire is it? soft wire is very difficult, but harder wire is a bit easier, and ends ups being sturdier. I find very hard steel works the best. For cube building, and general keeping wires straight, thinner and softer are more difficult, thicker and harder are easier, but for soldering, thinner is easier.

Hi!

I'm planning to run 64 20 mA LEDs from one of those MOSFETS.
That price of 142$ includes components for the big 8x8x8 cube, but also for the small 4x4x4 learning cube and some spares. I guess that if I tried to but onyl as many components as necessary for the 8x8x8 cube only, I could have pulled it off for about 100$.

6m of craft wire is definitely not enough. But I have bought 3x6=18m, which is probably twice as much as I need. I do not know how soft or hard it is, I bought it blindly from eBay based on the suggestion of somebody who has already used the same or similar craft wire to build a LED cube successfully. It is 0.8mm thick and is sold rolled up, I'll have to straighten it before soldering.

Hippynerd:
Somehow I got lost on the math there DC. 1.28 * 1.28 = 1.6384, divide by 4 and you get .4096.
How do you come up with .5 watt?

See reply #83. I suggested a maximum of 1W for a TO220 mosfet with no heatsink, and 0.5W for a mosfet in a smaller package.

CrossRoads, is there a special reason why the LED cube that we've discussed here uses the cathodes as columns (64 cathode columns) and the anodes as planes (8 anode planes) and not the other way around? Many other cubes that I've seen use anode columns and cathode planes and it seems to be more practical that way because the anodes are 2-3 mm longer, which compensates for the fact that the LED heads are taller than wide, so the horizontal and vertical distances between the LEDs could be longer and still equal if we used anode columns and cathode planes. Is it possible to do this reversing of anode/cathode roles? If yes, how?

Thanks,
Andras

Cathodes as columns because the TPIC6B595 can only sink current, not source it.
I have not seen a shift register that is designed to source 20mA (and not running at the Absolute Maximum as many people use 74HC595) outside of the 74AC299P which I think is not procurable in DIP form anymore. I bought a tube of them from Newark for not much when Newark was getting rid of the last of theirs.

I had not considered LED pin lengths - just figured cube dimension would adjusted to actual parts purchased, which no doubt vary by manufacturer.

74AC299.pdf (130 KB)

Well, I'll sacrifice those 2 millimeters then :slight_smile:
Thanks!

BTW, happy new year!

Thanks! Happy New Year to you as well!

Finally all my parts for the LED cube have arrived (except some minor things that I can start without) :slight_smile: I plan to start working on it soon, I will show you pictures when I'll have some results.
The only problem is that the LEDs that I bought seem to have very short legs. The Anodes are 18 mm and the cathodes are 15 mm. It will be a crowded cube...

I thought you were using craft wire? If you are using wire, you will be soldering the leads to wires, then clipping the leads.

My intention was to use craft wire only to strengthen the cube where necessary (diagonally relative to the LED anodes, inside the planes), but given the short legs, I might need to make the whole cube frame from craft wire. That would require twice as much soldering, though...

How do you keep from shorting things out with extra diagonal wires like that?

Well, all you have to make sure is that the craft wire inside the anode planes never touches any cathodes. The 64 (8x8) cathodes go down and all the anodes are soldered together in the same horizontal plane, including with craft wire. In other words, you solder the LED anodes together along the X axis. You strengthen the anode plane with craft wire along the Y axis (X and Y are in the horizontal plane) and the cathodes go down along the Z axis.

I'm afraid I have very bad news :frowning:

A few days ago I've started working on a 4x4x4 cube to see how I can build it, before I jump into the real one (the 8x8x8 cube). So I drilled a 4x4 matrix of 3 mm holes into a piece of wood to help me assemble the horizontal layers of 4x4 LEDs, filled the holes with 3 mm LEDs, cut the craft wire to pieces of appropriate length and set out to solder the pieces of craft wire to the LED anodes. Now this already turned out to be a huge pain. The craft wire is 0.8 mm thick and the LED legs are way thinner so it's close to impossible to hold them together with clips while you solder them together because the clips will only close to the thickness of the craft wire and will not be able to grab the LED legs properly. Because of this the building process was about 3-4 times slower than I thought it would be. I have wasted hours and hours trying to hold the LED legs together with the craft wire, while I was soldering them. Anyway, after about 8 hours of work I managed to make 4 layers of 4x4 LEDs connected by their anodes into planes.

While I have built the layers, 2 LEDs burned out or something, because after testing the layers, they were not working anymore, even though they had worked before being soldered into the layers. I didn't think much of it at the time, I just replaced them with new LEDs. But the ordeal began when I tried soldering the cathodes together into columns. Holding the LED legs together with the craft wire was a pain, as usual, but that was the least of problems. After soldering the cathodes of 3 layers together (into 16 columns), several LEDs started not working and instead they seemed to conduct electricity directly, without lighting up, which resulted in several LEDs lighting up instead of just one when I tested the intersections of layers and columns. In other words, when I put the multimeter's positive lead to layer x and the negative lead to column y, instead of having only one LED light up at (x,y), I saw 2 or 3 LEDs light up. This was not for all (x,y) pairs, just for a few. I managed to find some LEDs which did not light up at all, so I figured that they are the problem. I managed to solder them out and solder new ones in their place through very painful work. Imagine if this would have happened in the middle of a 8x8x8 cube, it would have been impossible to replace them. But the problems were far from over. While I replaced those LEDs, others have burned out. And so on, until I had to throw out the whole darn thing into the garbage. Hours of work gone.

Now the question is: what made the LEDs burn out in massive amounts?

  1. My best guess is that they are burning out because of the heat from soldering.
  2. My second guess is that perhaps the multimeter's diode testing mode is burning them out.
  3. Is there any other explanation?

God knows I've tried to limit the soldering time to 3-5 seconds, with a few exceptions. I can't do it faster, the solder just won't adhere any faster. Maybe the soldering iron is too hot? I think it's a bit above 300 degrees Celsius, although it doesn't show the temperature, so I'm only guessing. Turning it lower seemed not to heat the solder fast enough and I had to keep the iron on the LED legs longer because of this, so it wasn't good either. I've watched several videos about how to solder properly and I'm using standard 40-60 rosin core flux, so I don't think the problem lies there.

This is such a disappointment. After spending 150-200 $ on components and who knows how much time on planning and soldering, I'm close to giving up the whole project because I just don't see how I could avoid these problems. This wast just a 4x4x4 test cube. If just one single LED fails in the middle of a 8x8x8 cube, I'm screwed and my whole work goes down the drain, so I'd rather not even start working on it. The only solution I can think of is to somehow solder the LEDs together with some non-traditional, cold soldering method. Honestly, I've never heard of such a thing, but hopefully it exists, otherwise the whole project is wasted.

Maybe the LEDs that I've ordered are poor quality and weak, maybe they can't take as much heat as regular LEDs? Or maybe I should try soldering at really low temperatures? I doubt that it would work. Maybe I'm burning them out with the multimeter's diode test mode? I don't know. It all seems really hopeless right now...

Ouch. Yeah, did I mention that soldering a 3D grid of LEDs is difficult?

To start, id make sure that the holes for the LEDs are big enough to easily slide the LEDs in and out, once they are soldered into a grid, it will be difficult to remove the grid w/out buggering up your LEDs.

There are many ways to prep the leads, and lay the wires, Its unclear how exactly you are doing that, if you can provide pictures, that might help.

The LEDs shouldnt be burning out, you may lose one or two, but a bunch is unusual. The thick wire requires a lot of heat, one way to prevent the heat from damaging the LED is to pre-tin the wire, then when you put it next to the LED, you just quickly reflow the solder with a little flux on the joint to keep things clean and happy. 3-5 seconds is a lot, but I've done worse. Good solder joints are typically take 1 to 2 seconds, but can vary depending on how much mass you need to heat. With the thick wire, hotter is better, I solder really fast, so I want the hottest iron I can find so that I get the heat in and out as fast as possible.

I just recently wrote this up about soldering.

If you poke around you can find other good info about preparing parts and wires and stuff.
When prepping parts, the better job you do, the easier the soldering will be, Once you figure out how to prep your part well, the soldering will become easier, and you will also figure out how to prep your parts to make soldering easier. Basically, the more time you spend in prep, the less time you spend in soldering, so it pays for itself in time savings, and the better you do in the early steps, the better the end results will be, so its kind of a double win to spend the time prepping the parts.

The reason some LEDs lit and others didnt may be due to solder bridges or broken solder joints (shorts or opens) its hard to say from here.

Im building a cube that doesnt use craft wire, and I think its more difficult lapping 2 thin wires, than crossing wires in a solder joint. At least the lap solder joints are flat aluminum leads, which makes things a little easier.

If you have a heat gun, you might be able to use it to heat up the blob of leds and salvage some of them, and start over. The first cube I built was made with leftover flashlight LEDs that I salvaged when modifying flashlights. It was more difficult, bu it worked.

Thank you for your answer :slight_smile: Well, you did mention that soldering a 3D grid is difficult and I was prepared for that, but what I'm experiencing is way beyond difficult. It's just impossible to work like this. The 4x4x4 cube contained only 64 LEDs and about 10 of them burned out. Dealing with burnt out LEDs in the middle of a 8x8x8 cube would be absolutely impossible, so it's not even worth trying to build it until I can find a way not to burn out the LEDs.

You wrote that several LEDs lighting up simultaneously is due to shorts or opens. Well, there were definitely no shorts caused by LED pins touching wrong parts or by misplaced solder. The only way shorts could have occurred was through burned out LEDs. That was probably the case. I don't know what an LED does when it burns out, does it conduct electricity or not, but it seemed to me that it did. I can't imagine simultaneous light-ups being caused by opens. I mean in my LED cube each LED is connected to a single cathode column, so if I'm not touching that column at all (and I made sure of that!), how can the LED still light up when I'm touching a completely different cathode column with the multimeter's negative tester? The only way I can imagine it through some other burned out LED which conducts electricity...

I talked to a friend about this, who is skilled in soldering and he says that he has abused LEDs several times by soldering them for even 10 seconds, heating them up, etc. and they have never burned out... I don't know what to think. When I arrive home tonight, I'll start heating up some of my LEDs to see how they take the stress. I want to prove to myself that indeed heat is what's damaging them. Perhaps this is a very bad batch of LEDs and I should buy some others...

@Hippynerd: Nice article about soldering!

I've found a really nice experiment here:
http://books.google.ro/books?id=PQzYdC3BtQkC&pg=PA114&lpg=PA114&dq=leds+burn+out+during+soldering&source=bl&ots=8kWGijzk3H&sig=BA_OdSQzM9koZz9J2Vg3Wt-ofyk&hl=ro&sa=X&ei=EVkSUaOoDsKr4ATYnYCYCw&ved=0CFcQ6AEwAw#v=onepage&q=leds%20burn%20out%20during%20soldering&f=false

It explains how you can burn out LEDs while soldering. I'll try it today. I'm curious how fast they fry.

@Un4Seen

When I built my cube, I tested each layer before assembling the whole cube. I also found the same problem, the layers were good until additional soldering occurred. Out of 125 leds I had 3 fail but, my build method probably used less heat.

Yepp, that's exactly what happened! The layers were all fine on their own, but when I tried to put them together, all hell broke lose.
BTW, what soldering temperatures do you guys use? 250-300 Celsius degrees? Perhaps more? I've read in several places where people explain how to build an LED cube that they like to use "good hot irons" but only for a second or two. I find it impossible to be in and out in 1-2 seconds, so perhaps a less hot iron would make a difference without increasing the probability of cold solder joints.
I have to find a way to do the soldering with very low probability of burning out the LEDs, otherwise the 8x8x8 cube will put me in the loony bin.