However, there is one strikingly unusual thing about the circuit you show in the diagram. There is no third resistor (like R3) from the junction of R1 and R2 to the positive power rail.
If you like we can go though some of the math behind this which will allow some good approximations and show how that third resistor improves things. It's very interesting to go through at least once.
It would be very interesting to learn more about an R3 at that junction!
If you have the time to write it out a bit; I'll be reading it over several times, to get the math right.
Hello again,
I am happy to hear you are interested in this. This is what really makes electronics interesting and fun at times.
In the following, if anything doesnt make sense just let me know i'll try to clear it up. Also, as others have noted, component tolerances can affect the final result especially the capacitor value.
We start with a capacitor being charged by a constant voltage source like Vcc:
Vc=Vcc*(1-e^(-t/RC))
(where RC=R*C throughout this writing)
but when the capacitor voltage Vc is non zero we have to include the initial voltage of that cap:
Vc(t)=(Vcc-Vc)*(1-e^(-t/RC))+Vc
where Vc is the initial voltage at t=0 and Vc(t) is the rising voltage of the cap.
Now since the output is driving RC we change that to:
Vc(t)=(Vout-Vc)*(1-e^(-t/RC))+Vc
and that is the expression for the inverting input which we will call 'vn':
vn=(Vout-Vc)*(1-e^(-t/RC))+Vc
Now the expresson for the non inverting terminal (we can call 'vp') just involves the static values of Vcc and Vout, and because there are then two sources (Vcc and Vout) we can use superposition to solve for the non inverting terminal voltage 'vp'. To do this, we first calculate two combined resistor values R12 and R23 which are simply R1 and R2 in parallel and R2 and R3 in parallel, because that makes it simpler to calculate the solution using superposition. So we have:
R12=R1*R2/(R1+R2) R23=R2*R3/(R2+R3)
and now we can calculate the voltage due to each source Vcc or Vout.
Due to Vcc:
vp1=Vcc*R12/(R12+R3)
and due to Vout:
vp2=Vout*R23/(R23+R1)
and now the total voltage at the non inverting terminal is:
vp=vp1+vp2=Vcc*R12/(R12+R3)+Vout*R23/(R23+R1)
and expanding that with the values of R12 and R23 above we get:
vp=(Vout*R2*R3)/((R3+R2)*((R2*R3)/(R3+R2)+R1))+(Vcc*R1*R2)/((R2+R1)*(R3+(R1*R2)/(R2+R1)))
which simplifies to:
vp=(R2*(Vout*R3+Vcc*R1))/(R2*R3+R1*R3+R1*R2)
Now eventually we want to equate vp to vn as vp=vn as:
(Vout-Vc)*(1-e^(-t/RC))+Vc=(R2*(Vout*R3+Vcc*R1))/(R2*R3+R1*R3+R1*R2)
but since this includes the initial cap voltage Vc and there will be two such Vc, we should calculate those two Vc first. The first Vc is when the output just goes high and Vc is lowest, and the second is when the output just goes low and Vc is highest. Just before the output goes high the cap voltage is due to the voltage at the non inverting terminal vp and since the output was just low the output was zero and so the voltage at vp was:
vpL=(R2*(0*R3+Vcc*R1))/(R2*R3+R1*R3+R1*R2)
vpL=(Vcc*R1*R2)/(R2*R3+R1*R3+R1*R2)
so Vc with the output having been low is that:
VcL=(Vcc*R1*R2)/(R2*R3+R1*R3+R1*R2)
Just before the output goes low the cap voltage is due to the voltage at the non inverting terminal vp with the output high, so that is:
VcH=(R2*(Vcc*R3+Vcc*R1))/(R2*R3+R1*R3+R1*R2)
Now we can equate vn and vp and then replace Vc with the appropriate initial voltage but we will simplify the equation first:
(Vout-Vc)*(1-e^(-t/RC))+Vc=(R2*(Vout*R3+Vcc*R1))/(R2*R3+R1*R3+R1*R2)
and with some algebra and natural logs solving for 't' we end up with:
t=-log((R1*(Vout*R3+(Vout-Vcc)*R2))/((Vout-Vc)*((R2+R1)*R3+R1*R2)))*RC
(and log is the natural log function often denoted as "ln(x)").
Now when the output is high and cap charging Vout must be equal to Vcc (ideal case) and Vc must be equal to VcL so we have period low to high:
tpLH=-log((Vcc*R1*R3)/((Vcc-VcL)*((R2+R1)*R3+R1*R2)))*RC
and when the output is low and cap discharging Vout must be equal to zero (ideal case) and Vc must be equal to VcH so we have:
tpHL=-log((Vcc*R1*R2)/(VcH*((R2+R1)*R3+R1*R2)))*RC
Now we can simplify quite a bit.
Since we solved for VcL we can replace that in tpLH and get:
tpLH=-log(R1/(R2+R1))*RC
and samve for VcH so we can replace that in tpHL and get:
tpHL=-log(R1/(R3+R1))*RC
Adding the two time periods we get the total time period:
tp=-log(R1/(R3+R1))*RC-log(R1/(R2+R1))*RC
or in a different form:
tp=log(((R2+R1)*(R3+R1))/R1^2)*RC
or expanding logs we get:
tp=(log(R3+R1)+log(R2+R1)-2*log(R1))*RC
but now for the magic...
If we state that we shall make all three resistors R1, R2, R3 equal, that means that: R2=R1 and R3=R1, so we set those equal in the expression for tp and we get:
tp=log(4)*RC
and of course since log(4)=ln(4)=1.38629436111989 we end up with the final expression for tp:
tp=1.38629436111989*RC
and since f=1/tp we have (f in Hertz):
f=1/(1.38629436111989*RC)
or: f=0.72134752044448/RC
which can be approximated as: f=0.72/RC
or even just f=0.7/RC for simplicity.
So we went from a circuit with 5 components to an equation with just two components and a constant factor. I dont think it gets any simpler than that. This also means that we can change the timing by just changing R or C or both.
A couple things to note...
First, we assumed that when Vout goes high it is equal to Vcc. That will not be the case except with a rail to rail op amp. The calculation should be good enough though except in the most exacting applications. This will get worse with lower supply voltages because then the max output vs Vcc is more different. Also, we assumed that then Vout goes low it is equal to exactly zero. That will also not be the case as there is always some saturation voltage. We also assume that the op amp is ideal, and that is not the case either as there will be some slew rate and frequency response which limits the maximum frequency and squareness of the output wave shape. If you do a simulation with f around 1kHz though you should get reasonable results anyway. I am not sure you want to be bothered by these other issues though.