Electronics-Related.com
Forums

Learning about oscillators in LTSpice

Started by Clifford Heath October 21, 2010
I'm just getting started with LTSpice, and played yesterday
with some Colpitts oscillators to my satisfaction. Today I
tried a Hartley, and I can't understand some of the behaviour
I'm seeing.

In the attached circuit, I've added an emitter resister in
an attempt to reduce the high collector current. Merely
increasing the base resistor didn't help until the oscillator
stopped entirely. Actually, the collector current wasn't so
high until I removed a resister from base to ground, so maybe
that's the answer... but anyhow.

The collector current is too high, but I'm seeing a 3MHz
amplitude modulation over the top of the 80MHz fundamental.
Despite the Oscout connector, I'm actually looking at the
tank voltage.

Where is this 3MHz coming from? I.e. where's the TC?

What should I change to reduce the collector current?

Clifford Heath.

---- cut here for Hartley.asc ----
Version 4
SHEET 1 884 680
WIRE 208 -176 32 -176
WIRE 432 -176 208 -176
WIRE 32 -128 32 -176
WIRE 208 0 208 -176
WIRE -208 48 -336 48
WIRE -112 48 -208 48
WIRE 32 48 32 -48
WIRE 32 48 -48 48
WIRE 144 48 32 48
WIRE 432 48 432 -176
WIRE -208 144 -208 128
WIRE -336 208 -336 48
WIRE -208 240 -208 224
WIRE 208 240 208 96
WIRE 208 240 -208 240
WIRE 576 240 208 240
WIRE -208 256 -208 240
WIRE 32 272 32 48
WIRE -336 400 -336 272
WIRE -208 400 -208 336
WIRE -208 400 -336 400
WIRE 32 400 32 352
WIRE 32 400 -208 400
WIRE 432 400 432 128
WIRE 432 400 32 400
WIRE 576 400 432 400
WIRE 432 448 432 400
WIRE 672 32 0 0
FLAG 576 240 OscOut
IOPIN 576 240 Out
FLAG 576 400 0
FLAG 432 448 0
FLAG -336 48 Tank
SYMBOL res 16 256 R0
SYMATTR InstName R11
SYMATTR Value 4k7
SYMBOL res 16 -144 R0
SYMATTR InstName R10
SYMATTR Value 47k
SYMBOL voltage 432 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 9v
SYMBOL npn 144 0 R0
SYMATTR InstName Q1
SYMATTR Value BFR91A
SYMBOL ind -224 128 R0
SYMATTR InstName L2
SYMATTR Value .4<B5>H
SYMBOL cap -352 208 R0
SYMATTR InstName C1
SYMATTR Value 22pF
SYMBOL ind -224 352 M180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L1
SYMATTR Value .1<B5>h
SYMBOL cap -48 32 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 10pf
SYMBOL res -224 32 R0
SYMATTR InstName R1
SYMATTR Value 1ohm
TEXT -480 -168 Left 0 !.tran 0 20uS 0s 1ns
TEXT -160 264 Left 0 ;K1 L1 L2 1
On Oct 21, 7:45=A0pm, Clifford Heath <no.s...@please.net> wrote:
> I'm just getting started with LTSpice, and played yesterday > with some Colpitts oscillators to my satisfaction. Today I > tried a Hartley, and I can't understand some of the behaviour > I'm seeing. > > In the attached circuit, I've added an emitter resister in > an attempt to reduce the high collector current. Merely > increasing the base resistor didn't help until the oscillator > stopped entirely. Actually, the collector current wasn't so > high until I removed a resister from base to ground, so maybe > that's the answer... but anyhow. > > The collector current is too high, but I'm seeing a 3MHz > amplitude modulation over the top of the 80MHz fundamental. > Despite the Oscout connector, I'm actually looking at the > tank voltage. > > Where is this 3MHz coming from? I.e. where's the TC? > > What should I change to reduce the collector current? > > Clifford Heath. > > ---- cut here for Hartley.asc ---- > Version 4 > SHEET 1 884 680 > WIRE 208 -176 32 -176 > WIRE 432 -176 208 -176 > WIRE 32 -128 32 -176 > WIRE 208 0 208 -176 > WIRE -208 48 -336 48 > WIRE -112 48 -208 48 > WIRE 32 48 32 -48 > WIRE 32 48 -48 48 > WIRE 144 48 32 48 > WIRE 432 48 432 -176 > WIRE -208 144 -208 128 > WIRE -336 208 -336 48 > WIRE -208 240 -208 224 > WIRE 208 240 208 96 > WIRE 208 240 -208 240 > WIRE 576 240 208 240 > WIRE -208 256 -208 240 > WIRE 32 272 32 48 > WIRE -336 400 -336 272 > WIRE -208 400 -208 336 > WIRE -208 400 -336 400 > WIRE 32 400 32 352 > WIRE 32 400 -208 400 > WIRE 432 400 432 128 > WIRE 432 400 32 400 > WIRE 576 400 432 400 > WIRE 432 448 432 400 > WIRE 672 32 0 0 > FLAG 576 240 OscOut > IOPIN 576 240 Out > FLAG 576 400 0 > FLAG 432 448 0 > FLAG -336 48 Tank > SYMBOL res 16 256 R0 > SYMATTR InstName R11 > SYMATTR Value 4k7 > SYMBOL res 16 -144 R0 > SYMATTR InstName R10 > SYMATTR Value 47k > SYMBOL voltage 432 32 R0 > WINDOW 123 0 0 Left 0 > WINDOW 39 0 0 Left 0 > SYMATTR InstName V1 > SYMATTR Value 9v > SYMBOL npn 144 0 R0 > SYMATTR InstName Q1 > SYMATTR Value BFR91A > SYMBOL ind -224 128 R0 > SYMATTR InstName L2 > SYMATTR Value .4<B5>H > SYMBOL cap -352 208 R0 > SYMATTR InstName C1 > SYMATTR Value 22pF > SYMBOL ind -224 352 M180 > WINDOW 0 36 80 Left 0 > WINDOW 3 36 40 Left 0 > SYMATTR InstName L1 > SYMATTR Value .1<B5>h > SYMBOL cap -48 32 R90 > WINDOW 0 0 32 VBottom 0 > WINDOW 3 32 32 VTop 0 > SYMATTR InstName C2 > SYMATTR Value 10pf > SYMBOL res -224 32 R0 > SYMATTR InstName R1 > SYMATTR Value 1ohm > TEXT -480 -168 Left 0 !.tran 0 20uS 0s 1ns > TEXT -160 264 Left 0 ;K1 L1 L2 1
Cliff I'm pretty much an LTspice newbie also. I don't know the Hartley oscillator very well either. I also couldn't get your posted circuit to work... (I had no model for the BFR91A tansistor.) Anyway I futzed around (added some collector resistance.) and got this Version 4 SHEET 1 884 680 WIRE 208 -176 32 -176 WIRE 432 -176 208 -176 WIRE 32 -128 32 -176 WIRE 208 -128 208 -176 WIRE 208 0 208 -48 WIRE -208 48 -336 48 WIRE -112 48 -208 48 WIRE 32 48 32 -48 WIRE 32 48 -48 48 WIRE 144 48 32 48 WIRE 432 48 432 -176 WIRE -208 144 -208 128 WIRE -336 208 -336 48 WIRE -208 240 -208 224 WIRE 208 240 208 96 WIRE 208 240 -208 240 WIRE 576 240 208 240 WIRE -208 256 -208 240 WIRE 32 272 32 48 WIRE -336 400 -336 272 WIRE -208 400 -208 336 WIRE -208 400 -336 400 WIRE 32 400 32 352 WIRE 32 400 -208 400 WIRE 432 400 432 128 WIRE 432 400 32 400 WIRE 576 400 432 400 WIRE 432 448 432 400 FLAG 576 240 OscOut IOPIN 576 240 Out FLAG 576 400 0 FLAG 432 448 0 FLAG -336 48 Tank SYMBOL res 16 256 R0 SYMATTR InstName R11 SYMATTR Value 4k7 SYMBOL res 16 -144 R0 SYMATTR InstName R10 SYMATTR Value 47k SYMBOL voltage 432 32 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 9v SYMBOL npn 144 0 R0 SYMATTR InstName Q1 SYMATTR Value 2N3904 SYMBOL ind -224 128 R0 SYMATTR InstName L2 SYMATTR Value .4=B5H SYMBOL cap -352 208 R0 SYMATTR InstName C1 SYMATTR Value 22pF SYMBOL ind -224 352 M180 WINDOW 0 36 80 Left 0 WINDOW 3 36 40 Left 0 SYMATTR InstName L1 SYMATTR Value .1=B5H SYMBOL cap -48 32 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName C2 SYMATTR Value 10pf SYMBOL res -224 32 R0 SYMATTR InstName R1 SYMATTR Value 1ohm SYMBOL res 192 -144 R0 WINDOW 0 42 73 Left 0 WINDOW 3 32 43 Left 0 SYMATTR InstName R2 SYMATTR Value 400 TEXT -480 -168 Left 0 !.tran 0 20uS 0us 1ns TEXT -160 264 Left 0 ;K1 L1 L2 1 George H.
On Fri, 22 Oct 2010 10:45:26 +1100, Clifford Heath wrote:

> In the attached circuit, I've added an emitter resister in > an attempt to reduce the high collector current. Merely > increasing the base resistor didn't help until the oscillator > stopped entirely. Actually, the collector current wasn't so > high until I removed a resister from base to ground, so maybe > that's the answer... but anyhow. > > The collector current is too high, but I'm seeing a 3MHz > amplitude modulation over the top of the 80MHz fundamental. > Despite the Oscout connector, I'm actually looking at the > tank voltage. > > Where is this 3MHz coming from? I.e. where's the TC? > > What should I change to reduce the collector current? >
Firstly, it's a good idea to check the "Convert Greek mu to "u"" option in Control Panel/Netlist options. The Greek character doesn't travel well on Usenet, where not everyone is using the same extended character set. If in doubt use scientific notation, as in "1E-6" Assuming that the 0xB5 character I get is mu, hence L2 is 0.4 microhenries, what I see is about 700MHz, squegging at about 46MHz. The voltage across the whole tank circuit is a reasonably clean 46.2MHz, with second harmonic about 30dB down. 46MHz is in close agreement with the tank circuit values. Playing with the coil taps tames things a lot. Just reversing the base and ground ends gives a much improved output, fundamental at about 47MHz, second harmonic about 40dB down, third harmonic about 34dB down (FFT, Gaussian window). You can probably get things even better. BFR91A, with an ft something like 6 gigs, probably isn't the ideal choice at these frequencies. -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
On Fri, 22 Oct 2010 07:17:40 -0700, George Herold wrote:

