Electronic – arduino – ATtiny84 resets on high load

arduinoattinyled

I'm using a ATtiny84 and with three 74HCT595 serial to parallel converters to drive 24 LEDs. Every thing works fine, but when I try to light up more than 10 LEDs at the same time, the ATtiny84 program resets. I'm thinking a dip in voltage related to high load it causing this.

I've tried running it via a iPhone charger, PC USB but still the same issue. If I use the Arduino Uno to drive the LED's instead of the ATtiny84 it all works fine.

Any ideas on how to get around this? Do I need to add a capacitor somewhere or do I have to switch off some brown out voltage thing in the ATtiny?

Update:

I'm trying to make a clock. Two rings of 12 LEDs. The three 74HCT595 are chained using the overflow pin connected to the input of the next one. The 74HCT595 has 8 outputs so I need 3 of them for 24 LED's. The 3 digital pins of the ATtiny84 is used for clock, input and rclk.

Code: https://gist.github.com/anonymous/be75cd17bd5773f0df88

Best Answer

Repost from the comments section:

Place a decoupling capacitor across the voltage input pins of your ATTiny. 100nF normally suffice to smoothen over short dips in the voltage that result from switching loads, starting motors etc. Try to place the capacitor as (physically) close to the pins as possible. You should have decoupling capacitors for all devices that keep some kind of state, e.g. memory banks, uCs and whatnot.