We've a projet with an important autonomy concern. We use an homemade arduino (atmega328), and for the moment we're using interrupts on buttons to wake up the atmega.
so we have: sleep ->(button pressed) -> wake -> (user RFID identification) -> (RF Communications) -> sleep.
We've optimized the total consumption with advanced sleep, modules isolated from current with transistors and so on...
I was asking myself if we could use a voltage regulator with a shutdown pin, and link one button and one pin of the atmega with it.
We would have this cycle: shutdown -> (button pressed) -> shutdown pin HIGH -> atmega is powered-> atmega set shutdown pin HIGH during sketch configuration -> user RFID identification) -> (RF Communications) -> atmega set shutdown pin LOW -> shutdown
You get get the schematic here: So to summarize: I need the button during my sketch, so when it's pressed and get the shdn pin high on the regulator, the first thing the arduino makes is maintaining this high with its pin 4. Furthermore, it restore the pull-up configuration of the button by reconnecting it to the ground through the npn transistor. When arduino is shutdown, button is linked to VIN as the npn make a NOT function with arduino state (HIGH or LOW).
Do you think it could work? If something is unclear don't hesitate to tell me :-)
Thank's a lot!