I am feeding an interrupt input with the output from a CMOS Schmitt inverter. The falling edge of the inverter is nice and clean, But the rising edge is really dirty, and can get downright ugly at times. (See pictures)

Why is the ringing so much worse on the rise than on the fall??? What might be causing this noise on rise and how can I clean it up? (Note that the "ringing" on rise does not happen in a consistent manner, with some cycles it is far worse than others.)

The inverter is a 74AHC1G04, with 5V supply. Processor is LPC1517 at 3.3v. The connection between the two is < 5mm. Both parts share a ground plane on layer 2, but have separate power planes on layer 3.

(Input to inverter is an H11AA4 AC optocoupler, with the point to obtain a zero cross signal.)

[![Relativly clean falling edge][1]][1] Clean!

[![Dirty rising edge[![][2]][2]][2] Dirty! (8 seconds of persistence)

enter image description here Zoom in on a dirty example (1 second of persistence)

Inverter Input/Output Inverter input and output, triggering on inverter rise.

Argh, I had 4 snapshots to post, but I can only post 2 with my current "reputation" on this board.

  • \$\begingroup\$ Have you checked if you're terminating it properly? Without a schematic we can't help you with this but it looks like you are not. \$\endgroup\$
    – scarlso9
    Jul 23 '16 at 0:46
  • 1
    \$\begingroup\$ A schematic would help, as would additional information about what you are connecting up. Add links to the extra pictures in the comments and we can edit them in for you. \$\endgroup\$ Jul 23 '16 at 0:47
  • \$\begingroup\$ Can you post a single shot waveform in the same conditions? \$\endgroup\$
    – winny
    Jul 23 '16 at 8:24
  • \$\begingroup\$ No termination. I didn't think that was necessary since it was such a short trace (<5mm). \$\endgroup\$
    – jmd
    Jul 25 '16 at 19:57

Your problem is that 74AHC1G04 is not a Schmitt-trigger inverter. It's an inverter without the Schmitt trigger input. You can see this in your second screen shot because the switching threshold on the downgoing edge is the same as on the upgoing edge.

The problem with not using a Schmitt trigger is that with the slow edges of your input signal, a little noise added to that signal can cause the inverter to see the voltage pass through its threshold level, then back across the threshold the other way due to noise, and then back again to the final level. With a Schmitt trigger the noise has to be much larger, on the order of 300 mV, before it can cause multiple transitions.

For a Schmitt trigger in the same family try 74AHC1G14.

  • \$\begingroup\$ I doubt it's as necessary to use a Schmidt tigger in place of an inverter in all cases like you say. I think the oscillations might have other causes. I use inverters regularly and generally have no problems \$\endgroup\$
    – jbord39
    Jul 23 '16 at 5:57
  • 1
    \$\begingroup\$ @jbord39 - I don't believe The Photon is suggesting Schmidt triggers are always necessary, but in this specific case - they are. Look at the rise/fall times from that optocoupler. At 80 us/div, it looks like 300-350 us for 10%-90% rise time. From this TI doc on the 74AHC family there is a little hysteresis built-into the 74AHC04 but [...] \$\endgroup\$
    – SamGibson
    Jul 23 '16 at 14:09
  • 1
    \$\begingroup\$ [...] "Hysteresis in the input circuit is intended only to process reliably signals that have a slew rate of <10 ns/V. With a signal swing of 5 V, this corresponds to rise and fall times of about 50 ns. If signals with considerably longer rise and fall times are processed, the specially developed Schmitt triggers, such as the SN74AHC(T)14, should be used." \$\endgroup\$
    – SamGibson
    Jul 23 '16 at 14:10
  • \$\begingroup\$ @jbord39, possibly this situation could also be solved with a low pass filter. But a Schmitt trigger costs nothing (the price difference between an '04 and a '14 part) while a filter would add more parts to the board. This situation (slow edges with noise) is exactly the problem that Schmitt triggers are made to solve. \$\endgroup\$
    – The Photon
    Jul 23 '16 at 15:41
  • 1
    \$\begingroup\$ Doh! Our internal parts database indicated the part was a schmitt-trigger input, and I never bothered to check the datasheet. I just hacked on a 74LS14, and that certainly solved the noise issue. Thank you. \$\endgroup\$
    – jmd
    Jul 25 '16 at 19:53

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.