> Cliff I'm pretty much an LTspice newbie also. I don't know the > Hartley oscillator very well either. I also couldn't get your posted > circuit to work... (I had no model for the BFR91A tansistor.)
Neither did I, but the BFR91 core is used in various NXP models as a basis for other devices, they just add package parasitics, so I used that.
> > Anyway I futzed around (added some collector resistance.) and got this
<Circuit snipped> Output is a bit anemic (about 250mV RMS) Spectral purity isn't so good, either, second harmonic only about 10dB down, and there's what looks like phase noise on it. Try this, it's Cliff's original circuit, with the coil ends reversed, driving the transistor more kindly, giving over 7V RMS, much more cleanly. Capable of more improvement, too, I think. Getting a Hartley to oscillate isn't hard. Getting it to oscillate cleanly, and stably, is a whole 'nother ball game ;-) Version 4 SHEET 1 884 680 WIRE 208 -176 32 -176 WIRE 432 -176 208 -176 WIRE 32 -128 32 -176 WIRE 208 0 208 -176 WIRE -208 48 -336 48 WIRE -112 48 -208 48 WIRE 32 48 32 -48 WIRE 32 48 -48 48 WIRE 144 48 32 48 WIRE 432 48 432 -176 WIRE -208 144 -208 128 WIRE -336 208 -336 48 WIRE -208 240 -208 224 WIRE 208 240 208 96 WIRE 208 240 -208 240 WIRE 576 240 208 240 WIRE -208 256 -208 240 WIRE 32 272 32 48 WIRE -336 400 -336 272 WIRE -208 400 -208 336 WIRE -208 400 -336 400 WIRE 32 400 32 352 WIRE 32 400 -208 400 WIRE 432 400 432 128 WIRE 432 400 32 400 WIRE 576 400 432 400 WIRE 432 448 432 400 FLAG 576 240 OscOut IOPIN 576 240 Out FLAG 576 400 0 FLAG 432 448 0 FLAG -336 48 Tank SYMBOL res 16 256 R0 SYMATTR InstName R11 SYMATTR Value 4k7 SYMBOL res 16 -144 R0 SYMATTR InstName R10 SYMATTR Value 47k SYMBOL voltage 432 32 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 9v SYMBOL npn 144 0 R0 SYMATTR InstName Q1 SYMATTR Value BFR91 SYMBOL ind -224 128 R0 SYMATTR InstName L2 SYMATTR Value .1u SYMBOL cap -352 208 R0 SYMATTR InstName C1 SYMATTR Value 22pF SYMBOL ind -224 352 M180 WINDOW 0 36 80 Left 0 WINDOW 3 36 40 Left 0 SYMATTR InstName L1 SYMATTR Value .4u SYMBOL cap -48 32 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName C2 SYMATTR Value 10pf SYMBOL res -224 32 R0 SYMATTR InstName R1 SYMATTR Value 1ohm TEXT -480 -168 Left 0 !.tran 0 10u 0s 1ns TEXT -160 264 Left 0 ;K1 L1 L2 1 TEXT -464 -128 Left 0 !.lib BFR91.sub -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
George Herold wrote:
> On Oct 21, 7:45 pm, Clifford Heath <no.s...@please.net> wrote: >> The collector current is too high, but I'm seeing a 3MHz >> amplitude modulation over the top of the 80MHz fundamental.
>> Where is this 3MHz coming from? I.e. where's the TC? >> What should I change to reduce the collector current?
> Cliff I'm pretty much an LTspice newbie also. I don't know the > Hartley oscillator very well either. I also couldn't get your posted > circuit to work... (I had no model for the BFR91A tansistor.)
I didn't have any trouble getting it to work better than the version I posted... but I was curious about why this one behaved the way it did. Apologies for not including the BFR91A model. It follows. I didn't use the subckt with package parasitics, because (a) I'm not dialling up that high a frequency, (b) there will be many other parasitics I'm ignoring anyhow, and (c) I haven't figured out how to ;-). More in response to Fred's message. Clifford Heath. .model BFR91A NPN + IS = 1.32873E-015 + BF = 1.02000E+002 + NF = 1.00025E+000 + VAF = 5.19033E+001 + IKF = 8.15511E+000 + ISE = 1.39029E-014 + NE = 1.51292E+000 + BR = 1.76953E+001 + NR = 9.94038E-001 + VAR = 3.28032E+000 + IKR = 1.00000E+001 + ISC = 1.04297E-015 + NC = 1.18993E+000 + RB = 1.00000E+001 + IRB = 1.00000E-006 + RBM = 1.00000E+001 + RE = 7.63636E-001 + RC = 9.00000E+000 + EG = 1.11000E+000 + XTI = 3.00000E+000 + CJE = 2.03216E-012 + VJE = 6.00000E-001 + MJE = 2.90076E-001 + TF = 6.55790E-012 + XTF = 3.89752E+001 + VTF = 1.09308E+001 + ITF = 5.21078E-001 + CJC = 1.00353E-012 + VJC = 3.40808E-001 + MJC = 1.94223E-001
Fred Abse wrote:
> Try this, it's Cliff's original circuit, with the coil ends reversed, > driving the transistor more kindly, giving over 7V RMS, much more cleanly.
Ahh, right, I had the transformer upside-down. Referring to my source circuit it is constructed that way (had to check the coil winding details and board overlay). Thanks, that was the main answer I wanted, to reduce the drive. The other answer came in your reference to squegging. I hadn't come across that before. Although I can't reproduce it now, I had an oscillator that must have been borderline, because it had an amplitude modulation of about 20% depth at 3MHz. I was puzzled about where the TC was coming from; perhaps R10/R11 and C2? I'd like to know more about how to design to avoid squegging. There's obvious things to try, but is there a systematic approach?
> On Fri, 22 Oct 2010 07:17:40 -0700, George Herold wrote: > Neither did I, but the BFR91 core is used in various NXP models as a basis > for other devices, they just add package parasitics, so I used that.
I was simulating with the bare BFR91A because I hadn't figured out how to use the BFR93A subcircuit. It took me freaking ages to figure out how to make the subcircuit stuff work. I've included the files below (Fred obviously knows this, but maybe not others). The actual devices I was planning to use (though probably in a Colpitts) is a BFR93A, and at 146MHz - now just playing to get the hang of things without worrying too much about actual frequencies. I'd tweak the coil and cap values to suit when it's looking reasonable. At 46MHz, an 2N2222 is much more suitable, but the coupling cap has to be raised to 15pF - then the output is quite clean (2nd harmonic is 40dB down). With the BFR93A in the fixed circuit attached, there's some squiggling around 520MHz in the collector current before the transistor turns off properly on each cycle (BFR93A too fast?), but it doesn't appear at all in the tank - nearby spikes are > 60dB down. Just out of interest, I'd choose the coil and tank reactances based on magnitude at the frequency of interest; at 48MHz the .5uH has a reactance of 151jOhms (or is that -jOhms?). Obviously the cap will match with the opposite sign. Question: Is 150-ish a reasonable choice for this circuit? How would you choose this reactance? To dominate the bias resister impedances? It worries me that the coupling cap is 15pf when the tank cap is only 22. Should the coupling cap have a much higher impedance than the tank? If I drop it much, the 2n2222 stops oscillating (not enough gain at this frequency), but the BFR91A goes and goes. Smaller coupling caps seem to reduce purity, the opposite of what I expected.
> Output is a bit anemic (about 250mV RMS) > Spectral purity isn't so good, either, second harmonic only about 10dB > down, and there's what looks like phase noise on it.
I didn't get that result I had; I was getting p-p of +16 .. -18V on the tank. But what was surprising me was the 3MHz amplitude modulation on the 46MHz, to about 20% depth - possibly marginal squegging. I can't make it do that any more.
> it's a good idea to check the "Convert Greek mu to "u"" option
Good tip, thanks. Files follow. The .sub file is off the net, the asy file is one I made. The SYMATTRs are the tricky bit. Clifford Heath. ------------------ Cut Here for Hartley.asc ------------------ Version 4 SHEET 1 884 680 WIRE 208 -176 32 -176 WIRE 432 -176 208 -176 WIRE 32 -128 32 -176 WIRE 208 0 208 -176 WIRE -208 48 -336 48 WIRE -112 48 -208 48 WIRE 32 48 32 -48 WIRE 32 48 -48 48 WIRE 144 48 32 48 WIRE 432 48 432 -176 WIRE -208 144 -208 128 WIRE -336 208 -336 48 WIRE -208 240 -208 224 WIRE 208 240 208 96 WIRE 208 240 -208 240 WIRE 576 240 208 240 WIRE -208 256 -208 240 WIRE 32 272 32 48 WIRE -336 400 -336 272 WIRE -208 400 -208 336 WIRE -208 400 -336 400 WIRE 32 400 32 352 WIRE 32 400 -208 400 WIRE 432 400 432 128 WIRE 432 400 32 400 WIRE 576 400 432 400 WIRE 432 448 432 400 FLAG 576 240 OscOut IOPIN 576 240 Out FLAG 576 400 0 FLAG 432 448 0 FLAG -336 48 Tank SYMBOL res 16 256 R0 SYMATTR InstName R11 SYMATTR Value 4k7 SYMBOL res 16 -144 R0 SYMATTR InstName R10 SYMATTR Value 47k SYMBOL voltage 432 32 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 9v SYMBOL ind -224 128 R0 SYMATTR InstName L2 SYMATTR Value .06u SYMBOL cap -352 208 R0 SYMATTR InstName C1 SYMATTR Value 22pF SYMBOL ind -224 352 M180 WINDOW 0 36 80 Left 0 WINDOW 3 36 40 Left 0 SYMATTR InstName L1 SYMATTR Value .4u SYMBOL cap -48 32 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName C2 SYMATTR Value 10pf SYMBOL res -224 32 R0 SYMATTR InstName R1 SYMATTR Value 0.01ohm SYMBOL custom\\bfr93a 144 0 R0 SYMATTR InstName Q1 TEXT -480 -168 Left 0 !.tran 0 10u 0s 1ns TEXT -160 264 Left 0 ;K1 L1 L2 1 ------------------ Cut Here for lib\sym\custom\bfr93a.asy ------------------ Version 4 SymbolType CELL LINE Normal 44 76 36 84 LINE Normal 64 96 44 76 LINE Normal 64 96 36 84 LINE Normal 40 80 16 64 LINE Normal 16 80 16 16 LINE Normal 16 32 64 0 LINE Normal 16 48 0 48 WINDOW 0 56 32 Left 0 WINDOW 3 56 68 Left 0 SYMATTR Value BFR93A SYMATTR Prefix X SYMATTR ModelFile BFR93A.sub SYMATTR SpiceModel BFR93A SYMATTR Description Bipolar NPN RF transistor BFR93A PIN 64 0 NONE 0 PINATTR PinName C PINATTR SpiceOrder 1 PIN 0 48 NONE 0 PINATTR PinName B PINATTR SpiceOrder 2 PIN 64 96 NONE 0 PINATTR PinName E PINATTR SpiceOrder 3 ------------------ Cut Here for lib\sub\bfr93a.sub ------------------ * Filename: BFR93A_SPICE.PRM * BFR93A SPICE MODEL * PHILIPS SEMICONDUCTORS * Date : September 1995 * * PACKAGE : SOT23 DIE MODEL : BFR91A * 1: COLLECTOR; 2: BASE; 3: EMITTER; .SUBCKT BFR93A 1 2 3 Q1 6 5 7 7 BFR91A * SOT23 parasitic model Lb 4 5 .4n Le 7 8 .83n L1 2 4 .35n L2 1 6 .17n L3 3 8 .35n Ccb 4 6 71f Cbe 4 8 2f Cce 6 8 71f * * PHILIPS SEMICONDUCTORS Version: 1.0 * Filename: BFR91A.PRM Date: Feb 1992 * .MODEL BFR91A NPN + IS = 1.32873E-015 + BF = 1.02000E+002 + NF = 1.00025E+000 + VAF = 5.19033E+001 + IKF = 8.15511E+000 + ISE = 1.39029E-014 + NE = 1.51292E+000 + BR = 1.76953E+001 + NR = 9.94038E-001 + VAR = 3.28032E+000 + IKR = 1.00000E+001 + ISC = 1.04297E-015 + NC = 1.18993E+000 + RB = 1.00000E+001 + IRB = 1.00000E-006 + RBM = 1.00000E+001 + RE = 7.63636E-001 + RC = 9.00000E+000 + EG = 1.11000E+000 + XTI = 3.00000E+000 + CJE = 2.03216E-012 + VJE = 6.00000E-001 + MJE = 2.90076E-001 + TF = 6.55790E-012 + XTF = 3.89752E+001 + VTF = 1.09308E+001 + ITF = 5.21078E-001 + CJC = 1.00353E-012 + VJC = 3.40808E-001 + MJC = 1.94223E-001 .ENDS ------------------ Final Cut ------------------
On Mon, 25 Oct 2010 02:31:04 +1000, Clifford Heath wrote:

> Fred Abse wrote: >> Try this, it's Cliff's original circuit, with the coil ends reversed, >> driving the transistor more kindly, giving over 7V RMS, much more cleanly. > > Ahh, right, I had the transformer upside-down. Referring to my > source circuit it is constructed that way (had to check the coil > winding details and board overlay). Thanks, that was the main > answer I wanted, to reduce the drive.
I thought as much, done much the same myself.
> > The other answer came in your reference to squegging. I hadn't come > across that before. Although I can't reproduce it now, I had an > oscillator that must have been borderline, because it had an > amplitude modulation of about 20% depth at 3MHz. I was puzzled > about where the TC was coming from; perhaps R10/R11 and C2?
I've not been able to reproduce your result, Are you sure it wasn't an artifact of aliasing in your displayed waveform? I've posted a screen shot of what I get using your original circuit with the coil ends the wrong way round, to alt.binaries.schematics.electronic. The transistor cuts off every half cycle, and a ringing starts, which appears to be transistor parasitic capacitance resonating the tank coil. Classical overdriving. The result is what looks like 600-odd MHz, quenched at 40MHz.
> > I'd like to know more about how to design to avoid squegging. There's > obvious things to try, but is there a systematic approach?
Oscillators squeg when the drive builds up, maybe over several cycles, to the point where the active device cuts off, then oscillation (at least at the frequency you want) stops until things have calmed down enough for proper oscillation to start again.
> >> On Fri, 22 Oct 2010 07:17:40 -0700, George Herold wrote: Neither did I, >> but the BFR91 core is used in various NXP models as a basis for other >> devices, they just add package parasitics, so I used that. > > I was simulating with the bare BFR91A because I hadn't figured out how > to use the BFR93A subcircuit. It took me freaking ages to figure out how > to make the subcircuit stuff work. I've included the files below (Fred > obviously knows this, but maybe not others). > > The actual devices I was planning to use (though probably in a Colpitts) > is a BFR93A, and at 146MHz - now just playing to get the hang of things > without worrying too much about actual frequencies. I'd tweak the coil > and cap values to suit when it's looking reasonable. > > At 46MHz, an 2N2222 is much more suitable, but the coupling cap has to > be raised to 15pF - then the output is quite clean (2nd harmonic is 40dB > down). > > With the BFR93A in the fixed circuit attached, there's some squiggling > around 520MHz in the collector current before the transistor turns off > properly on each cycle (BFR93A too fast?), but it doesn't appear at all > in the tank - nearby spikes are > 60dB down.
I've had trouble with fast transistors, where tracks were resonating, producing components around 600MHz on top of the 100-odd that I wanted, plus harmonics up into the gigs. Having a spectrum analyzer around helps :-) A 2N2222 will go quite nicely at over 100MHz
> > Just out of interest, I'd choose the coil and tank reactances based on > magnitude at the frequency of interest; at 48MHz the .5uH has a > reactance of 151jOhms (or is that -jOhms?). Obviously the cap will match > with the opposite sign. > > Question: Is 150-ish a reasonable choice for this circuit? How would you > choose this reactance? To dominate the bias resister impedances?
Try and keep the L/C ratio high, remembering that: Dynamic impedance at resonance = LC/R, where R=wL/Q for the whole circuit.
> > It worries me that the coupling cap is 15pf when the tank cap is only > 22. Should the coupling cap have a much higher impedance than the tank? > If I drop it much, the 2n2222 stops oscillating (not enough gain at this > frequency), but the BFR91A goes and goes. Smaller coupling caps seem to > reduce purity, the opposite of what I expected.
That's because you're starving the transistor of drive with the smaller capacitor. Bear in mind that the coupling capacitor forms a potential divider with the input capacitance of the transistor, and the bias resistors. The coupling capacitor *will* have an effect on the frequency, too, but not that much.
> >> Output is a bit anemic (about 250mV RMS) Spectral purity isn't so good, >> either, second harmonic only about 10dB down, and there's what looks >> like phase noise on it. > > I didn't get that result I had; I was getting p-p of +16 .. -18V on the > tank. But what was surprising me was the 3MHz amplitude modulation on > the 46MHz, to about 20% depth - possibly marginal squegging. I can't > make it do that any more.
That remark was with reference to the modified circuit that George Herold posted. No squegging, but low output and dirty.
> >> it's a good idea to check the "Convert Greek mu to "u"" option > > Good tip, thanks. > > Files follow. The .sub file is off the net, the asy file is one I made. > The SYMATTRs are the tricky bit. >
Don't tell me you handcrafted an .asy file, line by line. LTSpice has a symbol editor that does the hard work for you. Lets you draw symbols.Or you can open an existing symbol file, save it as something else, then edit it to whatever you want.(AKA RTFM) ;-) -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
On Sun, 24 Oct 2010 07:00:44 -0700, Fred Abse wrote:

