Electronics-Related.com
Forums

Colpitts crystal oscillator in LTSPICE

Started by bitrex July 25, 2015
I'm trying to simulate a low frequency Colpitts oscillator in LTSpice 
using an NPN darlington and a crystal, and I'm having a lot of trouble 
getting it to start up.  Does anyone have a working one of these?  I'm 
just using a capacitor to simulate the crystal, the parameters I am 
working with are something like:

motional capacitance: 5.3ff
ESR = 11k
ESI ~ 4500 henries
EPR = 100 meg
EPC = 1.5pf

Does this seem plausible?
On 7/25/2015 10:56 AM, bitrex wrote:
> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice > using an NPN darlington and a crystal, and I'm having a lot of trouble > getting it to start up. Does anyone have a working one of these? I'm > just using a capacitor to simulate the crystal, the parameters I am > working with are something like: > > motional capacitance: 5.3ff > ESR = 11k > ESI ~ 4500 henries > EPR = 100 meg > EPC = 1.5pf > > Does this seem plausible?
The crystal has to be in its inductive region for a Colpitts to work. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On 7/25/2015 10:59 AM, Phil Hobbs wrote:
> On 7/25/2015 10:56 AM, bitrex wrote: >> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >> using an NPN darlington and a crystal, and I'm having a lot of trouble >> getting it to start up. Does anyone have a working one of these? I'm >> just using a capacitor to simulate the crystal, the parameters I am >> working with are something like: >> >> motional capacitance: 5.3ff >> ESR = 11k >> ESI ~ 4500 henries >> EPR = 100 meg >> EPC = 1.5pf >> >> Does this seem plausible? > > The crystal has to be in its inductive region for a Colpitts to work. >
Oh, and you can make simulated oscillators start faster by putting a current source in parallel with the inductor. Make it 1 uA or something, and drop it to zero near the start of the simulation. That's the SPICE equivalent of plucking a guitar string. Try it with 1 nA when you're done, to check for startup problems. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On Sat, 25 Jul 2015 10:56:05 -0400, bitrex
<bitrex@de.lete.earthlink.net> Gave us:

