In my battery powered mouse design, for the main switches I was initially using the traditional SPDT switch circuit, but after realizing how bad it is for low power applications I moved to a low-power circuit:
The main difference between the two is that the traditional circuit continuously draws current, whereas the low-power one only needs as much current to charge the capacitor. I've done the math and determined that the RC low-pass filter does not add a noticeable delay in the switch operation.
This optimization is especially useful in scenarios where the switch will be in the on position for long periods of time.
Question:
Should I put the capacitor near the switch or near the MCU pin?
Is this even something I should worry about? The maximum distance from a switch to the MCU is 50mm.
I'm inclined to put the capacitor near the MCU like a standard decoupling capacitor for power pins.
What should I consider in making this choice?