Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/www/team847.wildgardenseed.com/lib/smarty/Smarty_Compiler.class.php on line 270
FIRST Team 847 PHRED - Boolean Debounce SubVI

Boolean Debounce SubVI

 

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/www/team847.wildgardenseed.com/lib/smarty/Smarty_Compiler.class.php on line 270
Download: boolean_debounce_subvi.zip
PHRED Drive

Goal:
This subVI eliminates button bounce. When the contacts close on an electrical switch, the contacts often will bounce several times. In fast processors, like the cRIO, this can look like the button was pressed several times. The following VI solves this problem.

Theory of Operation:
The software assumes first button input is false. When two cycles are read the same, it feeds out the button output.

Code for debounce subVI.Figure 1 - Code for debounce subVI.
Inputs and outputs for debounce subVIFigure 2 - Inputs and outputs for debounce subVI

Our Application:
This was used to switch between three different driving modes using only one button on a joystick.

Other Potential Applications:
By changing the default to True rather than False you could use a normally closed button.

Hints and Warnings:
This is only designed for Boolean inputs, don’t put in scalar values.

Download: boolean_debounce_subvi.zip