0
\$\begingroup\$

There is an analog input voltage pin of a microcontroller whose threshold voltage is set 0.2V. If the input voltage at the pin is below 0.2V, then it is recognised as the short circuit to ground(SCG). A value for the debounced time should be chosen in ms. When the input voltage is below 0.2V for a time as long as the debounced time, then the error bit SCG is set. Do you have an idea how i can calculate the optimum debounced time?

\$\endgroup\$
  • 1
    \$\begingroup\$ I have trouble understanding the problem. Most likely you know all about the system you are designing, but I don't. Please provide all the information you can, too much information will not hurt, but too little means noone can answer. \$\endgroup\$ – peufeu Sep 1 '17 at 21:24
  • \$\begingroup\$ most microbutton switches 5ms \$\endgroup\$ – Sunnyskyguy EE75 Sep 1 '17 at 21:29
  • \$\begingroup\$ @ peufeu Thanks for the comment. - The problem is I do not know how to calculate the debounce time for debouncing a 'high' - the high comes when there is a short circuit to ground. A short circuit to ground(SCG) may come just for a few microseconds at the analog input pin and then vanish. An SCG for a few microseconds may not be enough to set the error bit SCG. So, how many seconds are enough to call it an SCG? \$\endgroup\$ – slM201z Sep 1 '17 at 21:32
  • \$\begingroup\$ @TonyStewart.EEsince'75 thanks. This debounce seems less relevant to switch debounce, so i haven't found any material on the net. \$\endgroup\$ – slM201z Sep 1 '17 at 21:35
  • 1
    \$\begingroup\$ it depends what you are connected to \$\endgroup\$ – Sunnyskyguy EE75 Sep 1 '17 at 21:39
0
\$\begingroup\$

SCG is a common automotive ECU fault diagnostic function such as the O2 sensor which is a field replaceable part.

It may be a long time in ms e.g. 500ms but not too long to stall the engine.

this spreadsheet shows some ECU fault detection parameters that may be useful.

http://dulevo.com/documenti/codici-guasto-5020e6.xls

\$\endgroup\$
  • \$\begingroup\$ Tony, thanks for your answer and the document. :-) \$\endgroup\$ – slM201z Sep 1 '17 at 22:50
  • \$\begingroup\$ Hello Tony, are there other parameters which help to calculate the exact value of the debounce time? For example, the open pin voltage of the pin - that the debounce time for SCG should be kept shorter if the voltage gets larger. \$\endgroup\$ – slM201z Sep 2 '17 at 8:50

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.