I’m wondering what be the most practical circuit for a 38KHz crystal oscillator? I bought a few quartz crystals and would like breadboard a simple circuit to test them. But of course it would be nice to try out a circuit on QSPICE first. I’m guessing that a circuit used for say a 1MHz crystal would not work for such a low frequency 38KHz one. I’m not sure if an opamp, bipolar or FET transistor topology would work which is why I’m asking here. I hope someone can help. Thanks.
Just an fyi, QSpice includes a crystal library. With a schematic open, type the letter “y” and a crystal will be appear.
If you want to build one from scratch, reference the following LTSpice thread and port it to QSpice along with modifying the values to your desired frequency.
https://www.electro-tech-online.com/threads/simple-crystal-oscillator-simulation-in-ltspice.155445/
Update:
Tried out the circuit per the link above. After fudging the values a bit, got it pretty close to 38 kHz. This is an option otherwise you can still press “y” for an oscillator.
38khz_osc.qsch (8.5 KB)
Do a Google image search for:
cmos xtal oscillator 32khz
I know you want 38KHz, but the 32KHz ones are far more common (used for real time clocks) and will work the same at 38KHz. There are lots of topologies, but the simplest involve one or two cheap CMOS inverters and a couple of passive parts.
You can use .meas to compute oscillation frequency from time domain result. For precision, .option maxstep is added.
38khz_osc (.meas).qsch (8.9 KB)
Ok, nice!
I noticed that with your method, it actually smooths out the waveform very well. Which specific instruction does this?
Update:
Ok, I see that it is this one - but how does it work?:
.option maxstep=1/38K/1000
Here is a forum discussion post.
Oscillator Problems - QSPICE - Qorvo Tech Forum
I have a document Qspice - How Time Step Works.pdf, which explains how simulation timestep work in Qspice environment.
KSKelvin-Github/Qspice: Qspice Unofficial Guidelines, Custom Symbol Library, and Projects
Thanks everyone. Lots to think about and try out.

