1
\$\begingroup\$

I have a 25 Mhz crystal oscillator, and I'm trying to make it oscillate and generate a radio frequency, which then I could view on my SDR waterfall.

I have read about crystals, but I still don't get how they work.

  • Can I just hook up then +/- pins to a DC power source?

  • Or do I need to apply an alternating current to make it oscillate? In which case, I don't get why they are needed at all, as I already have an AC current to begin with? This is confusing.

\$\endgroup\$
6
  • \$\begingroup\$ This video may help with bare crystals designed for oscillator circuits. Study what he says and does. (Reminds me very much of my childhood days, too, with the plywood board, etc. Been there, done that.) If you, instead, have a crystal oscillator system then provide your datasheet reference for the part. \$\endgroup\$ Commented Oct 2, 2023 at 2:57
  • 2
    \$\begingroup\$ Do you have a crystal or do you have an oscillator? You can use a crystal as the resonant component in an oscillator to set the frequency, but a crystal is not an oscillator all by itself. If it only has 2 pins, then it's a crystal. If it has 4 pins, then it might be an oscillator. \$\endgroup\$
    – brhans
    Commented Oct 2, 2023 at 3:11
  • \$\begingroup\$ it's a crystal, like this upload.wikimedia.org/wikipedia/commons/c/c7/16MHZ_Crystal.jpg \$\endgroup\$
    – Dan
    Commented Oct 2, 2023 at 3:15
  • \$\begingroup\$ Yet you say "hook up the +/- pins" implying more than 2 pins as you would also need at least one output pin.... \$\endgroup\$
    – colintd
    Commented Oct 2, 2023 at 12:36
  • 2
    \$\begingroup\$ Please include a picture of the part in question, ideally with a datasheet. \$\endgroup\$
    – colintd
    Commented Oct 2, 2023 at 12:37

5 Answers 5

1
\$\begingroup\$

Think of the crystal like a tuning fork (which is exactly what some very low frequency crystals are).

If you excite the tuning fork (say by hitting it), it will resonate at a given frequency, but this will die away as energy is lost.

If, however, you add a microphone to pick up the sound, amplify this signal, and feedback to a drive coil attached to the fork, then as long as the phase shift is right, the sound will become self-sustaining.

The frequency is tied to the resonant frequency of the tuning fork, but the power is coming from the external circuit.

Crystals are the same.

The resonance of the quartz block determines the frequency, but to maintain/establish oscillation you need an external drive circuit which picks up the output, amplifies, and then feeds back with the correct phase shift.

The equivalent circuit for a crystal has a series capacitor, inductor and resistance, and a parallel capacitor.

enter image description here

Depending on the oscillator, either the series or parallel mode can be excited.

enter image description here

Have a look at electronics-tutorials.ws (where the diagrams comes from) for an excellent, and detailed analysis. This page also includes a very simple CMOS inverter oscillator circuit (which is referenced in one of the other answers).

(With correct filtering in the amplifier, you can also excite overtones/harmonics in the crystal, but that is probably not what you are trying to do.)

A fully packaged "oscillator" (as opposed to a "bare" crystal) has this circuitry in the package, and will generate an output when power is applied.

\$\endgroup\$
2
  • \$\begingroup\$ Ok so it's exactly like a LC Tank circuit. If I connect my crystal directly to DC it will flex once and will emit a single RF (which is hard to detect) but If I turn the DC on and off very quickly the crystal will flex continuously and and keeps emitting the RF. We are just replacing a capacitor-inductor (the tank circuit) with a single crystal. Is that correct? \$\endgroup\$
    – Dan
    Commented Oct 2, 2023 at 13:01
  • 1
    \$\begingroup\$ The LC comparison is spot on, though the actual equivalent circuit is LCsR-Cp (with series and parallel resonances). Have a look at this link electronics-tutorials.ws/oscillator/crystal.html which talks about the equivalent LCsR-Cp circuit for a crystal, and the series and parallel resonances (where the series resonance is what is normally used). Also look at the CMOS oscillator example, which gives a very easy way to drive a crystal. \$\endgroup\$
    – colintd
    Commented Oct 2, 2023 at 13:38
2
\$\begingroup\$

If you actually do have just a two pin crystal component (as in your link),
here is a good tutorial on using it in simple oscillator circuits.

enter image description here
.
(Example circuit from the above link - Note additional comments below.)
.
.

Another group of crystal oscillator examples using other gates and op-amps.

Also, take a look at an older StackExchange Q/A on the same topic:

.

