5
\$\begingroup\$

I stumbled upon this part of the schematic (page 2) of the Arduino Portenta Edge Control (shown below), which – in my eyes — seems to be a debounce circuit, but more complex than the one shown in this TI video.

Portenta Edge Control Debounce Circuit?

It uses an inverting Schmitt Trigger, which is fed into an AND gate, which in turn controls an N-Channel MOSFET.

As I understand, the truth table for the AND Gate would be:

IRQ_C_CHn AND Input 1 AND Input 2 (Schmitt output) AND Output
LOW LOW HIGH LOW
HIGH HIGH LOW LOW

For me, it seems unlikely that the AND-Gate output would experience a state change, so how does this circuit works?

As a bonus question: what are its advantages over a classic RC + Schmitt-Trigger circuit?

\$\endgroup\$

3 Answers 3

4
\$\begingroup\$

This circuit is not switch de-bouncer. This is actually a pulse generator intended to generate a short pulse based on the IRQ_C_CH2's input low to high transition irrespective of how long that transition takes place. It's a type of one-shot circuit presumably to assert an interrupt one time otherwise the ISR keeps getting called while IRQ_C_CH2 is high indefinitely. R38, C35, and U6B set up an "inverting delay" into the AND gate.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ This makes sense, as this circuit is intended for ON/OFF inputs, like rain gauges. \$\endgroup\$ Commented Mar 25 at 17:35
2
\$\begingroup\$

It's an edge detector. When the input goes high, the output of the AND gate will go high and stay high until C35 charges enough to make the inverter's output go low. The Schmitt trigger is there to remove any spurious transitions as C35 slowly (τ = 10ms) charges through R38.

\$\endgroup\$
2
\$\begingroup\$

If the input is low for a long time for the RC circui to settle, then inverter output is high. So when the actual input goes high, the AND gate goes high, but soon the RC circuit settles and inverter output goes low and so does AND output.

On the other hand, if input is high for a long time, inverter output will be low after RC circuit settles, so AND output is also low. If there are short low states on the real input, nothing happens.

So it is just selective to edges, states and pulse timing.

What the advantage of such a circuit is depends on what kind of signal source you intend to give it as an input, and since that is unknown, nothing can be said about the advantage or even suitability of this circuit for that purpose.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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