The Classroom

# Making Waves

Bob Harper

Issue 17, November 2018

Most of the electronic oscillators we tend to ignore today were only invented in the 20th Century. A few new methods are still being invented, but without oscillators; time itself was in jeopardy.

Those who were awake during Science Classes may remember learning about pendulums, and the physics behind them known as “Simple Harmonic Motion”. A child on a playground swing is enjoying simple harmonic motion.

Their body is a mass, the swing is the pendulum suspending their mass at a length from the fulcrum, aka pivot point. A good parent raises the child’s mass slightly by moving the swing backward which raises the child; and then lets go.

The child enjoys the ride but their physicist parent watches as the child’s position of height, (gravitational potential energy) is converted into velocity (kinetic energy), which causes the child to swing up on the other side until all of the available kinetic energy has been converted back into gravitational potential energy. Without any forward momentum, the child swings back.

In the process, some energy was lost as friction, due to the viscosity of air, converting some of the kinetic energy into heat energy. Happily, for the child, the magic of the science was lost on them.

# Electronic Oscillators

Electronic Oscillators are circuits used to generate waveforms using much of the same basic physics of the playground swing. We intend to cover a number of oscillator types that are often used in both hobby and professional electronics.

A more recent device known by the letters MEMS (microelectromechanical system) has versions that can be programmed to generate a wide range of frequencies. However, to explain MEMS we need to give you an understanding of PLLs, Phase Locked Loops, and also DDS, Direct Digital Synthesisers, though only enough to know what they do, and how you may use them.

These topics will be presented in three parts, with some discrete transistor circuits, op-amp circuits, digital gate circuits, and some dedicated ICs.

# Oscillators and Swings

To completely understand the swing, remember that without any energy to replace the energy lost in passing through the air, the child on the swing requires an occasional push. The pendulum in a clock will also stop if the energy milked off to drive the gears is not replaced by winding the clock spring or raising the weights.

The mass of the pendulum, or child sitting on the swing represents one form of energy as it takes energy to raise that weight, and it returns energy when the weight is lowered.

The swing stops at each highest point, and travels fastest as it passes through the bottom of its travel. Velocity is another form of energy, and the two forms interact such that one is at it’s greatest when the other is at it’s lowest, and the energy passes back and forth between the two forms.

In an electronic oscillator, the two forms of energy storage (ignoring batteries which are simply too slow), are capacitance and inductance. In electronic oscillators, capacitors and inductors are one method of providing oscillations.

The other method is known as phase shift, which typically employs capacitors and resistors. We will explain the two methods using examples as we go along, but first, you might remember that person pushing the child was replacing lost energy.

That lost energy is also a problem with electronics, remembering that any waveform we take from the circuit is energy the circuit has lost.

# The Waveform

The purpose of an oscillator is to generate a waveform. Therefore, the symbol for an oscillator is the same as the symbol for an ac voltage source, a circle with a sine wave within it.

Inside that symbol, the method of generating that sine wave is unknown, another black box. All the engineer is concerned with, are the parameters of the waveform exiting that black box.

The first parameter of interest is the frequency, usually shown in Hertz, which is exactly the same as the older term Cycles Per Second, but easier to say and write. Of course, oscillators may generate kiloHertz, MegaHertz, GigaHertz or even TeraHertz, but not on my workbench; so far!

The second most stated parameter is amplitude, usually stated as peak to peak (p-p) voltage, or RMS voltage. The same 1Vp-p waveform would only be 354mV RMS, so be careful you know what the reading is meant to say.

DBV and dBmV may also be used but they are not common in hobby work. The peak to peak (p-p) voltage is 1.414 times the RMS voltage.

Other parameters may include frequency stability, which is a measure of how well the frequency remains at the nominated value, amplitude stability, how well the waveform holds the stated voltage, and jitter, whether the frequency makes sudden unexpected deviations.

For Radio and HiFi, Total Harmonic Distortion (THD) describes how well the waveform conforms to the mathematical sine wave. Any waveform is made up of an indefinite number of sine waves which have a mathematical formula, V = A sin(2πfT).

The oscillators requires the fundamental sine wave, (lowest frequency waveform) and any other waves are considered 'Harmonic Distortions'.

# The Oscillator

An oscillator is essentially two stages or functions, in order to generate a frequency and amplify it. The two stages form a loop, which means it has “Feedback”. The feedback of an oscillator must be greater than one in order to provide any output. In fact, including the energy provided to other circuits, the oscillator should have a loop gain of exactly one.

This means that the amplifier gain must be exactly equal to the losses in the feedback circuit plus the loses to the outside circuits.

# Phase Shift Oscillators

Amplifiers typically work one of two ways, the output signal is either in phase with the input signal, or 180° out of phase with the input signal i.e. inverted. Phase shift oscillators use this fact with appropriate feedback circuits, that cause the feedback signal to end up in phase with the input, thus adding to the input signal.

Phase shift oscillators are typically constructed with Resistors and Capacitors, although Resistors and Inductors could be used. In either case, the RC or LC pair are in High Pass, aka Differentiator configuration. Phase shift networks are commonly used in Audio Frequency (AF) oscillators.

The easiest to explain is actually called the Phase Shift Oscillator. It uses three RC pairs that each cause a 60° phase shift. The three RC pairs cause a total phase shift of 180° so it is used with an inverting amplifier. The circuits on the right consist of a single BJT transistor circuit, FET circuit, and an inverting op-amp circuit for you to compare technologies.

If all of the feedback resistors are identical, and all of the capacitors are also identical, a large equation can be simplified to f= 1/(2πRC√6), and the gain to replace the network loss should be 29, so in the op-amp circuit, Rf = 29 × R. In the BJT circuit Re = RL/29, and in the FET circuit Rd = RL/29.

Some adjustment may be needed to accommodate practical tolerances and prototyping oscillators can be frustrating. Circuit builders often have a favourite basic circuit that they re-use over and over on the basis that it worked for them.

Although for this circuit we have provided simplified circuits for three technologies, BJT, FET, and op-amp, you can concentrate on the feedback network for the next few, and we shall use op-amp circuits as they are easier to follow.

# Twin-T Oscillator

Really this is the same circuit as the previous circuit, but with the three RC pairs connected as two ‘T’ shaped filters, connected in parallel. You will also notice a couple of extra components that will be explained as we go. They can also be used in the previous circuit.

Note that one resistor is labelled as R/2, meaning it should be half the resistance of the other filter resistors, and one capacitor is labelled as 2C meaning that it should be twice the capacitance of the other filter capacitors. Twice the capacitance results in half the reactance. Often, instead of finding standard values of resistors of exactly half the value of another, and capacitors of twice the value of others, circuits sometimes feature two resistors in parallel and two capacitors in parallel.

Therefore, although only three resistors were required as shown in the circuit diagram, four identical values can be used with two in parallel where the circuit shows ‘R/2’. For the capacitors, four equal capacitance capacitors can be used with two in parallel for ‘2C’.

With all values as written above, the frequency of oscillation will be found using: f = 1/(2πRC).

We commented above that two 1N4148 diodes wired “back to back”, meaning in parallel and in opposite polarity, have been added to the feedback circuit with a resistor in series with them.

The diodes limit the feedback, controlling the amplitude, and thus avoid driving the oscillator into a square wave. The resistor in series with the diode “softens” the diode action so the waveform remains a clean sine wave. Other methods are used in an effort for the purest sine wave possible, but use many active components.

The voltage divider formed by the two 10k Ohm resistors create a half voltage reference for the non-inverting input. A capacitor is often placed across one or both of the 10k resistors to stabilise that voltage against the ground.

Oscillators are often isolated from other circuitry even to the extent of having their own filtered and regulated power supply.

# Wien Bridge Oscillator

The Wien Bridge Oscillator is a non-inverting (positive in op-amp terms) feedback oscillator for which the op-amp is the perfect amplifier. Some BJT or FET transistor circuits use two stages to cause a positive feedback; as each stage inverts, so the two stages ‘revert’ to non-inverting!

The feedback network features a series RC network between the output and the non-inverting input, and a parallel RC network between the input and signal ground.

If both resistors are equal values, and both capacitors are equal values, the frequency is found from f = 1/(2πRC).

The signal fed back to the input is 1/3 of the output voltage, and so the amplifier must have a gain of three just to oscillate. Remember that as a non-inverting amplifier, the gain is calculated from (Rf + Rt)/Rt.

The output of most oscillators is prone to amplitude variation, which is not appreciated in test gear, or by audiophiles. Many circuits, therefore, provide some sort of amplitude stabilisation. The feedback gain of the op-amp circuit can be set by making the resistance of Rf twice the resistance of Rt in the circuit.

Amplitude regulation is set by using a normal resistor for Rf and a PTC (Positive Temperature Coefficient) resistor for Rt. In older circuits, even valve based oscillators of the early 20th century, a small tungsten filament lamp was used in the circuit as a PTC. In modern circuits, a PTC Thermister is usually used.

The feedback resistor Rf should be twice the resistance of Rt when Rt is warmed to a temperature higher than the highest expected ambient temperature. Rt doesn’t need to glow, but its temperature should be a result of the circuit, not the seasonal weather.

# Usage

The three RC oscillators just described are very likely to cover the circuits you will find requiring an audio oscillator. Morse code practice oscillators, test tone generators, and even a ham radio Twin-Tone Oscillator for tuning an SSB Radio is commonly made from two Phase Shift, Twin-T or Wien Bridge oscillators.

IC only circuits exist and even square wave multivibrator outputs can be passed through a Low Pass Filter to remove harmonics, or integrated into a sine wave, and later we will discuss digital methods of generating a sine wave from square waves.

