{
  "id": "switch-debounce",
  "slug": "switch-debounce-calculator",
  "url": "https://electronics.tools/tools/switch-debounce-calculator/",
  "name": "Switch Debounce Calculator",
  "group": "amp-timing",
  "summary": "t = -RC ln(1 - VT+/VCC). 10 kΩ × 100 nF to 0.7 VCC is 1.204 ms.",
  "formulas": [
    {
      "id": "charge",
      "label": "Charge to VT+",
      "plain": "t = -R C ln(1 - VT+/VCC)",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"t = -R C ln(1 - VT+/VCC)\"><mrow><mi>t</mi><mo>=</mo><mo>-</mo><mi>R</mi><mi>C</mi><mi>ln</mi><mrow><mo>(</mo><mrow><mn>1</mn><mo>-</mo><msub><mi>V</mi><mrow><mi>T</mi><mo>+</mo></mrow></msub><mo>/</mo><msub><mi>V</mi><mi>CC</mi></msub></mrow><mo>)</mo></mrow></mrow></math>",
      "symbols": [
        "t",
        "R",
        "C",
        "VT+",
        "VCC"
      ],
      "sources": [
        "um10204"
      ]
    },
    {
      "id": "discharge",
      "label": "Discharge to VT−",
      "plain": "td = -Rd C ln(VT-/VCC) (Rd = 0 → instant)",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"td = -Rd C ln(VT-/VCC) (Rd = 0 → instant)\"><mrow><msub><mi>t</mi><mi>d</mi></msub><mo>=</mo><mo>-</mo><msub><mi>R</mi><mi>d</mi></msub><mi>C</mi><mi>ln</mi><mrow><mo>(</mo><mrow><msub><mi>V</mi><mrow><mi>T</mi><mo>-</mo></mrow></msub><mo>/</mo><msub><mi>V</mi><mi>CC</mi></msub></mrow><mo>)</mo></mrow></mrow></math>",
      "symbols": [
        "td",
        "Rd",
        "C",
        "VT-",
        "VCC"
      ],
      "sources": [
        "um10204"
      ]
    },
    {
      "id": "hyst",
      "label": "Schmitt hysteresis",
      "plain": "ΔVT = VT+ - VT-",
      "mathml": "<math display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\" aria-label=\"ΔVT = VT+ - VT-\"><mrow><mi>Δ</mi><msub><mi>V</mi><mi>T</mi></msub><mo>=</mo><msub><mi>V</mi><mrow><mi>T</mi><mo>+</mo></mrow></msub><mo>-</mo><msub><mi>V</mi><mrow><mi>T</mi><mo>-</mo></mrow></msub></mrow></math>",
      "symbols": [
        "ΔVT",
        "VT+",
        "VT-"
      ],
      "sources": [
        "scea046"
      ]
    }
  ],
  "variables": [
    {
      "symbol": "VCC",
      "name": "Supply",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 3.3,
      "urlParam": "vcc"
    },
    {
      "symbol": "R",
      "name": "Pull-up",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 10000,
      "urlParam": "r"
    },
    {
      "symbol": "C",
      "name": "Capacitor",
      "unit": "F",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 1e-7,
      "urlParam": "c"
    },
    {
      "symbol": "Rd",
      "name": "Discharge resistance (0 = ideal short)",
      "unit": "Ω",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 0,
      "urlParam": "rd"
    },
    {
      "symbol": "VT+",
      "name": "Rising threshold",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 2.3099999999999996,
      "urlParam": "vtp"
    },
    {
      "symbol": "VT-",
      "name": "Falling threshold",
      "unit": "V",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 0.9899999999999999,
      "urlParam": "vtn"
    },
    {
      "symbol": "SW0",
      "name": "Initial switch closed",
      "unit": "1",
      "role": "input",
      "precision": {
        "sig": 1
      },
      "default": 0,
      "urlParam": "init"
    },
    {
      "symbol": "Ts",
      "name": "Firmware sample period",
      "unit": "s",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 0.001,
      "urlParam": "ts"
    },
    {
      "symbol": "φ",
      "name": "Firmware sample phase",
      "unit": "s",
      "role": "input",
      "precision": {
        "sig": 4
      },
      "range": {
        "min": 0
      },
      "default": 0,
      "urlParam": "ph"
    },
    {
      "symbol": "N",
      "name": "Consecutive samples to accept",
      "unit": "1",
      "role": "input",
      "precision": {
        "sig": 1
      },
      "range": {
        "min": 1
      },
      "default": 2,
      "urlParam": "n"
    },
    {
      "symbol": "t",
      "name": "Charge time 0 → VT+",
      "unit": "s",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "td",
      "name": "Discharge time VCC → VT−",
      "unit": "s",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "ΔVT",
      "name": "Hysteresis VT+ − VT−",
      "unit": "V",
      "role": "output",
      "precision": {
        "sig": 4
      }
    },
    {
      "symbol": "τc",
      "name": "Charge time constant",
      "unit": "s",
      "role": "output",
      "precision": {
        "sig": 4
      }
    }
  ],
  "examples": [
    {
      "id": "10k-100n-07vcc",
      "title": "10 kΩ × 100 nF to 0.7 VCC",
      "input": [
        {
          "symbol": "VCC",
          "value": 3.3,
          "unit": "V",
          "display": "3.3 V"
        },
        {
          "symbol": "R",
          "value": 10000,
          "unit": "Ω",
          "display": "10 kΩ"
        },
        {
          "symbol": "C",
          "value": 1e-7,
          "unit": "F",
          "display": "100 nF"
        },
        {
          "symbol": "Rd",
          "value": 0,
          "unit": "Ω",
          "display": "0 mΩ"
        },
        {
          "symbol": "VT+",
          "value": 2.3099999999999996,
          "unit": "V",
          "display": "2.31 V"
        },
        {
          "symbol": "VT-",
          "value": 0.9899999999999999,
          "unit": "V",
          "display": "0.99 V"
        },
        {
          "symbol": "SW0",
          "value": 0,
          "unit": "1",
          "display": "no"
        },
        {
          "symbol": "Ts",
          "value": 0.001,
          "unit": "s",
          "display": "1 ms"
        },
        {
          "symbol": "φ",
          "value": 0,
          "unit": "s",
          "display": "0 ns"
        },
        {
          "symbol": "N",
          "value": 2,
          "unit": "1",
          "display": "2"
        }
      ],
      "output": [
        {
          "symbol": "t",
          "value": 0.0012039728043259357,
          "unit": "s",
          "display": "1.204 ms"
        },
        {
          "symbol": "τc",
          "value": 0.001,
          "unit": "s",
          "display": "1 ms"
        },
        {
          "symbol": "ΔVT",
          "value": 1.3199999999999998,
          "unit": "V",
          "display": "1.32 V"
        }
      ],
      "computedBy": "switchDebounce"
    },
    {
      "id": "39k-100n-07vcc",
      "title": "39 kΩ × 100 nF to 0.7 VCC",
      "input": [
        {
          "symbol": "VCC",
          "value": 3.3,
          "unit": "V",
          "display": "3.3 V"
        },
        {
          "symbol": "R",
          "value": 39000,
          "unit": "Ω",
          "display": "39 kΩ"
        },
        {
          "symbol": "C",
          "value": 1e-7,
          "unit": "F",
          "display": "100 nF"
        },
        {
          "symbol": "Rd",
          "value": 0,
          "unit": "Ω",
          "display": "0 mΩ"
        },
        {
          "symbol": "VT+",
          "value": 2.3099999999999996,
          "unit": "V",
          "display": "2.31 V"
        },
        {
          "symbol": "VT-",
          "value": 0.9899999999999999,
          "unit": "V",
          "display": "0.99 V"
        },
        {
          "symbol": "SW0",
          "value": 0,
          "unit": "1",
          "display": "no"
        },
        {
          "symbol": "Ts",
          "value": 0.001,
          "unit": "s",
          "display": "1 ms"
        },
        {
          "symbol": "φ",
          "value": 0,
          "unit": "s",
          "display": "0 ns"
        },
        {
          "symbol": "N",
          "value": 2,
          "unit": "1",
          "display": "2"
        }
      ],
      "output": [
        {
          "symbol": "t",
          "value": 0.004695493936871149,
          "unit": "s",
          "display": "4.695 ms"
        },
        {
          "symbol": "τc",
          "value": 0.0039,
          "unit": "s",
          "display": "3.9 ms"
        }
      ],
      "computedBy": "switchDebounce"
    }
  ],
  "sources": [
    {
      "title": "NXP UM10204 I2C-bus specification and user manual, Rev. 7.0 — §7.1 exponential V(t) = VDD (1 − e^{−t/RC})",
      "url": "https://www.nxp.com/docs/en/user-guide/UM10204.pdf",
      "retrieved": "2026-11-14",
      "standard": "UM10204 Rev. 7.0"
    },
    {
      "title": "TI SCEA046B Understanding Schmitt Triggers",
      "url": "https://www.ti.com/lit/ab/scea046b/scea046b.pdf",
      "retrieved": "2026-11-14",
      "standard": "SCEA046B"
    },
    {
      "title": "TI SLLA364A Solving CMOS Transition Rate Issues Using Schmitt Trigger Solution",
      "url": "https://www.ti.com/lit/wp/slla364a/slla364a.pdf",
      "retrieved": "2026-11-14",
      "standard": "SLLA364A"
    },
    {
      "title": "TI CD74HC14 Hex Schmitt-Trigger Inverters, Rev. G — labelled VT+/VT− example only, not auto-selected",
      "url": "https://www.ti.com/lit/ds/symlink/cd74hc14.pdf",
      "retrieved": "2026-11-14",
      "standard": "CD74HC14 Rev. G"
    }
  ],
  "datePublished": "2026-11-14T00:00:00+08:00",
  "dateModified": "2026-11-14T00:00:00+08:00",
  "author": {
    "name": "Jasper",
    "url": "https://electronics.tools/about/#jasper"
  },
  "relatedTools": [
    "https://electronics.tools/tools/555-timer-calculator/",
    "https://electronics.tools/tools/rc-time-constant-calculator/"
  ]
}
