Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simple crystal oscillator simulation in LTspice

Status
Not open for further replies.
I'm attaching an LTspice file that simulates a crystal oscillator with resonant frequency 1MHz, and it works fine. But if I change L1 from 2.5 H to 9.8 mH to simulate a crystal oscillator with resonant frequency 16MHz, it flat-lines (no oscillations). If I replace the CMOS inverter with a custom model for a chip like the 74HCU04, it works. I tried a few different MOSFET's, turning off initial operating point computation (uic), starting with the supply at zero (startup), and starting with different IC's. In every case there is no oscillation. Any tips would be greatly appreciated.
 

Attachments

  • CrystalOscillatorCMOS.asc
    1.8 KB · Views: 1,600
I cannot read your simulator file.
(I don't "do" simulators, maybe I should. I digress)

In your circuit, instead of just changing the inductance by a factor 16^2,
try changing the inductance by a factor of 16 and the frequency determining capacitors by a factor of 16.

JimB
 
You can't use the generic MOSFET models for that high a frequency.
What's wrong with using the 74HCU04 model?
 
Going from henries to millihenries is going to make an enormous difference in circuit Q, which could prevent oscillation. You'll need to find the lumped circuit parameters for an actual 16 MHz crystal, and use those. The lumped inductance value will likely still be more than a henry.
 
Thanks crutschow for the feedback. Yes, the 74HCU04 works fine in simulation and on a breadboard. The objective was to implement a simple transistor circuit that works, and to figure out what breaks down in the LTspice simulation. Thanks BobW. Good point that simple scaling may not work and more inductance may be needed.
 
Crystal oscillators can be difficult to simulate. A typical 16 MHz oscillator will take around 0.2 ms to start up, and so the amplitude for the first 1000 cycles will be tiny. The digitisation of the simulator may prevent it working.
 
Hi

I think the inductor should have been 19.8mh.

See attached.

eT

CrystalOscillatorCMOS-new.png
 
Thank you eTech! It appears that you had to change more than just the inductance to get this working.
I will have to read-up on the LTspice params that you have tweaked.
 
Books have been written about how to use Spice to accurately simulate the start-up behavior of crystal oscillators.
 
Hello MikeMI, it would be great if you can provide a pointer to your favorite book on this topic. Google searches find far too many examples without analysis, specific parameter values, or a discussion of SPICE/LTspice.
 
What I meant to convey is that this topic is so complex, it takes a several hundred page book to explain it...

I just Googled "modelling start-up of crystal oscillator using spice" and got thousands of hits.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top