RC Phase Shift Oscillator not Oscillating

In summary, the oscillator does oscillate at 20 Hz, but it requires many changes to get it to work properly.
  • #1
Cup of Joe
35
6
TL;DR Summary
Built an RC phase shift oscillator, but it is not oscillating.
Hello everyone.

I am having some trouble with an RC phase shift oscillator that I built as a hobby project. I am completely stuck on this and I just cannot figure it out. My oscillator is not oscillating.

Here is the circuit that I am trying to get to work. Taken from https://www.electrical4u.com/rc-phase-shift-oscillator:
1626176305158.png


And here is a circuit diagram of my circuit:

1626176386619.png

Where ground is -5V and Vcc is +5V. I do not have a ground rail on my breadboard.

And here is the real circuit:
1626176644088.png

1626176675896.png

Where there is a power supply module on the right side of the first image.

Desired frequency
And the frequency that I want is 20 Hz so that I can see an LED flashing:

R = 110 (because the resistors are in parallel)
C = 30 x 10^-6 (because the caps are in parallel)
N = 3
1626177502933.png

which is about equal to 20 Hz.

Transistor gain
The drop for this circuit is 29, and you need at least a gain of 29 in order for the oscillator to work. My BJT has a minimum gain of 35, so my transistor gain should be good.

What I have tried
- I have quadruple checked that the connections are correct
- I have tried to measure the frequency of the signal at the output, but it gave me 0 Hz
- I have tried to measure the AC voltage of the output and it gives me about 0.7 - 0.8 V (this is a contradictory result to the frequency measurement)
- I have tried to put an LED at the output to see if it flashes, but it doesn't (and I have checked every time after turning on the circuit to make sure that the LED is not burned out)

Please note: this is my very first time building any kind of oscillator.

I have looked at other posts and I saw that some other RC oscillators do not have enough voltage to sustain the oscillations. I am not sure if my circuit has the same issue.

I didn't really know what values the compoents should have as I have not seen any good examples online. Maybe you could provide some examples?

Thank you.
 
Engineering news on Phys.org
  • #2
Try another transistor, with more gain if possible.
 
  • #3
Delta2 said:
Try another transistor, with more gain if possible.
The usual problem with RC oscillators in not enough gain. I notice you have a low value of collector load. Remember this is in parallel with the phase shift network - have you allowed for this? I would be inclined to try a higher value of collector load, such as 1k, and possibly a different transistor.
 
  • #4
1626196818026.png


The transistor biasing looks wrong to me at first glance. Your objective should be to get the quiescent Vc collector voltage to be about half-way between the rails (so near 0V in your case). You set that operating point with the base voltage generating an emitter current through the emitter degeneration resistor Re (ignore the emitter capacitor Ce for the DC bias point). Right now it looks like the voltage across Re will be a bit over 4V, so 400mA of current for Ic and Ie? That will try to give you a 40V drop across Rc, which cannot happen of course.

Instead, bias the base of the transistor closer to the lower rail, so you drop about a volt across Re and Vc ends up around 0V with whatever Rc values is needed at that bias current. I also think your Ce value will need to be larger if you want good gain at only 20Hz...
 
  • Like
Likes DaveE
  • #5
Cup of Joe said:
Summary:: Built an RC phase shift oscillator, but it is not oscillating.

Desired frequency
And the frequency that I want is 20 Hz so that I can see an LED flashing:
BTW, do you want such a low frequency because you don't have an oscilloscope to watch the output signal? Do you have a DMM that has any frequency measurement capability? If not, check the specs to see how fast the AC voltage measurement circuit is. If it can measure a 1kHz AC waveform, it would help you probably to move the oscillation frequency up a bit.

You can also look at getting an inexpensive USB oscilloscope for simple circuit work like this.
 
  • #6
I suspect the RC timing components are too low an impedance compared to the amplifier circuit.

I would change the three 10 uF timing capacitors to 0.1 uF, and change the three 330R timing resistors and R1 to 33k.
 
  • Like
Likes DaveE
  • #7
I don't think this is a good circuit to drive an LED.
It does oscillate at about 20 Hz, but not without many changes.

Schematic.png


Plot.png
 
  • Like
Likes Delta2 and berkeman
  • #8
berkeman said:
BTW, do you want such a low frequency because you don't have an oscilloscope to watch the output signal? Do you have a DMM that has any frequency measurement capability? If not, check the specs to see how fast the AC voltage measurement circuit is. If it can measure a 1kHz AC waveform, it would help you probably to move the oscillation frequency up a bit.

You can also look at getting an inexpensive USB oscilloscope for simple circuit work like this.
Yes, I don't have an oscilloscope. I only have a DMM that can measure frequency, up to 10 MHz or something like that. I guess I could get a USB oscilloscope to see the signal better.
 
  • #9
Baluncore said:
I suspect the RC timing components are too low an impedance compared to the amplifier circuit.

I would change the three 10 uF timing capacitors to 0.1 uF, and change the three 330R timing resistors and R1 to 33k.
Why are the RC timing components are too low an impedance? Shouldn't you have the freedom to choose what frequency (pardon my naivety) you want? If not, then what are the limitations of this?
 
  • #10
I'll assume that you want to learn about linear transistor based oscillators, since that's the circuit you chose. so you can ignore my comments about other ways, below. I don't have much to add to the other comments, which I think are all good advice. These circuits can be a pain in the you-know-what.

The way this is really done is with digital circuits. Something like a PIC uP is great for this. If you don't want any software, then I really like the ICM7242 IC which is cheap and ancient. It's a CMOS timer based on the 555 with a counter added to get low frequencies. It costs about $1-$2 and you will have many fewer parts. It's also a lot easier to build, understand, and count on (sorry for the pun).

Basically, you only want a linear oscillator when you have to have a pure sinewave output, which isn't useful for flashing a light.
 
  • #11
DaveE said:
I'll assume that you want to learn about linear transistor based oscillators, since that's the circuit you chose. so you can ignore my comments about other ways, below. I don't have much to add to the other comments, which I think are all good advice. These circuits can be a pain in the you-know-what.

The way this is really done is with digital circuits. Something like a PIC uP is great for this. If you don't want any software, then I really like the ICM7242 IC which is cheap and ancient. It's a CMOS timer based on the 555 with a counter added to get low frequencies. It costs about $1-$2 and you will have many fewer parts. It's also a lot easier to build, understand, and count on (sorry for the pun).

Basically, you only want a linear oscillator when you have to have a pure sinewave output, which isn't useful for flashing a light.
Thank you for your comment. Yes, this type of circuit interests me as a hobbyist and I would like to get one working. Also, I did not build this to purely flash an LED, I built it (at 20 Hz) so that I can see if it works at all with an LED (so I can see it blinking) before I go to higher frequencies and do some other stuff.
 
  • Like
Likes DaveE
  • #12
tech99 said:
The usual problem with RC oscillators in not enough gain. I notice you have a low value of collector load. Remember this is in parallel with the phase shift network - have you allowed for this? I would be inclined to try a higher value of collector load, such as 1k, and possibly a different transistor.
The 1K resistor did not work as the collector load. I got 0.018 V AC and 0 Hz with my frequency mode on my DMM. I will try out other solutions first before changing my transistor.
 
  • #13
Cup of Joe said:
The 1K resistor did not work as the collector load. I got 0.018 V AC and 0 Hz with my frequency mode on my DMM. I will try out other solutions first before changing my transistor.
Have you tried changing to the circuit that @Baluncore simulated yet? That would be your best bet right not to get it working, IMO. :smile:
 
  • #14
Cup of Joe said:
Why are the RC timing components are too low an impedance? Shouldn't you have the freedom to choose what frequency (pardon my naivety) you want? If not, then what are the limitations of this?
Yes. But the collector output must be able to drive the three high-pass filter stages.

It is good to avoid electrolytic capacitors because their life is limited and small capacitors are cheaper. Bigger resistors and smaller capacitors have less signal current, so the circuit uses less power, but has the same time constant.
RC = 330R * 10uF = 3.3 msec
3k3 * 1uF = 3.3 msec
33k * 0u1F = 3.3 msec
330k * 10nF = 3.3 msec
Circuits with resistors over 100k because less stable because surface leakage currents due to dirt and moisture begin to affect the circuit timing.
The limitation is that the circuit will not oscillate if the output is overloaded, which lowers the gain.

I needed to make several sequential changes to the circuit until I got the oscillation. For example, the emitter resistor sets the transistor bias current, while the emitter capacitor increases the AC gain. The time constant of R5*C5 must be great compared with the period of the signal. That is why such a long TC needs a massive capacitor.

My aim was get it to oscillate. I could recalculate ideal component values, but I do not know the purpose of the design so can't guess what would be optimum. I do not think you will use this circuit for your oscillator.
 
  • #15
berkeman said:
Have you tried changing to the circuit that @Baluncore simulated yet? That would be your best bet right not to get it working, IMO. :smile:
I don't have those kinds of component values. I would have to buy some. Or I could go with a different frequency altogether with components that I do have.
 
  • Like
Likes berkeman
  • #16
I found out that I am just biasing my transistor incorrectly. I looked at some examples online and saw that I was doing it incorrectly. I will figure out how to bias it properly.
 
  • #17
Baluncore said:
Yes. But the collector output must be able to drive the three high-pass filter stages.

It is good to avoid electrolytic capacitors because their life is limited and small capacitors are cheaper. Bigger resistors and smaller capacitors have less signal current, so the circuit uses less power, but has the same time constant.
RC = 330R * 10uF = 3.3 msec
3k3 * 1uF = 3.3 msec
33k * 0u1F = 3.3 msec
330k * 10nF = 3.3 msec
Circuits with resistors over 100k because less stable because surface leakage currents due to dirt and moisture begin to affect the circuit timing.
The limitation is that the circuit will not oscillate if the output is overloaded, which lowers the gain.

I needed to make several sequential changes to the circuit until I got the oscillation. For example, the emitter resistor sets the transistor bias current, while the emitter capacitor increases the AC gain. The time constant of R5*C5 must be great compared with the period of the signal. That is why such a long TC needs a massive capacitor.

My aim was get it to oscillate. I could recalculate ideal component values, but I do not know the purpose of the design so can't guess what would be optimum. I do not think you will use this circuit for your oscillator.
So if resistors over 100k make the circuit less stable, does that mean that the smaller the resistor is, the more stable it will be? Surely there is a minimum resistor value that allows for maximum oscillator stability. Does this only apply to this RC circuit or to all circuits in general?
 
  • #18
Cup of Joe said:
Surely there is a minimum resistor value that allows for maximum oscillator stability.
But the oscillator must oscillate.
The gain of the transistor rises in proportion to the collector load resistance.
The RC timing circuit is connected to the collector so it lowers the gain.
Use the highest timing resistor values within reason, to get a gain greater than unity.
If the gain of the circuit falls below 1.000000 at the frequency you expect oscillation, the oscillator will not oscillate, it will be very stable, and dead.
 
  • #19
Baluncore said:
But the oscillator must oscillate.
The gain of the transistor rises in proportion to the collector load resistance.
The RC timing circuit is connected to the collector so it lowers the gain.
Use the highest timing resistor values within reason, to get a gain greater than unity.
If the gain of the circuit falls below 1.000000 at the frequency you expect oscillation, the oscillator will not oscillate, it will be very stable, and dead.
It is also a disadvantage using a bipolar transistor that the input resistance of the amplifier is fairly low and shunts the phase shift network output port.
 
  • #20
