maandag 17 januari 2011

Auto powerdown

A little detail from the Secret d'Icey project: I am actually not very familiar with Atmel's own power saving capabilities, so I made a little circuit with FET's. I set it up so that the Atmega328 cuts off its own power when there is no activity for 30 seconds.


Default the gate of the P-FET (IRF9530) is pulled up to V+, which is connected to the batteries. This turns off the P-FET and Vs stays 0V. The pulse switch S2 connects the gate to ground and lets the P-FET conduct so Vs become equal to V+. This will power up the circuit that also contains the Atmega328. When the Atmega is turned on the output B2 (pin 5) turns high. This makes also the N-FET IRF540 conduct and makes sure the gate of the P-FET keeps grounded. This takes over the role of the pulse switch.

When there is no change in the dice state for 30 seconds the output B2 becomes low, which turns off the N-FET and the gate of the P-FET is again pulled up high to V+. Now the circuit (Vs) is cut off from the batteries.

(The IRF540 and IRF9530 are maybe a bit overkill (with a maximum drain current of 22 respectively 12A) but these I had lying around.)

I tend to learn how to use Atmel's power saving functions in the near future, but until then this hardware solution will serve its purpose nicely and maybe it can be useful for other applications.

Geen opmerkingen:

Een reactie posten