Simple Oscillator (non ideal)

  • Thread starter Tactified
  • Start date
  • #1
Tactified
9
0
So I want to start off saying that I'm a senior in college in Electrical Engineering and I've been learning a lot about various kinds of circuits involving oscillators and I would like to know more about them. In school we talk a lot about them in various circuits and how important they are to those circuits but we haven't really learned anywhere how a simple oscillator works outside of ideal conditions for an LC circuit.

But since those don't exist in real life you have to be clever and invent a way to make something oscillate. And from my research most of the oscillators today use transistors in various combinations with capacitors and resistors (OpAmps, 555 timer, etc). I have an old radioshack lab book that works you through various electronic "projects" to help you understand circuits and I remembered it had an oscillator example, so I decided to open it up and try it out, and maybe that would help me understand it better. Even after reading the authors note and drawing up a circuit diagram myself, and changing the layout of the circuit so maybe I could understand it better, I'm still confused about how its oscillating.

If someone could explain it to me in detail step by step how its oscillating I would be greatly appreciative as this is something that has been bothering me for some time now. I want to have a fundamental grasp of how a basic oscillator would work. So I figured I would present my question to the awesome guys here at PF who explain things so well. I attached the picture of the circuit with the authors explanation of whats happening.

What bothers me is how the capacitor and the PNP transistor operates in this circuit. The capacitor is constantly being charged, so how could it discharge through Q1? Wouldnt it just discharge while charging? So nothing would happen and that whole part of the circuit would just stay an open circuit after the capacitor has charged fully.

Also the PNP transistor....I must not have a good grasp of how PNP transistors work because I would think the PNP transistor would always be on (current flowing from emitter to collector) and then when current is applied to the base it would turn off. Although I know from my electronics class you don't necessarily have to apply current through collector-emmitter so it does depend on how the configuration is setup. In this circuit they claim that once the NPN "turns on" when the base has current flown through it then current flows through emitter-collector of the PNP. That to me suggests current is flowing from NPN through base-collector through to the base-collector of the PNP. But then wouldnt that mean the NPN is off?

Any help in understanding this would be greatly appreciated. Thanks in advance PF guys!
 

Attachments

  • simpleosc.jpg
    simpleosc.jpg
    33.9 KB · Views: 1,110

Answers and Replies

  • #2
meBigGuy
Gold Member
2,324
406
I don't understand why Q1 ever turns off once it is turned on.

When Q2 turns on there is a huge surge through the base of Q1 as the cap is clamped to 0.7V by the Q1 BE junction. C1 may then try to discharge through Q1 BE, but the current through the resistor (that was enough to turn it on initially), would keep it turned on.

If Q2 ever did turn off there would be a -4.5 volt transition at the base of Q1.
 
  • #3
Tactified
9
0
@meBigGuy

From my understanding, right when the circuit is turned on, the capacitor is charging through the current from the sum of the resistances in series with the voltage source. Applying KCL at the node (in the attached diagram) you can see the current divides between the cap and the base of Q1. Right when the circuit is switched on, there is max current at I2 (in my diagram) but it decreases as the cap gets charged, and when the capacitor is fully charged it should become an open circuit and now I3 = I1.

At a certain point in the charge level through the capacitor the current to the base will reach a certain level and turn on Q1 because the current reaches a certain threshold in the transistor and "turns it on". So in theory if the capacitor discharges somehow the current through the base would decrease as the current gets split again through the capacitor and the base of Q1 which would lower the threshold level of the current and "turn it off".

What I dont understand is how that capacitor would discharge once its fully charged, since a voltage source it constantly being applied to it. Is the discharge rate faster than the charge rate of the capacitor or something? (which would be due to the RC circuit set up).
 

Attachments

  • osciwcurrent.jpg
    osciwcurrent.jpg
    32.7 KB · Views: 451
Last edited:
  • #4
