SR Latch Output Uns...
 
Notifications
Clear all

SR Latch Output Unstable with Mechanical Switches?

1 Posts
2 Users
0 Reactions
1,421 Views
0
Topic starter

I'm using a basic SR latch built from NAND gates to hold the state of a mechanical switch, but I'm getting unstable or bouncing outputs. Sometimes the output changes multiple times with a single press or even toggles without touching anything.

I suspect it might be due to switch bouncing, but I’m not sure if that’s the only cause. Do I need to add debouncing components? If so, what’s the best way to debounce inputs for an SR latch—hardware (RC filter, Schmitt trigger) or software (if used with a microcontroller)?
Also, could stray signals or improper pull-up/pull-down resistors be contributing?


1 Answer
0

Yep, you're on the right track—mechanical switch bounce is the most likely culprit here. Mechanical contacts don’t just close once—they physically bounce for a few milliseconds, causing multiple rapid transitions that your SR latch interprets as separate inputs. That’s why you're seeing multiple or unstable output changes.

To fix this issue, I recommend using a resistor and capacitor on the input line. A typical starting point is a 10kΩ resistor and a 0.1µF capacitor. This will help smooth out the bounce. Also, make sure the inputs aren’t floating and are properly pulled up or down. That should clean up the behavior of your SR latch.


Share: