Go Down

Topic: 8x8x8 multiplexed LED cube with an Arduino Mega 2560 (Read 52136 times) previous topic - next topic

Thank you, CrossRoads!

So, in other words we do need the 220 Ohm resistors between the shift register and the NDP6020P-ND gate. We also need pullup resistors between the gate and source of the NDP6020-ND and their value should be 5 KOhm.

As for the LED current limiting resistor, I understand now which components drop voltage and need to be taken into account. I guess your guess of 0.5 is from the NDP6020-ND. I've read the datasheet, not just once, but I can't figure out the voltage drop based on the graphs. Here is the excat datasheet of the NDP6020-NDs that I've bought from Farnell: http://www.farnell.com/datasheets/59594.pdf

The 3.3 voltage drop for the LEDs is a correct assumption.

One more important question: CrossRoads, in your image the Arduino had some additional things (capacitors, resistors) connected to some pins on the top and left, so it would seem that not only the MOSI, SCK, SS and GND pins are connected. Is that needed, or is that just some leftover from another circuit? If needed, what values would those be and what is their role?

Thank you very very much or your answer!



Ok, I didn't realize the NDP6020 was a MOSFET with 0.023 ohm on-resistance. Its voltage drop will be 0.023 * planned current (# of LEDs per row) or very small.

I drew up a standalone microcontroller circuit; if you are using an actual arduino, those are already built in, so you only to connect to the SPI pins and Gnd.
The standalone circuit has 10K reset pullup resistor, 16 MHz xtal, 22pF caps, and 100nF caps on VCC/AVCC/Aref.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Thank you, CrossRoads, very much! :)

So that means that the voltage for which we need to calculate the current limiting resistors for the LEDs looks like this:

5V (source) - 3.3V (LED) - 0.08V (TCIP6B595) - 0.023 * 64 * 0.02 = 5 - 3.3 - 0.08 - 0.03 = 1.59. In other words we need 82 Ohm resistors. Luckily I have a few hundred of those laying around :)

At this point  I understand the driving circuit 100%. I will soon post an updated diagram to reflect the reality accurately.

In the meantime I'm progressing with the 4x4x4 test cube. You guys were right when you advised me not to start with the 8x8x8 one. No amount of theory can prepare you for the difficulties encountered during soldering. A practice cube is a must. In a few days it will be ready and I'll come back with pictures.

Thank you all for your help!


1.59V/20mA = 79.5 ohm, 82 being a standard value should work well.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Here's the updated, hopefully 100% correct circuit diagram:


Thats pretty nice, I must admit, im a bit jealous. That looks like a pretty good schematic, it even includes specific part values, and the calculations.

I have been busy the last couple days strugling with my NPN transistor cube design. I accidentally smoked a few test parts (good thing for off board testing!), and my measurements are not what I had expected, and I think the parts I have, may not work well for what Im doing :( I have considered re-designing it using n-channel mosfets instead of bjt. I think maybe 12 LEDs maybe too much for one sot23 2222 BJT NPN.

Im starting to like your design better, since mine isnt going anywhere quick!

Have you figured out Your BOM ? I hope this is close:
Nine TPIC6B585 shift register ICs
Nine .1uf ceramic capacitors
Eight 220 ohm resistors
Eight NDP6020P-ND P-channel mosfets
Eight 5k ohm resistors
Sixty-four 82 Ohm resistors
Five-hundred and twelve LEDs
Six-hundred and eighteen parts. That sounds like a lot, but its mostly the LED and resistors.



You know, I sell this bare board for $5 that will do all but the resistors and P-channel MOSFET.
96 open drain outputs (TPIC6B595) that can sink cathode current from 64 columns  and pull P-channel gates low to enable the 8 layers.
Save you a ton of assembly wiring time, you can concentrate on the cube wiring.

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


I was going to mention that in my BOM post, but I wasnt comfortable selling someone elses product, so im glad you posted that. That board will make that project a lot easier, and tidier. I didnt know it was only $5.

Do you also sell a populated board? I would think that a board that is populated and ready to use would also be of value to many people.

It seems to me, you could use that board, another board for the rest of parts (except the LEDs), and the LED cube. That would be very nice and tidy, and my guess is a lot harder to make a mistake.


I could sell them as populated. I don't advertise that, there are too many variations as to the parts that make up the board.
The ones I've assembled have been for specific projects.
IC Sockets? Male/Female headers? LED colors & brightness? Right angle or straight FTDI connector? Power connector type?

Same for the 'LED support' board.
I suppose a generic board with up to 81 cathode current limit resistors, 9 PNP or P-channel parts, and 9 gate/base pullup resistors could be put together.
(base current limit resistors too?)
Basically just not enough hours in a day for all the projects I'd like to do.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Hippynerd, I think your list of parts is accurate, or at least that's about what I have bought. But you might need to add the following:
-About 40 meters of silver plated copper wire (if you plan to make the cube quite lose, to ensure good visibility, the leggs of the LEDs just arent'long enough, so you'll need to make the whole structure out of craft wire)
-Some small size crocodile clips (at least 4) to hold the LEDs and craft wire together while soldering
-Some small hair clips to hold them together (or you could just borrow from a lady :P )
-9 IC sockets for the shift registers so you can avoid soldering them directly onto the board
-A few hundred breakable male and female pin headers to attach to the LEDs (making it possible to detach the cube from the circuitry) and to attach different parts of the circuitry to each other (I'm planning on putting it on 3 PCBs)
-A few appropriate size PCBs to hold the whole thing
-A 5V power supply which can power 64 LEDs at once (for 20 mA per led I got myself a 5V 2A power supply)

CrossRoads, you did mention this board you are selling earlier in this thread and I was very tempted to request one from you (still am tempted in a way, but now it might take too long to arrive). The only reason I didn't ask you to sell me one was that I did not really understand what's on it and how exactly I could connect it to my project. Sometimes I wish they taught us some hardware at the university. Unfortunately I've only ever learnt software, all that I know about hardware is just from reading on my own...


Here's my idea for an LED support board.
Place to accept cathode drive, series resistor and connect out to LED columns.
Place to accept gate/base drive, pull up the gate/base, and connect out to the anode layers.

USPS mail only takes a few days in the US, and not much longer internationally.

This board is 132 x 100mm, maybe I'll see if resistor can  be squeezed to fit on a 100x100mm board for lower cost.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


  I built my 5 x 5 x 5 cube on a perf. board with the resistors on the same board. I need to take another picture to show it.

@CrossRoads, I need a FET driver board for the Anode layers just like part of the board you are showing. Then, I think your sinker board that you have shown earlier would complete my project. I do not need the 81 resistor part of the board because my cube board already has the needed resistors.

Nice board design though!
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com


Here we go, rearranged to fit in 100x100mm.

The bare driver boards are $5 each mailed to US locations.  I've got 10 on hand.
paypal to cardinaflyer @ comcast dot net.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads, you should change your nickname to "SolutionMan" or "TheManWithTheSolutions" or something :)
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?



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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131