The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 3:24pm
Pages: 1 2 
Send Topic Print
32kHz crystal (Read 467 times)
ic_engr
Senior Member
****
Offline



Posts: 135

32kHz crystal
Dec 05th, 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.
Back to top
 
 
View Profile   IP Logged
analog_wiz
Junior Member
**
Offline



Posts: 31
Universe
Re: 32kHz crystal
Reply #1 - 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.
Back to top
 
 
View Profile   IP Logged
nrk1
Community Member
***
Offline



Posts: 81

Re: 32kHz crystal
Reply #2 - 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.
Back to top
 
 
View Profile   IP Logged
nrk1
Community Member
***
Offline



Posts: 81

Re: 32kHz crystal
Reply #3 - 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.
Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #4 - 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

Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: 32kHz crystal
Reply #5 - 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
Back to top
 
 
View Profile WWW   IP Logged
analog_wiz
Junior Member
**
Offline



Posts: 31
Universe
Re: 32kHz crystal
Reply #6 - 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.

Back to top
 
 
View Profile   IP Logged
wave
Senior Member
****
Offline



Posts: 117
Silicon Valley
Re: 32kHz crystal
Reply #7 - 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.
Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #8 - Dec 11th, 2012, 6:09am
 
Wave,

You are right it seems the oscillations are dying out.

ic_engr
Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #9 - 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 ?

Back to top
 
 
View Profile   IP Logged
analog_wiz
Junior Member
**
Offline



Posts: 31
Universe
Re: 32kHz crystal
Reply #10 - 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.
Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #11 - 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
Back to top
 
 
View Profile   IP Logged
analog_wiz
Junior Member
**
Offline



Posts: 31
Universe
Re: 32kHz crystal
Reply #12 - 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.

Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #13 - 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
Back to top
 
 
View Profile   IP Logged
ic_engr
Senior Member
****
Offline



Posts: 135

Re: 32kHz crystal
Reply #14 - 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.
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.