High Frequency Ringing [SOLVED]

Hey all,

I need some help with a circuit I'm trying to run at 1/2 MHz... Currently, I'm getting a significant amount of ringing in my circuit on the output side. I want to eliminate the ringing need a hand. This will be driven from an arduino's 3.3v logic. I had the NPN's laying around and at this frequency, level shifters seem to struggle (I gathered this from datasheets). I'd also like to go up in frequency to about 1.2 MHz but the issue becomes severe between 250 kHz and 500 kHz.

The load only draws 2uA and has a capacitance of about 15pF. It's another IC and I guess I'm lucky I haven't damaged it with the insane undershoot too.

Also, note that I had no input attached when making these measurements.

Tolerances for the IC are:

  • delta Rise/Fall tolerance: +/- 150nS
  • Logic voltage hysteresis: .35v
  • Logical High @ 3.5v
  • Logical Low @ 1.5v

This is what I've measured from the scope:

Rise Delay: 120nS
Fall Delay: 126nS

First Ring Overshoot voltage: 2.24v (Logical high occurs at 1.5v)
First Ring undershoot voltage; -3.2v (This is why I'm glad the IC isn't damaged)

Here is the scope data and the schematic:

Fall Time.png

Overshoot Voltage.png

Ringing.png

Rise Time.png

Undershoot Voltage.png

Fall Time.png

Overshoot Voltage.png

Ringing.png

Rise Time.png

Undershoot Voltage.png

Try a 74HCT series buffer instead, it will do the level translation better.

Thanks! I am worried about inrush current damaging the 74hct buffer if I used it. Also, the datasheet for the 74hct series buffers has a stated output capacitance of 10pf, which is only 5pf smaller than the 3904... Wouldn't the buffer also start ringing if this is the case?

Thanks!

Its quite common for SPI and other serial communication to just use a series resistor to reduce or eliminate ringing. Note that when the 2N3904 turns off, the 430 ohm resistor pulls the signal high to 5V. Note the slower rise time, but no ringing. A possible solution might be just to use a 22-220 ohm series resistor from the collector of Q2 to the driven device.

You are simply doing a fast, clean, non-inverting translation of a square wave signal 0 to 3.3 volts to a 0 to 5.0 volt signal? If that is the case, I can’t see that D2 helps.

6v6gt:
You are simply doing a fast, clean, non-inverting translation of a square wave signal 0 to 3.3 volts to a 0 to 5.0 volt signal? If that is the case, I can’t see that D2 helps.

D2 clamps the gate when the gate gets pulled low. See Schottky diode clamps and baker clamps via google.

dlloyd:
Its quite common for SPI and other serial communication to just use a series resistor to reduce or eliminate ringing. Note that when the 2N3904 turns off, the 430 ohm resistor pulls the signal high to 5V. Note the slower rise time, but no ringing. A possible solution might be just to use a 22-220 ohm series resistor from the collector of Q2 to the driven device.

My goal will be a solar powered device with 2.5 watt solar panels and a 10Ah battery. Given low light season plus overcast skys, I'd like to keep quiescent current down to under 15mA. It will be using energy at night and storing energy during the day. And the 3904 has a max current rating of 200mA, making anything less than. 25 Ohms too much, not to mention the dissipated power through the resistor and package would make the lifespan too short for my liking.
Also, due to the timing nature, I've selected a balanced resistor at Q2 for power, matching rise/fall times, and limited propagation delay. The delay times match multi-sim pretty accurately, but multisim didn't anticipate this level of ringing.

I'm not sure what added quiescent current or dissipation you're referring to.
There, I added R6 (no more ringing).

Aaahhhh… I thought you were referring to R2. I misread your comment haha… I’ll give it a shot

BT-dubbs… nice photoshopping haha

dlloyd:
I'm not sure what added quiescent current or dissipation you're referring to.
There, I added R6 (no more ringing).