Averagesupernova
Science Advisor
Gold Member
4,105
956
I think I see how it works. When the transistors start to turn on C1 gets an extra 'kick' from the collector of Q2. I suspect that without this extra 'kick' there is probably not enough base current in Q1 to turn it on hard enough to latch up like it appears that it would. There is no doubt that there is positive feedback, that is for sure. So after C1 has been charged up by the positive feedback the base current in Q1 starts to sag again. As I said before, there is not enough base current to turn the transistors on hard without aid from C1. So, when the base current sags, the collector of Q2 drops which in turn reduces base current in Q1 even farther. Cycle starts over. A pretty clever circuit, but I am sure not very repeatable from one transistor to the next as it looks heavily beta dependent. Hence the pot.
 
  • #5
meBigGuy
Gold Member
2,324
406
That's the same problem I have. If the resistors supply enough current to charge to startup, what causes it to discharge below that point? It *may* somehow oscillate around the linear bias point that you would get if you shorted the capacitor. But, it would be a frequency related to the delay through the two transistors.

It has other problems as well. For example, when Q1 is off, Q2 leakage would want to keep Q2 turned on.

If you turned Q2 into an NPN darlington (with a pullup on its base) then it would be more like what I would expect.
 
  • #6
AlephZero
Science Advisor
Homework Helper
7,002
297
If Q2 ever did turn off there would be a -4.5 volt transition at the base of Q1.

Correct, but you forgot the other half of that story.

When Q2 turns on, there is a +4.5V jump at the base of Q1, (well, actually a bit less than that) because of the voltage across the speaker.

That reduces the voltage across R1 and R2, so the "charging current" for C1 is less than the "discharging current" through the base of Q1. More current is flowing out of C1 than is flowing in, and it discharges.

This circuit (with a fixed resiistor instead of R1 and R2, and a light bulb instead of the speaker) used to be used in the "flashing yellow lights" used on road works at night to warn of lane closures etc. The oscillation frequency was usually about 1 Hz.

A computer simulation will show what happens. You need an oscilloscope to investigate the real circuit - a DMM won't show you what happens during the short "on" pulse.
 
  • #7
meBigGuy
Gold Member
2,324
406
The voltage at Q1 base can never go above 0.7 volts because of Q1 Vbe. But, then what will ever cause it to go below 0.7 if the resistors were enough to get it to 0.7 initially.
 
  • #8
Averagesupernova
Science Advisor
Gold Member
4,105
956
The resistors are enough to get some kind of action on the output which is enough to make the feedback work. I never said that they have to be large enough to turn the transistors on hard. Base voltage does not need to get to .7. It needs to get close enough to get some kind of action on the output. It's a simple enough circuit, I say build it.
-
I can't see how Q2 would turn on through any kind of leakage. The speaker is a pretty good load and will keep the collector voltage pretty close to 0 when Q2 is off.
 
  • #9
meBigGuy
Gold Member
2,324
406
Generally one builds an oscillator around an inverter, not a buffer. It may oscillate, not not in the "popping" way described in the writeup.
 
  • #10
Averagesupernova
Science Advisor
Gold Member
4,105
956
An oscillator ALWAYS relies on positive feedback. This an inverter is NOT.
 
  • #11
meBigGuy
Gold Member
2,324
406
Frequency dependent positive feedback. Lookup inverter based oscillator on google images.
 
  • #12
Averagesupernova
Science Advisor
Gold Member
4,105
956
Frequency dependent positive feedback. Lookup inverter based oscillator on google images.

The signal always appears as positive feedback on the input through delay. Hence the frequency dependent part. It is ALWAYS a net positive feedback if it is to oscillate. Certainly not saying you can't build an oscillator around an inverter, but in one form or another the feedback ends up positive.
 
  • #13
meBigGuy
Gold Member
2,324
406
I understand how oscillators work, but this circuit will not produce the discrete popping sound the designer describes.
 
  • #14
