针对各种不同开关的开关去抖参考轨迹
Switch bouncing reference traces for a variety of different switches

原始链接: https://github.com/gsuberland/switch_bouncing

本仓库提供各种类型开关弹跳行为的示例轨迹,有助于设计稳健的去抖系统。数据涵盖来自Multicomp、Schurter、Schneider、XKB Connection、Dailywell和Lorin等制造商的摇杆开关、按钮开关和按键开关。 数据采集使用5V下拉配置、250MHz探头和PicoScope 3206B示波器,采样率为8.93MSa/s。对于每种开关,都采集了32次开关打开和32次开关关闭的动作,并改变了作用力和速度。双刀开关的常开和常闭触点分别记录数据。 仓库同时提供原始CSV数据(电压随时间的变化,单位毫秒)和PWL文件。PWL文件模拟开关电阻随时间的变化,允许在LTSpice等软件中进行真实的仿真。PWL数据假设关断电阻为100MΩ,导通电阻为1mΩ。所有资源均已进入公共领域。

Hacker News 最新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 各种不同开关的开关反弹参考轨迹 (github.com/gsuberland) 8 分,来自 luu,2 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 formerly_proven 5 分钟前 [–] 我从未见过这样的集合,真是太棒了。值得指出的是,由于使用了 x1 探头,输入电容约为 50-60 pF,这将导致 200 kHz 的低通滤波,并能抑制一般的高速振荡。在图表中可以看到,上升沿略微圆滑。MCU 的引脚电容要低得多,因此实际情况往往会比这更混乱,尤其是在放大后。 回复 加入我们,参加 6 月 16-17 日在旧金山举办的 AI 初创企业学校! 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系我们 搜索:

原文

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.

Falling edge (switch closing)

Rising edge (switch opening)

Falling edge (switch closing)

Rising edge (switch opening)

Falling edge (switch closing)

Rising edge (switch opening)

XKB Connection TC-1103-B-A

Falling edge (switch closing)

Rising edge (switch opening)

Dailywell MPS22-A03FP-3-JR-3V

Falling edge (switch closing)

Rising edge (switch opening)

Dailywell KPB22-8000-F10-324-JQ

N/O falling edge (switch closing)

N/O rising edge (switch opening)

N/C falling edge (switch closing)

N/C rising edge (switch opening)

Falling edge (switch closing)

Falling edge (switch opening)

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.

联系我们 contact @ memedata.com