The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

The New Hotness

  • SPICE Crystal Model

    Linear Technology’s LTSpice generic capacitor model has all the parts you need to synthesize a crystal, which is pointed out in the help file and various spots around the web. What’s missing is the relation between all the parts and the values you have in hand for an arbitrary crystal.

    SPICE Capacitor Model
    SPICE Capacitor Model

    The crystal capacitor model looks like this…

    Cpar (usually C0) along the right edge is the inter-electrode capacitance, on the order of a few pF.

    Rpar (usually R0) along the left edge is the parasitic resistance across the case, on the order of hundreds of MΩ.

    The RCL string in the middle is the “motional” part of the crystal model, generally found with a subscript “m” in the specs.

    • Rser (Rm or ESR) is on the order of 100 Ω
    • Capacitance (Cm) is the motional capacitance, on the order of fF (that’s femtofarad: 10-15)
    • Lser (Lm) is tens to thousands of mH
    • RLshunt is something I haven’t seen in any other model and, in fact, it doesn’t appear in the properties panel.
    Crystal Properties
    Crystal Properties

    Now, the part I screwed up is that the capacitor’s value (the number appearing on the schematic) is Capacitance (in the angle brackets that royally screw up WordPress HTML), not Cpar. So the crystal capacitor properties panel looks like this…

    That models a 10 MHz crystal, taken directly from a sidebar in Refinements in Crystal Ladder Filter Design by the legendary Wes Hayward W7ZOI, in the June 1995 issue of QEX.

    Guess what? Plug it into a model of his crystal-measuring circuit and it works exactly like he says it should. No surprise there…

    SPICE has a bit of trouble simulating high-Q oscillators; they tend to not start up properly. If nothing seems to be happening, wait for a few tens-to-hundreds of milliseconds before despairing. Try chopping Rser down by a factor of two or four to see if that improves its disposition.

    You could try injecting a few (hundred thousand) cycles of a kickstart signal, but that’s fraught with peril: you’re simulating something even further from reality than usual.

    Memo to Self: You can rename the cap from C2 (or whatever) to X1 (or whatever) and everything still works fine.