Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

For a better sine wave

Status
Not open for further replies.
The phase shift oscillator has three RC networks that should be changed to vary the frequency, but the circuit shown changes only two of the three frequency-setting resistors. If all three resistors are on a 3-gang pot and an automatic level control circuit is added then it can make a much wider frequency variation. But a Wien bridge oscillator is simpler and uses a 2-gang pot.
 
BobW,
Maybe you do not understand that your oscillator uses highpass RC filters that pass distortion.
I'm well aware of how a phase shift oscillator works. I've been designing and using them for decades. The circuit I posted follows the standard design. Using a series of 3 RC low pass networks, as you suggested, to get the required phase shift does not work reliably, which is why you'll never see them designed that way.

BTW, since people love to criticize circuits that they've never built, Here's the actual output of the phase shift oscillator circuit that I posted earlier. So, please let me know what part of this sine wave that you don't like.

PhaseShiftOscWaveform.JPG
 
Last edited:
The phase shift oscillator has three RC networks that should be changed to vary the frequency, but the circuit shown changes only two of the three frequency-setting resistors.
Not only frequency setting, it is well-known that there is a 90 deg phase shift between the current and voltage in the capacitor (when supplied by a sinusoidal signal) and it varies from 0 to 90 degrees in the RC integrating circuit when the frequency changes from zero to infinity.
If all three resistors are on a 3-gang pot and an automatic level control circuit is added then it can make a much wider frequency variation. But a Wien bridge oscillator is simpler and uses a 2-gang pot
Give me a link of 2-gang pot.
.
 
I'm well aware of how a phase shift oscillator works. I've been designing and using them for decades. The circuit I posted follows the standard design. Using a series of 3 RC low pass networks, as you suggested, to get the required phase shift does not work reliably, which is why you'll never see them designed that way.
Can you review your design at the initial stage ?
I have been forgot since I studied 12 years back. Explain why you have use the diode with this fashion.

BTW, since people love to criticize circuits that they've never built, Here's the actual output of the phase shift oscillator circuit that I posted earlier. So, please let me know what part of this sine wave that you don't like.

Me too I am interested to know.
 
I'm well aware of how a phase shift oscillator works. I've been designing and using them for decades. The circuit I posted follows the standard design. Using a series of 3 RC low pass networks, as you suggested, to get the required phase shift does not work reliably, which is why you'll never see them designed that way.

BTW, since people love to criticize circuits that they've never built, Here's the actual output of the phase shift oscillator circuit that I posted earlier. So, please let me know what part of this sine wave that you don't like.

View attachment 109898
I dislike the extremely simple single resistor biasing the transistor so one with high hFE is saturated and one with low hFE is cutoff. It also happens as the battery runs down.
Sure, your sinewave looks excellent. But at a frequency not shown and a level also not shown. Change either and it stops oscillating or the diodes show their clipping action.
Lowpass filters work in a phase-shift oscillator made with an opamp because its input impedance is much higher than a transistor, its distortion is much less than a transistor and its voltage gain is much higher.
 
Give me a link of 2-gang pot.
Stereo volume controls are logarithmic but I can't remember if you want a dual log pot in a Wien bridge oscillator. As I said earlier my Wien Bridge oscillator uses a dual variable capacitor from an AM radio that even has trimmer capacitors built into it for excellent frequency and matching calibrations.
 
I don't normally like to generate a wall o' text and scare people away, but since the questions were asked...

As with any oscillator it's necessary to get 360° phase shift around the feedback loop. In the classic phase shift oscillator the three phase shift networks provide a total phase shift of 180° at a frequency determined by the RC time constants. The gain stage provides an additional 180° phase inversion plus sufficient loop gain to give oscillation at that frequency. In theory, two RC networks are able to give almost 180° phase shift. In practice, 3 networks are always used to ensure operation. Because the 3rd RC network need provide only a small amount of phase shift, it's perfectly acceptable to have it as a fixed network, and adjust only the other two. So, a dual gang potentiometer is fine. This will still give a good range of adjustment. In my particular application, I only needed to go from about 250 to 1000 Hz, but a wider range of adjustment should be possible. I think a 10:1 frequency ratio should be achievable. And of course, the minimum and maximum frequencies of the oscillator can be changed by using different component values.
Explain why you have use the diode with this fashion.
The back to back diodes look very much like a clipper, which would be counterproductive in a sine wave oscillator. It's better to think of them as non linear resistors combined with the series capacitor to give a non linear RC network. What they do is provide increasingly aggressive attenuation to harmonics while leaving the fundamental alone. Thus, they eliminate distortion, rather than add to it. The series capacitor needs to be sized to suit the frequency range of the oscillator for this to work correctly.

