what is the frequency of oscillator circuit

MisterBill2

Joined Jan 23, 2018
28,637
Doing some simulation output clearly non linear, so no small signal
approaches will work for analysis.

The output duty cycle not being square is fact gates threshold not
exactly Vdd/2. This is transfer plot of a CMOS gate -



Regards, Dana.
The graph shown is correct, but it only shows half of the story, which is the high to low output transition. In many digital circuits the output versus input trace for output low to high does not lie on the same line. That means that as the Vin drops the Vout plot would not be the same as for the plot with Vin rising.. And, making things more interesting, the difference may change a bit with temperature or supply voltage, as well as with the different manufacturers. That last has caused problems for me with one production run a few years ago.
 

danadak

Joined Mar 10, 2018
4,057
The transfer characteristic is for either direction. Whether one approaches it from
left or right on graph. This is for a gate w/o hysteresis feedback designed into it.

You are correct that T does affect switching point and Vdd.

Do a spice sim on a generic CMOS gate and feed it a triangle wave.

Regards, Dana.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
28,637
The transfer characteristic is for either direction. Whether one approaches it from
left or right on graph. This is for a gate w/o hysteresis feedback designed into it.

You are correct that T does affect switching point and Vdd.

Do a spice sim on a generic CMOS gate and feed it a triangle wave.

Regards, Dana.
Thanks for the response. I presently don't have a simulator program on any of my computers. Never have used one,either, not since ECAP back in school. generic models are seldom equal to real parts, although functionally similar.
 

MisterBill2

Joined Jan 23, 2018
28,637
OK, DanaDak, it may well follow the rules but the square wave is not square, not even a bit close to square. That is undoubtedly due to both the 1K resistors and the asymetrical output capability of the inverters. But indeed, you have created a great creation. ON semiconductor does indeed provide a great value in their models of the devices that they sell.
I think that I see a period of 40 microseconds after the startup, meaning, I think, a frequency of 25 KHz.
 

MrAl

Joined Jun 17, 2014
13,923
Hi,
I am having trouble in finding the actual frequency formula for the attached image.
As per me, the frequency should be (1/6RC)

I will be helpful if the derivation of the same is explained.

View attachment 155406
Hi,

I quoted the original post just to show the original circuit again and the supposed original formula.
From this i think we could assume that this is a theoretical question and not a practical one, meaning we might be able to assume a rectangular wave output from each stage even though a real CMOS gate will not show that exactly.

So with that in mind, did anyone consider yet calculating a single stage DELAY time knowing the upper and lower thresholds of one gate input? Knowing that, we can calulate the theoretical frequency and see if it matches the given formula. Of course after that we could still look into the practical matters.

For threshold high VTH and threshold low VTL, since they are inverters, the time one stage output stays LOW is the time between Vin=VTH and Vin=VTL. That is simply a difference in exponentials. The time the output stays HIGH is then the time between Vin=VTL and Vin=VTH. That's also just a difference in exponentials.
Since we know the charge and discharge times:
VinCharging=(Vcc-Vc0)*(1-e^(-t/RC))+Vc0
VinDischarging=Vc0*e^(-t/RC)

This means the discharging time is (log(x) is the natural log ln(x)):
tdischarging=RC*log(VTH/VTL)
tcharging=-RC*log(1-(VTH-VTL)/(Vcc-VTL))

From those the total time for one stage is therefore:
tt=RC*log((VTH*(VTL-Vcc))/(VTL*(VTH-Vcc)))

With an assumed VTL=Vcc*1/3 and VTH=Vcc*2/3 we get:
tt=log(4)*RC

so for three stages:
tt3=3*log(4)*RC

which is approximatly:
tt3=4.16*RC

and so the frequency would be:
f=1/(4.16*RC)

which does not exactly match the original formula, but then again the original formula probably does not assume 1/3 and 2/3 of Vcc for the two thresholds.

To get a lower frequency (1/(6*RC)) we'd need a longer time delay per section, whcih would imply that the upper and lower thresholds are assumed to be different.
If we make VTH=Vcc*3/4 and VTL=Vcc*1/4, we get approximately:
f=1/(6.59*RC)

so the assumed threshold for a perfect "6" in the denominator would have to mean a set of thresholds slightly more narrowly placed than above.

Keep in mind this is a theoretical experiment based on ideal output switching from 0v to +Vcc with zero rise and fall times.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
@MisterBill2, I was being facetious in stating the system was linear, its clearly
so non linear one CANNOT use classic s plane analysis.

My apologies for misleading humor.

Regards, Dana.
 

MrAl

Joined Jun 17, 2014
13,923
@MisterBill2, I was being facetious in stating the system was linear, its clearly
so non linear one CANNOT use classic s plane analysis.

My apologies for misleading humor.

Regards, Dana.
Hi,

I thought you might have been joking there :)

Interesting though, it looks like you are getting around 25kHz, and the non linear ideal formula i posted using thresholds of Vcc*2/3 and Vcc*1/3 gives 24kHz.
 

Jony130

