|Elliott Sound Products||Project 22|
Audio Test Oscillator
Design By Rod Elliott - ESP
As a piece of test equipment, an audio oscillator has to be considered essential for anyone working in with hi-fi gear. Together with an audio millivoltmeter (as described in Project 16), and even better if you have access to an oscilloscope, you will be able to make proper measurements on everything from preamps, RIAA equalisation stages (for vinyl disks), tone controls, crossover networks, etc.
I have several, and could not verify any of my circuits without them.
Before embarking on this project, please see the article on Sinewave Generation Techniques. This has a lot of additional information - far more than most of the other material you'll find on-line. Many of the examples shown have been built and tested, and others have been simulated to verify that they work as claimed.
Normally when I design something, I try to stay away from hard-to-get parts, because if they are hard for me to get, they will probably be a lot harder for many of my readers.
This poses a problem with this project, because one of the essential items is a rather obscure thermistor. This is used in the gain stabilisation circuit, and as this is an absolute requirement for a sine-wave oscillator, poses something of a problem.
As a result, I was going to show three different ways to achieve (more or less) the same performance. Since there has been no request for the LDR stabilised version, it is on permanent hold. Of the two remaining, at least one is sure to be available, so no-one should be unable to build the unit. In this first version of the project, I will show the preferred option using the lamp stabilised circuit.
As with the audio millivoltmeter, it is not possible to use a standard opamp for the oscillator, because of the frequency response needed. A different variation of a discrete opamp is used for this design, using commonly available bipolar transistors.
Note that calibration of an oscillator is never easy if you do not have access to a frequency counter.
An oscillator is simply an amplifier whose positive feedback is greater than the negative feedback, resulting in a signal which is amplified over and over again (by the same amplifier) until the output can increase no further.
This generally results in a square wave if the frequency of oscillation is low enough relative to the amplifier's bandwidth. There are several things that must be done in order to create a usable audio oscillator:
The choice of filter circuit is discussed below, as is the stabilisation process.
The design presented will provide sine wave signals of typically less than 0.1% distortion from 15Hz to 150kHz, in four overlapping ranges. An optional square wave generator is also shown, and may be included if you have a use for it.
The oscillator is designed to operate using the AC "plug-pack" power supply described in Project 05, since this is simple and safe. The output level is adjustable in 20dB steps, from a maximum of +10dBV down to -50dBV in 4 ranges as shown in Table 1, with a variable control to enable any desired voltage from 0V up to the maximum.
|Range in dB||Voltage (RMS)||Range||Lower Frequency||Upper Frequency|
|-50||3.16 mV||1||15 Hz||160 Hz|
|-30||31.6 mV||2||150 Hz||1,600 Hz (1.6 kHz)|
|-10||316 mV||3||1,500 Hz||16,000 Hz (16 kHz)|
|+10||3.16 V||4||15,000Hz||160,000 Hz (160kHz)|
Table 2 shows the frequency ranges available, and this is generally sufficient to cover the vast majority of likely applications.
There are many different types of oscillator, but the one almost universally used for audio work is the Wien Bridge (also called Wein Bridge). This is chosen because of its stability, relatively low distortion and ease of tuning. The basic arrangement of the Wien Bridge circuit is shown in Figure 1.
The bridge is not really a filter as you would normally expect, but is a phase shift network (also known as an all-pass filter). Another way of looking at it is as a high-pass filter followed by a low-pass filter. Although it does have a bandpass response, the tuning circuit has a very low Q, and does little to attenuate harmonics.
Figure 1 - The Wien Bridge Basic Circuit
In the above circuit, R1=R2 and C1=C2. Frequency of oscillation (fo) for the lowest range is ...
fo = 1 / (2 * Pi * (R1 * C1)) = 1 / (2 * Pi * (11,000 * 1 *10-6)) (at maximum pot resistance)
fo = 1 / (2 * 3.141 * (11 * 103 * 1 * 10-6) = 1 / (6.282 * (0.011)) = 1 / 0.069 = 14.4 Hz (R1 and R2 at maximum)
fo = 1 / (2 * 3.141 * (1 * 103 * 1 * 10-6) = 1 / (6.282 * (1 * 10-3)) = 1 / 6.28 * 10-3 = 159 Hz (R1 and R2 at minimum)
Other ranges are simply multiples of the above, and as can be seen this is very close to the specification shown above. Since the maximum capacitance needed is 1uF (the others being 100nF, 10nF and 1nF), polyester caps should be used throughout.
In case you are not familiar with scientific notation for component values, 10,000 is 10 * 103 and 1uF (micro-Farad) is 1 * 10-6 Farad. 1nF (nano-Farad) is 1 * 10-9. All capacitances are in Farads, and resistors are in Ohms.
Rfb1 and Rfb2 must be carefully selected to provide a gain of exactly 3 (the loss in the phase-shift network). Since this is not possible in real life (due to component tolerances and other problems), some form of amplitude stabilisation is needed to ensure that the gain is automatically corrected. More on this subject below.
Some care is needed to minimise stray capacitance, since 100pF of stray will create a 10% error on the highest frequency range. No special precautions are needed, but keeping all leads as short as possible helps, and don't try to make the frequency range switching really neat (with all the caps nicely arranged), since this will add stray capacitance.
This should be really simple, but this is no longer the case. STC (and others) used to make an NTC (Negative Temperature Coefficient) thermistor - the RA53 (or R53), and I could find no-one who supplies this part any more. The unit is (was!) a directly heated glass encapsulated bead type, with a response time that is fast enough to be usable, but not so fast as to cause low frequency distortion. This particular device has been used in hundreds of audio oscillator circuits over the years, but now we need to use something different to keep the cost down.
There are a number of possibilities, outlined below (best to worst) ...
Since the NTC (Negative Temperature Coefficient) RA54 (or R54) thermistor was AU$30 when you could get them, this option is sadly eliminated for the vast majority of constructors - availability is now almost zero.
The alternative option shown uses a lamp - not ideal, but they do work and will suit the purpose very well. The lamp is a nuisance because of the extra power it needs, but such is life.
The NTC thermistor works by the rather simple method of decreasing its resistance as the signal level rises. Since it is located in the feedback path (as Rfb1), this increases the amount of applied feedback, thus reducing the gain. Should the gain fall, the resistance of the thermistor increases again (less available voltage, less current, so less heating of the thermistor bead). This naturally causes the gain to rise again.
A lamp (having a PTC), requires a re-arrangement of the feedback path, so it will perform the same function. The lamp stabiliser is connected as Rfb2.
One irritating habit of the thermistor (or lamp) stabilisation is that the output voltage "bounces" whenever the frequency is changed. One gets used to this, and ultimately it is worth it for the low distortion available. There are many "synthesised" sine-wave generators (I have one of them, too), and while they are fine for performing a quick test, the distortion is too high to be useful for serious measurements. This bounce will also be apparent on the LDR version, since again, improving the speed will cause an unacceptable increase in low frequency distortion.
For what it's worth, the main cause of amplitude bounce is small tracking errors in the pot used to set the frequency. As the pot is turned, the two resistances do not remain exactly equal - this upsets the circuit gain and the bounce occurs as the stabilisation network compensates for the change.
One of the most important aspects of the stabilisation circuit is that it must be slow enough to prevent the shape of low frequency waveforms from being altered. This would introduce considerable distortion at low frequencies, and it is the slow response time that is responsible for the waveform bounce.
The circuit for the oscillator itself remains unchanged for all options (other than the feedback path), since once a suitable design is found, there is no real need to change it. Unfortunately, use of batteries is not recommended due to the current drain of the Class-AB output stage, so the AC power supply is a necessity.
Figure 2 shows the oscillator itself, with the lamp stabiliser. The frequency range switching is done with a 4 position, 2 pole rotary switch, and the capacitors should be wired directly to the switch to minimise stray capacitance.
Figure 2 - Lamp Stabilised Wien Bridge Oscillator
The circuit is a low power version of a simple power amplifier, and will provide the necessary 3.16V RMS easily using a +/-12V supply. Peak amplitude is about +/- 4.5V, and a simple emitter follower buffer is used to drive the output voltage divider (see below for level control, buffer and output attenuator).
Current in the output stage and buffer is quite high at 8mA, and a small heatsink is a good idea for the output devices (those with the 33 Ohm emitter resistors). They will be dissipating about 100mW each under normal operating conditions with a +/- 12V supply. Likewise, heatsinks should be used on the power supply regulators (these are normally not needed when powering a few conventional opamps). The diodes shown are 1N4001 or similar. Resistors are all 1/4 Watt 1% tolerance metal film, and a cermet multi-turn pot is recommended for the 500 Ohm variable resistor.
Figure 3 - Typical 12V/50mA Lamp Characteristics
Figure 3 shows the average measured response of 4 typical 12V 50mA 'Grain of Wheat' lamps. The result is a non-linear resistance, which increases with increasing current (positive temperature coefficient). This is what we want, but as can be seen, the resistance is rather low, and a useful response is only achieved with a current of above 6mA. Typically, with 1.05V across the lamp and series resistor (3.16V output) the lamp resistance will be in the order of 60 Ohms or so, add the 47 Ohm resistor in series giving a total of 107 Ohms. Since the feedback resistance needs to be double this value, the pot will be set to 214 - 47 = 167 Ohms. These are all very low impedances, and this is the reason that the output stage needs to be able to supply more current than normal.
Figure 4 shows the circuit for the level control, buffer and attenuator. The buffer stage is used to ensure that the impedance seen by the attenuator is low, regardless of the pot setting. This arrangement is not as elegant as some others I have seen, but is quite acceptable and introduces little distortion. The loss introduced by this stage is about 0.05dB, which can be considered negligible.
Figure 4 - Level Control And Attenuator
The level control is a single gang linear pot, and as shown, the attenuator provides a passably constant output impedance of 560 Ohms at all output settings. If desired, the output can be calibrated in Volts, with the ranges 3V, 300mV, 30mV and 3mV. Attenuator accuracy is very good, provided 1% resistors are used for all ranges.
The BC559 transistor will need a small heatsink, as it is operating at a current of about 12mA, so dissipation is 140mW.
The electrolytic capacitors should ideally be low leakage types, and can be low voltage. The input is taken directly from the output of the oscillator, which means that there is a small DC voltage across the 10k pot. This might make the pot a little noisy, but it should be quite acceptable.
There are many ways to create a square wave output, but by far the simplest is to use a CMOS Hex Schmitt trigger inverter. These are fast, and with the outputs in parallel, will provide enough drive to ensure that the rise and fall times are very short indeed.
It is very important that you get the 4584 or 74C14 version of the hex Schmitt, because if you use the 74HC14 the 12V supply will destroy it instantly. It is also important to use the switching as shown, because if the square wave converter is left running all the time it will introduce switching spikes into the sine wave.
Figure 5 - Optional Square Wave Converter
The output of this circuit is from 0V to +12V, and is fed to the 10k level pot by a 10k resistor. This reduces the level to 6V P-P, which is equal to 3V RMS. The input circuit is designed to ensure that the Schmitt input is supplied from a 1/2 supply voltage (6V), so the applied AC will swing evenly about this point and produce a symmetrical square wave.
The view of the IC is from the top, with the dot indicating pin 1. In case anyone was wondering why I used the "picture" of the IC instead of a schematic, its because it was easier (and smaller). I don't have a Schmitt trigger schematic in my library, and was too lazy to build one.
The switch is a double-pole, double throw (DPDT) type - a slide switch or mini-toggle are equally suitable. As is (hopefully) apparent, this circuit goes between the oscillator and the level control and buffer of Figure 4.
The construction is not overly critical, but do remember the heatsinks for the output transistors of the oscillator and the buffer stage. Because of the simplicity of the circuit, it should pose no difficulties in construction.
The only tricky part is the frequency dial. There are a number of ways to do this, and the easiest is to reproduce the scale shown below, and stick it onto a disk of aluminium or fibreglass (or an old CD - you will need to resize either the CD or the image though). You then need to attach a suitable knob in the centre, using epoxy glue or small screws from the rear. The "pointer" can be as simple or elaborate as you like - mine uses a small piece of perspex with a line scribed on the rear, supported just above the dial.
Figure 6 - The Frequency Dial
Notice that the frequency scale runs backwards, so that the pot will be wired in the 'normal' fashion, with minimum resistance at the fully anti-clockwise position. Since minimum resistance is maximum frequency, this works out the way it should. The pointer is expected to be on the right hand side of the scale, otherwise the lettering will be upside down (or vertical) for the wanted frequency.
Unfortunately, the image scanned from my unit was fairly scungy, so I have had to do a reproduction. This is not perfect either, but it will still look better than hand lettering. The image shown is fairly good, but if you want a better one, you'll have to do it yourself. The two unmarked pointers should coincide with the limits of travel of the pot, so if you have no other method of calibration, this should get you into the ball park. However ...
Calibration is the next step. If you have access to a frequency meter, then you have no problems, but without one all you can do is hope for the best from one range to the next, having calibrated by ear from the mains supply (using a small transformer to generate a suitable voltage), or just used the pot travel markers on the dial.
If you have a 12V transformer, connect one secondary output to the oscillator's earth point, and connect the other via a 4.7k resistor to the output. Set the output to the 3V or +10dB range, but keep the level turned down. Set the frequency range to 15Hz, and the variable control to 100Hz (or 120Hz if you are in the US or anywhere else 60Hz is used).
Using a set of headphones, you should be able to hear the 50 (or 60) Hz hum softly. Now increase the oscillator level control, and a second tone should be audible. Adjust the frequency control slowly until the two tones are "in tune", at which point you should hear the 50/60 Hz and its second harmonic. The level should be stable - you will hear the signal "beat" as you move the frequency control slightly high or low.
It is possible to tune to an accuracy of 0.1% using this method. Once the perfect second harmonic is found, you need to rotate the knob on the pot shaft - without moving the shaft - until the pointer is exactly on the 100Hz (or 120Hz) mark on the dial.
The thermistor stabilised unit is very similar to the lamp stabilised version above, but can be expected to have better distortion figures at low frequencies. There is more amplitude bounce with the thermistor because it has a longer thermal time-constant, but this contributes to its lower distortion.
Figure 7 - Thermistor Stabilised Circuit
As can be seen, it is very similar to the previous circuit, but the feedback impedance is higher. This will also help lower the circuit's distortion, but as I stated earlier, the thermistor is almost impossible to get. It used to be advertised in a Farnell Components, but no longer. Same with RS Components and any other supplier that I could find. It has to be accepted that these thermistors are unavailable other than by accident.
Back in 1999, a reader sent me some information, including a part number from RS Components. Farnell also stocked the RA54 (you don't want to know the price). Unfortunately, both suppliers have dropped the RA53 and RA54 thermistors, nor does either have any equivalent. The only viable option now is to use a lamp.
|Copyright Notice. This article, including but not limited to all text and diagrams, is the intellectual property of Rod Elliott, and is Copyright (c) 1999. Reproduction or re-publication by any means whatsoever, whether electronic, mechanical or electro- mechanical, is strictly prohibited under International Copyright laws. The author (Rod Elliott) grants the reader the right to use this information for personal use only, and further allows that one (1) copy may be made for reference while constructing the project. Commercial use is prohibited without express written authorisation from Rod Elliott.|