Urgent.News

What's breaking now, across thousands of outlets.

Tech

Building a Wien Bridge Oscillator in LTspice: Watching a Sine Wave Born from Noise

The Idea An oscillator is a circuit that produces a signal without being given one. The Wien bridge is one of the classic ways to get a clean sine wave from an op-amp, a handful of resistors, and two capacitors. Think of a child on a swing. A tiny push starts the motion, and if you keep adding a little energy each cycle, the swing goes higher and higher. At some point the swing hits its physical…

An oscillator is a circuit that generates a signal without needing one externally. The Wien bridge oscillator is a well-known method to create a clean sine wave from an operational amplifier, a few resistors, and two capacitors. Imagine a child on a swing; giving it a small push initiates motion, and if you continuously supply energy, the swing rises higher and higher until it reaches its limit.

The Wien bridge oscillator follows a similar principle. In this circuit, two components interact: a positive feedback network and a negative feedback network. The former, consisting of a series RC (R1, C1) and a parallel RC (R2, C2), permits oscillation at a single frequency with the right phase shift, approximately 1 kHz with the given component values (R = 15.9 kΩ, C = 10 nF).

On the other hand, the latter, set by resistors Rgain1 and Rgain2 (22 kΩ and 10 kΩ respectively), establishes the amplifier gain at roughly 3.2. The network attenuates the signal by a factor of 3 at its center frequency. To sustain oscillation, the amplifier must compensate by providing a gain of nearly 3. Since a slightly higher gain is chosen, oscillation begins even if the initial disturbance is minimal.

To simulate this in LTspice, an initial condition is set on capacitor C1 (IC = 0.1 V) and the simulation is run with .tran 100ms uic. During the first few milliseconds, the signal appears as a faint ripple but gradually grows with each cycle due to positive feedback. As long as the loop gain remains slightly greater than 1, the waveform remains a clean sine wave because the op-amp operates linearly.

However, once the signal reaches the op-amp’s supply limits (±15 V in this case), it starts clipping, limiting the amplitude. This clipping results from the op-amp's inability to exceed its supply rails. To achieve a cleaner sine wave, one could implement an amplitude-limiting circuit, such as a diode-based limiter or an Automatic Gain Control (AGC) system.

For the purposes of this simulation, an ideal op-amp is used, which saturates 1-2 V below the supply rails.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Importance of Technical SEO for Website Performance

A website may have great content and an attractive design, but if search engines cannot crawl, understand, and index it properly, it may struggle to reach its target audience.

  • Technical SEO optimizes website structure for search engines and users
  • Improves loading speed, mobile-friendliness, crawlability, HTTPS, and structured data
  • Regular audits identify and fix issues for optimal performance and security

More from Wednesday 4 November →