# How to calculate the state debounce time for an analog voltage input pin?

An analog voltage input pin (AVP) of an ECU has an input voltage range of 0 to 10V and a Filter Frequency Limit of 330Hz. The input signal voltage (ISV) coming from a sensor to the AVP has a range between 0.5V and 5V. Using the ISV, the software should produce a digital state signal (DSS) in time domain with 0 and 1 states. So, two upper and lower thresholds are set - upper 4V and lower 2V. If the ISV is above 4V, then the DSS has the state 1 and if below 2V, then the state 0. But the direct conversion of ISV into DSS gives a bouncing signal. So, a debounce time is to be calculated to have the states of the DSS without transients. Do you have an idea how the state debounce time can be calculated?

• What are all these confusing abbreviattions that cause me to re-read what you write several times. AVP ISV DSS are what I refer to. Try plain ordinary English. – Andy aka Sep 2 '17 at 10:18
• I thought the abbreviations would make it easier to read. – slM201z Sep 2 '17 at 13:20
• The thresholds look to me like "hysteresis." If so, you should NOT be doing a "direct conversion" and if you did so, then of course you'd get a bouncing signal with noise present. Solve the hysteresis problem (by understanding what it is and how to implement it using your input voltage measurement.) Then discuss here your remaining bounce problem once that is solved. – jonk Sep 2 '17 at 17:23