EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: technix on January 09, 2017, 03:16:30 pm

Title: What caused the PWM line to ring?
Post by: technix on January 09, 2017, 03:16:30 pm
I tapped this signal directly off the pin of a STM32F103 driving a PWM line to nowhere on an Arduino-compatible board. What caused the ringing I am seeing here?
Title: Re: What caused the PWM line to ring?
Post by: bktemp on January 09, 2017, 03:21:21 pm
It is caused by the parasitic inductance in your scope probe (cable of the ground hook) or on the pcb.
Title: Re: What caused the PWM line to ring?
Post by: technix on January 09, 2017, 03:24:27 pm
It is caused by the parasitic inductance in your scope probe (cable of the ground hook) or on the pcb.
I was holding the probe right on the pin of the chip. Maybe I should try using a shorter ground hook?
Title: Re: What caused the PWM line to ring?
Post by: JPortici on January 09, 2017, 03:26:50 pm
yes. use the srping thingy for ground connection instead
Title: Re: What caused the PWM line to ring?
Post by: technix on January 09, 2017, 03:33:34 pm
With the ground hook at the negative terminal of a nearby decoupling cap, I got this waveform. It seem to me that with this 100MHz oscilloscope I am diving into some unchartered waters my old 20MHz CRO won't show me.
Title: Re: What caused the PWM line to ring?
Post by: Fungus on January 09, 2017, 04:01:40 pm
It's caused by the probe.

You should have a little spring thing in the probe bag.

If you pull the hook and ground clip wire off a probe (they both detach) you can put the spring on the end of the probe, like this:
(https://www.eevblog.com/forum/projects/what-caused-the-pwm-line-to-ring/?action=dlattach;attach=284142;image)

If you have a ground point close enough to touch with the spring it will really reduce the ringing.

nb. To get the spring off (and on) twist it in the direction that opens up the spring. It will come off easily.


Title: Re: What caused the PWM line to ring?
Post by: JPortici on January 09, 2017, 04:41:29 pm
With the ground hook at the negative terminal of a nearby decoupling cap, I got this waveform. It seem to me that with this 100MHz oscilloscope I am diving into some unchartered waters my old 20MHz CRO won't show me.

Of course, A square wave of 1 KHz frequency will have much higher frequency content as its edges should not depend on the wave frequency (the keyword here is rise time)
Title: Re: What caused the PWM line to ring?
Post by: bson on January 11, 2017, 09:48:04 pm
It looks to me like the sinc shape created by bandwidth limiting a sharp corner, not really ringing.
Title: Re: What caused the PWM line to ring?
Post by: macboy on January 11, 2017, 10:21:20 pm
It looks to me like the sinc shape created by bandwidth limiting a sharp corner, not really ringing.
No, it is ringing. technix's second post with better grounding shows improvement. The ringing is caused by the sharp edge exciting the resonant circuit formed between the probe tip capacitance and the ground inductance. Ground inductance is usually mostly from the long ground lead, but includes also any inductance on the PCB before the chosen ground closes the current loop back to the chip driving the wave. This is why grounding at the nearby decoupling cap is so much better.
Title: Re: What caused the PWM line to ring?
Post by: Benta on January 11, 2017, 11:21:23 pm
Is the probe calibrated/tuned correctly?

Title: Re: What caused the PWM line to ring?
Post by: T3sl4co1l on January 11, 2017, 11:55:04 pm
Modern MCUs produce edges of a few nanoseconds.  Signal quality is important for wiring lengths of only a few 10s of cm!

Tim
Title: Re: What caused the PWM line to ring?
Post by: daqq on January 12, 2017, 08:57:29 am
It was probably the probe, however it could also be the board design. ICs these days allow very fast rise times. This can induce ringing in transmission lines - which PCB traces and ground clips most definitely are.
Title: What caused the PWM line to ring?
Post by: timb on January 12, 2017, 01:36:27 pm
I get so many telemarketing calls on my PWM lines these days, I don't even bother answering them when they ring!
Title: Re: What caused the PWM line to ring?
Post by: David Hess on January 14, 2017, 05:58:17 am
It looks to me like the sinc shape created by bandwidth limiting a sharp corner, not really ringing.

There is no preshoot (https://en.wikipedia.org/wiki/Gibbs_phenomenon) so this is not it; the edge is not quite fast enough for the sample rate.