DPST-NO Tactile Switch Circuit

Thread Starter

radi8

Joined Oct 18, 2024
23
I am currently designing a small PCB using SKRNPAE010 tactile switch - which has a DPST-NO circuit. I am looking to hook the switch up to a small computer such as a Raspberry Pi via GPIO pins. I have seen that it recommended to have pull-up resistors for switches connected to microcontrollers, etc. to stabilize the signal. I made the follow circuit, which I as far as I know is correct. VCC on pins 1 & 3 will be connected to the Pi's 3.3 Power Pin, while S1-1 and S1-2 will be connected to GPIO pins on the Pi. Likewise, pins 2 & 4 are grounded.

Could a get a sanity check for this circuit? Thank you!
1736709517873.png
 

nsaspook

Joined Aug 27, 2009
16,250
This is for a camera - I need to detect half presses (focusing the camera) and full presses (to take the picture.)
OK, that makes sense (I should have read the switch spec's first), 1st 0.78N, 2nd 2.45N. Your circuit looks fine but there will be contact bouncing. I assume the software will handle that to reliably detect the half and full presses.
 

Thread Starter

radi8

Joined Oct 18, 2024
23
Because of the link between pins 2 and 3 of the switch, S1-2 is permanently grounded.
As far as I know, this should be the intended behavior:
  • When unpressed, S1-1 and S1-1 will be HIGH because of the pull up resistor
  • When half pressed, S1-1 will be LOW and S1-2 HIGH
  • When fully pressed, S1-1 * and * S1-2 will be LOW
Would this circuit not give that behavior? If so - what would need to be changed? This is the diagram from the datasheet:
1000010630.gif
 
Top