Averagesupernova
Science Advisor
Gold Member
4,105
956
Build it, my guess is that it will. It hasn't said the rate of pops. I would guess it cannot get slow enough to be accurately described that way, more like a slow buzz. I have looked at a lot of circuits and said that they cannot work and have been surprised many times. I'm betting on it working. It is no great shame to question if an oscillator can run by looking at the schematic. Typically most oscillators look to me like they can't run. LOL
 
Last edited:
  • #15
Tactified
9
0
@meBigGuy and Averagesupernova

Yeah it sounds like a buzz with a 0.01u Cap, if you use a 10uF cap you can really slow it down and make it go to 1Hz (it does sound like pop). And thanks everyone for the posts, this is helping me think about this more!
 
  • #16
meBigGuy
Gold Member
2,324
406
I sure would like to see the waveforms at the base and on C1 rightside.
 
  • #17
Averagesupernova
Science Advisor
Gold Member
4,105
956
I'll check this again in the morning. Off to bed. Interesting discussion. Have to admit when I first looked at it I questioned how it could possibly work. But if it is written by Forest Mimms, I have faith. LOL So I looked again and thought about it more. I think it would work, but probably not very beta stable or temperature stable.
 
  • #18
Tactified
9
0
@meBigGuy

You said earlier "If Q2 ever did turn off there would be a -4.5 volt transition at the base of Q1.". Could you explain why that would be the case? I noticed you guys talking a lot about feedback, but I dont see how that applies here. Could someone explain?

Edit: Ohhhhh is it because of the capacitor discharging?
 
Last edited:
  • #19
Tactified
9
0
So after C1 has been charged up by the positive feedback the base current in Q1 starts to sag again. As I said before, there is not enough base current to turn the transistors on hard without aid from C1. So, when the base current sags, the collector of Q2 drops which in turn reduces base current in Q1 even farther. Cycle starts over.

Which direction is the base current in the PNP going? I'm still confused on that. Also, does the base current in Q1 sag because of the discharge versus charging rate? Man, I think I'm confusing myself way too much here.
 
  • #20
meBigGuy
Gold Member
2,324
406
Roughly speaking, when there is a voltage change on one side of a capacitor, the same change appears on the other side. Just before the output switches off the Q2 side of the capacitor is at 4.5V (assuming large signal multivibrator action, which may not be what is actually happening). When Q2 switches off, that causes a transition to 0 volts, which is a -4.5V change. On the other side, the base of Q1 was in the region of 0.7V so it would transition by -4.5V to -3.8V.

But, again, all that was predicated on the voltage at the Q2 - C1 junction making 4.5v swings. What does it actually do?
 
  • #21
Tactified
9
0
But, again, all that was predicated on the voltage at Q2 and C1 making 4.5v swings. What does it actually do?

I dont have an oscope on me (poor college student), and I havent simulated it yet. But wait if Q2 switches off wouldn't there still be the constant +4.5 volts on the other side of the capacitor from the voltage source canceling out the -4.5volt change?
 
  • #22
meBigGuy
Gold Member
2,324
406
If Q2 switches off completely (hypothetical at this point) the speaker takes the node to zero. Since there is nothing on the other side that can supply the charge, that side will transition by -4.5V (again, assuming such a transition occurred at the Q2/C1 junction) and then charge through the resistors.
 
Last edited:
  • #23
Averagesupernova
Science Advisor
Gold Member
4,105
956
I had a quick look last night in an old radio shack book called: Getting Started in Electronics by Forrest Mims. Same circuit except a bigger cap and probably different resistor values. It is described as a metronome.
 
  • #24
NascentOxygen
Staff Emeritus
Science Advisor
9,242
1,073
This is a relaxation oscillator, the transitions are fast because the transistor switching uses positive feedback. Waveforms here are nothing like sinusoidal.

Generally speaking, the term "oscillator" as in your title without qualification is used for sinusoidal oscillators, using LC elements or RC staged filters, and where transistors operate as linear amplifiers/buffers.
 
  • #25
Jony130
625
138
This simply multivibrator is nothing more then two stage CE amplifier with positive feedback add by C1 capacitor.

https://www.physicsforums.com/attachment.php?attachmentid=62319&stc=1&d=1380546342

When we first start-up the circuit C1 start to charge until T1 start to conduct.
The current that is flow through T1 also opens T2 transistor. T2 collector voltage reach positive saturation voltage (4.5V). And C1 capacitor will quickly charge in the circuit:

+4.5V ---> emitter-collector T2---> C1 --->base-emitter T1--->GND

attachment.png


The capacitor is rapidly charge to V_C1 = Vcc - Vbe - Vce(sat) ≈ 3.8V.
And when Capacitor is full charged. The T1 base current is provided by R1 resistor. And
in order to circuit work as a multivibrator we need to select R1 so that R1 current is so small, that T2 immediately after C1 is full charging comes out from saturation to the linear region.
So voltage on T2 collector is start to drop (T2 comes out from saturation). This change in VecT2 voltage is "feedback" by C1 capacitor to T1 base.
This will decrease the voltage at T1 base. So T1 and T2 will decrease his currents. This will increase VecT2 and Q1 base voltage drop even faster (for example if Vec = 0.3V then Vb = Vcc - Vec - Vc1 = 4.5V - 0.3V - 3.8V = 0.4V).
So C1 that was previously charged to 3.8V "pulls-down" the voltage on the T1 base below GND (-3.8V)
So we have a very strong positive feedback in this circuit.

So T1 and T2 will be immediately go into cut-off.
And C1 immediately start to discharge in the circuit:

right C1 plate ---> R2 --->battery--->R1----> left C1 plate.

attachment.png


The voltage on the "left" plate of a C1 is rising during discharging phase, at some point becomes equal to zero volts (end of discharge), and voltage at C1 "left" plate (at T1 base) will continue to rising (C1 is now charging).
When voltage on C1 will increase to 0.6V the T1 is start to open.
And we buck to the beginning.
 

Attachments

  • 11a.PNG
    11a.PNG
    4.8 KB · Views: 523
  • 11b.PNG
    11b.PNG
    4.8 KB · Views: 560
Last edited:
  • Like
Likes 1 person
  • #26
Averagesupernova
Science Advisor
Gold Member
4,105
956
Which direction is the base current in the PNP going? I'm still confused on that. Also, does the base current in Q1 sag because of the discharge versus charging rate? Man, I think I'm confusing myself way too much here.

The base current of Q2 (conventional flow) comes out of the base. It can't go the other way. Base current in Q1 sags because once the cap is charged only the resistors provide base current. This lack of current in the base is reflected on the output which of course pulls the base low.
-
I would bet those of you who question this circuit would not having any problem seeing how an op-amp configured with positive feedback through an RC network would oscillate.
 
  • #27
AlephZero
Science Advisor
Homework Helper
7,002
297
@mebigguy: I think you are trying to understand the behavior of a very nonlinear circuit using a linear model of how an oscillator "ought" to work (frequency-dependent feedback etc).

This circuit is a switch, with some positive hysteresis - like an op-amp comparator designed to avoid "flutter" if the input is changing slowly. When the switch is flipped one way, the cap charges up, slowly. When it's flipped the other way, it discharges quickly. The "duty cycle" might be 100:1 or even 1000:1, hence you get a "pop" from the "discharge" part of each cycle.
 
  • #28
Averagesupernova
Science Advisor
Gold Member
4,105
956
An oscillator is generally defined as a device that outputs an AC signal with no AC input. I would say the circuit in question meets that requirement. It may be crude, but sometimes it is all that is necessary.
 
  • #29
Tactified
9
0
I think I see how it works. When the transistors start to turn on C1 gets an extra 'kick' from the collector of Q2. I suspect that without this extra 'kick' there is probably not enough base current in Q1 to turn it on hard enough to latch up like it appears that it would.