I tried what you said, however, the slope doesn't scale on the rising/falling edge... ALTHOUGH!!! It has given me some serious insight! I shall try other resistor values and it made me think of something... what about an RL filter? I might just wind me a coil... haha Only thing I'm worried about is flyback

... or RC filter

Why do you need non-inverting level translator? You cannot invert in SW?
Are you sure the input sees the ringing? Maybe it is scope artifact due to long GND leads?

EDIT:
Frequency of the oscillations is about 6 MHz; period 160 ns. Interesting fact: the blue trace (MCU output?) is lagging the yellow trace ringing by a tiny bit but consistently. Maybe 5 - 10 ns? I have no idea what that means. Can you make a photo of your setup?

Yes, this is one case where a photo could give us more info than a schematic.

Keep ground wires short ... all going to one point near or at the power source (star grounding scheme is the best.

If using a breadboard, use some caps across the power rails (one large i.e. 10uF+, one small 0.1uF).

It looks to me that the circuit is an inverting level shifter, but the traces look to be nearly in phase, so how is the scope configured, i.e. trigger levels for each channel?

Do your scope probes have x10 switch? If so, give it a try and re-adjust mV/div to compensate. The x1 setting will be lower impedance and could introduce much of the ringing.

dlloyd:
... or RC filter

I'll address these both at the same time...

Smajdalf:
Why do you need non-inverting level translator? You cannot invert in SW?
Are you sure the input sees the ringing? Maybe it is scope artifact due to long GND leads?

EDIT:
Frequency of the oscillations is about 6 MHz; period 160 ns. Interesting fact: the blue trace (MCU output?) is lagging the yellow trace ringing by a tiny bit but consistently. Maybe 5 - 10 ns? I have no idea what that means. Can you make a photo of your setup?

I've tried the RC filter, again, it pushes the timing uncomfortably close. Haven't dont the RL or RLC circuit yet, wifey got home from work and it was midnight haha. But yes, I made the same measurement. And I did experiment with some more values after making some calculations. I can critically damp for 12 MHz to get most of the ring out. Just a -600mV undershoot and a 100mv overshoot and no more ring.

I believe that the lagging ring on input is coming from the transition between conduction and the reverse bias of the transistor/diode clamp.

As for ground, I do have the lead connected to power supply ground. The scopes waveform output is driving the input to channel A and the circuit. Ie, 3.3v input is where the signal and channel a are probed to. No ground loops either, the scopes grounds are all the same so the same lead the supplies signal is the scope ground...

dlloyd:
Yes, this is one case where a photo could give us more info than a schematic.

Keep ground wires short ... all going to one point near or at the power source (star grounding scheme is the best.

If using a breadboard, use some caps across the power rails (one large i.e. 10uF+, one small 0.1uF).

It looks to me that the circuit is an inverting level shifter, but the traces look to be nearly in phase, so how is the scope configured, i.e. trigger levels for each channel?

Do your scope probes have x10 switch? If so, give it a try and re-adjust mV/div to compensate. The x1 setting will be lower impedance and could introduce much of the ringing.

I have a 1000uf, 220 pf, and 10 pf capacitor in parallel with VCC and ground for power supply isolation. Also, the driven devices are somewhat power hungry. Also note that I don't have the load hooked up while testing the circuit. I'll follow up in a few minutes with new scope data and an image of the hookup.
Lastly, yes, i did try x10. No difference in wave form. That was the very first thing I tried haha

D2 clamps the gate when the gate gets pulled low. See Schottky diode clamps and baker clamps via google.

Not to be picky but I don't see any 'gate'. BJTs have a BASE, not a GATE. (no big deal but just sayin')

What is your physical layout? How did you make the measurements? Probes set to 10x? Where is the probe ground connected? and many other questions. I'll bet there is minimal ringing in simulation (oh, wait, now I see you already know that). You're automatically blaming the components when it could be the wiring.

Note that the transistor output circuit impedance is asymmetrical - "off" current is through a resistance, "on" current through the transistor. This is another reason why I suggest 74HCT logic. It has a mostly symmetrical push-pull output.

I think your "inrush current" thing is a red herring.

How can a passive load be "power hungry"?

As implied by Aarg, digital inputs are high impedance (probably 10Mohms) so I don't think 'inrush current' is
a concern. (5V/10,000,000 ohms = 500pA)

OK! I figured out my problem. My level shifter does work. The problem wasn't just ringing but also my software. I changed my software and it works! bahaha. Also, when I use the output without the RC circuit, it fails. So it was half of the issue. So this was a two fold solution!

As far as a level shifter, yes, I could probably get it working. I didn't realize it was a high impedence device. Thanks @Aarg and @raschemmel, I will consider using this in the future. I do need this to work tho because I do have other devices associated with this project that don't have high impedence and will need a faster higher current level shift which is why I was trying to get this working with this because I'm gonna need it to work in the future:

raschemmel:
As implied by Aarg, digital inputs are high impedance (probably 10Mohms) so I don't think 'inrush current' is
a concern. (5V/10,000,000 ohms = 500pA)

Thanks Everyone for your help! I probably would've taken a few more days racking my head haha
Also, here are the wave forms and my current prototype. The 2 resistors near the single probe were for testing different resistances with the RC circuit... Simulation doesn't always port well as I have first hand experience... At least in high speed switching applications haha. Will eventually get thrown on a pcb. I got busy with my little boy :slight_smile:

150ohm10pfFallTime.png

150ohm10pRiseTime.png

220ohm10pfFallTime.png

220ohm10pfRiseTime.png

150ohm10pfFallTime.png

150ohm10pRiseTime.png

220ohm10pfFallTime.png

220ohm10pfRiseTime.png

While it wouldn’t make any difference now, the fact that you say your post was solved by changing the software
means that by normal judicial process procedures, introducing the software implies that you must disclose the
BEFORE software and the AFTER software, to make this post complete. This is an open source forum and you have
posted for what on the face of it would appear to be a hardware issue , and then you say this issue has been solved
by changing the software. How does saying that help anyone who has been following this post trying to learn how
to eliminate ringing in THEIR circuit ? Do you see my point ? It is only fair that you post your faulty software and your good software for the benefit of those who took the time to follow this post. Otherwise it is the same as simply
posting “NEVERMIND . I solved it. Thanks. Bye.”

[Frequency Response of parallel RC circuit](http://“It makes sense for this parallel RC circuit to act as a low-pass filter to remove the harmonics and fundamental frequency of the rectified AC signal to preserve only the DC component. But all analyses of RC-based lowpass filters are series-based circuits, with the frequency response based on voltage gain Vout/Vin. i.e.”)

It makes sense for this parallel RC circuit to act as a low-pass filter to remove the harmonics and fundamental frequency of the rectified AC signal to preserve only the DC component. But all analyses of RC-based lowpass filters are series-based circuits, with the frequency response based on voltage gain Vout/Vin. i.e.
H(ω)=11+jωRC

However, for the parallel RC circuit, this voltage gain is unity since the voltage across the R and C is the same.

Let : V = 5 V
F=500 kHz
R = 2.2 Mohm
C = 15 pF’
1
ZRC= --------------------------------
1
SQRT( [ ( ---- )^2 + (2Pif*C)^2 ])
R

1
ZRC= -----------------------------------------------------------------------------------
1
SQRT( [ ( --------- )^2 + (2*(3.14159265359)(500EE+3)(15EE-12))^2 ])
2.2EE+6

ZRC=
1
ZRC= -----------------------------------------------------------------------------------
SQRT( [ (0.207EE-12) + (0.2220868EE-8) ])

1
ZRC= -----------------------------------------------------------------------------------
0.4712608609EE-4

ZRC= 21,219.67

ZRC= 21,219.67 ohms

Results of Calculations

XC=21220.6591ΩXC=21220.6591Ω

Impedance:
Z=204.6702−21218.6849jZ=204.6702−21218.6849j

(vector is complex number: 204 ohms @ -21219j)

Modulus:
|Z|=21219.6720Ω|Z|=21219.6720Ω

Argument (Phase):
θ=−1.5612θ=−1.5612

(radians)
Argument (Phase):
θ=−89.4474∘

Z=204.6702 @ 500 kHz

Parallel RC Circuit Impedance Calculator

Parallel RC Circuit Impedance Calculator - 2

Plot Impedance as a function of frequency

raschemmel:
While it wouldn't make any difference now, the fact that you say your post was solved by changing the software
means that by normal judicial process procedures, introducing the software implies that you must disclose the
BEFORE software and the AFTER software, to make this post complete. This is an open source forum and you have
posted for what on the face of it would appear to be a hardware issue , and then you say this issue has been solved
by changing the software. How does saying that help anyone who has been following this post trying to learn how
to eliminate ringing in THEIR circuit ? Do you see my point ? It is only fair that you post your faulty software and your good software for the benefit of those who took the time to follow this post. Otherwise it is the same as simply
posting "NEVERMIND . I solved it. Thanks. Bye."

The issue was hardware. When I couldn't figure out why it wasn't working, I sought a software solution. The simulation gave me a false sense of security. I worked with the circuit in simulation to get fast switching speeds and it never indicated ringing would occur.

So I got a scope, found the ringing, fixed the hardware with an RC circuit, and then realized my software was never an issue to begin with.

I wasn't as clear as I thought I was. Thanks @raschemmel. I'm sorry for the emotional rant :frowning:

I think a simple "the software is 3000+ lines of code" would have sufficed.

I'm sorry, I don't know what this means:

The point of this was to figure out the hardware. I was using a signal generator to simulate the signal from the signal from the arduino, because initially, I couldn't tell what was wrong. I got an oscilliscope and it showed what I suspected to be a hardware problem. I had been fumbling around with the code that caused the problem in the software to cause me to believe, I was still in error in hardware. Confirmation bias is a b****. The problem still existed in hardware. That was the root of the software problem.

Essentially, this was not a software problem to begin with but the hardware generated the software problem. If i needed help with the software, I would've posted it in the software section. Again, my error in believing the problem was software initially before having a scope led to false assumptions and confirmation bias that ultimately led to it failing over the course of a few dozen software iterations.

The hardware problem being solved opened the door to for my specific issue to be resolved.
But, guess what? I didn't say nevermind. I posted updated scope captures, explained why I was in error, realized it was a twofold issue. And the initial issue?

High Frequency Ringing.

Now when others realize that, hmm, maybe its not a software issue like I did, they'll take the time to evaluate their hardware, AND IF, they determine it to be high frequency ringing, they will have another "open source" solution. Do some math, find an RC circuit value that works for you, maybe you need an RLC or an RL circuit, and implement it. As for the specific values and math, and the need for BJT's, it will be application dependent.

Can you summarize in 25 words or less ?
(was it a software problem when you posted ? (or a hardware problem?)
That's all I'm asking. I'm not ranting. I just don't see how the above explains anything.
Are you saying your code induced the ringing which caused you to debug it and solve the issue ?
That's really all I'm asking. There's no need to be annoyed. I'm just trying to make sense of what this post
was about. I know you didn't say "Nevermind". But you essentially said "I solved the ringing by fixing my software"
which, if you ask me, would confuse anyone trying to make sense of this post.
As you can see from my last post, I did not overlook the Parallel RC circuit. (which was there when in your OP is
still there now with , as far as I can tell, the same values so it can be ruled out as related to the 'initial issue:High Frequency Ringing.)

My level shifter does work. The problem wasn't just ringing but also my software. I changed my software and it works! bahaha. Also, when I use the output without the RC circuit, it fails. So it was half of the issue.

The RC circuit was there when you posted for High Frequency ringing but Dloyd added some components.