-1
\$\begingroup\$

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?

\$\endgroup\$
  • \$\begingroup\$ 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. \$\endgroup\$ – Andy aka Sep 2 '17 at 10:18
  • \$\begingroup\$ I thought the abbreviations would make it easier to read. \$\endgroup\$ – slM201z Sep 2 '17 at 13:20
  • \$\begingroup\$ 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. \$\endgroup\$ – jonk Sep 2 '17 at 17:23
0
\$\begingroup\$

You don't calculate a bounce time, you measure it. Operate the switch many times, record the digital signals, and observe how long the bouncing goes on for. From that, you need to estimate what the likely longest time bouncing will be going on for, twice as long as you've ever seen in many trials might be a reasonable estimate. With that estimate, you can apply debounce in your software.

\$\endgroup\$
  • \$\begingroup\$ Thanks. So, I should try simulate the different possible analog voltage signal with the analog pin? i'll try this. \$\endgroup\$ – slM201z Sep 2 '17 at 13:24
  • \$\begingroup\$ But what should I do with the Filter Frequency Limit? \$\endgroup\$ – slM201z Sep 2 '17 at 13:24
  • \$\begingroup\$ How about you draw a schematic of what you have? \$\endgroup\$ – Neil_UK Sep 2 '17 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.