• cmnybo
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 days ago

    Many microcontrollers already have Schmitt trigger inputs. If the switch is just for user input, a small capacitor between the input and ground is usually sufficient.

    • Maple Engineer@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

      Yup. Many do but the ESP-32 doesn’t. The problem that I was having was that it didn’t matter what combination of R and C I used it wasn’t fast enough to prevent multiple triggers during the transition through the tristate. The Schmidt trigger made the curve square.

      This was the best that I could do with an RC hardware debounce.

      This is what it looked like with the Schmidt trigger.

      I’m happy to use the Schmidt trigger for my project but I’m not suggesting that anyone else should do it for theirs.