The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> 32kHz crystal
https://designers-guide.org/forum/YaBB.pl?num=1354739430

Message started by ic_engr on Dec 5th, 2012, 12:30pm

Title: 32kHz crystal
Post by ic_engr on Dec 5th, 2012, 12:30pm

Hello Everybordy,

I am trying to design a pierce crystal oscillator for operarting a 32kHz crystal.

The crystal parameters are as follows:

Lm: 3.88kH
Cm:6.1fF
Rm:66.3kOhms
Co:1.84pF


My current source is a PMOS transistor giving a bias current of 220nA.
The ampliifer is a NMOS with a feedback resistor of 1Meg Ohm.

In the Lm I am giving an initial condition of 10uA, so at t=0+ the oscillations start, bu then it dies after 30mSec.

Note the GM for the NMOS amplifying device is : 5.6uS
i am using conservative accuracy in spectre.

Any help is appreciated.

Title: Re: 32kHz crystal
Post by analog_wiz on Dec 6th, 2012, 4:29am

Can you run a linear sweep in ac analysis and check both the gain as well

as phase shift by breaking the loop. Other aspects:To start the oscillator deque the xtal model.Make sure your min step is atleast 10p for 32khz simulation.What are the current no;s you are targetting?If supply range is wide use a regulator to minimize power consumption. try using fast startup if need to reduce startup time. In spectre you may have to use skipdc option as well as trapeziodal method for starting the oscillations(happens in cases even though you have sufficient gain). Let me know once you have tried the above.

Title: Re: 32kHz crystal
Post by nrk1 on Dec 6th, 2012, 5:12pm

ic_engr,

