Using Debounce

More
6 years 3 months ago #174808 by Clive S
Using Debounce was created by Clive S
What is the correct procedure to use "debounce" on a switch or sensor.

Re this:-
loadrt debounce cfg=1

addf debounce.0 servo-thread
setp debounce.0.delay 100

net homes-x < =parport.0.pin-12-in-not
net homes-x => debounce.0.0.in


I think the above is correct but when would you use a debounce.0.0.out pin and how?

Please Log in to join the conversation.

More
6 years 3 months ago #174810 by Aciera
Replied by Aciera on topic Using Debounce
Debouncing explained:

www.labbookpages.co.uk/electronics/debounce.html

[edit]
Basically you require debouncing whenever your signal does not change state in a stable manner. e.g. a mechanical contact. Sensors often have a hysteresis built in so bouncing is avoided.
In your example parport.0.pin-12-in-not is the bouncing input and debounce.0.0.out would be the debounced signal you would acually use.

Please Log in to join the conversation.

More
6 years 3 months ago #174817 by Clive S
Replied by Clive S on topic Using Debounce

Aciera wrote: Debouncing explained:

www.labbookpages.co.uk/electronics/debounce.html

[edit]
Basically you require debouncing whenever your signal does not change state in a stable manner. e.g. a mechanical contact. Sensors often have a hysteresis built in so bouncing is avoided.
In your example parport.0.pin-12-in-not is the bouncing input and debounce.0.0.out would be the debounced signal you would acually use.

I understand what debounce mean in the context of switches

Butl in my PlasmaC config i have this as an example.

net plasmac:float-switch hm2_7i96.0.gpio.003.in => debounce.0.0.in

But there are no debounce out pins. This is the bit I don't understand.

Please Log in to join the conversation.

More
6 years 3 months ago #174823 by phillc54
Replied by phillc54 on topic Using Debounce
The debounce out pins are used in the plasmac.tcl file

Please Log in to join the conversation.

More
6 years 3 months ago #174851 by Clive S
Replied by Clive S on topic Using Debounce

phillc54 wrote: The debounce out pins are used in the plasmac.tcl file


So to use debounce would this be correct:-

loadrt debounce cfg=1
addf debounce.0 servo-thread
setp debounce.0.delay 100

net home-x < = parport.0.pin-12-in-not switch or sensor
net home-x = > debounce.0.0.in

net home-x-out <= debounce.0.0.out or am I missing something here

Please Log in to join the conversation.

More
6 years 3 months ago #174891 by phillc54
Replied by phillc54 on topic Using Debounce

Clive S wrote:

phillc54 wrote: The debounce out pins are used in the plasmac.tcl file


So to use debounce would this be correct:-

loadrt debounce cfg=1
addf debounce.0 servo-thread
setp debounce.0.delay 100

net home-x < = parport.0.pin-12-in-not switch or sensor
net home-x = > debounce.0.0.in

net home-x-out <= debounce.0.0.out or am I missing something here

You would need to finish it off with something like:
Code:
net home-x-out => joint.0.home−sw−in

Please Log in to join the conversation.

Time to create page: 0.357 seconds
Powered by Kunena Forum