I'm trying to reverse engineer a pcb and I'm stuck on this circuit. I believe the capacitors maybe for debounce. The switch is a reed switch. Can anyone shed any light on it?

Circuit diagram

  • \$\begingroup\$ is the micro pin configured as an input within a passive pullup enabled? \$\endgroup\$ – vicatcu Aug 11 at 1:09
  • \$\begingroup\$ Yes I think it is. \$\endgroup\$ – Samuel Taylor Aug 11 at 2:44

You are correct it is a low pass filter for debouncing the reed switch. Reed switches dont just bounce they can vibrate for some time due to the physical configuration of the contact arms.

enter image description here

  • \$\begingroup\$ This is just to block RF noise. True debounce is done internally as simple digital filters. \$\endgroup\$ – Sparky256 Aug 11 at 8:09
  • \$\begingroup\$ I understand the use of the caps but why the resistors? Sorry if this seem a dumb question just trying to learn. :) \$\endgroup\$ – Samuel Taylor Aug 11 at 11:49
  • 1
    \$\begingroup\$ This is a RC (resistor capacitor) filter the time constant is R x C.You need resistance to provide some delay so the capacitor charges less rapidly. \$\endgroup\$ – RoyC Aug 11 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.