Square Wave to DC Dilemma

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Hi everyone, here it is the setup:

schematic.jpg

> 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.

signal V[out].jpg

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".

signal V[+].jpg

( 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!
 

DickCappels

Joined Aug 21, 2008
10,175
Certainly is strange.3V is close to the maximum output voltage of an LM324 with a 5V power supply -maybe that has something to do with it.
Where do you apply the pink signal?
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Certainly is strange.3V is close to the maximum output voltage of an LM324 with a 5V power supply -maybe that has something to do with it.
Where do you apply the pink signal?
Hi, thank you for the answer!

I am not sure about what your question means. The pink signal is the square wave input signal generated by the oscilloscope. It goes through the low-pass filter and then to the non-inverting input of the op-amp.

I just tried different amplitudes for the input signal. The result in terms of "overshooting" is the same. The amplitude of the input signal seems just to scale the output of the op-amp.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Please post scope shots with both channels DC coupled.

Also, is there any power supply decoupling around the opamp?

ak
Hi!
This is the op-amp output DC coupled:

signal V[out].jpg

And this is the non-inverting input DC coupled:

signal V[+].jpg

This time the input signal is a 1.5V square wave with 500Hz frequency. I just applied some offset in order to center the signals.

I am using a breadboard and a 100uF decoupling capacitor near the power supply pins ( not the op-amp power supply pins ).
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
From the TI datasheet, what you see is not very far off from the drawing below.

View attachment 139600
Yes, you are right. I am familiar with that picture, probably I am missing something obvious.

The first thing I tried to answer my question was to put an identical low-pass filter in series with the one shown in the schematic.
The op-amp output ( using the second-order low-pass filter ) was slightly better but was still overshooting.

The only way I found to solve the problem was to put a 1nF capacitor connecting the op-amp output to ground.

Am I wrong if I think output overshoot occours only when a step or pulse signal is applied to the input of a voltage follower?
I don't understand how the input square wave still have a dramatic effect on the op-amp output even if the low-pass filter seems to be quite effective.
 

Alec_t

Joined Sep 17, 2013
14,313
I don't know what the waveform trailing edge is.
Your scope blue trace shows a rising (leading) edge. What happens when the input falls (trailing edge)? Do you still get an overshoot? At such a low frequency it is unlikely that the probe lead inductance would have any significant effect, but you never know .....
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
Your scope blue trace shows a rising (leading) edge. What happens when the input falls (trailing edge)? Do you still get an overshoot? At such a low frequency it is unlikely that the probe lead inductance would have any significant effect, but you never know .....
I hope that's what you meant:

signal V[out] - Trailing Edge.jpg

then yes! still overshooting. And still not getting it..
 

MrChips

Joined Oct 2, 2009
30,806
You are looking at a very magnified scale at 50mV/div.

I suspect that what you are seeing is cross-talk between the two scope probes.
Remove CH2 probe or GND CH2 INPUT and see if you can trigger on CH1 alone.
 

Deleted member 115935

Joined Dec 31, 1969
0
your driving a 1volt input pulse, with a few ns rise / fall times,

on the output you have a 50mV . 50 ns pulse.

So the input signal has a very high frequency compared to the op amp capabilities.

it would be educational to see if you slowed the input edge rate down, see if that affects the output 'pulse'
 

ebeowulf17

Joined Aug 12, 2014
3,307
your driving a 1volt input pulse, with a few ns rise / fall times,

on the output you have a 50mV . 50 ns pulse.

So the input signal has a very high frequency compared to the op amp capabilities.

it would be educational to see if you slowed the input edge rate down, see if that affects the output 'pulse'
But the op amp is being fed the output of the low pass filter - no high frequency, no steep rise times. The question is why the square wave which isn't directly connected to the op amp still appears to have an effect on the op amp output.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hi!
This is the op-amp output DC coupled:

View attachment 139599

And this is the non-inverting input DC coupled:

View attachment 139598

This time the input signal is a 1.5V square wave with 500Hz frequency. I just applied some offset in order to center the signals.

I am using a breadboard and a 100uF decoupling capacitor near the power supply pins ( not the op-amp power supply pins ).
You should probably also have decoupling near the op amp supply pins. The datasheet probably has recommendations. If not, 10uF electrolytic/tantalum plus 0.1 to 1uF ceramic seems to be a good starting point.
 

ebeowulf17

Joined Aug 12, 2014
3,307
You are looking at a very magnified scale at 50mV/div.

I suspect that what you are seeing is cross-talk between the two scope probes.
Remove CH2 probe or GND CH2 INPUT and see if you can trigger on CH1 alone.
I'm really intrigued by this theory. I hope the thread starter tries it and shares the results.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
You are looking at a very magnified scale at 50mV/div.

I suspect that what you are seeing is cross-talk between the two scope probes.
Remove CH2 probe or GND CH2 INPUT and see if you can trigger on CH1 alone.
Hi! Sorry for the delay.

In the previous pictures I posted CH2 ( pink ) was directly connected to the oscilloscope waveform generator through a ( generic ) coaxial cable.
It appears that triggering CH1 ( yellow ) alone is impossible.

The best I could menage was to connect the External Trigger directly to the waveform generator ( the same thing I did before with CH2 ).
I couldn't find any schematic showing the internal connections for the External Trigger.

Here is the result ( 1.5V Square Wave 500Hz, CH1 AC coupled ):

External Trigger.jpg

So, this time the overshoot peak halved, from 40mV to 18mV.
( Do not compare with the first post because there the signal was 3V amplitude)

I hope this is what you suggested.
 

Thread Starter

Alessandro Bergamo

Joined Nov 18, 2017
13
your driving a 1volt input pulse, with a few ns rise / fall times,

on the output you have a 50mV . 50 ns pulse.

So the input signal has a very high frequency compared to the op amp capabilities.

it would be educational to see if you slowed the input edge rate down, see if that affects the output 'pulse'
Hi! I tried what you suggested:

1.5V Square Wave @ 500Hz :: overshoot peaks at 40mV
1.5V Square Wave @ 50Hz :: overshoot peaks at 24mV
1.5V Square Wave @ 5Hz :: overshoot peaks at 20mV

As you slow down the square wave frequency the overshoot is less stable, but I think this is a good representation of what happens.
 

MrAl

Joined Jun 17, 2014
11,474
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!

Hello,

Op amps work on very teeny tiny input signals. The difference between 0.0001 and 0.0002 could make a difference on the output of as much as 10 volts before the feedback responds.. This means when you look at the non inverting input with the scope you need to use an AC coupling and amplify the signal much more. Look for a change that syncs with the output. Look for a signal as low as 10uv if you can on the non inverting input.

You can also try a 0.01uf to 0.1uf cap across the 10uf cap.
If the 10uf cap has inductance it could cause a problem like this. All caps have some inductance though and the bigger it is the worse the problem will be.

Just some possibilities.
 
Top