2-Pin Push Button Switch Wiring Diagram: Pull-Ups and Debounce

2-pin push button switch wiring

A 2-pin push button switch wiring diagram connects a single two-terminal contact pair to a low-voltage logic input—alongside a pull-up or pull-down resistor so the input never floats when the button is open. Unilluminated 2-pin mechanical contacts are nonpolar, yet choosing between normally open (NO), normally closed (NC), momentary, and latching suffixes—plus sizing the pull resistor against input leakage and debounce—determines whether an MCU registers clean presses in production.

Active-Low IdleHIGH (2.79–3.3 V)10 kΩ pull-up · 20 µA max leak
Active-Low PressedLOW (≤ 0.038 V)0.33 mA nominal · 100 Ω path
Contact PolarityNonpolarUnless illuminated (LED inside)
Bounce WindowRC + Firmware10 kΩ × 100 nF → 2.0 V in 0.93 ms

Wiring a 2-pin switch: Active-Low pull-up vs. Active-High pull-down

Every open mechanical contact leaves a high-impedance CMOS pin floating and vulnerable to noise or phantom triggers. Most PCB designs prefer Active-Low (pull-up to +3.3 V, switch to GND) because routing ground to an off-board front-panel switch avoids exposing the regulated +3.3 V rail to accidental chassis shorts. Note that these examples apply strictly to energy-limited SELV logic inputs—never mains or safety interlocks. Do not confuse a 2-pin SPST contact with a 3-terminal changeover switch (see our SPDT switch arrangement guide).

Active-Low (Pull-Up — Preferred)Released = HIGH · Pressed = LOW (Routes GND to button)+3.3 VR1 = 10 kΩMCU GPIOS1 (2-Pin NO)Pin 1 & Pin 2 nonpolarGNDActive-High (Pull-Down Alternative)Released = LOW · Pressed = HIGH (Routes +3.3 V to switch)+3.3 VS1 (2-Pin NO)MCU GPIOR1 = 10 kΩGND
Figure 1 — Comparing Active-Low (pull-up) and Active-High (pull-down) 2-pin push button wiring on a 3.3 V logic input. Always verify whether the exact MPN is a 2-pin contact or a 4-leg internally bridged tactile switch (such as the OMRON B3F series).Scroll the diagram horizontally to see all labels.

Distinguish NO, NC, momentary, and latching contact actions

Identical actuator caps and footprints can hide completely different switching actions—lock the exact orderable suffix per our PCB switch action & package guide:

NO Momentary (Most Common)

At rest:Open
While pressed:Closed
After release:Returns Open
NC Momentary

At rest:Closed
While pressed:Open
After release:Returns Closed
Push-On / Push-Off Latching

Initial state:Open (or saved)
First press:Toggles Closed
After release:Stays Closed!

Sizing a 3.3 V pull-up resistor against leakage & logic thresholds

Assume a 3.3 V MCU rail spanning 3.0–3.6 V, logic thresholds of VIH ≥ 2.0 V and VIL ≤ 0.8 V, maximum open-state pin sink leakage of 20 µA, and worst-case closed switch + trace resistance of 100 Ω:

Open-State Worst High (10 kΩ ±5% = 10.5 kΩ max): 3.0 V − (20 µA × 10.5 kΩ) = 2.79 V (+0.79 V margin)
Closed-State Worst Low (9.5 kΩ min): 3.6 V × 100 / (9,500 + 100) = 0.0375 V (+0.76 V margin)
Pull-up resistor sizing comparison (3.0–3.6 V rail, 20 µA max leakage, VIH ≥ 2.0 V)
Pull-Up R1 (±5%) Worst Open Vin Nominal Pressed I DC Logic Verdict & Trade-Off
4.7 kΩ 2.901 V 0.70 mA Pass Strong noise immunity & contact wetting; higher pressed current
10 kΩ 2.790 V 0.33 mA Pass Balanced default for general MCU logic inputs
100 kΩ 0.900 V 0.033 mA Fail Drops 2.1 V under 20 µA leakage—violates 2.0 V VIH!

Two practical design details matter here: (1) an external resistor guarantees a known idle state during MCU boot/reset before internal pull-ups enable—and ensures the pin isn’t briefly driven HIGH as an output while pressed; and (2) verify the switch datasheet’s minimum wetting current, because heavy power contacts can oxidize when switching only 0.33 mA. Compare resistor technologies in our PCB resistor types guide.

Contact bounce, 100 nF RC filtering & firmware debounce

