hi Al,
Interestingly is the difference between the observed frequency from the LTS plot of ~141kHz and the ~76kHz from your formula, which is more accurate than the 83kHz derived from the 1/[1.2*RC].
To get a 141kHz from your formula I had to set the vL=1.9v vH=3.5v and Vss=4.8v
[of course there other combinations that give the 141kHz]
Its appears that LTS is using different vL, vH and Vss from its plotted values of Vc.????
Strange.
Hi there Eric and Irjaj,
Eric:
Thanks for looking at this. I checked the formula but i didnt do like 100 problems with it yet
Anyway, from your previous post i can see that the model you are using has characteristics such that vL=2.1 and vH=2.9. This of course means we need to plug those two values into the formula to get it to work correctly. I took the time to derive the formula using vL and vH so that people that wanted to use this kind of oscillator could investigate the oscillator properties with variations in either vL or vH or both, either randomly or systematically.
If we do plug in those two values and use Vcc=4.8 instead of 5.0, with a 10k resistor and 1nf capacitor we come out with a calculation of 148330Hz, which is pretty close to the observed frequency using LT Spice according to your simulation. We could investigate and tweek the formula a bit i guess.
I would suggest that anyone trying to use this oscillator to simply ignore the formula 1/(1.2*R*C). I think that formula is a spinoff of an oscillator with thresholds of 1/3 Vcc and 2/3 Vcc, which comes out to a neat 1/(1.386*R*C) (and as a side note this can be derived from the formula i gave previously). In other words, we have no guarantee that we'll see 1/3 and 2/3 Vcc thresholds so we cant rely on that simpler formula. As we can see by comparison the simple formula fails completely in many cases.
Irjaj:
The derivation of that formula is not especially difficult, just takes some attention to what is going on with an oscillator like this kind.
The first thing to notice is that the oscillator only has two output states: either the output is high or the output is low. Knowing this, and knowing how the capacitor charges and discharges through a resistor gives us enough to go on. We are working with two different time periods, the charge time and discharge time, so it's convenient to figure out the two time periods and then add them together to get the total time period tp, then take the inverse because F=1/tp.
Starting with the output low, we can note that just before it went low the cap was charged to vH. This means we can use the formula for the discharge period we'll call t1:
vH*e^(-t1/RC)
and since the cap is discharging from vH to vL we can set that equal to vL and we get:
vL=vH*e^(-t1/RC)
Now when the output goes high, we can use the formula for a cap charging through a resistor powered from a voltage source where the voltage source is the output high voltage Vcc (t2 is the charge period):
(Vcc-vL)*(1-e^(-t2/RC))+vL
and because the cap charges from vL to vH we set that equal to vH:
vH=(Vcc-vL)*(1-e^(-t2/RC))+vL
Now we have two equations and two time periods t1 and t2:
vL=vH*e^(-t1/RC)
vH=(Vcc-vL)*(1-e^(-t2/RC))+vL
Now all we have to do is solve each equation for its respective time period (t1 or t2) and then add the two results together. After simplifying a little, the result is the formula i gave previously:
tp=t1+t2=RC*(ln((vL-Vcc)/(vH-Vcc))+ln(vH/vL))
and as i noted we throw in a little fudge factor making the supply voltage Vcc equal to 4.8v instead of 5v to get a little better correlation with real world results.
Last edited: