Square Wave to DC Dilemma

nsaspook

Joined Aug 27, 2009
16,333
That is why I strongly believe that what you are seeing is an artifact cause by cross-talk between the scope input channels.
+1
His waveforms look like classic fast rise/fall times coupled signals. The clue is the slower opposite polarity ring after a faster peak from reactance in the signal path.
 

MrAl

Joined Jun 17, 2014
13,716
Hello,

We need to see the input signal on the non inverting terminal with better amplification. That should clear up the question of if we are seeing some sort of crosstalk or the op amp is responding normally. The open loop amplification can be 100000 so even a 1uv signal might show up on the output until the op amp has time to respond to the feedback. That 1uv step can come from a small ESL in the capacitor. We would not see much with the scope set to 50mv per division vertical, we would have to use AC coupling and a lower setting.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Hi everyone, sorry again for the delay.
( In the meantime I also tried diffrent things you guys suggested but nothing seemed to be conclusive )

So.. my brain is not happy about this but here it is a screenshot where no signal is applied to the CH1 (yellow) probe...

No Input.jpg

The measurment was taken as follows:
> Waveform generator connected directly to CH2 : 1.5V 500Hz Square Wave
> CH1 is DC coupled and the signal displayed is a 1024 samples average
> The results are the same with the op-amp power supply on or off


Is that definitive proof of common mode signal as the probes and the waveform generator share the same ground line?

If that is the case that means that indeed there is an unwanted signal that is affecting the cicuit, right?
( I mean even when I am not probing the circuit )
 
Hi everyone, here it is the setup:

View attachment 139586

> Input signal: 3V amplitude square wave, 500Hz frequency
> LM324N: voltage follower, 5V single-supply


I am trying to wrap my head around why the op-amp output signal seems to overshoot everytime the input signal rises.

View attachment 139588

The reason I am surprised about this behaviour is because the output of the low-pass filter ( op-amp non-inverting input ) appears to be "nice and flat".

View attachment 139587

( In the pictures both signals are sampled in AC mode. The yellow signal comes from the op-amp output / non-inverting input. The pink signal is the input signal offset in order to make the pictures clearer )

Hope someone can shed some light on this matter, thank you in advance!



You are integrating a square wave, which gives you a triangle wave, and you feed that into the op-amp. I would guess the opamp is saturating for a short while because of the triangle wave peaks!

The input to your V+ is not the square wave, it's a triangle wave!

Can you show us a larger timebase photo please? I want to see the signal for at least 5 cycles.
 
Last edited:
If your output signal is a triangle wave as expected, then that signal looks to me like a parasitic capacitive coupling in your circuit as long as the same happens when the wave goes low. Does it happen? I'm no Xpert though :(
 

MrAl

Joined Jun 17, 2014
13,716
Hi everyone, sorry again for the delay.
( In the meantime I also tried diffrent things you guys suggested but nothing seemed to be conclusive )

So.. my brain is not happy about this but here it is a screenshot where no signal is applied to the CH1 (yellow) probe...

View attachment 139852

The measurment was taken as follows:
> Waveform generator connected directly to CH2 : 1.5V 500Hz Square Wave
> CH1 is DC coupled and the signal displayed is a 1024 samples average
> The results are the same with the op-amp power supply on or off


Is that definitive proof of common mode signal as the probes and the waveform generator share the same ground line?

If that is the case that means that indeed there is an unwanted signal that is affecting the cicuit, right?
( I mean even when I am not probing the circuit )
Hello,

You need to show the input directly on the non inverting input terminal of the op amp. You need to use enough amplification to show that signal properly. 50mv per division is not good enough you probably at least need 1mv per div vertical.
You also MUST explain what waveforms you are showing, where they are in the circuit, what nodes or else we cant know where you are measuring.
 

ebeowulf17

Joined Aug 12, 2014
3,307
So.. my brain is not happy about this but here it is a screenshot where no signal is applied to the CH1 (yellow) probe...
I'm not sure what you're describing here. Is the CH1 probe not connected to anything?

Or is CH1 still connected to the op amp output, but the square wave generator is no longer connected to the RC filter?

