waveform occurs at about 190 degrees of the (yellow) line
Figure 2 shows a more normal situation where the
line frequency is 59.79 Hz, the oscillator frequency is
60.007 Hz, and the difference is 0.217 Hz. There is no
discernible distortion, and the signals are synchronized but
slightly out of phase. The phase difference is allowed here
to more clearly distinguish the waveforms, and will be
Figure 3 shows a low line frequency of 57.835 Hz.
The oscillator frequency is 60.007 Hz. The oscillator must
run more than 360 degrees to fill the time period of the
line. It also restarts at about 190 degrees.
These photos illustrate that synchronization using this
method creates distortion that becomes negligible for
small differences in frequency. Furthermore, the distortion
occurs when the voltage is near zero volts, suggesting that
the energy of the distortion is very small.
Most practical cases resemble Figure 2 where the
distortion is essentially absent. The more extreme cases of
Figures 1 and 3 are shown to aid understanding of this
A synthesized function generator was used to simulate
the line voltage for these photos. This allowed us to easily
change the line frequency for our test purposes. The
photos show how the oscillator is synchronized to any line
frequency by fitting the oscillator signal into the period of
the line, either by chopping off a slight bit of the
waveform or letting it run for a little longer than one cycle
to fill up the period of the line. This may cause some
distortion of the oscillator waveform, but under normal
conditions the distortion is negligible.
The small phase difference between the traces is
partly due to the zero crossing detector (look ahead to
Figure 6) which does not switch at precisely the zero
crossing. However, the phase difference can be removed
in software as will be described shortly.
Before presenting the synchronizing software (in
flowchart form), it is necessary to understand how this
By Dana Geiger Post comments on this article and find any associated files and/or downloads at www.nutsvolts.com/magazine/article/April2017_Synch-60Hz-Crystal-Oscillator-to-Line.
FIGURE 1. High line frequency. Line frequency
(yellow) is 61.746 Hz. Oscillator frequency
(blue) is 60.007 Hz. Oscillator frequency (blue)
restarts at about 190 degrees of the (yellow)
line waveform. A segment of the oscillator
output has been chopped off to make the
oscillator period equal to the period of the
FIGURE 3. Low line frequency. Line (yellow) is
57.835 Hz. Oscillator (blue) is 60.007 Hz. The
oscillator runs for slightly more than a full
cycle, thereby synchronizing to the slightly
slower 57.835 Hz line.
FIGURE 2. Normal line frequency. Line
frequency (yellow) is 59.79 Hz. Oscillator
frequency is 60.007 Hz. Difference is 0.217
Hz. Signals are synchronized with no
April 2017 41