tech99 said:
It is also a disadvantage using a bipolar transistor that the input resistance of the amplifier is fairly low and shunts the phase shift network output port.
Which is why the early suggestions (and @Baluncore's circuit) suggested higher gain transistors. The input impedance of BJTs (especially at 20Hz) doesn't have to be low. It's just the emitter load times β+1. You get to choose this as well as the impedance of the feedback network. BJTs are fine for this circuit, but it has to be designed correctly.
 
  • #21
I ask myself why not the most direct and logical way was mentioned up to now for finding the required gain for this circuit:
Simulating the loop gain of the circuit and plotting both magnitude and phase responses.
Then, applying Barkhausens oscillation criterion you immediately can see
* at which frequency the loop phase crosses the zero-deg line
* the actual loop gain at this frequency.
If the gain is too low (negative gain margin), the plot shows by which amount the gain has to be increased.
 
  • Like
Likes berkeman
  • #22
@berkeman @Baluncore and anyone else that wants to chime in. I have looked at this video:



and I have followed it. But I have a problem: the collector resistor that I have calculated is too small (8 Ohms) compared to what this thread has told me to use (1 kOhm). I am confused. I have my NPN datasheet attached to this comment that I should have posted in my question in the first place. I think I am just biasing my transistor incorrectly. Are you able to figure out from the datasheet what resistor values I need and why? Thank you.
 

Attachments

  • ELEGOO PN2222 NPN Bipolar Transistors.pdf
    126 KB · Views: 143
  • #23
Okay, I think I know what is going on. I am getting about 0.6 VAC (max ~2.1 VAC) on my DMM for the output. But when I measure the frequency with my DMM, it gives me wild swings from 1 kHz to 100 kHz. After some reading online, I think I am getting some EMI/RF on my probe leads and I need to get rid of it. I do have my phone nearby and I have some Bluetooth in the room. I also have a lamp on my desk that I think just cancels out the frequency measurement. I tested this theory out by bringing my leads of my DMM right next to the light bulb, and I got about 60 Hz, and then a few seconds later, it went down to 0 Hz.

I suspect my RC oscillator is oscillating after the changes you guys suggested because I am getting VAC reading on my DMM that seems reasonable. I guess my DMM is just more sensitive when measuring frequency. I will try to eliminate the EMI/RF from my work area. I will update you accordingly.
 
Last edited:
  • #24
I have got rid of the devices, but the frequency measurement continues to fluctuate in the kHz range. I wonder if there is something wrong with my DMM or if there is another source of EMI/RF that I am not taking into account. I am thinking of buying a PC-based oscilloscope to measure the frequency to see if there is any difference between my DMM frequency measurement and the oscilloscope measurement. It would also help me for future projects as well.
 
  • #25
In my opinion, it is most likely that your DMM is failing or that some other component in the circuit is failing (most likely the transistor), however we can't exclude the possibility that there is some unusual EMI in your workshop area.
 
  • Like
Likes Cup of Joe
  • #26
If you test your DMM with the frequency of AC mains, does it show it correctly?
 
  • #27
Cup of Joe said:
After some reading online, I think I am getting some EMI/RF on my probe leads and I need to get rid of it.
Multimeter leads are usually separate. If you twist the leads together, to minimise the gaps between them, you will reduce the pickup of stray fields.

You should be able to hear your oscillator.
Do you have an audio line input to a speaker or headphones?
 
  • Like
Likes DaveE
  • #28
Cup of Joe said:
I am thinking of buying a PC-based oscilloscope to measure the frequency to see if there is any difference between my DMM frequency measurement and the oscilloscope measurement.
Wrong response. Better response: Finally! An excuse to buy a PC-based oscilloscope.

Seriously, anybody experimenting with oscillators really needs an oscilloscope, and PC-based scopes are cheap.
 
  • Like
Likes jim mcnamara, DaveE and berkeman
  • #29
If it is a matter of interferences I wonder if just screening the circuit with alufoil won't help.
 
  • #30
I will kind of insist my view: I think the transistor he is using is certainly faulty-it certainly doesn't provide the gain it is supposed to, and maybe his DMM has a problem too.
 
  • #31
The only thing is that my DMM is brand new. I bought it quite recently. So I don't see how it could be faulty right off the bat. Although, I could be wrong and the DMM has a defect from the factory. BTW, my DMM is a Proster, model VC99 in case you are wondering.
 
  • Like
Likes Delta2
  • #32
Delta2 said:
If you test your DMM with the frequency of AC mains, does it show it correctly?
Yes, I just tested it, it works. It shows 123 VAC and 60 Hz. So the problem must be my circuit. I will add that extra transistor on the previous page for better gain.
 
  • Like
Likes Delta2
  • #33
Just to be sure, the output of the oscillator has to be connected to ground or -5V in my case, right?
 
  • #34
So I added that extra transistor, but I am getting inconsistent results. One time I got a max AC voltage of 3.3 and then got a max of 1.5 later. The minimum AC voltage is about 0.23. Also, I seem to be having the same issue as before: the frequency measurement on my DMM seems to be fluctuating in the kHz range still. The gain should be much higher than before, and I see a higher voltage at the output because I added another BJT.

There seem to be many overlapping harmonics at the output. Maybe my BJTs are producing lots of noise?
 
  • #35
Cup of Joe said:
So I added that extra transistor, but I am getting inconsistent results. One time I got a max AC voltage of 3.3 and then got a max of 1.5 later. The minimum AC voltage is about 0.23. Also, I seem to be having the same issue as before: the frequency measurement on my DMM seems to be fluctuating in the kHz range still. The gain should be much higher than before, and I see a higher voltage at the output because I added another BJT.

There seem to be many overlapping harmonics at the output. Maybe my BJTs are producing lots of noise?
if you try only with the new transistor what do you get? Same things as before? (frequency at DMM to be Khz, 0.5V peak and such?)
 

Similar threads

Replies
27
Views
2K
Replies
6
Views
2K
Replies
10
Views
2K
Replies
10
Views
3K
Replies
43
Views
6K
Replies
3
Views
2K
Replies
1
Views
1K
Back
Top