bobmcinnis:
I built a simple project with my son. It's sort of a nightlight where four led's are connected to the Arduino via a breadboard and there's a button attached to it. He pushes the button and the lights go on and again and the lights go off. I figured the LED didn't use much power so it could be run off of a 9 volt battery for a good amount of time.We connected a 9 volt battery to the power connector. It worked great as his first stand-alone device. He didn't use it yet, but overnight the battery drained, even though the button wasn't pressed and the LED's weren't on. Any ideas why? I noticed there's a little light lit on the board even when the button isn't pressed. Could that tiny light be draining the battery?
Having prototyped the system on an Arduino, I would build a minimal atmega328p design on a piece of stripboard, and program it to be in sleep mode most of the time. If you want to stick with the 9V battery as the power supply, use a micropower regulator to provide the 5V supply, such as the MCP1702-5002E.