> Try and keep the L/C ratio high, remembering that: > > Dynamic impedance at resonance = LC/R, where R=wL/Q for the whole circuit.
Typo alert! LC/R should read L/CR Sorry (and I did proofread it!). -- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)
Fred Abse wrote:
> I've not been able to reproduce your result, Are you sure it wasn't an > artifact of aliasing in your displayed waveform?
Yes, I'm sure, but nm, I can't do it again myself, despite fiddling with this stuff for more than ten hours yesterday.
> Oscillators squeg when the drive builds up, maybe over several cycles,
I found a few more ways to do it yesterday too, and I have some notion of how to handle it, though a few examples surprised me. In particular this article from ED, which purports to show an anti-squegging biassing for a Colpitts, but which will happily squegg with even quite small changes (short url <http://bit.ly/d8nqxl> or <http://electronicdesign.com/article/analog-and-mixed-signal/use-current-mirror-biasing-to-avoid-squegging-in-r.aspx> Increase the 5.1K bias resistor, for example. The inductor in the emitter is the only innovation that improves the Colpitts circuit I already had. And maybe temp compensation on the biassing, from the transistor matching, but I don't know how to Spice that. ColpittsEL.asc is attached below.
> I've had trouble with fast transistors, where tracks were resonating,
My circuits don't model track lengths, but there is lead inductance and internal and external capacitance, so maybe that reaches 500MHz.
> A 2N2222 will go quite nicely at over 100MHz
Yes, but needs a lot more drive than the BFR93A because it has less gain. The CA3046 suggested by ED is better, if you can use the extra transistors.
> Try and keep the L/C ratio high, remembering that:
Ahh yes, I'd discovered that. That makes sense.
> That's because you're starving the transistor of drive with the smaller > capacitor.
But it's biassed, so never turns off, and oscillates. All of these oscillators use the transistor to deliver short pulses of collector current, with the transistor off-ish in between, so as long as it starts, why should low drive cause impurity?
>> The SYMATTRs are the tricky bit. > Don't tell me you handcrafted an .asy file, line by line.
No, just those lines, copied after ones from the libraries. The problem wasn't how to create the file, but how to know which things mattered. Clifford Heath. ------------------- Cut Here for ColpittsEL.asc ------------------- Version 4 SHEET 1 880 708 WIRE 576 -160 304 -160 WIRE 304 -128 304 -160 WIRE 304 -16 304 -48 WIRE 304 -16 80 -16 WIRE 80 16 80 -16 WIRE 304 80 304 -16 WIRE 576 80 576 -160 WIRE -176 128 -224 128 WIRE -144 128 -176 128 WIRE -48 128 -80 128 WIRE 80 128 80 96 WIRE 80 128 -48 128 WIRE 240 128 80 128 WIRE 80 144 80 128 WIRE -48 160 -48 128 WIRE -176 224 -176 128 WIRE 80 240 80 208 WIRE 304 240 304 176 WIRE 304 240 80 240 WIRE 304 288 304 240 WIRE -48 304 -48 240 WIRE 80 304 80 240 WIRE -176 432 -176 304 WIRE -48 432 -48 368 WIRE -48 432 -176 432 WIRE 80 432 80 368 WIRE 80 432 -48 432 WIRE 304 432 304 368 WIRE 304 432 80 432 WIRE 576 432 576 160 WIRE 576 432 304 432 WIRE 304 528 304 432 FLAG 304 528 0 FLAG -224 128 Vosc IOPIN -224 128 Out SYMBOL res 288 -144 R0 SYMATTR InstName R1 SYMATTR Value 220 SYMBOL ind 288 272 R0 SYMATTR InstName L1 SYMATTR Value 0.2uH SYMBOL voltage 576 64 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 9v SYMBOL cap 64 144 R0 SYMATTR InstName C1 SYMATTR Value 10pf SYMBOL cap 64 304 R0 SYMATTR InstName C2 SYMATTR Value 47pF SYMBOL ind -64 144 R0 SYMATTR InstName L3 SYMATTR Value 120nH SYMBOL cap -64 304 R0 SYMATTR InstName C3 SYMATTR Value 1nF SYMBOL npn 240 80 R0 SYMATTR InstName Q1 SYMATTR Value CA3046 SYMBOL res 64 0 R0 SYMATTR InstName R4 SYMATTR Value 100k SYMBOL res -192 208 R0 SYMATTR InstName R2 SYMATTR Value 100k SYMBOL cap -80 112 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName C4 SYMATTR Value 10pF TEXT -272 -8 Left 0 !.tran 0 20uS 0 1nS .model CA3046 NPN + (IS = 10.0E-15 XTI=3.000E+00 EG=1.110E+00 VAF=1.00E+02 + VAR=1.000E+02 BF=145.7E+00 ISE=114.286E-15 NE=1.480E+00 + IKF=46.700E-03 XTB=0.000E+00 BR=.1000E+00 ISC=10.005E-15 + NC=2.000E+00 IKR=10.00E-03 RC=10.000E+00 CJC=991.71E-15 + MJC=0.333E-00 VJC=0.7500E-00 FC=5.000E-01 CJE=1.02E-12 + MJE=.336E-00 VJE=0.750E-00 TR=10.000E-09 TF=277.01E-12 + ITF=1.750E-00 XTF=309.38E+00 VTF=16.37E+00 PTF=0.000E+00 + RE=0.0E+00 RB=0.00E+00
On Fri, 22 Oct 2010 10:45:26 +1100, Clifford Heath
<no.spam@please.net> wrote:

>I'm just getting started with LTSpice, and played yesterday >with some Colpitts oscillators to my satisfaction. Today I >tried a Hartley, and I can't understand some of the behaviour >I'm seeing.
Do current circuit simulators really work (produce usable results) with oscillators (thermal noise amplifiers with frequency selective positive feedback with voltage limitation, satisfying the Barkhausen oscillation criterion) ? At least in the old days, positive feedback did cause a lot of problems in most simulation packages.