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.

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. Inb4 not a hack! I really like the way this is put together; quite simply. I’d love to know how the animations are written; whether theyre hard coded, or calculated on the fly.

  2. 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. duty cycle of 50% = 1/2*power so if it was 70ma and it is on 50% of the time the shift reg. will heat as if a 70ma/2= 35ma..: <50ma

      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…

  3. Nice circuit :) I’ve planned to build it but some problems occured during compiling the source code…could you send me The hex file? I’d be pleasant.
    my address: szabi155@vipmail.hu
    Great site anyway :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s