RC Filter For Switch Debounce

zmanvortex

Member
Join Date
Apr 2002
Location
Nebraska
Posts
216
I am using an AutomationDirect DL-06 with a H0-CTRIO to retrofit to a Bindicator. I will be getting pulses from a micro switch on the Bindicator at about 10 hertz. I was bench testing using a toggle switch in place of the micro switch and noticed that I was getting about 10 debounce pulses every time I flipped the switch, leading to a false pulse count.

I am going to build a simple passive RC circuit to try and filter anything over 15 hertz. This is a pretty low frequency and would like some insight. I will have a 1.4k resistor and 1000nF capacitor later today to test with.

The high speed counter card does not have any filtering capabilities.
 
zmanvortex said:
I am going to build a simple passive RC circuit to try and filter anything over 15 hertz.
if this is the corner frequency then the signal will be reduced by -3db but you will still get some signal above 15 hz. A first order filter has a gentle roll off.

zmanvortex said:
This is a pretty low frequency and would like some insight. I will have a 1.4k resistor and 1000nF capacitor later today to test with.
15 Hz is low and your filter is not low enough to match 15 Hz.
f = 1/(2*PI*R*C) which is about 113 Hz for the values you provided.

zmanvortex said:
The high speed counter card does not have any filtering capabilities.
:( What you really need is some D flip flops. Better yet a switch that doesn't bounce. It would be worth the money. This will be a pain in the a$$ trying to get the filter just right. Others on the forum have bought higher order filters that have sharper rolloff than a simple first or RC circuit.
 
Thanks Peter. I have discovered with a scope set to trigger that my debounce has a 10-14khz debounce and also a 3-4khz debounce element to it. I had an old 30nF cap and a 1.5k resistor that I tested. This setup eliminated the 10-14khz frequency but allowed the 3-4khz through.

Of course this is on a toggle switch and I can guarantee that the microswitch debounce will behave much differently. I think I should be able to filter anything above 30hz and be ok.

I don't think the sloped drop off will affect the count but I will find out for sure later today and let you know.

I think with the proper cap sizing I can get the filter to do enough for the application.

rdrast, This bindicator lowers a weight to the material. A cam triggers the microswitch on it's way down. Once the weight hits the material a slack switch triggers which raises it back up.
 
I have used a solid state one shot timer - the solid state output will keep you from getting contact bounce. Set the time for the one shot so that it does not go off until the contact bounce is finished, but it does go off in time to see the next real pulse. The counter card coes not care how long the pulses are, it just wants to see either a leading or trailing edge of a pulse. I used a one shot that was a lot more mounting friendly than this one (I thought it was a Banner or Turck because it was yellow) but a quick search of their website did not show it. Other people make these but this may help get you on the path.

http://www.automatictiming.com/pdf_div/tse_data.pdf
 

Similar Topics

When supplying variable frequency drives (vfd), should we install the line filter (emc) before the reactor (choke), or reactor before filter...
Replies
2
Views
175
Hi. I'd like to have a filter on an Alarm Summary page where I could pick which of the 3 groups I created I want to display on the screen. I...
Replies
3
Views
539
Good morning, I'm new to PLC and HMIs, and I was given the following problem: I need to be able to filter alarms and events that are only related...
Replies
0
Views
386
I am trying to find the operating limit range of a few conveyors. In the event one of them breaks I want to see the abnormal value and use this...
Replies
11
Views
1,307
Hello! In FTView SE 13.00 for the AlarmEventSummary1 object I need to add the filter Alarm Name LIKE % %. In the field % % I want to pass a...
Replies
1
Views
540
Back
Top Bottom