What, exactly, is connected where in this test setup?
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
I'm not sure what you're describing here. Is the CH1 probe not connected to anything?

Or is CH1 still connected to the op amp output, but the square wave generator is no longer connected to the RC filter?

What, exactly, is connected where in this test setup?
The test setup is the one described in the first post. The square wave is still connected to the RC filter.
The only difference is that the CH1 probe is not connected to anything ( literally ), or to be more specific only the ground is connected to the circuit ( inside the oscilloscope ).

The square wave generator is inside the oscilloscope so I was hoping that proves the problem is caused by the impedance along the common line (ground).
 
Last edited:

MrAl

Joined Jun 17, 2014
13,716
I'm not sure what you're describing here. Is the CH1 probe not connected to anything?

Or is CH1 still connected to the op amp output, but the square wave generator is no longer connected to the RC filter?

What, exactly, is connected where in this test setup?
Hi,

I guess you just want to talk about this forever without ever finding out what is really wrong.
If you dont measure the input at the non inverting terminal, you wont know if it is that or not. You need high amplification though.

Goodbye and good luck.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Hi,

I guess you just want to talk about this forever without ever finding out what is really wrong.
If you dont measure the input at the non inverting terminal, you wont know if it is that or not. You need high amplification though.

Goodbye and good luck.
You are right, I should have known better, I got a little bit discouraged.
The other day I tried to see if I could spot anything related to the square wave at the non-inverting input of the op-amp and I could swear there was nothing ( I was sampling in normal mode ). My bad I dicided not to share the results.

Just now I checked again the non-inverting input sampling in average mode:

non-inverting.jpg
 

ebeowulf17

Joined Aug 12, 2014
3,307
So, if crosstalk is a legitimate possibility, how do you determine whether or not that's what you're seeing at any given moment? The last several suggestions have been to zoom way in on the trace for the non-inverting input, presumably to prove that the unwanted signal also exists there.

But if crosstalk is a possible explanation for what we see at the op amp output, isn't it just as likely that we'd see that same crosstalk when scoping the non-inverting input?

I would've thought (just instincts and intuition - not enough experience to back this up) that seeing the unwanted signal on CH1 when it wasn't connected to anything would be fairly convincing evidence of crosstalk. Is there some better way to test crosstalk?

Is the floating probe bad because it can act like an antenna? Would it be better to ground the probe and look for crosstalk? Or maybe disconnect the probe entirely?

Just curious. I'd love to be better educated on this stuff and know what to look for and how to troubleshoot issues like this one.
 

MrChips

Joined Oct 2, 2009
34,845
It may be difficult to eliminate crosstalk completely.

Here is something that you should try. Use one input channel only. Set the unused input selector DC-AC-GND to GND.

Apply your trigger signal to the EXT TRIGGER input and set the TRIGGER SOURCE to EXT.
 

MrAl

Joined Jun 17, 2014
13,716
You are right, I should have known better, I got a little bit discouraged.
The other day I tried to see if I could spot anything related to the square wave at the non-inverting input of the op-amp and I could swear there was nothing ( I was sampling in normal mode ). My bad I dicided not to share the results.

Just now I checked again the non-inverting input sampling in average mode:

View attachment 139945

Hello again,

I am happy you could show this signal now. I think it helps.

There is a correlation between what you are seeing on the non inverting terminal and what you see on the output. Compare your output signals to the blip you are seeing on the non inverting input. The amplitude and the time frame is about the same. That would be what we would see if the capacitor had some series inductance which all capacitors do especially large value electrolytic caps.

Since ceramics are better at shunting high frequency signals, a small cap across the electrolytic may help matters. It has to be a good quality cap though with value around 0.01uf to 0.1uf just like power supply bypass capacitor would have.

It is interesting that we can even see this with a vertical setting of 10mv/div. The blip looks about 5mv high. That is surely enough to cause an output blip, but it is a little fast for this op amp so the cap shunt test would help to narrow this down. If a good quality cap can improve this problem then at least part of the problem is the cap inductance or related, but if you cant find a cap that helps then it is probably not that. It is very important though that it must be a good quality cap. Also, a different cap should show different results, like a 1uf electrolytic rather than 10uf. Changing the physical cap should change the response unless it is inherent in part of the setup itself such as the wiring or power supply connections, and good power supply bypassing is a must too.

