Help with Crystal Oscillator

Thread Starter

lph65724

Joined Jul 2, 2008
14
Hi everyone,

I am trying to use a 36kHz crystall oscillator to replace my 555 timer, but I have never used one before, so I have no clue. Could someone please help with it. Thank you so much
 

SgtWookie

Joined Jul 17, 2007
22,230
One handy IC is the MC14060B; or a generic 4000 series CMOS number os 4060, 14 Bit Binary Counter and Oscillator.

Go to OnSemi.com and download the datasheet for the MC14060B. Near the bottom of page 5 you'll see how a 32.768kHz crystal can be used with this IC to generate a reasonably accurate 1Hz clock signal. Note that the accuracy is affected by temperature and by the Vdd supply. Oscillator manufacturers use both voltage and temperature controls on their oscillators to make them much more stable.
 

theamber

Joined Jun 13, 2008
325
To add to the sarg. comments the best way to obtain precision with a crystal is with a Oven controlled crystal oscilator OCXO. But it will require an initial warm up period.
 

Thread Starter

lph65724

Joined Jul 2, 2008
14
Thank you guys so much for your inputs
I need an oscillator for the IR LED. Right now, I have a 555 timer, but the frequency drifts as time goes by, so I don't know what to do but to try crystal oscillator.
 

SgtWookie

Joined Jul 17, 2007
22,230
I put together a simulation of a crystal oscillator using a couple of gates from a CMOS 4093 quad Schmitt-trigger NAND, a couple of caps and a resistor.

The 10MEG resistor is there in case the oscillator is "hung" - it provides a small current path from the output to the input to force a toggle in states. Think of it as a "jump start". The caps to ground absorb the peak transients from the crystal's output, and also serve to adjust the frequency slightly. The input side should remain around 20-27pF. You'll need at least 20pF on the output, but you can go somewhat larger.

The "CMD1 0V" attached to a balloon is a SPICE directive that causes the attached point to start the simulation at 0V; otherwise the simulation doesn't know what to do with an oscillating circuit.
 

Attachments

Thread Starter

lph65724

Joined Jul 2, 2008
14
Hi guys,

I have a stupid question, please forgive my ignorance.
crystal oscillator circuits still require some pulse generator, right? so I can't replace my 555 timer with a crystal oscillator circuit? If I have the output of the timer to excite the crystall oscillator, will the output frequency of crystal oscillator chagne as the frequency of the timer changes? Thank you
 

Wendy

Joined Mar 24, 2008
23,421
Nope, a crystal oscillator is an oscillator, just more stable than an RC oscillator, even without voltage or temperature regulation. Wookie's design would probably work as is.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, I misread your statement. I somehow assumed you had just a 36kHz crystal, not a crystal oscillator.

A crystal oscillator has the driver components integrated. A plain crystal does not; it requires a driver circuit.

So if you have a crystal oscillator, you don't need the circuit I posted. Just connect up the power, ground, and signal out.

You may wish to use a buffer, inverting or noninverting, to give the oscillator a light load.

Sorry for the confusion.
 
Last edited:

Thread Starter

lph65724

Joined Jul 2, 2008
14
Thank you so mcuh for the help! I really appreciate it

But still I am curious about using a single crystal. If I had a crystal, would I need some sort of pulse to excite it? If so, would the output frequency be stable when the output frequency of the 555 drifted?
 

SgtWookie

Joined Jul 17, 2007
22,230
Yes, if you had just a crystal in a package, you would need a driver circuit similar to what I posted. I used a 4093 because it is a pretty common quad NAND gate with Schmitt trigger inputs. It is easy to make oscillators with that IC.

If you could only have one CMOS IC in your junk box, this would be a good choice. You can build any other type of logic gate by using multiple NAND gates.

The 4011 is also a quad NAND gate, but it does not have Schmitt trigger inputs. It would not work reliably in the circuit I posted.

An alternative would be to use a 40106 IC, it's a hex inverting buffer with Schmitt inputs. You would use one inverter to drive the crystal, and one inverter as a buffer. You could use the output of the buffer to drive the remaining 4 inverters' inputs together, so that you would have a relatively strong clock.

One thing I neglected to mention - if you have unused gates in a CMOS device, their inputs must be tied to Vdd or Vss. Otherwise, they can oscillate unpredictably.

As far as stability - even a crystal oscillator will drift in frequency due to temperature and excitation voltage, perhaps up to a few hundred parts per million. You can stabilize it by housing the crystal in a temperature-controlled oven. Once the temperature of the crystal is is stabilized, it will have a drift of only a few parts per million.

A 555 timer driven with an RC network can't hope to approach that kind of accuracy.
 
Last edited:
Top