You also need enough capacitance between the drain and source and gate and source of the amplifier transistor to obtain enough negative resistance for oscillation. For your values, assuming equal capacitances(they don't have to be), that is about 0.24pF. Perhaps the Cgs and Cgd aren't contributing that much(I am assuming you are talking about an nMOS common source amplifier with drain feedback bias). You can add these capacitances and try.

Title: Re: 32kHz crystal
Post by nrk1 on Dec 7th, 2012, 12:48am


nrk1 wrote on Dec 6th, 2012, 5:12pm:
ic_engr,

Perhaps the Cgs and Cgd aren't contributing that much(I am assuming you are talking about an nMOS common source amplifier with drain feedback bias). You can add these capacitances and try.


Meant Cgs and Cdb above, not Cgs and Cgd.

Title: Re: 32kHz crystal
Post by ic_engr on Dec 10th, 2012, 6:46am


analog_wiz wrote on Dec 6th, 2012, 4:29am:
Can you run a linear sweep in ac analysis and check both the gain as well

as phase shift by breaking the loop. Other aspects:To start the oscillator deque the xtal model.Make sure your min step is atleast 10p for 32khz simulation.What are the current no;s you are targetting?If supply range is wide use a regulator to minimize power consumption. try using fast startup if need to reduce startup time. In spectre you may have to use skipdc option as well as trapeziodal method for starting the oscillations(happens in cases even though you have sufficient gain). Let me know once you have tried the above.


Should I just break the loop adding an AC source between the gate of nmos transistor and the feedback resistor ?

I had tried step as 100nsec, but failed to start.

Also the load capacitance has a range from 3.3pF - 12pF based on spec.


Regards


Title: Re: 32kHz crystal
Post by Ken Kundert on Dec 10th, 2012, 9:37am

There is a section in my book dedicated to starting oscillators: The Designer's Guide to SPICE and Spectre (see page 209). You would benefit by reading it. In a few words, my advice boils down to this: If your oscillator does not start:
1. choose a different way of exciting the oscillator that better couples into the mode of oscillation
2. force a small time step (say 10-20 points per cycle) using maxstep
3. switch the integration method to trapezoidal
Of course, I encourage you to read the book. There is a lot more information there.

-Ken

Title: Re: 32kHz crystal
Post by analog_wiz on Dec 10th, 2012, 10:24pm


ic_engr wrote on Dec 10th, 2012, 6:46am:

analog_wiz wrote on Dec 6th, 2012, 4:29am:
Can you run a linear sweep in ac analysis and check both the gain as well

as phase shift by breaking the loop. Other aspects:To start the oscillator deque the xtal model.Make sure your min step is atleast 10p for 32khz simulation.What are the current no;s you are targetting?If supply range is wide use a regulator to minimize power consumption. try using fast startup if need to reduce startup time. In spectre you may have to use skipdc option as well as trapeziodal method for starting the oscillations(happens in cases even though you have sufficient gain). Let me know once you have tried the above.


Should I just break the loop adding an AC source between the gate of nmos transistor and the feedback resistor ?

I had tried step as 100nsec, but failed to start.

Also the load capacitance has a range from 3.3pF - 12pF based on spec.


Regards




Hi, your min step needs to be 10p and max maybe 100ps. You need to break the loop at either  xtal_in or xtal_out(ports where you would ideally connect your crystal for the circuit to be able to oscillate).Inject an ac signal so that the signal can undergo phaseshift through the inveter and also through the crystal and observe the gain as well as phase at xtal_in(dont use log scale use linear scale: from 1k to 50 or 100k).I will upload an image if possible.


Title: Re: 32kHz crystal
Post by wave on Dec 11th, 2012, 12:50am

If the circuit starts oscillating and then dies out, it sounds like more likely the Loop Gain is not meeting the Barkhausen criteria.

Title: Re: 32kHz crystal
Post by ic_engr on Dec 11th, 2012, 6:09am

Wave,

You are right it seems the oscillations are dying out.

ic_engr

Title: Re: 32kHz crystal
Post by ic_engr on Dec 11th, 2012, 1:26pm

Hello Everyone,

reducing max timestep to 100nsec, did start-up the circuit. I still needed Initial condition in my Inductor of 5nA.

Thanks for everyone's input.

'analog_wiz' regards to AC Simulation: How much gain should I see at the resonance frequency ?


Title: Re: 32kHz crystal
Post by analog_wiz on Dec 11th, 2012, 11:40pm

Try to have some current programmability for your circuit (in case osc does not start, you have a failsafe option).at least gain of 7-10 should be fine.

Title: Re: 32kHz crystal
Post by ic_engr on Dec 13th, 2012, 9:39am

analog_wiz,

There is a built in AGC loop that reduces the quiscent current after start-up.
Based on thoretical calcuations, I would need gm of 0.8uS, however the worst case gm is ~4uS. So I have a margin of 5X in gm critical.

The AGC circuit takes the sine output, rectifies it and then provides voltage to the bias block which is controlling the current.

Regards

ic_engr

Title: Re: 32kHz crystal
Post by analog_wiz on Dec 16th, 2012, 10:52pm

since you are designing for very low currents. It would be good to have some addtional current programmability since..during production the crystal fitted can be different (different crystal parameters:eg high esr)that that which you have simulated with, so this in effect would increase your gmcrit requirement. Recommending additional current: is to give some more margin for oscillation.


Title: Re: 32kHz crystal
Post by ic_engr on Dec 20th, 2012, 12:28pm

Hello analog_wiz,

When I ran the AC signal, the change in phase at 32kHZ was about 150 deg.

However, the gain is 3000. About 13dB. That is huge. The designer used a feedback resistor based on a triode based transistor that is very long.

If I change the feedback resistor to an a poly resistor of 500Kohms, I get a gain of 15.

Do you believe this will be sufficient gain.

Regards

ic_engr

Title: Re: 32kHz crystal
Post by ic_engr on Dec 20th, 2012, 1:14pm

Sorry, I was wrong.

The gain was only 7 in magintude and 15dB in decibels.

Anyways, it seems the circuit needs ~20Meg of resistance in feedback realized by transistor or poly since the Ibias is only 220nA.

I am worried of leakage currents causing issues due to such large feedbck. I put a 1Gohm resistance from gate of NMOS amplifier device to Ground and with fine timesteps the circuit did not start upto 1sec.

Regards

ic_engr.

Title: Re: 32kHz crystal
Post by analog_wiz on Dec 20th, 2012, 10:06pm

Hi ic_engr, a gain of 7-8 in magnitude should be fine and should be worst case (least no across corners).Thats why i suggest having some way of adding currents (in case your oscillator does not start due to lack of gain).I  implemented a 600nA xtal and things are fine.If you are using nmos1v devices then take care of leakages(nmos1v cap gate leakage).Yes the startup times are huge (order of 1-2 sec for 32khz). Just deque the xtal and give a run inorder to see if things are starting up properly across corners.

Title: Re: 32kHz crystal
Post by ic_engr on Feb 8th, 2013, 7:44am

Hello analog_wiz,

All theoretical calculations for pierce oscillator give minium start-up time using |Rneg| which is computed at gmopt.

t=2*Lm/|Rneg|.

I believe the assumption is at gmopt, the |Rneg| is maximum so we get minimum time.

However, if the actual gm of the circuit is well above gmcritical, but BELOW gmopt, what will be the |Rneg| at the actual gm and how will the max start up time be computed.

Also I am planning to use a Feedback resistor of ~6Meg-7Meg with a bia current of 200nA.

Regard

ic_engr

Title: Re: 32kHz crystal
Post by ic_engr on Mar 12th, 2013, 12:08pm

For transient start-up, I was using a max step of 100nsec AND IC=5nA (in crystal inductor). I see oscillations grown to full amplitude ~400msec.

However, if I make ic=0, the oscillations gre to 2mV in 400msec.
To predict Start-up time should I use IC=5nA or NOT.

Appreciate your feedback

Regards

ic_engr

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.