Often the output is buffered and/or amplified, and in some cases the frequency is adjustable. Normally, the Wien Bridge is the easiest to make the frequency agile, using perhaps a band switch to change capacitance values and a dual gang pot for adjustment, within the bands.

This method can produce an oscillator operating from 50Hz to 50kHz, easily managed by a band switch and a pot. However, as the frequency exceeds audio frequencies, RF coils and capacitors take over. That is the next type of oscillator to describe to you.

# RF or LC Oscillators

Remember the child on the swing; or the clock pendulum? Wonder what they have to do with Radio Frequency Oscillators? In physics, it is sometimes beneficial to notice how one system works, and compare it to another.

The SHM, simple harmonic motion equates to the electronic LC oscillator in that L is represented by the mass of the pendulum which attempts to remain in constant motion, or current flow in the case of the inductor.

C is represented by the height of the pendulum, as it attempts to retain energy by virtue of its height. Together, just as in the pendulum the energy is swapped back and forth between inertia (E=1/2Mv2) and potential energy of height (E=MGh); in the LC circuit, energy is swapped back and forth between the Capacitor (E=1/2CV2) and the inductor (E=1/2LI2).

Energy is lost in the mechanical system due to friction, whereas in the electrical system energy is lost due to resistance. You can think or resistance in the tuned circuit as similar to a shock absorber in a mechanical suspension. Therefore, the LC circuit is more correctly the LCR circuit, but we often use another name in Radio usage.

# The RF Tank

A Tank Coil is an inductor used in radio circuits, or any circuit that runs at frequencies that require a tuned circuit to filter a frequency or band of frequencies. While we do have series tuned circuits, the tank circuit is always a parallel tuned circuit.

Some tank circuits employ a tapped inductor, and some employ two series capacitors. Others use two coils to form a transformer.

Tank coils often have a ferrite slug inside the coil that can be screwed into the coil or out of it to adjust the inductance, which therefore adjusts the tuned frequency, which in turn sets the frequency of the oscillator. The resonant frequency of a parallel tuned circuit is the frequency when the Capacitive Reactance is equal to the Inductive Reactance.

• when XL = 2πfL = XC = 1/(2πfC)
• 2πfL = 1/(2πfC)
• f × f = 1/(2πC)(2πL)
• f2 = 1/(2π2 × (CL))
• f = 1/(2π√(CL))

# Armstrong Oscillator

Arguably, the first electronic oscillator was invented around 1912, by Edwin Armstrong who also invented the Superheterodyne Radio Receiver and eventually FM Radio. The Armstrong Oscillator circuit features a transformer with a main tuned circuit, and a secondary coil to provide a small part of the signal back to the input of the amplifier.

As it is the oldest, but one you are unlikely to see or use, the circuit presented here shows a valve amplifier. Don’t be afraid of valves. They are very similar to FETs except they require some warmth to work, so they have built-in heaters (They’re warm at heart!).

# Hartley Oscillator

The Hartley Oscillator is very common in older radio receivers and transmitters that predate IC technology. Instead of two windings, the Hartley uses a single winding with a tapped connection in the winding. The full output signal is applied to the top of the RF Tank Coil.

In an inverting configuration amplifier, the tapping is grounded and the end of the coil is fed to the input, the base on a transistor amp. The parallel capacitor forms the tuned circuit while the other two capacitors prevent DC from disrupting the bias of the amplifiers.

For a Variable Frequency Oscillator (VFO) the capacitor may be a tuned type, wired in parallel with one or more other capacitors to set the frequency range of the RF output, e.g. from 5MHz to 5.5MHz. The circuit shown is an example of a Hartley circuit, somewhat simplified by leaving out components to increase reliability, stability, drumming and a myriad of other issues that LC tuned circuits suffered from.

# Colpitts Oscillator

Whereas the Hartley Oscillator used a tapped inductance (think of Hartley and Henrys) the Colpitts Oscillator uses ‘tapped’ capacitance, meaning two capacitors in series. In most cases, the two circuits may be identical, except for the treatment of tuning a variable frequency circuit.

The 5-5.5MHz VFO mentioned previously has a fixed value capacitor that sets the upper end of the frequency band at 5MHz, possibly in concert with a tuning slug in the inductor. The variable capacitor then adds a variable capacitance to the tuned circuit, in parallel, that causes the frequency to be reduced.

Remember; f = 1/(2π√(CL)); which means that increasing either the capacitance or the inductance changes the resonance and reduces the operating frequency.

# In Summary

Oscillators are amplifiers with feedback that provides a fraction of the output to the input via a filter or phase shift network, such that the loop gain is unity (1). Good oscillators generate a clean sine wave at a fixed frequency and amplitude, unless changed by the operator.

Phase shift oscillators used for audio frequencies with RC networks to ensure the input and output sine waves are of the same phase. Tank coils using inductors and capacitors are used for radio frequencies. Increasing the value of resistance (in phase shift oscillators), capacitance or inductance always reduces the frequency of operation.