■ FIGURE 8. Logic gate test circuit.
■ FIGURE 9. Logic gate test
■ FIGURE 11. Crystal oscillator
simulation at start-up.
■ FIGURE 10.
drive a logic gate Macromodel with a
slow ramp and plot the input and
output, as shown in Figure 9.
Once the oscillator is running, it
makes very clean sine waves (as
shown in Figure 12) which is a
selected portion of Figure 11
(described in last month's session).
I built this circuit on a scrap of
protoboard (shown in Figure 13), as I
didn't think the solderless breadboard
would give good performance. Using
a 4 MHz crystal and a CD4049 hex
inverter IC (in a socket), I got the
results shown in Figures 14 and 15.
Having a working crystal oscillator
on your bench is handy, too!
A crystal controlled oscillator has
very good accuracy and stability
because it uses a mechanical filter
fabricated from a precision ground
"slab" of quartz. We're familiar with
miniature crystals found in computer
hardware — most of which are in the
several MHz range. By the way, a
■ FIGURE 12. Crystal oscillator
simulation when running.
watch crystal has a quartz tuning
fork design, is very small, and
operates accurately at 32.786 kHz
(a number than can be divided
down to exactly 1 pps — one pulse
per second — with 15 binary
counter stages in a chain).
Crystal elements only require
an external capacitance of a few
picofarads for correct frequency
operation, typically 10 pF total
(two external 22 pF capacitors will
do). We can simulate the crystal in
LTspice, using L and C elements to
represent the mechanical 'slab.' Recall
that crystals make stable oscillators
due to their very high Q factor
(20K-50K) which is expressed as
X /R, explaining the large inductor
and very small capacitor and resistor
values in the model. An LTspice
crystal model for the crystal oscillator
built around a CMOS inverter gate
is shown in Figure 10 and the
simulation is in Figure 11. Notice that
the output doesn't start immediately
as the circuit relies on random noise
in the amplifier (our digital gate).
To make the simulation as close
as possible to my breadboard, I
fiddled with the crystal's parameters,
represented by Cp, Cs, Ls, and Rs
in Figure 10. There's also a crystal
element symbol to be found in the
LTspice supplied Misc folder (sub-dir)
for your next oscillator simulation
■ FIGURE 14. Crystal oscillator
Y = 2V/div, X = 200 ns/div.
■ FIGURE 13. Crystal oscillator breadboard.