ZL2PD Audio Signal Generator
A
couple of cheap CMOS ICs are used to
digitally generate audio sinewaves across a wide range in this compact
battery-powered test instrument. The oscillator features both
unbalanced and balanced outputs.
Introduction

I use
signal generators of one sort or another all the time as I design and
build circuits. They include a pair of simple oscillators; a transistor
oscillator for testing crystals, and a CMOS square wave clock source,
built on a scrap of PCB. I also have a homebrewed RF signal generator
which covers up to about 50 MHz in a dozen ranges, and an audio signal
generator.
For many years, I used a kit-built audio oscillator, a design from the
now defunct Electronics Australia (EA) magazine. It used a couple of
op-amps, and was stabilized with a thermistor. It worked, but it had
some serious limitations. The output level would vary with frequency,
and it was annoyingly microphonic. Knock it by accident, and it would
make a "boinnngggg" sound over top of the wanted tone. The oscillator's
frequency also had a habit of drifting a little over time.
The most critical limitation however was its power consumption. It seemed
to gobble batteries! Whenever I went to use it again, the bothersome
thing would require a (yet another!) new battery before I could begin
to use it. Along with the one or two seconds it took to start up, a
product of its thermistor stabilization scheme, I became sufficiently
annoyed with it one day that I designed and built this simple
CMOS-based version.
Functional Description
The
oscillator described here is now more than a dozen years old. After all
that time, and some fairly heavy use, I finally replaced the original
9V battery I put in when I built it about six months ago. It draws a
miserly 3mA at 9V, but it is possible to power it with any voltage from
3V to as much as 15V, the limit of the CMOS chips. If nothing else,
it's proved to be more battery efficient than the EA design, and as a
result, it's always ready for use.
Operating from a single 9V battery, this audio oscillator covers from
300 Hz to 12 kHz in a single range. If you want a higher or lower
range, it's very easy to modify to add either an extra range or two, or
change the range .
This unit only provides a sinusoidal output. I've not needed a square
wave generator to the same extent, and the little CMOS oscillator I
built onto a scrap of PCB to generate
a square wave some time back seems to be sufficient for my requirements
(although it's as ugly as anything!) However, a square wave output is
available on the PCB, at pins 10 and 15 of IC2, for anyone that wants
square waves too.
There are two outputs on this audio signal generator. The first is a
standard unbalanced DC-isolated output with an impedance of about 100
ohms and an adjustable level up to at least 5 Vpp. This output is
available on an "RCA" or "phono" female connector as well as a
parallel-connected BNC connector. Both are mounted on the front panel.
These are the two most commonly used connectors around my bench, but
you can obviously use any connectors you want if you want to build your
own version of this unit.
The second output is a balanced 600 ohm output. This is connected to a
pair of banana plug terminal posts, again mounted on the front panel.
The output level is similarly adjustable, and the open circuit isolated
output reaches at least 9Vpp due to a compact 150 ohm to 600 ohm audio
transformer inside the unit. I measured an output level of +10dBm into
a 600 ohm load with a fresh battery. This output is used for feeding
600 ohm professional audio interfaces such as VHF and UHF transmitters
which I encounter from time to time in my work.
Schematic

The circuit is simplicity itself. (Right click your mouse on the digram
over to the right to see the full detail) A CMOS square wave
oscillator using three CMOS gates each wired as an inverter. VR1
allows the frequency to be adjusted over a 40:1 range. Selecting one of
two timing capacitors allows two ranges to be selected. (The details
for adding the second range are shown in the diagram at the foot of
this page) The square wave frequency is 16 times greater than the final
sine wave frequency.
This square wave is used to clock the 4015 CMOS 8 stage shift register.
When power is first applied, the 4015 shift register's outputs all go
low. This forces the fourth gate of IC1 to apply an initial high logic
level to the input pin of the shift register stage. Once the power-up
reset pulse generated by C5 and R10 ends, the 4015 is clocked by the
output of the oscillator stage (IC1).
As the rising edge of each pulse of the square wave oscillator clocks
the shift register, the level present on the data input pin (pin 7) is
shifted sequentially to the next output pin. Eight pulses of the input
clock will change all the outputs high.
However, when the last output goes high, this causes the input to the
shift register to go low because of the inverter onto the input of the
4015. The next 8 pulses of the square wave oscillator will result in
the 8 shift register stages going low with each new pulse.
By selecting the values of the output weighting resistors (R2 - R9), a
variety of output waveforms can be produced. In this case, the
resistors produce the desired sine wave output waveform. However, other
outputs such as a triangle wave could be produced by changing the
values of the resistors.
Because the 4015 is made up of two 4-stage shift registers, a
synchronised square wave of the same frequency as the sine wave output
is also available from the counter. This waveform appears at the output
of the first 4-stage section. This may be used to synchronise other
test equipment circuitry precisely with the main sine wave output.
The output sine wave is then buffered through two op-amp stages. The
first stage has variable gain to allow the required output level to be
set. It is used for the unbalanced output. The second op-amp is
set for unity-gain, and buffers the output for the balanced 600 ohm
output port.
This latter stage is wired normally via the link on JP1 to feed the
centre (150 ohm) tap of the output transformer. This provides a further
6 dB lift of output voltage swing, making it possible to achieve the
desired +10 dBm output level. Without this arrangement, the maximum
output would be insufficient for some high level balanced audio tests
required on some communications systems. If a lower output level is
required, link the output to the top of T1 using the other connection
on JP1.
Resistor R15 is used to eliminate the crossover distortion in the
op-amp.
As you can
see from the photo on the left here, the output waveform is not a
perfect sine wave. The oscilloscope shows the sinewave which is made up
of a series of small steps, 16 per wave. While this may appear
distorted, it is perfectly adequate for the majority of audio
applications. In theory, the third and fifth harmonics are about 50 dB
below the output level, but I've never measured the output myself to
prove or disprove this claim. My guess is it's more likely to be of the
order of 20 to 30 dB. Still, it's good enough for most work.
Since this output waveform is quite distinctive, when I'm using it as a
signal source and I'm tracing my way through a circuit with an
oscilloscope, I can very easily see if the signal I'm looking at is
from my test generator or from some other source. It also shows
accurately if there is any signal distortion going on. So, it's really
a feature!
The output is accurately maintained over the entire range of the
oscillator, within 0.2 dB. The greatest variation comes from the
transformer used to give the isolated balanced output. Tthe smaller the
physical size of the output transformer, the greater is the insertion
loss at the lower frequencies. The loss is usually less than 2 dB even
with the smallest 600 ohm audio transformers, and that loss is quite
acceptable for most uses too.
T1 is a miniature 600 ohm 1:1 audio
transformer, similar in size to the little transformers you used to
find in old transistor radios in the 1960s and 70s. Both primary and
secondary windings on the transformers I used are centre tapped. If you
cannot find a centre tapped transformer, use the 600 ohm primary and
increase R16 to 600 ohms (You can use two 1200 ohm resistors in
parallel)
Building the Oscillator
The
front panel was made using a laser printer, and the printed paper is
then covered with self-adhesive clear plastic. This is surprisingly
hard-wearing and still looks good even after many years of use.
I designed a PCB for this circuit, and you can download it by clicking
on the appropriate button below, along with the circuit and the layout
information. The 9V battery can be mounted on the PCB. I used a cable
tie to hold the battery to the PCB. I mounted my oscillator board into
a compact plastic box I found somewhere, which you can see in the
pictures, and the result is a small lightweight audio oscillator that's
simply a joy to use.
I hope you enjoy making and using it too.

Right-click on this diagram to see the circuit changes
required to add a second frequency range to the generator
Downloads
Click here here to
download the PCB layout
Click here to download
the PCB component placement details
Want to go back to the main page? Click
here to
return directly.