>I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >using an NPN darlington and a crystal, and I'm having a lot of trouble >getting it to start up. Does anyone have a working one of these? I'm >just using a capacitor to simulate the crystal, the parameters I am >working with are something like: > >motional capacitance: 5.3ff >ESR = 11k >ESI ~ 4500 henries >EPR = 100 meg >EPC = 1.5pf > >Does this seem plausible?
Oscillators (of this type) can have what are known (referred to) as "hard start" issues. Usually a little inductance and or capacitance on the transistor leg provides enough lead or lag to allow the oscillations to get going.
On Sat, 25 Jul 2015 10:56:05 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >using an NPN darlington and a crystal, and I'm having a lot of trouble >getting it to start up. Does anyone have a working one of these? I'm >just using a capacitor to simulate the crystal, the parameters I am >working with are something like: > >motional capacitance: 5.3ff >ESR = 11k >ESI ~ 4500 henries >EPR = 100 meg >EPC = 1.5pf > >Does this seem plausible?
Here's a programmable crystal Spice model... ****************************************************************** .SUBCKT MyXTAL 1 2 PARAMS: Fo=10Meg Cp=5pF Rs=100 Q=25K Series=0 .PARAM P1={6.283185*Fo} .PARAM P2={Q*Rs} R1 1 3 {Rs} C1 1 2 {Cp} L1 4 2 {P2/P1} C2 3 4 {1/(P1*P2-(1-Series)/Cp)} .ENDS MyXTAL ****************************************************************** For Fo the parallel resonance, set Series=0, for series resonance, set Series=1 (You can often get all these parameters from the crystal datasheet.) As Phil pointed out most feedback-based oscillators (which queue up in a linear operating region) need a kick start. Start with Q low, otherwise you will have timestep issues, and won't see any oscillation. Then tighten up Q as you make max timestep smaller. My rule-of-thumb for oscillators is max timestep = 1/Fo/32 ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On 7/25/2015 11:24 AM, DecadentLinuxUserNumeroUno wrote:
> On Sat, 25 Jul 2015 10:56:05 -0400, bitrex > <bitrex@de.lete.earthlink.net> Gave us: > >> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >> using an NPN darlington and a crystal, and I'm having a lot of trouble >> getting it to start up. Does anyone have a working one of these? I'm >> just using a capacitor to simulate the crystal, the parameters I am >> working with are something like: >> >> motional capacitance: 5.3ff >> ESR = 11k >> ESI ~ 4500 henries >> EPR = 100 meg >> EPC = 1.5pf >> >> Does this seem plausible? > > Oscillators (of this type) can have what are known (referred to) as > "hard start" issues. > > Usually a little inductance and or capacitance on the transistor leg > provides enough lead or lag to allow the oscillations to get going. >
Thanks, I'll give that a try.
On 7/25/2015 11:37 AM, Jim Thompson wrote:
> On Sat, 25 Jul 2015 10:56:05 -0400, bitrex > <bitrex@de.lete.earthlink.net> wrote: > >> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >> using an NPN darlington and a crystal, and I'm having a lot of trouble >> getting it to start up. Does anyone have a working one of these? I'm >> just using a capacitor to simulate the crystal, the parameters I am >> working with are something like: >> >> motional capacitance: 5.3ff >> ESR = 11k >> ESI ~ 4500 henries >> EPR = 100 meg >> EPC = 1.5pf >> >> Does this seem plausible? > > Here's a programmable crystal Spice model... > > ****************************************************************** > .SUBCKT MyXTAL 1 2 PARAMS: Fo=10Meg Cp=5pF Rs=100 Q=25K Series=0 > .PARAM P1={6.283185*Fo} > .PARAM P2={Q*Rs} > R1 1 3 {Rs} > C1 1 2 {Cp} > L1 4 2 {P2/P1} > C2 3 4 {1/(P1*P2-(1-Series)/Cp)} > .ENDS MyXTAL > ****************************************************************** > > For Fo the parallel resonance, set Series=0, for series resonance, set > Series=1 > > (You can often get all these parameters from the crystal datasheet.) > > As Phil pointed out most feedback-based oscillators (which queue up in > a linear operating region) need a kick start. > > Start with Q low, otherwise you will have timestep issues, and won't > see any oscillation. Then tighten up Q as you make max timestep > smaller. > > My rule-of-thumb for oscillators is max timestep = 1/Fo/32 > > ...Jim Thompson >
Thank you. Usually most oscillators I design get going simply by setting the option "Start external supply voltages at 0 volts" or whatever - that gives them enough kick. It doesn't seem to be happening in this case. Does the crystal stabilized Colpitts need any other modifications from the standard version? One can just swap the inductor for a crystal and it should work the same, right?
On Sat, 25 Jul 2015 10:56:05 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >using an NPN darlington and a crystal, and I'm having a lot of trouble >getting it to start up. Does anyone have a working one of these? I'm >just using a capacitor to simulate the crystal, the parameters I am >working with are something like: > >motional capacitance: 5.3ff >ESR = 11k >ESI ~ 4500 henries >EPR = 100 meg >EPC = 1.5pf > >Does this seem plausible?
Select "skip initial operating point" in the transient analysis, or it will never start. Or goose it as Phil suggests. XOs are terrible to sim in time domain. The sims take forever and there's no reasonable way to measure the frequency to PPM resolution. Once I get one running, I cut over to AC loop analysis to fine-tune things. Post your netlist so people can play with it. -- John Larkin Highland Technology, Inc lunatic fringe electronics jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Sat, 25 Jul 2015 12:07:08 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:

>On 7/25/2015 11:37 AM, Jim Thompson wrote: >> On Sat, 25 Jul 2015 10:56:05 -0400, bitrex >> <bitrex@de.lete.earthlink.net> wrote: >> >>> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >>> using an NPN darlington and a crystal, and I'm having a lot of trouble >>> getting it to start up. Does anyone have a working one of these? I'm >>> just using a capacitor to simulate the crystal, the parameters I am >>> working with are something like: >>> >>> motional capacitance: 5.3ff >>> ESR = 11k >>> ESI ~ 4500 henries >>> EPR = 100 meg >>> EPC = 1.5pf >>> >>> Does this seem plausible? >> >> Here's a programmable crystal Spice model... >> >> ****************************************************************** >> .SUBCKT MyXTAL 1 2 PARAMS: Fo=10Meg Cp=5pF Rs=100 Q=25K Series=0 >> .PARAM P1={6.283185*Fo} >> .PARAM P2={Q*Rs} >> R1 1 3 {Rs} >> C1 1 2 {Cp} >> L1 4 2 {P2/P1} >> C2 3 4 {1/(P1*P2-(1-Series)/Cp)} >> .ENDS MyXTAL >> ****************************************************************** >> >> For Fo the parallel resonance, set Series=0, for series resonance, set >> Series=1 >> >> (You can often get all these parameters from the crystal datasheet.) >> >> As Phil pointed out most feedback-based oscillators (which queue up in >> a linear operating region) need a kick start. >> >> Start with Q low, otherwise you will have timestep issues, and won't >> see any oscillation. Then tighten up Q as you make max timestep >> smaller. >> >> My rule-of-thumb for oscillators is max timestep = 1/Fo/32 >> >> ...Jim Thompson >> > >Thank you. Usually most oscillators I design get going simply by >setting the option "Start external supply voltages at 0 volts" or >whatever - that gives them enough kick. It doesn't seem to be happening >in this case.
That's another way of accomplishing a kick start. If it doesn't start, the gain/phase criteria isn't met.
> >Does the crystal stabilized Colpitts need any other modifications from >the standard version? One can just swap the inductor for a crystal and >it should work the same, right?
I don't speak buzzword (Colpitts, Pierce, etc) oscillators because they're rarely used with microchips... most of my clocks are simply a crystal around an 'HCU04 or equivalent, and my PLL VCO's are AGC'd differential configuration.... starting with my MC1648 from the mid '60's. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On 7/25/2015 12:07 PM, bitrex wrote:
> On 7/25/2015 11:37 AM, Jim Thompson wrote: >> On Sat, 25 Jul 2015 10:56:05 -0400, bitrex >> <bitrex@de.lete.earthlink.net> wrote: >> >>> I'm trying to simulate a low frequency Colpitts oscillator in LTSpice >>> using an NPN darlington and a crystal, and I'm having a lot of trouble >>> getting it to start up. Does anyone have a working one of these? I'm >>> just using a capacitor to simulate the crystal, the parameters I am >>> working with are something like: >>> >>> motional capacitance: 5.3ff >>> ESR = 11k >>> ESI ~ 4500 henries >>> EPR = 100 meg >>> EPC = 1.5pf >>> >>> Does this seem plausible? >> >> Here's a programmable crystal Spice model... >> >> ****************************************************************** >> .SUBCKT MyXTAL 1 2 PARAMS: Fo=10Meg Cp=5pF Rs=100 Q=25K Series=0 >> .PARAM P1={6.283185*Fo} >> .PARAM P2={Q*Rs} >> R1 1 3 {Rs} >> C1 1 2 {Cp} >> L1 4 2 {P2/P1} >> C2 3 4 {1/(P1*P2-(1-Series)/Cp)} >> .ENDS MyXTAL >> ****************************************************************** >> >> For Fo the parallel resonance, set Series=0, for series resonance, set >> Series=1 >> >> (You can often get all these parameters from the crystal datasheet.) >> >> As Phil pointed out most feedback-based oscillators (which queue up in >> a linear operating region) need a kick start. >> >> Start with Q low, otherwise you will have timestep issues, and won't >> see any oscillation. Then tighten up Q as you make max timestep >> smaller. >> >> My rule-of-thumb for oscillators is max timestep = 1/Fo/32 >> >> ...Jim Thompson >> > > Thank you. Usually most oscillators I design get going simply by > setting the option "Start external supply voltages at 0 volts" or > whatever - that gives them enough kick. It doesn't seem to be happening > in this case. > > Does the crystal stabilized Colpitts need any other modifications from > the standard version? One can just swap the inductor for a crystal and > it should work the same, right?
Nope. With an inductor there's only one place it can oscillate. With a crystal and any external inductance, there are two, one below the series resonance, and one above the parallel resonance. Also of course the rate of change of reactance with frequency is doubled for a crystal, because the L & C are fighting each other. The reason your usual procedure isn't working here is that the circuit constants are too extreme--you aren't getting any initial amplitude on the series LC. Try the current source. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net