I dislike the extremely simple single resistor biasing the transistor so one with high hFE is saturated and one with low hFE is cutoff. It also happens as the battery runs down.
Sure, your sinewave looks excellent. But at a frequency not shown and a level also not shown. Change either and it stops oscillating or the diodes show their clipping action.
Lowpass filters work in a phase-shift oscillator made with an opamp because its input impedance is much higher than a transistor, its distortion is much less than a transistor and its voltage gain is much higher.

To address Audioguru's comments:
I agree that the single resistor biasing goes against traditional 'good' design practice. The reason why I did this was twofold:
1. I needed to operate this from a single 5 volt supply and still get a reasonable output amplitude. Using a more conventional phase splitter type bias arrangement would give more stable bias, but would limit the output amplitude. (Since the supply voltage in the current application is higher, there's no reason why the bias arrangement couldn't be changed.)
2. Modern components have a much smaller variance of parameters than they did years ago when these biasing arrangements were first analyzed. So, we don't see as much variation in HFE as we did back in our youth. Thus, the single resistor between collector and base is nowhere near as bad as we were taught to believe. With the transistor that is specified, there's little risk of problems. On the other hand if you use an unmarked general purpose transistor from Uncle Fred's House o' Parts, then there are no guarantees.

As for the use of lag filters rather than lead filters, I've never seen it done anywhere in the literature. I have tried it in my own experiments, and it's never worked. One of the problems is that this arrangement is stable at DC, and so there is no need for the circuit to oscillate. If you are aware of a phase shift oscillator that uses lag networks, I am truly interested in seeing it.

Frequency range for this specific example is as I indicated in the previous post: 250-1000 Hz. Amplitude is fairly constant across that range at about 3.5 Vp-p with a 5 volt supply. Across that range, the waveform is very clean, and looks the same as the one I posted.

Regarding the back to back diode thing, see my comments above.

I just want to say that I don't randomly post dubious circuits I've found on the 'net. However, if I happen to have a simple circuit that I know performs very well, such as this one, then I will post it. If you want to replace the single transistor with an op amp, then go right ahead. I don't have a problem with it. It should perform well either way.

The primary reason why I do post very simple one transistor circuits such as this one is that I believe the purpose of this forum should be to educate. And, transistors are the fundamental building blocks of electronic circuits. While op amps certainly have their uses, they are like the electronic version of french fries. Anyone can take frozen french fries out of the freezer and throw them in the oven, and maybe try to convince themselves they are a chef, but if you handed the same person a potato and a potato peeler they would likely starve to death. The transistor is the unpeeled potato of electronics. You can do amazing things with them that are not greasy at all.

Also, I should point out that the OP has never explicitly stated the required frequency range for his application. This is important to know. If we're talking GHz, then everything that's gone before is all for naught.
 
Last edited:
In theory, two RC networks are able to give almost 180° phase shift. In practice, 3 networks are always used to ensure operation. Because the 3rd RC network need provide only a small amount of phase shift, it's perfectly acceptable to have it as a fixed network, and adjust only the other two. So, a dual gang potentiometer is fine. This will still give a good range of adjustment. In my particular application, I only needed to go from about 250 to 1000 Hz, but a wider range of adjustment should be possible. I think a 10:1 frequency ratio should be achievable.
Then the losses change requiring more amplification causing higher distortion at some frequencies.

The back to back diodes look very much like a clipper, which would be counterproductive in a sine wave oscillator.
Of course the diodes clip the signal, if they barely affect the fundamental frequency then they also barely cut the dominant third harmonic. Your single capacitor and diodes work only for a narrow range of frequencies. your sinewave looks good probably because the gain was low so it barely works.

Modern components have a much smaller variance of parameters than they did years ago when these biasing arrangements were first analyzed. So, we don't see as much variation in HFE as we did back in our youth. Thus, the single resistor between collector and base is nowhere near as bad as we were taught to believe. With the transistor that is specified, there's little risk of problems. On the other hand if you use an unmarked general purpose transistor from Uncle Fred's House o' Parts, then there are no guarantees.
I use genuine 2N3904 transistors that have a 3 to 1 range of gain, like most transistors. They need a voltage divider to bias the base plus maybe an emitter resistor.

As for the use of lag filters rather than lead filters, I've never seen it done anywhere in the literature. I have tried it in my own experiments, and it's never worked.
Texas Instruments shows it in their literature. They also reduce distortion by taking the output after the third lowpass filter.

I should point out that the OP has never explicitly stated the required frequency range for his application.
In another thread he is making a hearing aid so audio frequencies from 20Hz to 20kHz.
 

Attachments

  • TI phase-shift oscillator.png
    TI phase-shift oscillator.png
    21.2 KB · Views: 208
2N3904's are el cheapo broad spec transistors regardless of who made them. My circuit called for a 2N5089, which is a higher gain tighter spec transistor.

