Wien Bridge oscillator with optocoupler stabilizer?

Thread Starter

patricktoday

Joined Feb 12, 2013
157
I am working on an adjustable oscillator project.

Here are the desired specs:

100Hz - 20kHz adjustment
Single supply - 12 volts
No cap switching
Low distortion
Stable amplitude

And before you say, "well go buy one off EBay for $50," that's not the point! :)

I have achieved workable results with a 12V, 25mA lamp from Radio Shack, see attachment 1. I was able to get the full range desired, but the amplitude is not terribly consistent and there are a few spots in the adjustment range where it may stop oscillating based on very minor adjustments.

Then, I had heard tell that a resistive optocoupler could be used for the AGC in place of the lamp and have experimented with that. My optocouplers are Silonex NSL-32H-101 and I have a bunch of them. I put together what I believe to be the very simplest implementation of this concept... the oscillator feeds out into a "moving average" peak detector which drives a transistor which is calibrated to change the optocoupler's resistance from, say, 4k to 40k (related to a 4.7k inverting input-to-ground resistor) -- extreme values that would surely keep the circuit oscillating and within a pretty tight amplitude range, at least that was the idea. The second attachment is my attempt at this.

The waveform appears very undistorted to the eye. I can get an adjustment of about 200-20k, sometimes down to 100 if the weather's right and I would say the gain is pretty darned consistent within the 2k-20k range. There's some jitter. I have to adjust the amplitude down _really_ small to get to 20k…

About the largest amplitude I've achieved is 0.8V peak to peak at 20kHz. Anything above that (I get there by adjusting the 1Meg pot) and the waveform distorts dramatically. At about 1.5V it gets into a modulation fit and starts oscillating off and on at a lower frequency (see attachment 4. Here I lowered the time period to 1ms/DIV to show this.) At about 2V it oscillates normally but the waveform is badly spiked at the bottom (see attachment 5).

I can adjust the gain within a wide range cleanly at lower frequencies.

Any input/advice/insight would be appreciated. I’m just kind of confused why it’s being so erratic at 20k.
 

Attachments

Thread Starter

patricktoday

Joined Feb 12, 2013
157
OK, I was able to figure this out. It looks like the distortion was simply caused by excessive gain in the feedback path. Apparently, the optocoupler/feedback resistor was generating too high a resistance value. I brought down the value of the inverting-input-to-ground resistor from 4.7k to 1k, readjusted the 1 Meg pot and, voila, success! Whatever value you set for this resistor, the optocoupler's resistor must become _roughly_ twice that value to oscillate properly so it changes the range of operation. I would theorize the I to R curves are going to be a little different at different points along the way (and also for different optocouplers).

This is generating 2V p-p at 20k (my target value) and falls as low as 1.5V somewhere around 400 Hz. The range is 100Hz-20kHz. It seems much more stable than the lamp-based circuit and it has no visible distortion within this range (to me :))

I'll post the finished circuit. If anyone has any suggestions or comments, they would be definitely still be appreciated.

 

Attachments

Top