Author Topic: Crystal oscillator and (unwanted) overtones  (Read 444 times)

0 Members and 1 Guest are viewing this topic.

Offline RaoulDukeTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Crystal oscillator and (unwanted) overtones
« on: December 27, 2024, 08:05:47 pm »
Good day all,

I've been messing around with crystal oscillators a bit lately, due to eventually needing it for various projects, and simply due to curiosity. I've found many designs online, some work, some simply don't. Nevertheless, the ones that I have gotten to work all seem to have this odd issue.... they output highly distorted, decidedly NON-sine waves. This is contrary to what is usually shown in tutorials on youtube, which invariable always work so nicely, with a high amplitude output of picture perfect sine waves.

In looking at the waveform on my scope, it occurred to me that it looked like a mix of multiple sine waves. For discussions sake, lets assume I am using the circuit demonstrated at   with a 30 MHz crystal and capacitors sized a tad smaller than his recommended for 25MHz crystals, in the table at the end of his video. But, this issue I am having is not just with this circuit, it is with many others, so this should not be taken as being a problem of just his design.

I switched on my spectrum analyzer and see that the output is indeed right at 30MHz...but there are also outputs at 60 MHz, etc, at harmonics. Zooming out the spectran's stop frequency can show several of these, almost looks like a comb of frequencies.

Why is this happening? It certainly can't be normal... the outputs shown on various videos are always so darned clean. That nice clean sine wave, with no harmonic content. What could I be doing wrong?

Things I have tried, to no effect:

-Varying Vcc from 5V up to 15V, amplitude of all unwanted harmonics tracks directly in-line with the fundamental.
-Using different capacitors, whether cheap ceramics, to good quality Vishay NP0, to mica. No change.
-A different crystal. No change.
-2N2222 vs 2N3904. Same thing.
-Ground plane construction via soldering over solid copper sheet, vs components on a plastic breadboard. Same thing.
-Different oscilloscope probes. Siglent, vs P6100, vs older HP probes. Nothing different.

What to do? Thanks in advance.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4014
  • Country: us
Re: Crystal oscillator and (unwanted) overtones
« Reply #1 on: December 27, 2024, 09:27:22 pm »
Can you show an exact circuit diagram of what you are trying including part numbers along with a photograph of the circuit in use, including the probes?

Crystal oscillators are high Q so they can be very sensitive to physical construction.  Without seeing exactly what you are doing it's hard to guess.
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6406
  • Country: de
Re: Crystal oscillator and (unwanted) overtones
« Reply #2 on: December 27, 2024, 09:53:03 pm »
Most crystal oscillators these days are designed for clocking digital circuits, and thus a square-wave output is desirable.
Downside is they'll give you 3rd, 5th, 7th... harmonics for the same reason.
Pure sinewave oscillators will mostly need a tank circuit or other filtering to get your result.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8934
  • Country: us
  • Retired, now restoring antique test equipment
Re: Crystal oscillator and (unwanted) overtones
« Reply #3 on: December 27, 2024, 10:13:01 pm »
Usually, the active device (BJT, whatever) in a crystal oscillator is in large-signal operation, designed to stabilize the amplitude of oscillation, and its current or voltage will be distorted.

The crystal itself is a collection of high-Q resonant modes, usually modeled as a set of series-resonant RLC circuits in parallel with an overall (holder) capacitance.
These higher-frequency (overtone) modes are approximately odd-valued harmonics of the fundamental.
Harmonic overtones occur with one-dimensional resonances, such as violin strings or organ pipes, but crystals are three-dimensional.

If an appropriate resonant circuit is added to the oscillator to reject all but one of the modes (usually fundamental or 3rd overtone), the current through the crystal should be a very clean sine wave.
Tapping the feedback network at a well-chosen location can give the clean sine wave, but with not as much power as in the collector current of the transistor.
 

Offline RaoulDukeTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: Crystal oscillator and (unwanted) overtones
« Reply #4 on: December 27, 2024, 10:29:05 pm »
Well, isn't this embarrassing...

A 0.1uF decoupling capacitor between Vcc at the board, and to ground plane solved almost all of it. Why didn't I include it? Well, tunnel vision mostly I suspect, plus no schematic showing it, nor the youtube videos showing it. They must use invisible ones. And because I try to not do too many "ego improvements" to a circuit until I get it working in the original fashion.

Lesson learned again -- decouple everything.

Either way, here is one iteration of one of the circuits I've been messing with. Doesn't seem to work any better or worse when the ground plane is omitted and all components are just stuck in a breadboard. Either way, the spurious and harmonics are mostly gone now with the good ol' decoupling cap. With that said...

TimFox, you mention using a resonant circuit to reject unwanted frequencies and clean up the sine wave. In the circuit I have in the picture, where would be a good place? I would assume any such circuit would be set to resonate at the wanted frequency, in this case 30Mc.

Any good books or documents on this subject I could read to learn more on these xtal oscillators? I have never fully understood the ratios of the split capacitors, how they are determined, and how their values are chosen with respect to a given oscillation frequency. Most of what I read is something along the lines of "try caps until they work"....there's got to be something more exact than that.
 

Offline geggi1

  • Frequent Contributor
  • **
  • Posts: 448
Re: Crystal oscillator and (unwanted) overtones
« Reply #5 on: December 27, 2024, 10:37:45 pm »
You could try to adjust the the biasing of the transistor. If the bias is to high you will produce a larger amount of harmonics.
A few years ago i played with a 14Mhz crystal and managed to force the circuit to make it producing 210Mhz that i could find on the SA.
by adjusting the bias correctly the harmonics will be at a minimum.
To get a cleaner output you can put a low-pass filter a few Mhz above your crystal frequency somewhere in the range of 35-40 Mhz. Another option is to use a tuned output.
Examples of working crystal oscillators that work well can be found in the book "exprimental metods in rf design" bu Wes Heyward and others.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 8934
  • Country: us
  • Retired, now restoring antique test equipment
Re: Crystal oscillator and (unwanted) overtones
« Reply #6 on: December 27, 2024, 10:38:38 pm »
Crystal oscillators operating on overtones usually have a LC circuit tuned roughly to that frequency to determine which overtone (harmonic, 3rd, 5th, etc.) has enough gain for oscillation.
A different approach is to operate on the fundamental mode of the crystal, but use a tuned circuit with the transistor to output at the third harmonic of the transistor current.
There are many books discussing crystal oscillator circuits.
My favorite is  R J Matthys Crystal Oscillator Circuits.  Original edition 1983 by J Wiley & Sons, revised edition 1992 by Krieger Publishing.
That book contains many practical examples, all designed to work from +5 V power for reasonable comparison, with either discrete transistors or common ICs.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: Crystal oscillator and (unwanted) overtones
« Reply #7 on: December 28, 2024, 10:58:39 am »
I took this screen shot of the schematic from the video. Well yes, the BJT is non-linear, so this is what one should expect. A crystal is normally used to make a square wave in a digital circuit. The most obvious solution is to add an LC circuit to act as a filter.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf