A little op-amp troubles

Thread Starter

be80be

Joined Jul 5, 2008
2,395
#17 low pass the one i posted was a high pass it didn't work too hot 17 was really good tho

I'm going to try what you said in post #19 thanks crutschow
 

MrAl

Joined Jun 17, 2014
13,702
Hello again,

The circuit in post #17 with added buffer (gain=1 or we make the gain here instead) should work but the diodes have to be arranged so that they clip at just the right point and the gain should be close to the optimum gain using ideal components.

For example, if we use a buffer between the two of C3 and the input to the input resistor of the inverting op amp, the ideal gain is 29 (see root locus below). So if the gain is set to maybe 35 and the diodes are arranged right (different configuration than shown in the schematic) the circuit should oscillate and run forever.

In the diagram below, the root locus crosses the jw axis when K=29 (the gain of the inverting op amp section or the gain of the non inverting section, but not both, or part gain in the non inverting section and part in the inverting section). The dark green locus shows the entire locus with the gain set from 0 to 100, and the light green locus shows the part of the locus with gain from 0 to 29. The tiny white dots show the locus when the gain is zero (0) so it starts there, then progresses along the three green lines in the various directions until it gets to the end of the green lines which is a gain of 100 or at the end of the light green lines which is a gain of 29. The gain K is equal to the feedback resistor divided by the input resistor (inverting stage) but you can move that gain to the non inverting section instead and take the output from the non inverting output which should work pretty nice.

This is probably better than the simpler but problematic high pass version. BTW the high pass version was not set up right either, the circuit is not connected that way. But either circuit will need some gain clipping such as with diodes.

If we look at some other circuit with diodes we usually see a little resistor arrangement that goes with them so that they mostly start to clip at some specific amplitude. Note if they are just in series with the feedback resistor, they are working near their clip point already. It would be better to use a voltage divider at least so as to get the clipping to start later as the amplitude gets higher. Alternately, try two back to back zeners. A little experimentation here will get you there. The idea is to have soft clipping so that it does not bother the sine wave too much. The low pass filtering does help this though.

In the diagram we see one real root (left side) start from some real value and progress out getting farther and farther from the jw axis (bright white vertical line). The complex roots start out on the real axis, then progress toward each other, then break away from the real axis and progress to the right toward the jw axis. At K=29 they meet the jw axis and at K>29 they move farther into the RHP. So for K<29 the oscillation damps out, and for K>29 the oscillation increases in amplitude until it saturates the output, and at K=29 the oscillation is a pure sine wave.
The practical problem is keeping the gain at 29 because the components shift value very slightly over time, which means some non linearity has to be added like with the diodes.

PhaseShiftOsc_LP_WithBuffer_RootLocus-1.gif
 
Last edited:

Thread Starter

be80be

Joined Jul 5, 2008
2,395
It worked really good after i changed the 100k to a 200k I been reading a book thats where I got the first circuit from.

I want play with a h - bridge and output a bigger sine wave nothing better to do i guess.
 

MrAl

Joined Jun 17, 2014
13,702
It worked really good after i changed the 100k to a 200k I been reading a book thats where I got the first circuit from.

I want play with a h - bridge and output a bigger sine wave nothing better to do i guess.
Hi,

That's great :)

Check for clipping on the output too, that would act as a non linear gain adjust also.

The oscillation frequency for the circuit i was talking about is:
w=sqrt(6)/(R*C)

or of course:
f=sqrt(6)/(2*pi*R*C)

The value of w can be seen in the root locus plot too, where the locus crosses the jw axis. There are two roots so we see this at plus and minus w.

Here is the circuit i have been working with. I almost forgot to mention that V2 is there to check for phase shift change in the output of the oscillator over time. If the phase does not stay the same over long periods of time, then i dont have V2 adjusted to the right oscillator frequency. Just another way to measure the frequency of the oscillator to within a very small percentage error.
Also note that there is no non linear mechanism because in the ideal circuit we dont need any for shorter time periods like 1000 cycles. When we get to very very long time periods though even in the simulation we would need some non linear feedback because we cant choose an exact value resistor when we only have maybe 16 digits to work with, unless of course we get lucky like with this circuit (29k). But then the op amp gain is very high but not infinite, so we'd eventually see a change in amplitude either rising or falling.
I'll eventually add some non linear feedback.
 

Attachments

Last edited:
Top