It's Hard to Build an Oscillator
Key topics
Regulars are buzzing about the challenges of building a reliable oscillator, with the author sharing their hands-on experience and frustrations in crafting a simple yet functional circuit. Commenters riff on the intricacies of oscillator design, sharing their own war stories and insights on everything from component selection to noise reduction. As the discussion unfolds, a consensus emerges that oscillator building is as much an art as it is a science, with many contributors nodding in agreement about the importance of empirical testing and iterative refinement. The thread feels particularly relevant right now as DIY electronics and maker communities continue to push the boundaries of what's possible with analog circuits.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
38m
Peak period
21
0-3h
Avg / period
9.3
Based on 74 loaded comments
Key moments
- 01Story posted
Nov 21, 2025 at 2:45 AM EST
about 2 months ago
Step 01 - 02First comment
Nov 21, 2025 at 3:23 AM EST
38m after posting
Step 02 - 03Peak activity
21 comments in 0-3h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 22, 2025 at 10:20 PM EST
about 2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Why the first two circuits fail is also pretty obvious without derper circuit analysis: to get reliable oscillation you don't only need amplification, you also need some time setting element, usually in the form of a capacitor (or involuntary capacitance).
I guess hobbyists nowadays are just using SI5351 and calling it a day.
You want a frequency generator that oscillates with a constant period/frequency. Even an unbalanced oscillator can just be divided by two to provide uniformity. However, it turns out that building something that is not sensitive to any outside inputs (temperature, strain, voltage, time, etc) is really hard to do over a very wide frequency range (from ~DC to many MHz), but from that you can build a stable clock.
Look up Allan Variance, if you're looking for bit of a rabbit hole on clocks and oscillators and other sensors.
>It's hard to build an oscillator
It took a long time, too, after the invention of the vacuum tube.
Finally one day they had some remarkable success using circuitry more reliable than ever before.
It seemed so promising that a startup really could be based on technology like that, so that's what was happening.
Unless you were intrigued by relatively high-voltage analog electronics, it was just another boring engineering company. Even though they were very creative, their little company was simply named after the founders like many others.
That's why they called their startup Hewlett-Packard.
I made a program that generate random topology and uses spice simulation to find if it oscillate. The goal was to find some novel LC oscillators. It worked, it found many different oscillators. I let it ran for a while and soon I found out that the simplest possible LC oscillator has 1 inductor, 2 capacitors, 1 resistor and 1 transistor. I found many different variations of it, I called this class of oscillators "LCCRT oscillator" and it also always had 2 internal nodes so that's not very large search space (40000 combinations) so I generated all possible combinations and I found out there are exactly 12 distinct LCCRT topologies.
Basically any time cap connects to a rail it can be placed to other rail as well, and any time one rail connects via resistor, the resistor can also be moved to other rail. This creates 12 possible combinations. I tested them in real life and they are stable, even used one in metal detector.
Of course it found many different topologies. Some times they were unique, other times they could be simplified into already found oscillator. It can also use multiple transistors not just one. You can find entire project on github, it is a ngspicejs script: https://github.com/dvhx/lc-oscillator-finder
One of my favorite books is Tremaine's Passive Audio Network Design, seems appropriate right now. Passive circuit design is great fun and a lost art.
I get the impression that there was some requirement to use transistors that I was missing. The article briefly mentions some kind of inductor as a rare component.
And you always need an active component like a transistor. A pure LC can oscillate for hundreds of cycles but not indefinitely.
3340s are more DIY-friendly though, as they're DIP packages.
Never lose this
Sometimes, the box a degree stuffs you into with all of that learning often means losing some creative out-of-the-box thinking abilities. I get away with things all the time because I didn't know you weren't supposed to not do this, yet now that I have, it works just fine.
It's a miracle high schools are able to achieve anything, really.
It's funny, I was just thinking this morning about an old article in (I think) Television magazine that I read in the 80s when I was getting into electronics. The author was talking about some service notes he'd received for a particular model of Philips radio, which had just come out, and it was when shops tended to have their own service department that would repair things right there in the shop - and also, apply any "factory fixes".
One such fix was described as "Fix VIUPS", and involved changing a couple of resistors and adding a couple of capacitors. Not really any difference, but the author did think it seemed to make the amp a bit more stable and less inclined to make squealy ploppy noises at high volume when the battery was low. But, curiosity got the better of him, so he rang the Philips rep - what's this "VIUPS"?
No idea. But I'll get hold of someone at head office you can ring. Okay, what's this "VIUPS" thing? No idea, said the head office guy, but I can put you in touch with one of the factory engineers in Eindhoven.
So, a call came in, an international call! Quite a big deal in the 80s. "What's this VIUPS Fix thing in the service notes?" he asked the guy.
"Aha yes", he said in a heavy Dutch accent, "the VIUPS is the noise the set makes when the fault is present."
VIUPS VIUPS VIUPS. Yup.
The most easy way to annoy a neighbor using AM radios, it's using a regenerative AM receptor with too high gain. Could oscillate and begin to emit noise at the same freq that are you tuning. Adding a simple carbon microphone to it, and setting the gain to the max, was a very easy way of building a AM radio emitter.
Damn hippies.
The way I heard it was "amplifiers oscillate and oscillators don't".
This can be easily demonstrated using so called no-input technique[0] which basically means that you patch audio mixer output to it's input and it starts feedbacking and you can create some tones from this. Note that this needs to be done carefully.
[0]: https://www.youtube.com/watch?v=H-7kQmpjBds&t=2s
What's fascinating is the endless variety of chaos and patterns created from such a simple mechanism and system. It seems the feedback is key, how an output is fed back into another input. Recursive functions, like fractal geometry.
Yes, you're using a million transistors to do something you could have done with a couple of discrete passives, but it will often result in a lower total BoM and development time. Not always.
Now that I think about it, no, it's not even cheaper as XTALs are quite pricy compared to other discrete components.
I didn't mean to be rude - I interpreted the comment as "Would you like to build an (insert random object here)? Well, you can just BUY it and be done with it" - may not be as I put it (dumb) but certainly... simplistic and purpose-defeating
The first being the "Two Transistor Metronome" that I can't even remember where I saw first - possibly Electronics Today International or Hobby Electronics, although Practical Electronics was a contender - we didn't get that one much though. I remember my dad and I building this when I was probably about seven or eight, and I've built loads since.
https://tinyurl.com/22qjecj7
It's a relaxation oscillator where the two transistors form more-or-less an SCR, which fires when its (negative-going) gate voltage exceeds its anode voltage. Kind of.
A similar circuit using three transistors and a diode is used in the oscillators in the Roland TB303 and Korg MS10/20/50 series, with a current source used to set the capacitor charging time so you get a nice linear sawtooth. Conveniently the expo converter turns an incoming control voltage into an exponentially-rising current, which is just what you need!
The two-transistor metronome one really is working more like an SCR, that rapidly charges the capacitor and allows it to discharge again.
Well... Using a NOT (really a NAND) gate was a very classic way of generate clocks for discrete logic.
https://en.wikipedia.org/wiki/Pearson%E2%80%93Anson_effect
https://en.wikipedia.org/wiki/Negative_resistance
A somewhat difficult part of making (moderate-frequency) analog oscillators is getting a clean sinewave without harmonics. It sounds like the easiest thing in the world: a delay, a low-pass filter, a linear amplifier that compensates for the loss in the delay and filter, and boom, sinewave. You can even put the low-pass filter and the delay in a single phase shifter circuit.
The difficulty is hidden in the "compensates for the loss" language. If you amplify too little, your oscillation will decay. If you amplify too much, you will inevitably saturate the amplifier, introducing lots of harmonics (like a squarewave output in the article). So you need some way to stabilize your gain at exactly the right level.
A lightbulb is an interesting device: it is a very linear resistor at short timescales, but nonlinear at long timescales. As the filament heats up, resistance rises. The thermal constant can be fairly substantial, certainly more than kHz or MHz oscillator frequencies. So you can exploit this sweet and clean nonlinearity to produce an oscillator that self-stabilizes!
Design your circuit so that the amplifier gain is controlled by lightbulb's resistance (which is quite easy: you use the lightbulb as one of the gain-setting resistors). And boom, pretty much a perfect sinewave.
Let's take the common watch circuit. Conceptually it's just like 5 components: crystal, a few capacitors, a NOT gate/transistor/amplifier. Introduce 180-degree phase shift at the 32.768k target frequency and bam, oscillator.
Except not really. A clock is expected to have a drift in the region of 100 ppm (or 0.001% error), or lose a second per day or so. That's the hard part, building something that accurate and consistent.
There are also startup specs, power specs (less power is harder. More power helps startup....) etc. etc.
-------
If you just need something to oscillate back and forth randomly, try making a noise generator lol, it will oscillate wildly at many frequencies, one of which might have been the frequency you wanted.
---------
The 555 timer is perhaps the easiest oscillator for a beginner if you are willing to put up with +/-10% drift. It's honestly good enough for far more applications than you might expect.
Even without the premade chip, a 555 timer is just 2x comparators (analog version of an If statement), a 33%/33%/33% voltage divider, and a capacitor. If Voltage > 66% input voltage, remove power from capacitor. If Voltage < 33% input voltage, add power to capacitor. Bam, you now have an oscillator that is accurate to the +/-10% capacitance values of your electronics kit.
Alas, modern circuits need to be faster and more accurate than the humble 555. But a beginner article about oscillators should be about the 555, rather than about opamp or transistor based oscillators.
The author mentions that they consider a center-tapped inductor to be "fancy," but if you consider a regular inductor to be fair game, then the Colpitts oscillator is a good choice. And I suppose you could build a Hartley oscillator with two inductors rather than one center-tapped inductor.
If you consider op-amps to be fair game even though it is made from multiple transistors, then you might consider digital logic to also be fair game and should consider a Pierce oscillator. I'm also assuming that a crystal is also fair game, but those are quite cheap.
Side note- these oscillators are all part of the exam material for the Extra class amateur radio license in the USA. If you find lcamtuf's Substack interesting, then amateur radio might be for you.
It was hard to get a proper intuition of how and why it works, but when you finally do ... fireworks!
Another thing that's real fun with oscillators is to try and build a true chaotic oscillator, but only with R+C+BJT
Not easy, but can be done [2]
[1] https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj...
[2] https://www.instructables.com/A-Simple-Chaos-Generator/
Up until that time, radio frequency carriers were produced with AC Generators designed for a high-frequency (> 60 Hz) output. That is in part why it took so long for things like music to be broadcast by radio: you needed a high-frequency carrier. Generators were topping out at about 15K Hz according to the old article I read.
So once they had the accidental circuit that squealed, it was studied and expermented upon (trial and etrror modifications), and that is where all the 'classic' oscillator circuits originate.
Essentially, an oscillator is an amplifier with positive feedback. Amplifiers that are amplifiers sometimes have negative feedback.
> but it’s rather difficult to build a good analog oscillator from scratch. The most common category of oscillators you can find on the internet are circuits that simply don’t work. This is followed by approaches that require exotic components, such as center-tapped inductors or incandescent lightbulbs.
It is not hard to build a good analog oscillator from scratch, we have been doing this for decades. Secondly, while an incandescent _might_ be considered exotic, and completely unnecessary for an oscillator, a center tapped inductor is totally not exotic, and also, not really necessary for an oscillator.
As others have noted, it is simple to build a really good analog oscillator. This article is blah, and "meh" at best.
14 more comments available on Hacker News