Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Ringing in the edges of a quare wave

Status
Not open for further replies.

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
What is the best way to suppress ringing on the leading edges of a square wave?

On my bread board I tried a 18nF capacitor on pin 3 of a buffer 555 to GND and it seemed to work well.

But then I tried it on my more complex circuit and it wrecks the square wave and causes the buffer 555 to overheat.

The square wave is more complex here, with a 20kHz interrupter square wave with a 100kHz square wave superimposed on it.

I assume the imedence of the capacitor on pin 3 of my buffer 555 is to low in this case and is working the 555 too hard.

So clearly using a cap to suppress ringing is not a very robust approach.
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
What is the best way to suppress ringing on the leading edges of a square wave?
1.Choose a Tx buffer with lower slew rate (slower rise/fall times).
2.Make sure that driver's side's impedance is matched to the impedance of the transmittion medium.
3.Shorten the distance from Tx to Rx.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
1.Choose a Tx buffer with lower slew rate (slower rise/fall times).
2.Make sure that driver's side's impedance is matched to the impedance of the transmittion medium.
3.Shorten the distance from Tx to Rx.

I have 555 square waves going into CMOS logic gates. From what you have said here it sounds as though that it might be the source of the ringing. The output impedance of a 555 is much lower than the input impedance of a CMOS logic gate. Although I do have some resistors on the inputs of my logic gates.

Do you think this might be correct?
 

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,300
Do you think this might be correct?
No.
You don't match the output impedance of the Tx buffer to the input impedance of the Rx buffer.
You match the output impedance of the Tx buffer to that of the transmittion line - you do so with a series resistor.

The "transmittion line" might be a cable or a PCB trace for example...
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,299
Helped
14,233
Reputation
28,727
Reaction score
12,925
Trophy points
1,393
Location
Bochum, Germany
Activity points
279,668
So clearly using a cap to suppress ringing is not a very robust approach.
Good observation.

Actually the ringing isn't caused by a mismatch of driver and load impedance. It's caused by circuit inductance, insufficient ground connections and possibly by transmission line effects (in case of large circuit geometry or high signal frequencies).

555 is rather slow, so you must have a lot of circuit inductance respectively very bad ground and power supply wiring. An effective means to reduce ringing is to add a series resistor at the source side. The method is only applicable if the load is mostly capacitive, e.g. CMOS inputs.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
No.
You don't match the output impedance of the Tx buffer to the input impedance of the Rx buffer.
You match the output impedance of the Tx buffer to that of the transmittion line - you do so with a series resistor.

The "transmittion line" might be a cable or a PCB trace for example...

Come to think of it that can't be it anyway. I was playing around with an astable 555 on my breadboard scoping the output and it also had the same ringing on leading edges of square wave. I happened to try a 10nF cap from pin 3 to GND and the ringing was greatly suppressed.

But this same approach did not work on my soldered circuit - it just resulted in the 555 in my buffer to overheat due to a too low impedance issue.

Perhaps it would be better to try a 1n4148 from pin 3 to Vcc - I will try that on my bread board and then on my soldered circuit if it seems to work. That would avoid the impedance issue.
 

jiripolivka

Advanced Member level 5
Joined
May 21, 2010
Messages
2,832
Helped
831
Reputation
1,660
Reaction score
802
Trophy points
1,393
Location
Santa Barbara
Activity points
22,012
Come to think of it that can't be it anyway. I was playing around with an astable 555 on my breadboard scoping the output and it also had the same ringing on leading edges of square wave. I happened to try a 10nF cap from pin 3 to GND and the ringing was greatly suppressed.

But this same approach did not work on my soldered circuit - it just resulted in the 555 in my buffer to overheat due to a too low impedance issue.

Perhaps it would be better to try a 1n4148 from pin 3 to Vcc - I will try that on my bread board and then on my soldered circuit if it seems to work. That would avoid the impedance issue.

BTW, do you use a well compensated oilloscope probe in your tests? Ringing is often due to it if impedances are mismatched.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
BTW, do you use a well compensated oilloscope probe in your tests? Ringing is often due to it if impedances are mismatched.

To be honest I really don't know. My oscilloscope did not come with probes so I purchased some from ebay for about $30. Given that some probes are worth up to $100, the answer is probably no.
 

tggzzz

Advanced Member level 4
Joined
Jan 7, 2015
Messages
114
Helped
17
Reputation
34
Reaction score
16
Trophy points
18
Activity points
807
What is the best way to suppress ringing on the leading edges of a square wave?

