It’s Hard To Make A (Good) Oscillator

There’s more to making an oscillator than meets the eye, and [lcamtuf] is here with a good primer on the subject. It starts with the old joke that if you need an oscillator it’s best to try to make an amplifier instead, but of course the real point here is to learn how to make not just a mere oscillator, but a good oscillator.

He does this by taking the oscillator back to first principles and explaining positive feedback on an amplifier, before introducing the Schmitt trigger, an RC circuit to induce a delay, and then phase shift. These oscillators are not complex circuits by any means, so understanding their principles should allow you to unlock the secrets of oscillation in a less haphazard way than just plugging in values and hoping.

Oscillation is a subject we’ve taken a deep dive into ourselves here at Hackaday, should you wish to learn any more. Meanshile [lcamtuf] is someone we’ve heard from here before, with a comparative review of inexpensive printed circuit board manufacturers.

28 thoughts on “It’s Hard To Make A (Good) Oscillator

  1. Relaxation oscillators, ring oscillators, and the classic multivibrator are all cool and all but what if I need higher frequency oscillator? Its harmonic oscillators all the way. Sadly they are difficult to get right and start up.

    1. I made a great oscillator for 87MHz to 108MHz. It’s based on the Vackar oscillator. Very flat, stable low distortion, and easy to tune with a varactor. Made with a single transistor. It’s a little finicky to get it to start and only puts out about 50mW, so it requires a buffer. I used a voltage follower which boosts the output to around 100mW and isolates the output from the oscillator.

    1. I spent my final year at uni proving mathematically…I could design a microwave amplifier that oscillated and vice versa – because, then, you couldn’t model all the parasitics. You made them work by hacking.

    1. Although HP specified distortion as < 1% over the entire tunable range, distortion at low frequencies could be pretty bad as the light bulb nonlinearity modulated the waveform. My only experience with the 200 series oscillator was with a brand new unit in 1981, which would not have been a 200A. The waveform was so distorted that it was funny.

  2. Once I heard an anecdote about one guy who designed filter for some synth company. But to test it he needed oscillator but things escalated quickly and this is how Access Virus was born. So be careful guys – you may end up as industry leader.

  3. Ocillators are a bit of magic. I wanted an old fashioned ESR meter, sensing effective resistance across a capacitor with a 100KHz oscillator as an excitation source. I decided a phase shift oscillator would be the best solution, and I researched online to find the right formulae to work out how to make it work at 100KHz. I didn’t use the technique of increasing the impedance stage by stage, which may have been a mistake ;-)

    Using close tolerance components, built using sensible design techniques on a PCB, and danged if the thing doesn’t oscillate at 80KHz. It is a nice sine wave though.

    1. That’s interesting. I’ll speculate that you used a cheap opamp that only had a gain of 10 at 100 kHz. If you used high value resistors / small capacitors, stray capacitance could also lower operating frequency.

  4. Will the video where a butterd slice of toast is taped on the back of a cat, then dropped, then since both the cat want to land on its feet and the buttered toast want to land on the buttered side, a perpeetum mobile generator is created (that could be use as an oscillator) would qualify for practical tests?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.