0

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:

enter image description here

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? enter image description here 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?

StefanoN
  • 480
  • 2
  • 12
  • What are you using the capacitor for? – Andy aka Aug 20 '23 at 10:34
  • My one and only reason for putting it in is that after the switch closes and the line goes high, current will stop to flow through the switch, given that the switch I'm using is rated for 1mA min, I fear that the electrical connection between the two internal plates would sever until the next pressing event. When the MCU samples the line it will inevitably sink the current that was put into it, effectively lowering the voltage on that line, so I add capacitance to be able to "store" the pressing event for longer. First time doing this, so feel free to correct me. – StefanoN Aug 20 '23 at 12:28
  • 2
    You can do this if you expect strong RF noise around your circuit. In such a case the capacitor should be next to the MCU. – Jens Aug 20 '23 at 20:44

0 Answers0