It started out as a little night list for my son, inside a frosted glass jar... but it was chewing up batteries because he fell asleep and never turned it off. I tried adding a 555 to get it to turn off after one hour... but the 555 just does not seem to work with large intervals like that... so I decided to try using an arduino. Overkill for sure, but I figure I can add some cool effects, like cyclons, pwm-ing etc.
I used a "dorkboard" due to the form factor and price, and I designed a little adapter board which connects 12 smt leds, and a button switch.
The device works, but with a problem. I have it on for say 10 minutes, and I "sleep" the device, and it works exactly as expected... but when I change the time to 1 hour I seem to have power problems before the hour is out, lights flicker etc.
I'm using 12 of these
http://www.sureelectronics.net/goods.php?id=389or
http://www.sureelectronics.net/goods.php?id=388My math says 20ma * 12 = 240ma per hour for the leds.. add a little for the arduino running at 16mhz. On three AA batteries that should get a few weeks of use right?
The only thing I can think of is a voltage drop, because there is no LM317 or regulated power on the dorkboard... just batteries straight to the mega168. I'm thinking there is a voltage drop, so the mega16 resets and/or the voltage across the leds is just gettign too low. Am I making the correct assumption?
If so I think I'll design my own purpose specific ardunio variant, all smt, with power reg built in.... but I'm not sure, I'm heading down the right path? Perhaps I can just just make a tiny power regulator and put it inline with the device I already made?
P.S. my little kid said I am a "genius" when he saw what I made for him... so while he may be wrong... I have a lot of motivation to get this working.

Thanks for the input.