Earlier I didnt know what you meant by turning it on hard. But thinking about it a little further, did you mean that the current is actually flowing through the cap from +4.5 through Q2 (Emitter base) and through Q1 (base emitter), but there is only a very small amount of current becuse none of the diodes have hit the linear region yet? And then once it builds up it discharges all its built up charge through Q1?

Is that what you were saying?
 
  • #30
Averagesupernova
Science Advisor
Gold Member
4,105
956
I don't know what you mean by this:
...did you mean that the current is actually flowing through the cap from +4.5 through Q2 (Emitter base) and through Q1 (base emitter), ...
That really doesn't make sense.
-
At power up, both transistors are turned off. At first, the voltage across the base emitter junction is zero because of the cap. The voltage on the collector of Q2 is at zero and the low impedance of the speaker does not allow it to float up. The cap needs time to charge up. The voltage starts to ramp up at the base of Q1 due to the cap charging. Eventually it gets high enough so the transistor Q1 starts to conduct which pulls the base of Q2 lower. This starts Q2 into conduction. The voltage on the collector starts to rise. Up to this point, we have not gone through even half a cycle of oscillation. The voltage across the cap is a little less than .7 volts with the left side of the cap being more positive than the right side. Here is where it gets interesting. The collector of Q2 is tied to the cap. So the voltage on the right side of the cap starts to rise which makes the voltage on the left side of the cap attempt to follow it. This is the start of the discharge. The base voltage of Q1 can only get as high as .7 volts because of the diode in the base-emitter junction. There is some serious positive feedback going on at this point. The higher the collector voltage at Q2 gets, the harder it drives Q1 which in turns makes the collector voltage of Q2 go higher. Eventually it tops out close to supply voltage. At this point the cap is discharged and is now recharged in the opposite polarity. Now the right side of the cap is more positive than the left. The cap is now fully charged in this polarity (we'll call it reverse) so it no longer conducts current. At this point there is not enough base current on Q1 to keep the collector of Q2 close to supply voltage. The collector voltage of Q2 starts to fall which in turn lowers the voltage on base of Q1. Again we have some serious positive feedback. The more the collector voltage of Q2 falls, the less Q1 is driven which lowers the collector voltage of Q2 even farther. The collector voltage of Q2 is now at zero and the voltage across the cap is still what we called reverse with the right side more positive than the left. But, there are resistors tied to the left side of the cap and they will start the discharging of the cap and then eventually recharge it in the other direction again with the left side more positive than the right. That is one complete cycle. I don't think I can explain it any more clear than that. If you want to know more about it try building it and tweak a few things. Try it without the cap. Or try bringing up the power supply voltage REALLY slowly. You may find it won't oscillate.
 
  • Like
Likes 1 person
  • #31
meBigGuy
Gold Member
2,324
406
I fully understand a bistable mult-vibrator like "oscillator" and was attempting to analyze with that in mind, especially since that was the description.
I had a problem with the off cycle.

" At this point there is not enough base current on Q1 to keep the collector of Q2 close to supply voltage. "

That's where I had a problem. My thoughts were that if R could supply enough current to turn on Q1, the current into Q1 Base would never drop enough to turn it off. I still have a small problem with that since it take very little current on Q1 to keep Q2 saturated. But, then again, it requires very little voltage change at Q2 to get Q1 fully off - maybe even noise is enough since gm is high.

The other thing I don't like is that the base of Q2 is open circuit when Q1 is off, meaning leakage current (Q2 Icb and Q1 Icb and Ice) will tend to keep it on a bit. Feels sloppy.

Looks like starving Q1 Ib with high R is what makes it work.
 

Suggested for: Simple Oscillator (non ideal)

Replies
2
Views
3K
  • Last Post
Replies
31
Views
19K
  • Last Post
Replies
1
Views
11K
Replies
18
Views
6K
Replies
8
Views
5K
Replies
10
Views
3K
Replies
2
Views
10K
Replies
1
Views
2K
  • Last Post
Replies
8
Views
2K
Top