ATtiny Hacks: 2313 Driving A 4x4x4 LED Cube

ATtiny Hacks Theme Banner

[Kirill] wrote in to share his ATtiny hack, a 4x4x LED cube. The 64 LED display is a great choice to fully utilize the hardware he chose. It’s multiplexed by level. Each of the four levels are wired with common cathodes, switched by a 2N3904 transistor. The anodes are driven by two 595 shift registers, providing a total of 16 addressable pins which matches the 4×4 grid perfectly. All said and done it only takes seven of the ATtiny2313’s pins to drive the display. This is one pin more than the chip’s smaller cousins like the ATtiny85 can provide. But, this chip does include a UART which means the project could potentially be modified to receive animation instructions from a computer or other device.

You may have noticed the USB port in the image above. This is serving as a source for regulated power in lieu of having its own voltage regulation hardware and is not used for data at all. Check out the animations that [Kirill] uses on the display by watching the video after the break. You’ll find a link to the source code there as well.

[youtube=http://www.youtube.com/watch?v=d4na-kO2q1Q&w=470]

Here’s a link to [Kirill’s] source code: http://www.mediafire.com/?c47p92t0rl3z90p

19 thoughts on “ATtiny Hacks: 2313 Driving A 4x4x4 LED Cube

  1. Hey there — someone mind clearing up some of my confusion with a number of LED matrix/cube projects? It always seems like folks are running their shift registers way over the max ratings (when all LEDs are lit), or I’m just way off on my calculations…please be gentle on your response ;)

    I’m looking at the 74LS595 datasheet and seeing I_CCH for the 595 to be 50 mA, and I_CCL to be 65 mA. With those 68 Ohm resistors and V_CC = 5.0V, we’d be sourcing roughly 70 mA for each LED connected to that shift register.

    I must be wrong…otherwise if all 8 LEDs connected to the 595 are on…those shift registers would be getting mighty hot, right? ;)

    I see the 596 has open collector outputs, which might certainly alleviate this issue a bit, if there is one…

      1. i didnt look at the sourcecode but im assuming the code is loading while the LEDs are off and then a delay while they are on, i was assuming the program took 50% of the time and the delay would be the other half.

      1. Sure…those transistors are sinking that current, but I’m still confused how the 595’s can source the 5V / (68 Ohm + some additional series resistance) A. I guess the low duty cycle clears it up for me though…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.