# Wake up on movement

My circuit application requires processing during physical activity, but it can be put to deep sleep for long periods of inactivity. I need a "true" or "false" output from a sensor that can be used to interrupt a microcontroller, i.e. an accelerometer would be massive overkill.

Is there a very cheap ( < \$1 ) and very low power ( < 10uA ) sensor or technique that will generate an interrupt to a microcontroller when the sensor is physically moved?

I know you said an accelerometer would be overkill, however the Freescale MMA8453QT can actively sample while drawing only 6 ua and provide an interrupt on movement. Price is 84 cents in quantities of 100, which appears to meet your needs.

• This does indeed meet my needs. Commented Nov 21, 2011 at 22:21

Yes. There are motion sensors that act like a switch and randomly open and close when moved. When not moved, the output freezes in whatever state it was last in. These things can be suprisingly sensitive.

One drawback is that you never know if the switch will be open or closed when nothing is happening. Since it could be closed for long periods of a time, you have to take this into account when designing for low current. In your case you can tolerate 10 µA, so that's not much of a problem. A 1 MΩ pullup would only take 3.3 µA at 3.3 V.

You can sample periodically with a micro and have the pullup be on for only a fraction of the time to reduce current. It then becomes a probability game at slow sample rates. If you figure the state of the switch is random every time you sample it when the device is moving, then you only have a 1:1024 chance of missing motion after 10 samples. If you sample fast enough compared to the mechanical time constant of the sensor, then the probability of missing motion goes way down, but your average current goes up. For example, sampling every 10 ms is unlikely to miss even one event, whereas every 100 ms makes the result random when moving.

• One can improve the odds by pulling the port weakly to the "OR" of the port's present value and a signal which periodically pulses high. An advantage of this scenario is that if something can generate periodic short pulses while the micro is asleep, the micro can wake up if the port's value changes. Depending upon capacitive loading effects, the resistor may only not have to pull up on a closed switch as long as would be necessary with a processor polling it (e.g. with a 100K resistor, "on" time would have to be about 1us per 10pF). One could handle 320pF of loading if one's pulse generator... Commented Nov 17, 2011 at 22:34
• ...was on for 32us every ~8ms, a duty cycle of 0.4%. That would waste 1/25 the energy of a 1 meg resistor while offering better sensitivity. Commented Nov 17, 2011 at 22:36
• Good Comments. Thanks. Do you have any part numbers? What should I google to find these parts? Commented Nov 17, 2011 at 23:26
• Interrupt on change. It seems like waking up to sample will consume more current than just waiting for the event. Commented Nov 17, 2011 at 23:33
• @Joel: Not really. The point of sampling periodically is to keep the pullup off most of the time. To trigger the micro using interrupt on change requires the pullup on all the time, which will draw current half the time on average and possibly for long periods of time if the sensor happened to end up closed after the last motion. Waking up periodically uses very little current. Low power watchdogs are under 1 uA. On for 10 uS every 10 ms is 0.1% of the time, so 1 mA when running becomes 1 uA average. Commented Nov 21, 2011 at 18:56

See my answer to this question: Accelerometer switch to trigger LED fade.

There are problems with some of the other suggestions: MEMS type accelerometers are the ideal solution, but need to be powered up to sense. Switches that randomly open/close also require some power to do the sensing (or a complicated polling system). Tilt switches could be good, if the "idle" position is guarenteed to be when the switch is off.

My super-cheap accelerometer (which I didn't invent) can be made with different sensitivities and consumes no power when there is no motion. If your microcontroller doesn't offer good power savings features then you can probably create your own external circuit to shut off power to the MCU until there is motion.

Are you looking for a tilt switch? It won't detect as many types of movement as a 3-axis accelerometer, but it will be simpler. It can be powered through a very large pull-up resistor to avoid wasting energy.

There are also piezoelectric vibration sensors. You'd need 3 orthogonally to detect movement in any direction. They generate their own voltage.

looks like this is the solution. https://au.element14.com/sensolute/mvs0608-02/sensor-micro-vibration-15v/dp/1768152

My needs are similar. something simple that wakes up the uC when someone picks up the circuit. There are cheaper versions of these.

• They've managed to manufacture and market an SMT version of a bad connection.. Commented Sep 1, 2023 at 3:30