Waveshaper: Amplitude changing as frequency changes

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Below is the LTspice simulation of Alec's basic circuit with an opamp to perform the switch function to invert the polarity of the input op amp.

Due to finite response times of the op amps, there is a glitch during the sawtooth flyback.
This is reduced by the R6-C2 filter.

View attachment 149160

Thank you everyone for your great help! The circuit is simulating great without any issues. I have included the 9V supply and MC330 op amps that will be used. I was hoping to get the triangle wave so that it would oscillate with an average voltage of zero (-2.5 V offset). Any ideas how to achieve this ?

Capture11.PNG Capture99.PNG
 

AnalogKid

Joined Aug 1, 2013
12,129
First, you will need bipolar power supplies for at least the output opamp. For a fixed offset, replace R7 with two resistors that create a Thevenin equivalent DC offset. For an offset that tracks the actual amplitude of the waveform, AC couple the input to U3A.

ak
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
So I have connected the actual sawtooth source, which is displayed in red on the Oscilloscope below. A triangle wave is produced however again there seems to be an issue with it. Connecting a saw tooth generator of the same frequency and offset as the source gives a perfect triangle output. However it doesn't seem to work using the source. Changing the value of Rs6 to 1kHz cleans it up a bit, but it also seems to decrease the amplitude. Is it possible to get a cleaner signal? complete 2.PNG

Rs6 at 10kHz:Complete 1.PNG

Rs6 at 1khz:232323.PNG
 

crutschow

Joined Mar 14, 2008
38,506
The problem is that the precision rectifier has a different input impedance for the top half of the waveform as compared to the bottom half, which causes a DC offset of the waveform through the capacitor and thus distortion of the rectified output.

One solution is to add a follower op amp between C3's output and the precision rectifier input.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
I added a follower, but the problem persists. What values need changing to alter the symmetry of the sawtooth? I really am stumped with this, I was hoping to start building tomorrow!
New.PNG
 

Attachments

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Below is the LTspice simulation of Alec's basic circuit with an opamp to perform the switch function to invert the polarity of the input op amp.

Due to finite response times of the op amps, there is a glitch during the sawtooth flyback.
This is reduced by the R6-C2 filter.

View attachment 149160
I wonder if you could explain this circuit in a bit of detail, I understand that the rectifier blocks any negative part of the waveform. But what are the other 2 op amps configurations ?
 

crutschow

Joined Mar 14, 2008
38,506
I wonder if you could explain this circuit in a bit of detail
When the input is negative, U5 turns on and keeps node 2 at ground through D1.
This means U4 acts as an inverter with a gain of -1 to convert the negative input voltage to a positive voltage.

When the input goes positive, U5's output goes to 0V.
This allows node 2 to see the positive input voltage.
U4 then acts as a follower with a gain of +1 (applying the same voltage to the inputs of the opamp makes it act as a follower).
U6 is just a buffer for the RC glitch filter.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
When the input is negative, U5 turns on and keeps node 2 at ground through D1.
This means U4 acts as an inverter with a gain of -1 to convert the negative input voltage to a positive voltage.

When the input goes positive, U5's output goes to 0V.
This allows node 2 to see the positive input voltage.
U4 then acts as a follower with a gain of +1 (applying the same voltage to the inputs of the opamp makes it act as a follower).
U6 is just a buffer for the RC glitch filter.

Thank you, so U5 and U4 basically make up a full wave rectifier? is there any benefit to using this topology for my application compared to the standard full wave rectifier circuit? Regards
 

Alec_t

Joined Sep 17, 2013
15,119
Providing the non-inverting input of the preamp gets clamped at half the peak voltage of the sawtooth during the lower half of the sawtooth only, then the circuit can be regarded as a full-wave rectifier or absolute value generator.
 

Thread Starter

Jack Tranckle

Joined Jan 20, 2016
73
Providing the non-inverting input of the preamp gets clamped at half the peak voltage of the sawtooth during the lower half of the sawtooth only, then the circuit can be regarded as a full-wave rectifier or absolute value generator.
any benefits of this topology at all for this application ?
 

crutschow

Joined Mar 14, 2008
38,506
any benefits of this topology at all for this application ?
It may give a smaller glitch at the sawtooth flyback since U4's output does not have to change polarity when the input suddenly goes from a positive to negative input (or vice-versa).
My simulations have shown a higher output glitch for some of the other precision full-wave configurations.
 
Top