UPC EETAC Bachelor's Degree in Telecommunications Systems and in Network Engineering EEL

 

Debouncing_filter FSM

P10


1. Specifications Planning Dev. & test Prototype Report

Let us try to eliminate ON/OFF button bounces and digital noise for a push-button or key connected to a microcontroller.

The idea is represented in the symbol and the waveforms in Fig. 1. The FSM will complete operations only only after the key pressed is acknowledged by another digital system and the key is released by the user.

 How to filter electric noise

Fig 1. Symbol and waveforms for the debouncing filter.

The idea of sampling and filtering to match a given mask is represented in the next picture.

Sampling and filtering

Fig 2. The process of sampling and filtering to debounce the signal. var_ST_flag will be set only when a truth click is detected.

NOTE:  Other versions of the same project:

Debouncing_filter: The basics on such phenomena and a hardware circuit solution.

Debouncing_filter: Using PIC18F, DEE, MCC Melody

 


Specifications 2. Planning Dev. & test Prototype  Report

A) Planning hardware

 


B) Planning software

We can configure the number of samples to filter, the filter mask and also the sampling frequency.

State diagram for the debouncing filter

Fig 2. State diagram for the debouncing filter. The user or normally another FSM will performing operations will acknowledge the key pressed, so that the process can be repeated for another click.  However, before going back to Input_high state, the machine must be aware of the user releasing the key.

 


Specifications Planning 3. Dev. & 4. test Prototype Report

A) Developing hardware

 


B) Developing software

This is the full project "Debouncing_filter.zip". Key pressed acknowledgement where the system is locked at Valid_key state, can be modelled by an external switch or by a delay.  


C) Step-by-step testing

 


Specifications Planning Dev. & Test 5. Prototype Report

For these kind of projects where input signals are noisy, random and depend on the technology, materials and quality of the electronic components, it is fundamental to experiment at the laboratory examining and visualising the phenomena. In this way, we can make the filter more effective and robust adjusting its parameters: sampling frequency, number of samples and filter validation mask.

 

 


Specifications Planning Dev. & Test Prototype 6. Report