Using Debounce

More
16 Jul 2020 07:16 #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 or Create an account to join the conversation.

More
16 Jul 2020 08:05 - 16 Jul 2020 08:12 #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.
Last edit: 16 Jul 2020 08:12 by Aciera.
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
16 Jul 2020 08:47 #174817 by Clive S
Replied by Clive S 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.

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 or Create an account to join the conversation.

More
16 Jul 2020 10:03 #174823 by phillc54
Replied by phillc54 on topic Using Debounce
The debounce out pins are used in the plasmac.tcl file
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
16 Jul 2020 14:31 #174851 by Clive S
Replied by Clive S on topic Using Debounce

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 or Create an account to join the conversation.

More
16 Jul 2020 23:05 #174891 by phillc54
Replied by phillc54 on topic Using Debounce

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:
net home-x-out  =>   joint.0.home−sw−in

Please Log in or Create an account to join the conversation.

Time to create page: 0.143 seconds
Powered by Kunena Forum