Help
  • FAQ
    browse most common questions
  • Live Chat
    talk with our online service
  • Email
    contact your dedicated sales:
0

Simple Programmable Wien Oscillator Design

Author : AIVON | PCB Manufacturing & Supply Chain Specialists March 06, 2026

 

Overview

Digital potentiometers (digiPOTs) are versatile and widely used, for example to filter or generate AC signals. Some applications require adjustable frequency. In such designs, a programmable solution that allows frequency adjustment through an appropriate interface is useful for development. This article describes a simple programmable oscillator design in which oscillation frequency and amplitude can be tuned independently using digiPOTs.

 

Circuit description

Figure 1 shows a typical diode-stabilized Wien bridge oscillator capable of producing accurate sinewave output at VOUTPUT from about 10 kHz to 200 kHz. The Wien bridge has two legs: one is a bandpass filter and the other is a voltage divider. In this example an ADA4610-1 rail-to-rail precision amplifier is used, and an AD5142 digiPOT provides two independently controllable potentiometers, each with 256-step resolution. Resistance values are set by SPI programming, as shown in Figure 2. Alternatively, the I2C-controlled AD5142A can be used. Both are available as 10 kΩ or 100 kΩ potentiometers.

Amplitude-stabilized programmable Wien bridge oscillator with resistances implemented by digiPOTs.

Figure 1. Amplitude-stabilized programmable Wien bridge oscillator with resistances implemented by digiPOTs.

Functional block diagram of the AD5142.

Figure 2. Functional block diagram of the AD5142.

 

Operation and tuning

In the classic oscillator circuit shown in Figure 1, the paths through R1A, R1B, C1 and C2 form the positive feedback, while R2A, R2B and the two parallel diodes D1 and D2 or their equivalent resistance R_DIODE form the negative feedback. In this configuration, equation 1 applies:

f471122e-b289-11ee-8b88-92fbcf53809c.png

To sustain stable oscillation, the phase shift in the loop gain must be eliminated. Expressed as an equation, the oscillation frequency is:

f47c3e24-b289-11ee-8b88-92fbcf53809c.png

Where R denotes the programmable resistance on the AD5142:

f48fc67e-b289-11ee-8b88-92fbcf53809c.png

D represents the decimal equivalent of the programmable digital code in the AD5142, and RAB represents the total resistance of the potentiometer.

To maintain oscillation, the Wien bridge should be relatively balanced; that is, the positive feedback gain and negative feedback gain must be coordinated. If positive feedback (gain) is too large, the amplitude at VOUTPUT will increase until the amplifier saturates. If negative feedback dominates, the amplitude will decay.

In the circuit shown, the gain R2/R1 should be set to about 2 or slightly higher to ensure the signal starts to oscillate. The alternating conduction of the diodes in the negative feedback loop causes the gain to be temporarily less than 2, allowing the oscillation to stabilize.

Once the desired frequency is set, the oscillation amplitude can be tuned via R2 without affecting frequency. The amplitude is given by:

f4a2c634-b289-11ee-8b88-92fbcf53809c.png

In this expression, ID and VD represent the diode forward current through D1 and D2 and the diode forward voltage, respectively. If R2B is shorted, the oscillation amplitude will be approximately ±0.6 V. When R2B has the correct magnitude, the loop reaches balance and VOUTPUT converges. In the Figure 1 circuit, R2B is implemented as a separate 100 kΩ digiPOT.

 

Conclusion

Using the described circuit and a 10 kΩ dual digiPOT, oscillation frequencies of 8.8 kHz, 17.6 kHz and 102 kHz can be tuned by setting resistances to 8 kΩ, 4 kΩ and 670 Ω, respectively, with frequency error as low as ±3%. Increasing the output frequency can increase frequency error; for example, at 200 kHz the error rises to about 6%.

When using this circuit in frequency-sensitive applications, take care not to exceed the digiPOT bandwidth limit, which depends on the programmed resistance. The frequency tuning shown in Figure 1 requires R1A and R1B to have equal resistance values. Because the two channels can only be programmed sequentially, this creates an instantaneous critical intermediate state, which may be unacceptable for some applications. In those cases, use a digiPOT that supports daisy-chain mode (for example AD5204) to allow simultaneous resistance changes.

AIVON | PCB Manufacturing & Supply Chain Specialists AIVON | PCB Manufacturing & Supply Chain Specialists

The AIVON Engineering and Operations Team consists of experienced engineers and specialists in PCB manufacturing and supply chain management. They review content related to PCB ordering processes, cost control, lead time planning, and production workflows. Based on real project experience, the team provides practical insights to help customers optimize manufacturing decisions and navigate the full PCB production lifecycle efficiently.

Related Tags


2026 AIVON.COM All Rights Reserved
Intellectual Property Rights | Terms of Service | Privacy Policy | Refund Policy