Ringing like this is caused by capacitance and inductance resonating. Depending on the details of your construction, you probably have a lot of stray inductance and capacitance - especially if you are using a solderless breadboard. Measure the resonant frequency and make a first guess at the capacitance and inductance, and see if they tie up. Wire is ~1nH per mm.

If you really have minimal inductance and capactance, then consider the effect of how you are measuring the signals. Typically a scope+probe will resonate at ~100MHz. See https://entertaininghacks.wordpress.com/2015/04/23/scope-probe-accessory-improves-signal-fidelity/ for the reason and the cure.

- - - Updated - - -

BTW, do you use a well compensated oilloscope probe in your tests? Ringing is often due to it if impedances are mismatched.

An uncompensated scope probe won't cause ringing, but it may cause edges to have an incorrect amplitude.

Impedance mismatch per se is unlikely to be a problem, unless there is a very long cable involved.

Scope probes can ring, typically at ~100MHz, for the reasons given at https://entertaininghacks.wordpress.com/2015/04/23/scope-probe-accessory-improves-signal-fidelity/

The problem is probably a combination of 1nH/mm wire inductance and stray capacitance in a breadboard. Moral: don't use solderless breadboards - you'll spend more time debugging the breadboard than your prototype!
 

jiripolivka

Advanced Member level 5
Joined
May 21, 2010
Messages
2,832
Helped
831
Reputation
1,660
Reaction score
802
Trophy points
1,393
Location
Santa Barbara
Activity points
22,012
Ringing like this is caused by capacitance and inductance resonating. Depending on the details of your construction, you probably have a lot of stray inductance and capacitance - especially if you are using a solderless breadboard. Measure the resonant frequency and make a first guess at the capacitance and inductance, and see if they tie up. Wire is ~1nH per mm.

If you really have minimal inductance and capactance, then consider the effect of how you are measuring the signals. Typically a scope+probe will resonate at ~100MHz. See https://entertaininghacks.wordpress.com/2015/04/23/scope-probe-accessory-improves-signal-fidelity/ for the reason and the cure.

- - - Updated - - -



An uncompensated scope probe won't cause ringing, but it may cause edges to have an incorrect amplitude.

Impedance mismatch per se is unlikely to be a problem, unless there is a very long cable involved.

Scope probes can ring, typically at ~100MHz, for the reasons given at https://entertaininghacks.wordpress.com/2015/04/23/scope-probe-accessory-improves-signal-fidelity/

The problem is probably a combination of 1nH/mm wire inductance and stray capacitance in a breadboard. Moral: don't use solderless breadboards - you'll spend more time debugging the breadboard than your prototype!

To be sure, I would start with testing the probes. Many oscilloscopes offer a calibrated square-wave source, and with this the probe trimmer should be adjusted for a good pulse response. If not available, I would build a simple square-wave oscillator from a 555 or CD 4001, and adjust the probe.
Load and source mimatch may be one problem, long lines and poorly blocked DC power source another.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
To be sure, I would start with testing the probes. Many oscilloscopes offer a calibrated square-wave source, and with this the probe trimmer should be adjusted for a good pulse response. If not available, I would build a simple square-wave oscillator from a 555 or CD 4001, and adjust the probe.
Load and source mimatch may be one problem, long lines and poorly blocked DC power source another.

Ummmm....how would I adjust the probe Jir?
 

Audioguru

Advanced Member level 5
Joined
Jan 19, 2008
Messages
9,218
Helped
2,129
Reputation
4,252
Reaction score
1,957
Trophy points
1,393
Location
Toronto area of Canada
Activity points
57,921
Where are my posts about this? On another thread maybe? There I mentioned the lack of supply bypass capacitors that the datasheet of the LM555 says are important. Then I got a reply that it worked and eliminated the ringing.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
Where are my posts about this? On another thread maybe? There I mentioned the lack of supply bypass capacitors that the datasheet of the LM555 says are important. Then I got a reply that it worked and eliminated the ringing.

That's what seemed to happen when I added those capacitors audio. I was reading on wikipedia that they also absorb power supply spikes. Is it possible to get power supply spikes due ringing bouncing back and forth from all the stray inductance in a circuit?
 

tggzzz

Advanced Member level 4
Joined
Jan 7, 2015
Messages
114
Helped
17
Reputation
34
Reaction score
16
Trophy points
18
Activity points
807

zorro

Advanced Member level 4
Joined
Sep 6, 2001
Messages
1,131
Helped
356
Reputation
710
Reaction score
298
Trophy points
1,363
Location
Argentina
Activity points
8,907
Ringing seen in the scope can be caused also by bad or no connection of the probe ground.
Z
 