Your comment about diode clipping leads me to believe that you are one of those people who think that a diode behaves like some kind of switch that doesn't conduct at all until a certain voltage is reached, and then suddenly becomes a short circuit. They actually start conducting at zero volts, and follow an exponential VI curve. By combining this characteristic with frequency sensitive components (such as the capacitor in this case) it's possible to design a very well performing nonlinear harmonic filter. Yes, you do have to switch in different capacitors if you want the circuit to operate over a very large frequency range, but the single value works fine for the frequency range of the circuit I posted.

Texas Instruments shows it in their literature. They also reduce distortion by taking the output after the third lowpass filter.
Ah yes. But they need the ridiculously high gain of an op amp to make it work. It wouldn't be possible with a single transistor circuit.

I think I've provided far more explanation than I anticipated when I first posted the circuit. So, I'll excuse myself from the conversation at this point. I'm sure you'll want to have the last word anyway.
 
I know the 2N5089 because I got some and used some. They have the same 3 to 1 hFE range as a 2N3904 but at lower currents. Its high typical hFE peak of 600 has dropped 1/3rd at a collector current of only 30mA.

Thank you for posting and discussing your circuit which unfortunately has a narrow frequency range of only 4 when this function requires a frequency range of 1000.
 
Well! nice, fabulous, mind-blowing knowledge sharing is going on!
You have nicely present things here.
Let me draw some points I need to clear.


The back to back diodes look very much like a clipper, which would be counterproductive in a sine wave oscillator. It's better to think of them as non linear resistors combined with the series capacitor to give a non linear RC network. What they do is provide increasingly aggressive attenuation to harmonics while leaving the fundamental alone. Thus, they eliminate distortion, rather than add to it. The series capacitor needs to be sized to suit the frequency range of the oscillator for this to work correctly.

Do you suggest to add this "clipper" other oscillator circuit than yours?

Frequency range for this specific example is as I indicated in the previous post: 250-1000 Hz. Amplitude is fairly constant across that range at about 3.5 Vp-p with a 5 volt supply. Across that range, the waveform is very clean, and looks the same as the one I posted.

With the same design, dont you believe the frequency cant be raise further? According to datasheet of 2N3904, Current−Gain − Bandwidth Product (IC = 10 mAdc, VCE = 20 Vdc, f = 100 MHz) is 300Mhz.

Then the losses change requiring more amplification causing higher distortion at some frequencies.
I also believe that distortion is MUST here. The reasonable answer is what you have said about the impedance matching fact that " Lowpass filters work in a phase-shift oscillator made with an opamp because its input impedance is much higher than a transistor, its distortion is much less than a transistor and its voltage gain is much higher."

I know the 2N5089 because I got some and used some. They have the same 3 to 1 hFE range as a 2N3904 but at lower currents. Its high typical hFE peak of 600 has dropped 1/3rd at a collector current of only 30mA.

Thank you for posting and discussing your circuit which unfortunately has a narrow frequency range of only 4 when this function requires a frequency range of 1000.

Above your comment, neigher 2N5089 or 2N3904 cant be use for higher frequencies?


In another thread he is making a hearing aid so audio frequencies from 20Hz to 20kHz.
Do you suggest me to use TI opamp you posted ?
 
Do you suggest to add this "clipper" other oscillator circuit than yours?
It is very simple causing a low distortion frequency range of only 4 to 1: 10Hz to 40Hz. 250Hz to 1kHz. 25kHz to 100kHz. Or a higher narrow range of frequencies. A more complex automatic gain control circuit using a Jfet can have low distortion over a wide range of frequencies like 10Hz to 100kHz in my Wien Bridge oscillator.

With the same design, dont you believe the frequency cant be raise further? According to datasheet of 2N3904, Current−Gain − Bandwidth Product (IC = 10 mAdc, VCE = 20 Vdc, f = 100 MHz) is 300Mhz.
Its simple capacitor limits its low distortion frequency range to 4 to 1. A 2N3904 can have fairly low distortion in the narrow frequency range of 15MHz to 60MHz.

I also believe that distortion is MUST here. The reasonable answer is what you have said about the impedance matching fact that " Lowpass filters work in a phase-shift oscillator made with an opamp because its input impedance is much higher than a transistor, its distortion is much less than a transistor and its voltage gain is much higher."
You do not want distortion in a sinewave oscillator.

Above your comment, neigher 2N5089 or 2N3904 cant be use for higher frequencies?
The 2N5089 can produce fairly low distortion from 2.5MHz to 10MHz using the simple diodes and capacitor clipper.

Do you suggest me to use TI opamp you posted ?
It is an excellent audio opamp. The rail-to-rail opamp you are planning to use might work fine.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top