Wednesday, February 13, 2013

Power consumption of Arduino

While the Arduino doesn't draw much power, the consumption does go up (significantly) if you throw a 7805 voltage regulator in the mix. Just because you don't actually see stuff happening, doesn't mean that the processor isn't at work. Even at full rest, an Atmel ATMega 328 powered through a 7805, does draw current. As my lights and sirens project demonstrates: one night of letting the box sit around without turning the main power switch off pretty much drained a 9V. Especially when the circuit is a toy for a 3-year old, it is hard to expect him to turn the thing off every time.

In order to address that, I updated my circuit a bit. After doing some searching, it was clear that the standby mode of the Arduino processor isn't good enough; it still draws power because of the voltage regulator. In order to address that, I came up with the following solution:


The 9V battery powers the voltage regulator in one of two ways. When the momentary push button is pushed, the circuit is closed and power is applied. That power will then initialize the processor, which in turn will set a pin to 5V. Setting the pin to 5V will engage the relay, which at that point closes the circuit for the 9V <-> 5V battery also. The momentary button can be released, since the relay is still active.

After some period of no activity, the processor can simply drop the pin to which the relay is connected to low, the relay disengages, and the circuit is broken, which cuts power to the voltage regulator, and as a result to the microprocessor.

As far as I can see now, the only drawback of this design is that the relay also draws a current. The model that I chose clocks in at around 24mA, which compares it to an LED. I could have countered that with a relay that latches, but those were too pricey for me.

All in all-- a solution that appears to work. And, with a timeout set to 2.5 minutes, hopefully less frequent battery replacements.

Friday, February 8, 2013

Arduino Lights and Sirens Final Product

I finished the final version of my Arduino Lights and Sirens project last night. I'll write up the software and the final build post later on, but I figured that I would at least share the results here.

The completed project box looks like this:


When it is actually running, you get the effect as shown below:




More details about the write-up at a later time.