Audioguru

Advanced Member level 5
Joined
Jan 19, 2008
Messages
9,218
Helped
2,129
Reputation
4,252
Reaction score
1,957
Trophy points
1,393
Location
Toronto area of Canada
Activity points
57,921
You should throw away the solderless breadboard or use it only for slow DC LED or motor on and off circuits.
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
See the references in https://lmgtfy.com/?q=how+to+compensate+scope+probe Note that an improperly calibrated probe will not cause ringing - it will only cause the edges to be abnormally large/small compared with the rest of the waveform.

For more detailed information, see the references in https://entertaininghacks.wordpress.com/library-2/scope-probe-reference-material/

OK.

I need to bare this in mind when I see what appears to be ringing in my circuits:

If you don’t, at best you will waste time chasing after strange unexpected effects. At worst you will damage the circuit, oscilloscope, or yourself.

Unfortunately my probes do not have any of the adjustments depicted in the other link.

Let me ask you this....

For an old analog scope (with valves), what brand and type of probes would you recommend?
 

SunnySkyguy

Advanced Member level 5
Joined
Sep 26, 2007
Messages
6,743
Helped
1,675
Reputation
3,348
Reaction score
1,644
Trophy points
1,413
Location
Richmond Hill, ON, Canada
Activity points
50,732
Usually ringing is caused by excessively long scope probe ground inductance and probe capacitance resonating. To fix that remove the ground clip and tip and only use the tip&ring of the barrel on the probe between to adjacent pins for signal and ground.

The other cause is long line driving cable inductance and capacitance not loaded to the characteristic impedance thus ringing or a reactive load. This impedance can be reduced with twisted pair or shielded and terminated with something less than a 500 Ohms, if 50 Ohm cable a series 50R driving the coax and 50R terminating or 120R for twisted pair +/- 30% for 8 turns per foot or used two R's biased to some DC voltage are some options to offers ieal matched impedance and flattest frequency response at the expense of losing half the voltage which got doubled due to a 100% reflection of a high impedance load. ( transmission line theory)
 

boylesg

Advanced Member level 3
Joined
Jul 15, 2012
Messages
995
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Location
Epping, Victoria, Australia
Activity points
11,537
Usually ringing is caused by excessively long scope probe ground inductance and probe capacitance resonating. To fix that remove the ground clip and tip and only use the tip&ring of the barrel on the probe between to adjacent pins for signal and ground.

The other cause is long line driving cable inductance and capacitance not loaded to the characteristic impedance thus ringing or a reactive load. This impedance can be reduced with twisted pair or shielded and terminated with something less than a 500 Ohms, if 50 Ohm cable a series 50R driving the coax and 50R terminating or 120R for twisted pair +/- 30% for 8 turns per foot or used two R's biased to some DC voltage are some options to offers ieal matched impedance and flattest frequency response at the expense of losing half the voltage which got doubled due to a 100% reflection of a high impedance load. ( transmission line theory)

Is there any point in having a go at adding the filters detailed here: https://lmgtfy.com/?q=how+to+compensate+scope+probe?

Perhaps connect the probe to the scope through a small circuit board where I can solder in the filters. The low frequency filter would be at the wrong end, but perhaps better than nothing?

Or perhaps even use the hook thing on the end of my probe to attach it to a small circuit board with the low frequency filter a sewing needle or something as the new probe soldered to the circuit board? Then the low frequency filter would be at the correct end of the probe.
 

tggzzz

Advanced Member level 4
Joined
Jan 7, 2015
Messages
114
Helped
17
Reputation
34
Reaction score
16
Trophy points
18
Activity points
807
What is the frequency of oscillation?
What is the length of the wires on your breadboard?

Numbers always help discussions, since they rule possibilities out.

OK.
Unfortunately my probes do not have any of the adjustments depicted in the other link.

In which case I assume you are using a *1 probe, which will have ~150pF capacitance (i.e. "C")

What is the inductance associated with the wires (i.e. "L")? (Assume 1nH/mm)

What would you expect the resonant frequency of the LC circuit to be? (Use google if you don't know the formula)

- - - Updated - - -

Is there any point in having a go at adding the filters detailed here: https://lmgtfy.com/?q=how+to+compensate+scope+probe?
Perhaps connect the probe to the scope through a small circuit board where I can solder in the filters. The low frequency filter would be at the wrong end, but perhaps better than nothing?

If you don't want to see what is happening in your implementation, then add the filters.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top