## What is the most basic circuit to get a crystal to oscillate

17 posts / 0 new
Author
Message

Hi,

Let's say I want to watch a crystal oscillate on a scope without using the XTAL1/XTAL2 pins on an AVR. I just want the crystal standalone on a breadboard. How would it be connected? Any idea of the most basic circuit to do this? What type of voltage does a crystal typically require?

Thanks,

Alan

Total votes: 0

GOOGLE for "crystal oscillator" and you get tons of info. There are transistor based oscillators, gate
base oscillators and a lot of different circuits.

Total votes: 0

One simple way is a logic inverter - say one out of a 74HC04. Connect a large resistor (say, 10Meg to 1Meg) from an input to an output (of the same inverter). Connect crystal across resistor. Connect a 22pf cap from each end of crystal to ground. Power from 5V, well bypassed. Connect a second inverter to the output of the first to give you a buffered signal. But, don't try this (or any crystal oscillator above about 500KHz) on one of those plug-in "proto-boards".

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Total votes: 0

Actual component values depend on frequency range and crystal.

74HCU04 or another unbuffered CMOS inverter like HEF4069, 1Mohm resistor, crystal, and the two load capacitors. Maybe one series resistor in 0-500 ohm range.

Both chips have crystal oscillator designs in datasheets.

You can use a 74HC04 too, which is a buffered inverter. Component values will matter more, and you almost always need the series resistor, often matched to same impedance as the load capacitor to create voltage divider which halves the amplitude.

Total votes: 0

Hi,

Thanks everyone, lots of good info to get me started!

Alan

Total votes: 0

Quote:
One simple way is a logic inverter - say one out of a 74HC04. Connect a large resistor (say, 10Meg to 1Meg) from an input to an output (of the same inverter). Connect crystal across resistor. Connect a 22pf cap from each end of crystal to ground. Power from 5V, well bypassed. Connect a second inverter to the output of the first to give you a buffered signal.

This will work initially, but be aware that watch crystals have limited maximum drive limits.

A resistor from the output of the inverter to the junction of the crystal and its load capacitor may be required to prevent overdrive, and also aids in preventing overtone operation.

Ron.

Total votes: 0

But why not just use the AVR now when you have it?

Total votes: 0

Or you can also use a 555 timer.

Total votes: 0

Quote:
But why not just use the AVR now when you have it?

Perhaps because he doesn't want to?

Seriously, have you ever tried scoping a watch crystal on an AVR, one that's been set up for low frequency crystal? The signal is a noisy sine wave down in the millivolts. The only way to get a clean signal is with an external oscillator. But do bear @rberger's warning in mind and keep the drive very weak, under 1 volt at the crystal.

Total votes: 0

Hi,

I actually was able to scope a 16.384mhz watch crystal on my avr project board with no issues, avr still ran fine. I just want to try to scope something faster to see how it would look on the scope.

BTW, in the Clock document I found it mentions that clock style crystals do not require capacitors, is this true? I've been implementing some 27pF caps with a clock style crystal in my project... Will the caps cause any problem?

Thanks,

Alan

Total votes: 0

16.384 MEGA hertz? Watch crystals are generally 32.768 KILO hertz.

Many chips designed to use watch crystals have internal capacitors, that's why you'll see it written that none are needed. They work without caps on the AVR but the crystal tends to run a bit fast. I generally use 18pF external caps, or a cap on X1 and a 5-20pF trimmer on X2.

Total votes: 0

peret wrote:

Many chips designed to use watch crystals have internal capacitors, that's why you'll see it written that none are needed. They work without caps on the AVR but the crystal tends to run a bit fast. I generally use 18pF external caps, or a cap on X1 and a 5-20pF trimmer on X2.

Either they have internal capacitors, or the stray capacitance of IO pin and PCB trace is big enough. 32768Hz crystals need something like 6pF or so.

Most datasheets say the caps should be of equal size, but if the other is bigger than the other, it may help to increase input voltage swing if required.

To use watch crystals you need 10Mohm feedback resistor, and very high series resistor compared to normal crystals. I am not sure if it can still be calculated so that external cap impedance is same as resistor impedance.

Total votes: 0

Watch crystals (usually 32.xxx khz) have VERY different drive requirements from standard (say 1MHz and up) crystal. Since the OP did NOT say "watch crystal", I tried to describe a standard oscillator. However,by inference,the OP did refer to XTAL1/XTAL2 pins rather than TOSC1/TOSC2 which tends to imply a higher frequency crystal (though not exclusively).

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Total votes: 0

Hi,

Here is the one I am using. I'm not sure if it is a "watch" one or not although it is a small cylindrical one like a watch one. Specs do say 18pF though...

http://search.digikey.com/script...

Thanks,

Alan

Total votes: 0

Hi,

Can this style of crystal be mounted on its side. I think I've read someone talking about tacking it down with some solder to the PCB. If I try that, what should it be tacked too? I already have a ground plane on the bottom, and I've created a small ground plane around the crystal. Should it tack down to the ground plane? Or should I put a small box for it to tack to that connects to nothing?

Thanks,

Alan

Total votes: 0

Oh my bad, he said "watch a crystal", not "a watch crystal". Still, that is a tuning fork type he's looking at, so watch crystal characteristics probably apply.

Total votes: 0

Agree with peret. Cylindrical case almost always means tuning fork type.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!