The other question that comes up is if this "problem" is a real problem for the end application itself. It may not matter if it blips up a little for a short time.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Hello again,

I am happy you could show this signal now. I think it helps.

There is a correlation between what you are seeing on the non inverting terminal and what you see on the output. Compare your output signals to the blip you are seeing on the non inverting input. The amplitude and the time frame is about the same. That would be what we would see if the capacitor had some series inductance which all capacitors do especially large value electrolytic caps.

Since ceramics are better at shunting high frequency signals, a small cap across the electrolytic may help matters. It has to be a good quality cap though with value around 0.01uf to 0.1uf just like power supply bypass capacitor would have.

It is interesting that we can even see this with a vertical setting of 10mv/div. The blip looks about 5mv high. That is surely enough to cause an output blip, but it is a little fast for this op amp so the cap shunt test would help to narrow this down. If a good quality cap can improve this problem then at least part of the problem is the cap inductance or related, but if you cant find a cap that helps then it is probably not that. It is very important though that it must be a good quality cap. Also, a different cap should show different results, like a 1uf electrolytic rather than 10uf. Changing the physical cap should change the response unless it is inherent in part of the setup itself such as the wiring or power supply connections, and good power supply bypassing is a must too.

The other question that comes up is if this "problem" is a real problem for the end application itself. It may not matter if it blips up a little for a short time.
Hi, placing a ceramic capacitor across the 10uF capacitor didn't help. I tried a 0.01uf and a 0.1uf but I wouldn't refer to these as good quality capacitors. Also I tried again to decouple the op-amp supply properly but there was no difference in the result.

There was a small variation substituting the 10uF capacitor with a 1uF:

10u.jpg 1u.jpg
10uF 1uF

As you can see nothing is really happening.

For reference these are shoot of the non-inverting input (yellow) and the output (pink), the op-amp supply is swith on and off respectively:

on.jpg off.jpg
Op-Amp ON Op-Amp OFF


The output of this circuit will feed a voltage controlled oscillator, that's why I was a little bit worried about the bump in the signal.
As a matter of fact the little variations in the opamp output do not affect too much the frequency of the oscillator.
As this is the first time this problem happens to me on a circuit which is simple to talk about I decided to ask and try to shed some light about it.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
It may be difficult to eliminate crosstalk completely.

Here is something that you should try. Use one input channel only. Set the unused input selector DC-AC-GND to GND.

Apply your trigger signal to the EXT TRIGGER input and set the TRIGGER SOURCE to EXT.
Hi, I am confused about what you are asking me to do. I got the trigger part, can you explain the input part.
 

MrAl

Joined Jun 17, 2014
13,716
Hi, placing a ceramic capacitor across the 10uF capacitor didn't help. I tried a 0.01uf and a 0.1uf but I wouldn't refer to these as good quality capacitors. Also I tried again to decouple the op-amp supply properly but there was no difference in the result.

There was a small variation substituting the 10uF capacitor with a 1uF:

View attachment 140199 View attachment 140198
10uF 1uF

As you can see nothing is really happening.

For reference these are shoot of the non-inverting input (yellow) and the output (pink), the op-amp supply is swith on and off respectively:

View attachment 140200 View attachment 140201
Op-Amp ON Op-Amp OFF


The output of this circuit will feed a voltage controlled oscillator, that's why I was a little bit worried about the bump in the signal.
As a matter of fact the little variations in the opamp output do not affect too much the frequency of the oscillator.
As this is the first time this problem happens to me on a circuit which is simple to talk about I decided to ask and try to shed some light about it.
Hi,

Ok so it look like no matter where you place the other probe you still get the same result on the non inverting input right?

Also, where did you have the ground of the scope connected when you measured the non inverting input with the additional capacitor? This means a lot. The ground lead of the scope must be connected in the right place to properly view this signal. In fact many scope measurements are like that.
 
Top