Mechanical switch contacts chatter for 1–20 ms on make and break. Adding a 100 nF filter capacitor across an active-low input with a 10 kΩ pull-up yields τ = 1.0 ms, charging from 0 V to the 2.0 V threshold in −1.0 ms × ln(1 − 2.0/3.3) ≈ 0.93 ms after release—but repeated bounces can still reset the cap and slow edges can chatter non-Schmitt inputs:

Switch Bounce vs. RC Filtering & Debounce Timing (3.3 V Active-Low)Raw Pin Voltage(No debounce)Press bounceRelease bounceWith 100 nF Cap(τ = 1.0 ms)2.0 VReaches 2.0 V in 0.93 ms (use Schmitt input!)Firmware Event(e.g., 15 ms lock)Single Clean Valid Press Registered
Figure 2 — Mechanical bounce causes multiple edge transitions on raw inputs. Pair an optional RC filter (and Schmitt-trigger GPIO or series discharge resistor) with a defined firmware debounce window.Scroll the diagram horizontally to see all labels.

Separating ICT continuity from powered functional testing

Board-Level ICT (Unpowered)

Functional Press & Release Test (Powered)

  • Measure idle voltage (confirm ≥ 2.0 V), actuated low level (≤ 0.8 V), and post-release return to idle.
  • Verifying the return to idle catches an accidental latching-switch substitution that a press-only test misses.

Frequently asked questions

Does a 2-pin push button switch have polarity?

An unilluminated mechanical 2-pin switch is nonpolar and works identically in either direction. Illuminated push buttons (with an integrated LED) or diode-protected switches are polarized—always check the manufacturer schematic.

Why is a 10 kΩ pull-up safer than 100 kΩ on a 3.3 V logic input?

Under a 20 µA worst-case input leakage, a 100 kΩ ±5% pull-up drops up to 2.1 V, pulling a 3.0 V rail down to 0.9 V (failing a 2.0 V VIH threshold). A 10 kΩ ±5% pull-up stays at 2.79 V with 0.79 V margin while drawing only 0.33 mA when pressed.

Is a 100 nF capacitor enough to debounce a push button by itself?

Usually not alone. While 10 kΩ × 100 nF creates a 1 ms time constant, heavy switch bounce can re-discharge the capacitor repeatedly, and slow rising edges require a Schmitt-trigger input or a firmware debounce interval (typically 10–20 ms) to guarantee single-event detection.

Review your push-button input & test-point layout before PCBA

As a PCB manufacturing and PCB assembly factory, Highleap Electronics verifies exact switch MPN contact actions (NO/NC/latching), footprint clearances, and ICT/functional test-point access before production.

  • Exact switch MPN & momentary/latching suffix
  • 3.3 V / 5 V rail, VIH/VIL & leakage limits
  • Pull-up/pull-down value & debounce timing
  • PCB Gerbers, test-point map & assembly drawing

Review push-button input design

Photo of Ashley, Senior International Business Manager at Highleap Electronics

About the Author

Ashley – Senior International Business Manager at Highleap Electronics


Ashley specializes in one-stop PCB and PCBA solutions, supporting international customers with DFM analysis, Gerber file optimization, and engineering coordination from PCB fabrication through EMS production.


With strong technical communication skills and fluent English, she works closely with engineering teams to align design intent, manufacturing processes, and quality requirements—helping ensure reliable delivery for complex PCB and PCBA projects.

Highleap PCB and PCBA solutions - request a quote

Recommended Posts

How to get a quote for PCBs

Let‘s run DFM/DFA analysis for you and get back to you with a report. You can upload your files securely through our website. We require the following information in order to give you a quote:

    • Gerber, ODB++, or .pcb, spec.
    • BOM list if you require assembly
    • Quantity
    • Turn time

In addition to PCB manufacturing, we offer a comprehensive range of electronic services, including PCB design, PCBA, and turnkey solutions. Whether you need help with prototyping, design verification, component sourcing, or mass production, we provide end-to-end support to ensure your project’s success.

For PCBA services, please provide your BOM (Bill of Materials) and any specific assembly instructions. We also offer DFM/DFA analysis to optimize your designs for manufacturability and assembly, ensuring a smooth production process.

    Tell Us About Your PCB Project

    No design files yet? No problem. Share what you know, and we'll follow up if more details are needed.



    Upload files (optional)

    PCB files, BOM, PDF/STEP, TXT, images, ZIP/RAR/7Z · Max 50 MB total