However, you did mention hooking up the +/- pins, which would seem to indicate you might have an oscillator module, more often with 4 pins, possibly similar to this: enter image description here
(Picture from Mouser ),
with a datasheet here.

In that case you basically can (per the datasheet spec's) hook it up to a 5V supply and generate a high frequency output.

There are similar parts about half the size of the above and even smaller SMT versions. .

\$\endgroup\$
3
  • 3
    \$\begingroup\$ The tutorial may be good but that picture is just wrong and against the text it has. The first inverter connected to the crystal would never work if it is a Schmitt trigger like in the picture, as it can't be biased in the middle of it's linear operating region, as it is not linear. \$\endgroup\$
    – Justme
    Commented Oct 2, 2023 at 6:30
  • \$\begingroup\$ @Justme - While I cannot vouch for the linked article using Schmitt trigger gates with crystals, the CD4049 inverter (one of the 3 listed) does simulate well at relatively high frequencies. Oscillators with Schmitt trigger inverters would make more sense using lower frequency RC oscillator circuits. \$\endgroup\$
    – Nedd
    Commented Oct 2, 2023 at 7:08
  • 1
    \$\begingroup\$ Yes any unbuffered CMOS inverter should work in that cicuit. Emphasis on both CMOS and unbuffered. CD4049U at least. The CD40106 is a schmitt trigger and I can't even find any reference to a 74HC19 existing, but a TTL 74LS19 does, and is also a schmitt trigger. \$\endgroup\$
    – Justme
    Commented Oct 2, 2023 at 7:33
0
\$\begingroup\$
  1. You cannot just connect DC source and expect the Xtal start oscillate.
  2. You need to ensure a positive feedback to Xtal supply from Xtal oscillations. Look for schematic of Xtal oscillator with Op-amp (easiest solution).

AC source itself does not help you much.
Be careful to use right Op-amp. For 25Mhz should be a "fast" one.

\$\endgroup\$
2
  • \$\begingroup\$ If I have an AC current then I could just connect it to an inductor and have it emit a RF, why would I need a crystal at all? I thought the whole point of a crystal is to create AC for me. \$\endgroup\$
    – Dan
    Commented Oct 2, 2023 at 3:02
  • \$\begingroup\$ @Dan No, a crystal has specific frequency-dependent properties that help an oscillator hold its frequency. \$\endgroup\$ Commented Oct 2, 2023 at 5:35
0
\$\begingroup\$

A crystal is used as part of an oscillator circuit to produce an RF signal at a accurate frequency.

An RF oscillator can be made using an inductor and capacitor to determine the frequency, but an oscillator using a crystal to determine frequency will hold the frequency much more accurately than one using inductor and capacitor.

Crystal oscillator modules are available which combine a crystal and an oscillator circuit in a single package.

\$\endgroup\$
2
  • \$\begingroup\$ inductor and capacitor is a Tank circuit yes. They need a feedback loop to essentially turn the power on/off very quickly so the circuit could oscillate. Does a crystal work in the same way? you need a feedback loop to essentially turn the power on/off quickly to make it resonate? \$\endgroup\$
    – Dan
    Commented Oct 2, 2023 at 12:20
  • \$\begingroup\$ A crystal essentially replaces the LC tank circuit in an oscillator. \$\endgroup\$ Commented Oct 2, 2023 at 15:20
0
\$\begingroup\$

Crystals don't work themselves, they need a circuit around them that utilizes the properties of the crystal to achieve what you want, like generating some AC signal at the frequency that reads on the crystal package.

When crystals are used as a feedback element to set or stabilize the frequency of an oscillator, the circuit as a whole is called a crystal oscillator.

So you just need a suitable oscillator circuit intended for use with crystals and with the frequency of the crystal.

Such a circuit takes in DC and will oscillate at the frequency set by the crystal. It can be constructed using different oscillator topologies (e.g Pierce, Colpitt, etc) based on how they work and using different types of active elements as the oscillator amplifier (e g. transistor, op-amp, or logic inverter). Which circuit to use depends on what kind of waveform you want out, sine wave or square wave.

However the crystal parameters such as ESR and load capacitance are currently unknown, and also if the crystal is manufactured to have the rated frequency in series or parallel mode of operation, so it may be required to try a couple of different oscillator circuits and have tunable load capacitance to get the oscillating frequency within suitable tolerance.

As there are many unknowns which exact 25 MHz crystal you actually have, it might be worth to just buy a new one with known properties, or just buy a ready-made crystal oscillator module to which you can just apply power and get your required waveform such as square wave or sine wave out.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.