Joined Feb 17, 2009
5,601
Interesting though, it looks like you are getting around 25kHz, and the non linear ideal formula i posted using thresholds of Vcc*2/3 and Vcc*1/3 gives 24kHz.
But what if we use an ideal CMOS gate with the threshold at 1/2 Vdd.

I think


eg. 60 degrees /section.
And danadak was right. As a first aproximation, we can use this equation:

F = √3/(2 pi RC) = 27.57kHz

https://electronics.stackexchange.c...tion/383142?noredirect=1#comment932451_383142
 

MrAl

Joined Jun 17, 2014
13,923
But what if we use an ideal CMOS gate with the threshold at 1/2 Vdd.


And danadak was right. As a first aproximation, we can use this equation:

F = √3/(2 pi RC) = 27.57kHz

https://electronics.stackexchange.c...tion/383142?noredirect=1#comment932451_383142
Hi,

I dont think a CMOS gate has only one threshold, but it can be biased into linear operation which then changes
the circuit configuration and thus a different solution (namely, the 60 degree solution i think).

If there was only one threshold and not linear, then we have to consider the individual gate delays. The gate delay would dominate the response rather than the two thresholds. We could also add the gate delay to the two threshold model. We could also improve the calculations for the two threshold model.

For the two threshold model with no gate delays, i went over the calculations and came up with this:
t=RC*log((VTH*(VTL-Vcc))/(VTL*(VTH-Vcc)))

and of course f=1/t.

This checked out with a simulation of ideal gates with no gate delay and perfect outputs of Vcc and zero volts for logic states high and low.
For example, with 10k and 1uf i get 72.135Hz. The simulation output phase stays in sync with a 72.135Hz sine wave for many cycles so this looks correct.
 
Last edited:

Jony130

Joined Feb 17, 2009
5,601
I dont think a CMOS gate has only one threshold
Strange to hear this from you.
I always thought that we assumed in CMOS that the transient at the output (from low to high or from high to low) will acquire when the voltage at the input "pass" 1/2Vdd.

And the simulation confirms this prediction
12.png
 

MrAl

Joined Jun 17, 2014
13,923
Hello again,

Yes i see what happened here. I was assuming we were using a Schmitt Trigger for some reason which has more clearly defined VTH and VTL. So that formula is only good for inverters that are also Schmitt Trigger gates not the 'normal' gate.
There is some of this behavior in a normal gate too, but not so well defined. I have a book with the formula for the output response of a normal CMOS gate but i'll have to try to find it. There is a very narrow region that behaves in a similar manner, but i dont think we can characterize it in quite the same way due to the linear region. (See attachment). In the attachment the linear region is between the two central vertical lines, slightly exaggerated for clarity.
Because of that central linear region i think we need the formula as the input could be VERY slow changing for large R and C.

The more accurate response is more like a linear amplifier for some frequencies and a non linear amplifier for other frequencies. There may also be a delay factor. So the exact response could be quite complicated.
The nice thing is that the three sections are symmetrical so once we know the response for one section we know the response for all three sections.

[LATER]
I took a quick look on the web and found some formulas, but they are all too complicated involving constants we'd have to find out or test for, which makes it a little too involved i think for our casual interest. Maybe an alternative would be to model the output as a curve fit and then go from there, or just use the spice simulator as this is an area where it shines by saving a lot of time. An empirical formula may then emerge.
 

Attachments

Last edited:

MrAl

Joined Jun 17, 2014
13,923
This is why to simplify things we should assume VTh at 1/2 Vdd and ideal square wave at the gate output.
Hi,

I understand the 1/2 Vcc (or as you like Vdd) but could you explain why you are stating an ideal square wave at the output? What would make you want to assume that?

I think i realized why i assumed a Schmitt Trigger gate rather than normal inverter. That is because the normal inverter acts as a linear device for a small range of input. But since the output then changes very quickly, that means the next stage could response quickly also, and that may be a problem. We can talk about that later but that would make simulation of the oscillator more difficult. More about this later though.
 

MisterBill2

Joined Jan 23, 2018
28,637
If you use an inverter like the 4049 things will be different because it can sink far more current than it can source. And then, with inverters that have much lower drive capabilities, such that the effective output impedance is similar to the timing resistor "R", that square wave gets rounded a bit. The 4049 can sink 12 to 16Ma but only source 2.5Ma, so the square portion won't be so square.
The propagation delays vary from 30 to 65 Nanoseconds at 5 volts, so at 25Khz that is not a big part of the cycle. Of course, those are old device specifications, most newer devices are much faster.
AND, sorry, Danadak, I don't always get some jokes. My problem, not yours. My jokes are not so subtle, usually.
 

MrAl

Joined Jun 17, 2014
13,923
Hello again,

I am starting to think that any assumed solution may not be reliable. After all, isnt a constant DC level one solution? If the gates operate in the linear region around 1/2 Vcc then it looks like one ideal solution would be where all inputs and outputs are at 1/2 Vcc and remain there. It would take some non symmetrical mechanism to unbalance this situation, such as a slightly different input than output for one or more gates. Such a situation would make it hard to predict exactly what would happen because it could be very different for different gate packages or maybe power supply noise.
A solution i think would be to introduce some hysteresis which could be as simple as adding a resistor or two.

This deserves more thought i think.
 
Top