EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: Dan Moos on September 07, 2020, 11:11:26 pm

Title: Spice results vastly different than built circuit (Hartley oscillator)
Post by: Dan Moos on September 07, 2020, 11:11:26 pm
I've built up a Hartley oscillator. As far as I can tell it is exactly as the Spice schematic I'm posting here.

I built my circuit  Manhattan style on a piece of copper clad board.

The actual circuit is oscillating at ~470 MHz (according to the spectrum analyzer). Nothing but noise shows up on my 100 MHz scope (as you'd imagine).

The Spice sim is running at ~152 KHz. Close enough to what my math predicted.

In the Spice sim, I have the 1meg and 13pF in parallel to ground at the output to try and mimic my scope probe. As you an see, I'm getting abut a 2v P-P signal. If I take the 1meg and 13pF  out of the sim, I get about 9v P-P (almost double the supply!).

To be clear, I know this isn't a "good" Hartley topology. I'm experimenting with MANY such oscillators. This is purely for fun/education. Resist suggesting better oscillators! I just want to understand the discrepancy between Spice and my circuit, and why my circuit can oscillate at such a higher freq than the math says.

It can't be a harmonic because I can't find the fundamental!

EDIT: My DC operating voltages on the built circuit are all close to what I figured on.

SECOND EDIT: my reactive component values plugged into the sim ar the measured values (using LCR meter) of the actual parts.
Title: Re: Spice results vastly different than built circuit (Hartley oscillator)
Post by: T3sl4co1l on September 07, 2020, 11:48:04 pm
Are you sure? 470MHz is pretty impressive for a 2N3904, actually. :-+

C2 seems suspiciously small, but I suppose the feedback gain is pretty high (L1/L2 = 1), and the emitter degeneration helps to raise the equivalent base input impedance.

It is a good idea to model circuit losses, even if just a ballpark.  There's no way your inductors are lossless -- they'll have some ESR, or EPR or however you might express it.

One of the things that bothers me about LTSpice: components have default parasitics, which can be woefully inappropriate; it depends entirely on the circuit.  You can specify these parameters in the component dialog, but they don't show by default.  I prefer to see it explicitly on the schematic.

Hint: if the frequency is that high, what must the circuit impedances be?  Even just from the stray pF's around the transistor itself?
And what does that tell you about the impedance of components, including little bits of wire?

Namely, my eye is drawn to the C1-C2-Ccb loop, and whatever L1-L2 is equivalent to up at that frequency (it might actually be capacitive, or complex in any case).  Also, there's no k statement in the screenshot, are they supposed to be uncoupled?

It's quite possible that you've made a Colpitts oscillator, and the impedances are such that the above mentioned loop is the critical path, and everything else (R1-R3, R5, and probably L1 and L2) is basically inert.

Possibly, you can replicate this in the simulation by adding RLC elements to model that loop.  1nH/mm is a good ballpark figure for the inductance of wires.  Also, something that, given expected node capacitances, resonates around, well, 470MHz, is a good guess. :)

Note that just adding things may be inconclusive -- oscillators don't need to start in SPICE.  It's a simulation, lacking many aspects of the real world.  (It is up to you, to ensure that the simulation models something real!)  You need a source of noise, or initial displacement, to start the oscillator.  Running the sim with "set initial conditions to zero" (or however it's phrased exactly in LTSpice) can help.  (After 30ms into the simulation, I can't see how you've started it.  Possibly you've already done this!  Or maybe the startup (DC operating point) calculation happened to be slightly off, and it settles in the first moments, giving just a little movement that makes it start up.  Or, the resistor or transistor models happen to include thermal noise, which provides an initial signal to amplify.)

You may need a small initial timestep to see 400MHz behavior.  Likely, it will otherwise simply discard any short perturbations as rounding error.  You may need to kick it into oscillation by putting a small VPULSE in the loop, with a suitably short risetime, and not much amplitude (0.5ns rise and 1mV amplitude would be fine).

Tim
Title: Re: Spice results vastly different than built circuit (Hartley oscillator)
Post by: SilverSolder on September 08, 2020, 07:08:59 pm

Can you post a photograph of the actual circuit implementation?