I've recently put together the 4x4x4 led cube kit from icstation for the Arduino Uno, and I'm getting about what I expected from it. it works pretty well and I've made a simple code setup(although tedious) to create some neat designs. I would assume that it's not possible to make it brighter using only one resistor per plane, rather than one per column. If anyone has any pointers on how to get the most out of it I would appreciate it. attached is my code
sketch_may16a.ino (10.6 KB)
Have a look at this library and example code. Make sure you read documentation in the docs folder.
Is this your cube?
I can't read your .ino attachment on my phone, but I would guess the cube is lit one column at a time? So the duty cycle is 1 in 16. Let's assume those blue leds have a forward voltage of around 3.2V. The instantaneous current per led will be around (5-3.2)/500=3.6mA. The average current will be 3.6/16=0.2mA. Very dim!
The limiting factor with the circuit design, I think, is the maximum current that a single 74hc595 output pin can source, which is 35mA. Split between 4 leds in column, that's 8.75mA per led. So you could use series resistors of (5-3.2)/0.00875=205R. You could use 220R. That would give an instantaneous current per led of 8mA, 0.5mA on average.
To go brighter, you could change the duty cycle to 1 in 4, lighting the cube one layer at a time. As you figured out already, you would need one resistor per column for that, and 4 transistors to sink the current from the layers. A 74hc595 can source 70mA in total, so that's around 8mA per output pin, 8mA instantaneous led current, and with a 1 in 4 duty cycle, a 2mA average current. That's 10 times more than you are getting now. But it would require major surgery, to the circuit and the code. You would need to cut all 16 legs of the cube and solder more 220R resistors in place. You could solder 4 X bc337 transistors, their base pins into the board and their collectors to the layers/cathodes. You would need to find a ground point to connect the transistor emitters to, perhaps soldering a wire to the ground pin on the shield connector, or perhaps that unused 16-way header on the shield has a ground pad.