# Noise in tunable sine wave oscillator

I recently soldered a tunable phase shift oscillator on a bread board pcb. It produces a sine wave in the range from 80 Hz to 3,3 kHz. The oscillator frequency is tuned with a dual 100k potentiometer. Unfortunately there always is some kind of noise or unwanted oscillation in the sine wave. It is present in all frequencies.

LTspice schematic:

The noise looks like this:

Does anyone have an idea what might cause this issue?

• how long are the jumpers for the breadboard and pots Feb 10 at 20:54
• Looks like it is happening when the dV/dt of the output is highest. Are the opamps' power supply rails properly bypassed?
– jonk
Feb 10 at 21:05
• @TonyStewartEE75 I've added a picture of the pcb. They are quite long. Do you think the inductance is too high? Feb 10 at 21:06
• What decoupling do you have on Vref and the supply? Feb 10 at 21:06
• You must put decoupling caps on each IC in the circuit. For each of those op-amp packages, put a 100nF capacitor right up against the socket by pins 1 & 8 or pins 4 & 5, then using as short of wire runs as you can, connect it to the positive and negative power pins on the op-amps. Then report back. Feb 10 at 21:21

That is instability in the opamps.

That can easily happen if you have bad decoupling as mentioned in the comments or there is too much capacitance from the inverting input nodes to ground. That capacitance in conjunction with the feedback resistor adds phase shift that can cause oscillation.

The gain of the opamp varies with the instantaneous bias level that explains why it only happens on some parts of the output sine wave.

A common cure for this is to add a small capacitance across the feedback resistor (R30, R23, R26). It usually only needs to be in the region of 10pF and shouldn't affect operation at the frequency of operation.

When designing a PCB it is necessary to minimize trace lengths at the inverting node or the PCB parasitics can trigger this type of oscillation. In a PCB design I always make provision for a capacitance across the feedback resistor just in case it is needed.

On surface mount designs that haven't incorporated a capacitor in the design you can solder a capacitor directly on top of the feedback resistor as a "hack" to make the circuit function.

• You are right. Even one 100 pF capacitor parallel to one of the feedback resistors fixes the problem. Feb 10 at 21:56

Only the 3rd opamp (with the diodes) needs to have voltage gain. The output of the 2nd opamp has lowest distortion. Do it like this:

Stable and parasitic Oscillations both occur due to positive unity gain feedback and the Barkhausen criteria.

Given there are 3 inverting Op Amps, there exist 3 positive feedback paths from output to another input. All it takes is a fraction of picofarad between a low impedance output and a high impedance input with overall loop gain of 1. Knowing the impedance of capacitor reduces with the rise in slew rate, dV/dI=Z(f) with dV/Ic=C*dt.

I can simulate this oscillation with an arbitrary parasitic RC network with < 1 pF and get close to your signal but not a stable pattern like yours..

## Theory of Operation

A 3 segment Phase Shift oscillator with 60 deg phase shift per segment with inverting feedback adding an extra 180 to satisfy the positive feedback (0=360deg) at unity gain.

• However this circuit only has 2 RC phase shifters and an inverter with a slight >1.0 gain. The ratio of the R values used in the 3rd stage in series and parallel with diodes will affect the steady state Vpp. -The Vref speeds up the oscillation when it is tuned for high Q (narrow BW), that speeds up settling time (k/BW). The value of Vref is almost irrelevant as the amplitude is neither very stable or precise.
• The Barhausen Criteria is satisfied by each RC filter shifting only 45 deg with attenuation but a net gain of 1. Superposition says the inverting input has a gain of -1 and phase of -180. Since the Vin- is a midpoint between previous stage and output, the phase shift must be half of 180 deg or + 90 deg as the non-inverting gain dominates.
• thus the overall phase shift with 3 stages is 90+90+180

## Pro's

• The steady-state Vpp amplitude of the sine is relatively constant with change of either 100k Pot.
• it works, although not instrument quality, but it's cheap

## Cons

• Since a linear Pot can only change about 200:1 this limits the frequency range.
• Diode limiting distortion might be < 5% but is not very pure. Although this can be improved fine tuning the gain closer to 0.9x and making the diode Resistor add x.
• parasitics can be a nuisance with this design, so suppression methods are needed.
• the amplitude of the output changes immediately as the breakpoint shifts and the frequency changes are not coherent. But it settles fairly quick depending on Q of R values in the 3rd stage. (i.e. how close to unity gain with diodes off.)

There are better Sine Wave Oscillator designs.