An op amp oscillator uses positive feedback to generate continuous AC waveforms—sine, square, or triangle—without requiring an external AC input signal. If you need a reliable, low-distortion sine wave for audio or general bench testing, the TL072 is your safest default part. If you are building a low-frequency square or triangle wave on a single battery supply, the LM358 is the industry workhorse. This guide skips the abstract physics and takes you straight to the bench: how to wire it, how to bias it, and how to figure out why your sine wave looks like a mangled square wave.
The Anatomy of an Op Amp Oscillator
Before wiring feedback networks, you need to understand the physical and symbolic anatomy of the operational amplifier. On a schematic, the op amp is drawn as a triangle pointing to the right. The non-inverting input (+) is on top, and the inverting input (-) is on the bottom. The output emerges from the right point of the triangle. Power rails (V+ and V-) are typically drawn entering the top and bottom of the triangle, though they are often omitted in simplified schematics to reduce clutter.
For a standard 8-pin DIP dual op amp package (like the TL072 or NE5532), the physical pinout is strictly standardized:
- Pin 1: Output A
- Pin 2: Inverting Input A (-)
- Pin 3: Non-Inverting Input A (+)
- Pin 4: V- (Negative Supply Rail or Ground)
- Pin 5: Non-Inverting Input B (+)
- Pin 6: Inverting Input B (-)
- Pin 7: Output B
- Pin 8: V+ (Positive Supply Rail)
Selecting and Biasing: Safe Defaults and Operating Regions
Choosing the right op amp for an oscillator depends entirely on your target frequency, waveform shape, and power supply. The most common beginner mistake is selecting an op amp based solely on its ability to amplify DC, ignoring its AC limitations like slew rate and gain-bandwidth product (GBW).
| Part Number | Slew Rate | GBW | Supply Range | Approx. Cost | Best Application |
|---|---|---|---|---|---|
| TL072 | 13 V/µs | 3 MHz | ±5V to ±18V | $0.80 | Audio sine waves, Wien bridge |
| NE5532 | 9 V/µs | 10 MHz | ±3V to ±22V | $1.20 | Low-noise audio, precision sine |
| LM358 | 0.3 V/µs | 1 MHz | 3V to 32V (Single) | $0.30 | Low-freq square/triangle, battery |
| MCP6001 | 0.6 V/µs | 1 MHz | 1.8V to 5.5V | $0.50 | Low-power microcontroller clocks |
How you bias the op amp dictates whether it can swing above and below zero volts. In a dual-supply configuration (e.g., ±12V), the non-inverting input is biased directly to ground (0V), allowing the output to swing symmetrically positive and negative. In a single-supply configuration (e.g., +9V and Ground), you must create a 'virtual ground' at half the supply voltage (4.5V) using a resistive voltage divider, and bias the non-inverting input to this midpoint. If you fail to bias a single-supply op amp to mid-rail, the bottom half of your AC waveform will be hard-clipped at 0V.
Op Amp Operating Regions
An oscillator intentionally drives the op amp in and out of its linear region, or keeps it strictly within it depending on the topology. Understanding these regions is critical for debugging.
| Region | Condition (V+ vs V-) | Output State | Typical Output Voltage (±12V Supply) |
|---|---|---|---|
| Linear (Active) | V+ ≈ V- (Virtual Short) | Proportional to input difference | -10.5V to +10.5V (Continuous) |
| Positive Saturation | V+ > V- by >1mV | Railed High | +10.5V (approx. V+ minus 1.5V drop) |
| Negative Saturation | V- > V+ by >1mV | Railed Low | -10.5V (approx. V- plus 1.5V drop) |
Complete Application Circuit: 1 kHz Wien Bridge Sine Wave
The Wien bridge is the gold standard for generating low-distortion sine waves. It uses a series-parallel RC network in the positive feedback path to select the frequency, and a resistive divider in the negative feedback path to set the gain. For sustained oscillation, the closed-loop gain must be exactly 3. If it is less than 3, the wave dies out; if it is greater than 3, the wave clips into a square wave.
Component Values and Math
To target a frequency of roughly 1 kHz, we use the formula f = 1 / (2πRC). Selecting R = 10kΩ and C = 15nF yields a theoretical frequency of 1,061 Hz. For the gain network, we need Rf / Rg = 2. We will use a 10kΩ fixed resistor for Rg, and a combination of a 15kΩ fixed resistor and a 10kΩ trimmer potentiometer for Rf. This allows you to dial the gain precisely to the edge of oscillation.
- Power Setup: Connect a dual bench power supply to the TL072. Set it to ±12V. Connect Pin 8 to +12V and Pin 4 to -12V. Place 100nF caps from each rail to ground.
- Frequency Network: Connect a 10kΩ resistor (R1) and 15nF capacitor (C1) in series from the Output (Pin 1) to the Non-Inverting Input (Pin 3). Connect a second 10kΩ resistor (R2) and 15nF capacitor (C2) in parallel from Pin 3 to Ground.
- Gain Network: Connect a 10kΩ resistor (Rg) from the Inverting Input (Pin 2) to Ground. Connect the 15kΩ fixed resistor in series with the 10kΩ trimmer pot from Pin 2 to the Output (Pin 1). This forms Rf.
- Amplitude Stabilization: To prevent clipping as the op amp warms up, wire a small 100Ω incandescent lamp in series with Rg, or use a 10kΩ NTC thermistor in place of the upper half of Rf. (For quick bench testing, carefully adjusting the trimmer pot by hand works fine).
- Verify: Connect an oscilloscope to Pin 1. Power on and slowly turn the trimmer pot until a clean, unclipped sine wave appears. Measure the peak-to-peak voltage and frequency.
Bench War Story: The Clipped Sine Wave Disaster
Theory is clean; the bench is messy. A few years ago, I was tasked with building a 50 kHz triangle wave generator to test the bandwidth of some audio filters. I grabbed an LM358 off the shelf because I had a tube of them, wired up a standard integrator-Schmitt trigger oscillator on a single 9V supply, and scoped the output.
The Setup: Target frequency was 50 kHz. Target amplitude was 6V peak-to-peak (3V peak). The LM358 was powered by 9V, biased to 4.5V.
The Numbers: The required slew rate for a sine wave is calculated as 2π × f × V_peak. While a triangle wave requires a constant dV/dt, the peak slew rate requirement for a 6Vpp, 50 kHz signal is roughly 0.94 V/µs. The LM358 datasheet specifies a maximum slew rate of just 0.3 V/µs.
The Outcome: Instead of a crisp triangle wave, the oscilloscope displayed a trapezoid that looked suspiciously like a rounded square wave. The rising and falling edges were sloping lazily, completely ruining the harmonic profile I needed for the filter test.
What Went Wrong: I had ignored the slew rate limit. The op amp's internal compensation capacitor could only charge at 0.3 V/µs. It physically could not change its output voltage fast enough to keep up with the 50 kHz demand. I swapped the LM358 for a TL072 (13 V/µs), and the trapezoid instantly snapped into a razor-sharp triangle wave. Always check the slew rate column in the spec sheet before committing to a part number for anything above 10 kHz.
Troubleshooting: How Op Amps Fail and How to Test Them
Op amps rarely just 'die' without a reason. They usually fail due to output short circuits, exceeding absolute maximum supply voltages, or static discharge frying the input stage. If your oscillator is dead, erratic, or stuck at a DC rail, follow this diagnostic path with your multimeter.
Step-by-Step Multimeter Testing
1. The Power Rail Check (Voltage Mode)
With the circuit powered, set your DMM to DC Volts. Measure directly at the chip pins (Pin 8 and Pin 4), not at the power supply terminals. You are looking for a solid ±12V (or your target voltage). If Pin 8 reads 2V instead of 12V, you have a broken trace, a cold solder joint, or a shorted bypass capacitor dragging the rail down.
2. The Input Protection Diode Check (Diode Mode)
Power down the circuit completely. Set your DMM to Diode Test mode. Measure from the Inverting and Non-Inverting inputs to the V+ and V- rails. Internal ESD protection diodes should show a forward voltage drop of roughly 0.6V to 0.8V in one direction, and 'OL' (Open Loop) in the reverse. If you read 0.0V (a dead short) or a very low resistance in both directions, the input stage is blown. The chip is trash.
3. The Output Stage Check (Resistance Mode)
Still powered down, set the DMM to Resistance (Ohms). Measure from the Output pin to Ground, and from the Output pin to V+. You should read a high resistance (typically >10kΩ). If the output reads near 0Ω to either rail, the internal output transistors have shorted out—usually the result of driving a heavy capacitive load or accidentally shorting the output to ground while powered.
Building an op amp oscillator is one of the most rewarding bench exercises because it forces you to reconcile ideal math with physical silicon limitations. Start with the TL072 for your sine waves, respect the slew rate limits for high-frequency signals, and always verify your power rails directly at the chip pins before blaming the feedback network.






