8x8x8 multiplexed LED cube with an Arduino Mega 2560

A friend showed me these days a really nice piece of software called Sprint Layout, which can be used to design custom printed circuits. I started playing with it and found that it's very easy and straightforward to use. Driven by the desire to have the whole LED cube driver circuit on a single board, I've taken CrossRoads' design and tried to create a drawing for a printed circuit. Here's how it turned out:

Back:

Imaginary Front:

Real Front:

The board is 180 mm x 120 mm and holds all the components (except the Arduino and the LEDs, of course). The connections to the Arduino are marked with large rectangles and the connections to the LED cube are marked with small squares. The round connections are all internal.

I've struggled with it for about 6 hours until I have reached the current result. This is the first time in my life that I've ever done something like this, so it might be far from perfect. It might even have errors in it, unfortunately it's 3 o'clock in the morning here already, so I have to go to sleep, I can't verify it... If you guys notice anything strange or you have suggestions related to how it could be improved, let me know :) I've spent quite a lot of time trying to squeeze things into the smallest space possible. A multi-layer PCB would have probably been smaller, but I don't know how to do that and I didn't even want to work on more than one layer because it might complicate the creation of the board.

Now, I haven't got the slightest idea yet if and how I can turn this design into a real board. I don't know anybody or any company who will accept such a design and make a board out of it. For now, it's just a design. If I can turn it into something concrete that's going to be great. If not... well, it has been a nice learning experience :)

Nice plan!
couple of thoughts:

The board is 180 mm x 120 mm

That’s gonna be pricey.
5 boards for $76.20 for example at iteadstudio (2 layer >10cm x 10cm >> 15x20cm price.
Figure out 2 sided & shrink it down. May not be much smaller, my 12xTPIC6B595 board is 100x100mm, not sure of removing the ‘arduino’ portion and 3 shift registers would let 64 resistors fit instead. Even 10 x 15cm would get you down to $44.20 for 5.
(mine was designed with LED strips on mind, which have their own current limit resistors).

holds all the components (except the Arduino and the LEDs, of course)

So put the ‘arduino’ on it. Just the 328P, xtal, two 22pf caps, couple of 0.1uF caps, 10K pullup resistor, header to attach USB/Serial adapter to.

Would be a lot easier to review from a schematic.
Add ground plane top & bottom will eliminate a bunch of traces.

Thank you for the advice CrossRoads!

“Put the ‘Arduino’ on it” - just when I thought that I’ve figured it all out, you got me tempted again into figuring it out even deeper :slight_smile: It’s a nice idea. Until now I haven’t considered it because my understanding of things was just not deep enough. But I’ve learned a lot these days, so now it’s a different perspective… Based on my test results with the 4x4x4 cube, I might consider this, replacing the Arduion with a built-in controller!

Ground plane - what a simple and efficient way to ground things! I’ve never thought of this until now, but that certainly would eliminate a lot of strips! But where would that ground plane be? The current bottom (with the strips) would be the top and the bottom would be the ground plane? I’ll have to read up on this…

The first thing I’ll have to figure out is who or what company can turn the design into a real circuit. Based on that I will be able to decide how many planes I can have (how many they can do). I’d rather find somebody who can just make 1 or 2 boards, there’s nothing I can do with 5… But I guess it’s not worth it for them do make less than 5…

"Would be a lot easier to review from a schematic." - I'm not entirely sure what kind of schematic you mean, but I've done it based on your design:

I've shown my circuit design to a friend who really knows about electronics. HE had two remarks/questions:

  1. Will it not be a problem that the SCK and SS signals coming from the Arduino are connected to 9 shift registers? He says that the SCK and SS signals are probably carried by weak currents (10-20 mA) and if this gets divided into 9 parts, it might be a problem. He also says that he looked at the datasheet of the TPIC6B595 shift registers and that they can work with very low currents, so maybe it's not a problem after all. I thought I'd ask your opinion anyway, just to be on the safe side. According to my friend, if this is a problem, I could employ some buffers like the 74HC125 in order to get around the problem, but I'm not sure what that means in our case.

  2. What is the frequency of the MOSI/SCK/SS signals coming from the Arduino? It seems that if the signals have a high frequency, the circuit design becomes more complicated. Now, I'm sure that the signals cannot be faster than 16 MHz, which is the CPU frequency of the Arduino, but I wonder how high is the actual SPI frequency. If it is too high, do I need to take into consideration some additional things? He mentioned something about impedance, but that's a bit high-level for me at the moment...

I've found an article about the Arduino SPI, here: http://arduino.cc/en/Reference/SPISetClockDivider It seems that the SPI frequency can be set from software. The default is 4 MHz. I wonder what the optimal value is. You don't want it to be too slow, because it will become visible in the cube. You don't want it to be too fast because high frequency signals complicate things...

1 & 2: I have daisy chained 20 TPIC6B595 shift registers spread over 2 boards. The up-to-40mA capable IO pins had no problems driving them at default SPI speed of 4 MHz.

I don't know how your new program does a ground plane, ground pour, or what it might call it. In eagle, you draw a polygon covering the area you want and then Name it GND. I do on the top & bottom layer because iteadstudio does 2 sided boards as standard. 1-sided is usually just home board creaters - I won't be bothered doing that when compex designs can be had & silkscreened & solder masked & have plated thru vias, all for $25 for 10 boards. (10cm x 10cm)

I've made a dual-layer version of the circuit :) Unfortunately it's very late again and I haven't had time to properly verify it. Maybe tomorrow...

Front:

Back - Mirrored:

Back:

The ground plane really has helped a lot. The board size has decreased from 180 x 120 mm to 140 x 100 mm :) Thanks for the tip, CrossRoads!

