Electronic – How to interface a SPST switch with minimal current (1µA)

low-powermicrocontrollerswitches

The usual way to wire up a SPST switch to a MCU is by means of a pull-up resistor. However, this wastes current when the switch is closed. If this switch is used to wake up the MCU from sleep, then this current (100-500 µA) is significant compared to the sleep current (< 0.1 µA). I imagine increasing the resistor value up to megaohms wouldn't be practical for a number of reasons. So is there a better way to interface a SPST in general? I have a couple of pins on the MCU to spare (but keep in mind the MCU has to be put in sleep most of the time – it should wake up and do its stuff only when the switch state changes).

The only solution that comes to my mind is to basically use the pull-up scheme, but buffer it through a P-MOSFET/N-MOSFET pair for increased input impedance.

And yes, I realize the solution is trivial if we were dealing with a SPDT or a push-button.

Best Answer

If the latency (in reading the switch) was acceptable at once per 100 milliseconds then why not let the micro wake up for a short period (in as low a current mode as possible), energize the switch's pull-up briefly, read the switch, then do what it has to do then re-enter sleep mode.

The switch is only briefly taking current when the micro wakes up.

Maybe the problem with this scenario is that the micro wakes up for 1 millisecond and consumes 1mA for that period BUT if it only does this once every 100 milliseconds then its average consumption is 10 uA. At least that may be better than energizing a closed switch continually?

As an aside you've got to take care to feed a switch with enough current to break thru oxide layers that form - it's called the switch's wetting current and some can be several milliamps.