I thought about modifying this circuit (Momentary switch power: press to turn on, microcontroller can turn itself off), but I wonder if something simpler might work (or if someone had a better idea)?
I'm using the Atmel SAM R21 Xplained to prototype a device. I want to detect if a tilt sensor has been activated, but I don't want to continuously poll its stated so I can save power. I'd like to poll, let's say once a minute, send it's state over 802.15.4 to the cloud.
Here is the idea I've come up with:
By using a digital output to charge a capacitor and the analog input to detected it's voltage, track the capacitor's voltage to see if it got shorted out within the 1 minute interval. The circuit would look something like this:

simulate this circuit – Schematic created using CircuitLab
The algorithm would be:
- Initially charge the capacitor.
- Loop forever - Detect, if the voltage dropped significantly, send a message. Charge the capacitor.
Thanks,
Greg