Debounce

When a switch closes, often the contact bounce after making initial contact. Normally this is not a problem, but if your counting something you may notice mutable counts on one contact closure. To eleminate this it is common practice to "catch" the input with a latching, relay or self holding contact. The relay would then be released by a short timer after the switch has opened.
 
If you're talking about a switch, then you typically have to use some sort of software (or hardware) debouncing to keep it from appearing to the controller as multiple makes (or breaks).

This only applies to high-speed controllers (or interrupting routines) and not to relativly slow-speed PLC scanning.

The cause of the bounce is the physical contacts within a switch that typically bounce a bit as they're making or breaking their connection.
 
This explains debounce: http://www.patchn.com/Debounce.htm

This only applies to high-speed controllers (or interrupting routines) and not to relativly slow-speed PLC scanning.

Technically I am not too sure about that, a plc is not really a slow device since it can update in micro or milliseconds. There have been several situations using float switches etc where I had to include routines to eliminate issues.
 
rsdoran said:
This explains debounce: http://www.patchn.com/Debounce.htm



Technically I am not too sure about that, a plc is not really a slow device since it can update in micro or milliseconds. There have been several situations using float switches etc where I had to include routines to eliminate issues.

Fair enough.
I havn't come across situations with like that (I typically use stop and start levels with float switches), but I can see where the need could arise.
 
Generally I debounce things like alarms for analogue signals.
What i mean by that is .....
If a signal goes above a certain level but falls again within say 1 second you might not want anything to happen, however if the signal stays high for say 2 seconds you may want to stop a pump.
I'd describe that as debouncing a stop signal.
 
Fiona, most people use the term "deadband" to identify the difference between "on" and "off" values for an analog alarm. The term hysterisis is also commonly encountered. The delay you are talking about is technically "debouncing", but most often debouncing refers to an event measured in milliseconds. A delay of several seconds, although it performs the same function, is usually just called a delay.

My classic debouncing experience was with a GE starter. I have a spin timer that inhibits running a motor after the run contact from the starter is lost. This prevents damage from putting full voltage to a rapidly spinning high inertia load. The auxiliary contact on the starter literally bounced, and made and broke contact a couple of times after I hit the starter coil with voltage, causing the spin timer to operate and keeping the motor from pulling in and getting up to speed. I added a 250 milisecond time delay on the PLC input before the Run bit was set and the problem went away.
 
Once, I had a small dc motor control that took it's velocity command from the frequency of a master encoder. To control the start-stop of it, I would break the command signal.

All at once, my motor start "surging" at startup, I mean really spinning out. I could not figure out for the life of me what was causing it, the encoder counts were correct!

Come to find out, the relay contact (high-quality gold leaf, but hey, still metal) was bouncing, which in turn was being picked up along with the encoder counts, creating the illusion of 100's of extra Hz in that short space.

So I replaced the mechanical relay on the signal line with a transistor output relay (opto) on the 5V power line, and achieved my goal.

Funny how something as simple as debounce can double back and bite you in the butt...

TM
 
We use spin timers out in the orchards for the well pumps. When the pump shuts off the water drains bak down causing the motor to spin backwards. If you apply power to the motor when this happens it could cause the motor to run backwards, and destroy $$$$ motor. So we intall spin timers to allow couple of minutes before pump comes back on once it shuts off.
 

Similar Topics

Hi guys, I am pretty new when it comes to programming. I am working with CX-Programmer and I am having a problem where I have a sensor on my...
Replies
6
Views
620
Hi Group I have an on/off type steam valve which is set to maintain temperature in a vessel. If the PV drops below setpoint, the valve is...
Replies
4
Views
1,659
Working with a huge PLC 5 program that does not have much memory left in the processor and it has about 600 alarms in all and about 270 of them...
Replies
12
Views
4,072
Ok, I'm using Rockwell's PlantPax add on instructions. In the package there is a Digital-In function that has a "Debounce" option, which doesn't...
Replies
7
Views
6,533
Hello Again, Simple question for you guys. I am having trouble with a n.c. air pressure switch. I believe I need to have some debounce? in my...
Replies
5
Views
4,654
Back
Top Bottom