Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/06/03 05:15
Read: times


 
#57919 - RC + Schmitt-trigger - Scope plots
Responding to: ???'s previous message
Here are some scope plots, which demonstrate debouncing performance of following 'RC-filter + Schmitt-trigger circuit':



When the key is pressed ('make'), 100n capacitor begins to discharge through 10k resistor. Time constant of this discharge is (10k x 100n) sec = 1msec. If contact bouncing takes place, discharge is stopped and instead a charging takes place through 220k resistor. But because charging time constant is much greater, namely (220k x 100n) sec = 22msec, capacitor is only little charged during bouncing. Discharging is highly dominating. This can be seen in the following scope plot: 'Input' means voltage across 100n capacitor. Again 10:1 scope probes were used.



Here another bounce event, with stretched horizontal deflection:



The following scope plot shows performance of key release ('break').



At points of 'Input' voltage, where curve doesn't look like ideal charging or discharging (exponential curve), heavy bouncing takes place with many very narrow spikes. 'Input' voltage curve, which represents voltage across 100n capacitor, results from an integration over these spikes.

How to dimension such a circuit?
First, a high quality capacitor should be used. X7R ceramics is very reliable and enough stable with time and temperature for this application! Of course, also polyester foil capacitors can be used. Electroytic capacitors should be avoided, especially when high ambient temperatures are to be expected.

Next, charging and discharging time constant should be very different, at least by a factor of 10, or so. Otherwise capacitor cannot be discharged enough! Actual resistor values depend on input leakage current of Schmitt-trigger gate, allowed maximum current across key and, of course, on wished time constants.
CMOS gate's input leakage current is less than 1µA, so that 220k resistor is not too high. 10k resistor limits discharging current to less than 500µA, which is quite adequate for key contacts.

How to choose time constants?
To prohibit the fabrication of more than ONE edge when key is pressed or released, Schmitt-trigger hysteresis, charging time constant and bounce duration must match. Or by other words, if voltage of discharging capacitor once has reached lower threshold level of Schmitt-trigger, eventual charging process during same 'make' or 'break' event must not result in a reach of upper threshold level!
From the charging formula U(t) = 5V x (1 - exp (-t / tau)) we can calculate the time T needed to charge the capacitor from the lower threshold voltage (Ul) to the upper (Uu). With Uu = 2.9V, Ul = 1.9V and tau = 22msec it follows:

T = -tau x ln (1 - Uu / 5V) + tau x ln (1 - Ul / 5V) = 8.6msec

What do we conclude?
T is a bit little! There's no problem with 'make' procedure, as we can see from according scope plots. Bounce duration here is very short. But with 'break' procedure, where scope plot shows some greater bounce duration problems can occur. Especially, when key contacts are becoming a bit older. We must also take into account, that threshold levels can show some tolerance. This influence can be checked with the help of datasheet, of course.

I would increase charging time constant to prohibit all further problems:



With this circuit T is about 40.4msec. This is pretty enough for very most cases.
If someone wishes a lower ohmic circuitry, increase capacitor and decrease resistors by same factor. Avoid too little discharging resistor.

Kai

List of 28 messages in thread
TopicAuthorDate
toggle function            01/01/70 00:00      
   RE: toggle function            01/01/70 00:00      
   RE: toggle function            01/01/70 00:00      
   RE: toggle function            01/01/70 00:00      
   RE: toggle function            01/01/70 00:00      
      RE: toggle function            01/01/70 00:00      
         Hardware De-bounce            01/01/70 00:00      
            De-bouncing is more complex!            01/01/70 00:00      
            RE: Hardware De-bounce            01/01/70 00:00      
               RE: Hardware De-bounce            01/01/70 00:00      
                  RE: Hardware De-bounce            01/01/70 00:00      
                     RE: Classic Hardware De-bounce            01/01/70 00:00      
                        RE: Classic Hardware De-bounce            01/01/70 00:00      
            RE: Hardware De-bounce            01/01/70 00:00      
               RE: Hardware De-bounce            01/01/70 00:00      
   Switch bounce - Scope plots            01/01/70 00:00      
      RE: Switch bounce - Scope plots            01/01/70 00:00      
      APOLOGIES... :(            01/01/70 00:00      
         RE: Note            01/01/70 00:00      
             Resistor for capacitor dischar            01/01/70 00:00      
               RE: Resistor for capacitor dischar            01/01/70 00:00      
               RE: Added Resistor            01/01/70 00:00      
                  RE: Added Resistor            01/01/70 00:00      
                     RE: Added Resistor            01/01/70 00:00      
                     Did you read my last reply?            01/01/70 00:00      
      RC + Schmitt-trigger - Scope plots            01/01/70 00:00      
   RE: toggle function            01/01/70 00:00      
      RE: toggle function            01/01/70 00:00      

Back to Subject List