The front/top is the ground plane? Looks like it, just confirming.

Yepp, the top/front is the ground plane :) I'm not quite sure yet about how the pads (round and rectangular connection areas) are connected to the whole ground plane (which is mostly all a big copper rectangle), as they seem to have some isolation circle or rectangle around them, but I'll figure that out...

I have a really basic, but important question. The Arduino has some pins marked 5V and GND. See the group of pins which is leftmost on the bottom of the following image:

My question is: Are those 5V/GND pins directly connected to the power jack of the Arduino or the current passes through some circuitry in the Arduino before it reaches the 5V and GND pins? I'm asking because I want to determine whether I can feed my LED Cube Driver circuit from these 5V/GND pins of the arduino or I need to connect my LED Cube Driver to the real power supply's 5V and GND. As you know, my LED Driver Circuit can work with currents up to 1.3A and I'm wondering if it's safe to take that much current from the Arduino's 5V/GND pins... It would be nice if I could feed my custom circuit from the 5V/GND pins of the Arduino because that way I would have only one power connector (on the Arduino), I would only need to solder some pin headers on my own custom circuit.

Thanks!

Im not sure about the mega, but the 328 based units seem to be limited to 500ma at the 5v pin. My guess is that 1.3a is going to too much, even for the mega. I think that the 5v pin limit is from the specific voltage regulator that is used (the part right next to the external power socket.)

Hippynerd: Im not sure about the mega, but the 328 based units seem to be limited to 500ma at the 5v pin. My guess is that 1.3a is going to too much, even for the mega. I think that the 5v pin limit is from the specific voltage regulator that is used (the part right next to the external power socket.)

That and when using USB power there is a 500ma thermofuse that limits the maximum 5V current one can draw.

Lefty

Too bad... Well, then I'll just connect the LED driver board directly to the power supply unit.

Un4Seen: Too bad... Well, then I'll just connect the LED driver board directly to the power supply unit.

Always a better way to go. The arduino boards are great at controlling stuff but are pretty wimpy at powering things.

Lefty

5V & Gnd are connected to the output of the 5V regulator, which is rated at 800mA,and is fed by a 1A rated diode from the barrel jack connector, or 500mA from the USB port. For 1.3A, you need an external source for sure.

Extrenal 5V/GND connector it is then :) This makes me wonder, though... the fact that I need to connect the Arduino's GND pin to the ground of the LED circuit still holds true, right?

Yes, Gnds must be connected. Arduino, LED "shield", power supply.

I have perfected the dual layer design. Here is the result:

Front (ground layer):

Back (Mirrored):

The power supply is supposed to connect through a barrel jack identical to the one on the Arduino (this should be soldered onto the LED cube driver board's front). The MOSI, SCK, SS and GND of the Arduino are supposed to be connected via standard pins (breakable pins soldered onto the front of the circuit, either male or female). The anode planes and cathode columns are supposed to be connected to the board via standard pins (male/female pin headers soldered onto the front of the board).

If any of you guys want to try producing a real board from the design, I'm happy to send you the Sprint Layout file or some exported results (PDF, Gerber file, drill data, isolation milling, PCB outline milling, etc.). Please keep in mind that this has never been tested (except virtually inside Sprint Layout), so there's a chance that it has some bugs :)

Nice. See you figured out how to run some traces on the top too. What's the size of the board now?