This repository contains a collection of example traces showing switch bouncing behaviour. This may be useful if you want some quick reference data for implementing robust debouncing systems in your circuits and firmware.
Device | Type | Notes |
---|---|---|
Multicomp MC3813-011-01 (archive, datasheet) | Rocker switch, latching, DPST | Only one pole tested. |
Schurter 1301.9206 (archived catalogue) | Rocker switch, latching, SPST | Old part, been in my drawer for over ten years. |
Schneider XB2-BW31B1C (archive, datasheet) | Push button, momentary, NO | Very large industrial pushbutton. |
XKB Connection TC-1103-B-A (archive, datasheet) | Push button, momentary, NO | |
Dailywell MPS22-A03FP-3-JR-3V (archive, datasheet) | Push button, momentary, NO | IP67 / IK10 rated |
Dailywell KPB22-8000-F10-324-JQ (archive, datasheet) | Push button, momentary, SPDT | IP65 rated. NO and NC traces recorded. |
Lorin IRL-5-M-D-2 (archive, datasheet) | Key switch, momentary, DPDT | Only one pole recorded, only NO trace recorded as the NC legs were cut off. |
The switches were configured as pull-downs, i.e. opening the switch leaves the voltage a +5.0V, and closing the switch pulls the output voltage to ground.
All traces were collected using the same procedure and equipment:
- Connect 5.0V to one terminal of the switch through a 10kΩ resistor.
- Connect 0.0V to the other terminal of the switch, directly.
- Measure voltage across the switch.
- 250MHz probe (x1)
- PicoScope 3206B recording at 8.93MSa/s
- 2V trigger, 1.5% hysteresis, 20% pre-trigger, both edges
- Press the button 32 times, resulting in 64 total traces (rising/falling edges)
- Approximately 8 presses in 1 second spacings (holding for momentary).
- Approximately 8 presses in rapid succession.
- Approximately 8 presses with light or glancing actuation.
- Approximately 8 presses with heavy force.
- If the switch is double-throw, record measurements for both the NO and NC contacts.
These plots show 32 opening and 32 closing actions on top of each other for each device.
Remember that the switches were configured as pulldowns, so high voltage = open, low voltage = closed.
PWL files are available to download under this repository's releases section. These PWL files contain switch resistance values over time, assuming an off-resistance of 100MΩ and an on-resistance of 1mΩ. These allow you to accurately simulate the behaviour of the switch during bouncing, beyond just a simple on/off state.
Here is an example of the PWL data being used in LTSpice:
The PWL file is loaded into a voltage source, and the output of that voltage source is labelled as Vres
(you can pick any name). A resistor is added to the circuit and its resistance parameter is set to R={V(Vres)}
, matching the voltage source label. This resistor acts like the switch. The rest of the circuit shown is part of a test simulation for hardware debouncing - the voltage source (V3) and resistor (R3) are all you need.
The raw data is available to download under this repository's releases section. The data is formatted as a CSV with a header, with each device in its own directory. For double-throw devices that have both normally-open and normally-closed forms, the device will have two directories suffixed with -NO
and -NC
respectively.
Voltages are simply in volts. Timestamps are in milliseconds. A timestamp of zero signifies the time at which the oscilloscope was triggered by a rising or falling edge. Negative timestamps are before the trigger, positive after the trigger.
Everything in this repository is released into the public domain.