8x8x8 multiplexed LED cube with an Arduino Mega 2560

Here we go, rearranged to fit in 100x100mm.

@cyclegadget,
The bare driver boards are $5 each mailed to US locations. I've got 10 on hand.
paypal to cardinaflyer @ comcast dot net.

CrossRoads, you should change your nickname to "SolutionMan" or "TheManWithTheSolutions" or something :slight_smile:
I's stretching my mind to understand the boards you presented here and I think I'm starting to realize how deeply convenient they are for this LED cube project!

I am seriously thinking about requesting an LED support board as it would be much more elegant than the perfboard solution I had in mind and it would save me a lot of time. I can't use it for the 4x4x4 test cube because with that one I plan to include variable resistors connected in series with the 82 Ohm resistors in order to experiment with how much current is exactly needed for the LEDs. With this approach I'll be able to determine the exact resistor values which I will use for the big cube (8x8x8). So, if my 4x4x4 cube will prove to work fine, I'll have to order such an LED support board from you. I like the 13.2 x 10 cm version better because it's less crowded.

As for the other board, which is meant to hold the shift registers, it's also very tempting. There are quite a few things I don't fully understand about it yet. For example I suspect that the IC1 (the big IC) on it is a microcontroller which is meant to replace the Arduino. If that's true, I probably don't need most of the left part of the board. But the bigger part, the right part, is a convenient way to hold the shift registers. Another thing I can't see is where I'd connect the MOSI, SCK and SS signals coming from the Arduino.

I see that you design very nice boards, which you also sell for more than correct prices. Do you by any chance happen to have a version of the shift register board specifically designed to work with the Arduino? If I understood things correctly, that would make the board smaller because it would leave out the left part of it. It would also be more elegant.

Final question: Did I understand correctly that these boards that you presented are completely naked, I mean there aren't even pin headers soldered to them, they are just the boards, and nothing else?

Thanks,
Andras

SolutionMan, I like that.
I'm still playing with the LED support board, iteadstudio is still closed so there's time.
I like the 10x10 because it will a lot less money - 10 x 13.2 jumps way up in price.
The other board has Arduino function built right in - just connect an FTDI Basic, FTDI Cable, CP2102 module for a USB interface.
Or, build it up with shift registers & caps, and connect arduino SPI wires to the correct pins.
$5 gets you a bare board.
I can assemble one for you, we'd have to discuss specifics on parts, as I mentioned on Reply #143.

Ok, thank you :slight_smile:
I'll first see how my 4x4x4 test cube turns out and if the hardware and software parts both prove to be correct, then I'll most likely need an LED support board :slight_smile: I'm still thinking about the other one...

CrossRoads, I think I've spotted a mistake on all he connection diagrams that we've shown so far:

If you look carefully at the TPIC6B595 shift register on the bottom of the diagram (the one which drives 8 cathode columns) and at the connections to its pins 13 and 12 (SRCK and RCK), you'll see that according to the connection diagram the SRCK connects to the next shift register's RCK and the RCK connects to the next shift register's SRCK. It think that's messed up and should be the other way around. I think that all shift registers should have their SRCK pins connected together and their RCK pins connected together, including the shift register which drives the anode planes. In other words, the Arduino's D13 (SCK) should be connected to all shift registers' SRCK and the Arduino's D10 (SS) should be connected to all shift registers' RCK. Am I right?

Another question that came to my mind: looking at the TPIC6B595's data sheet, I se that its pin 2 is marked VCC. In our diagram pin 2 is not connected to the 5V rail. Is that OK?

Thanks,
Andras

The "To Next Device SCK" & "To Next Device SS" notes are swapped, I'll agree with that.
Pin 2 is shown connected to +5V.

Ouch! I missed the connection of pin 2.
OK, thank you! I will correct the diagram tonight so that others who read this in the future see the correct design.

Updated schematic:

After you get this going and tested, I'd like a copy of the schematic and BOM, I may make one, but like crossroads said, there isnt enough time in the day to build all the stuff that i want to build.

My initial tests with transistors has lead me to wonder why anyone would ever use anything but a mosfet, but I still have more transistor torture to do before I make any decisions.

Sure thing, Hippynerd! I'll send you everything when it proves to be working, although I'm afraid that's going to take at least 2 weeks from now.

Sweet. Thank you :smiley:
Please dont rush on my account, I would prefer that you insure success.

Also, thank you crossroads, youve done a great job here too.

Yes, I think it's important to emphasize that CrossRoads is the mastermind behind this design. Thank you, CrossRoads!

Well, we'll see if you guys can make it work!
I used similar for an 12x8 matrix here
with 8 common cathode 'rows' sunk by ULN2803 (from arduino pins) and just resistors sourcing the anodes - two 6B595s pulled the anodes low for the "off" LEDs.

6B595 & PNP/row is a little more hightech, but is really needed for the much higher number of LEDs that can be on.

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 :slight_smile:
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 :slight_smile:

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)