Hello guys, I made an oscillator from a 74LS04 a capacitor and resistor. I have obtained a formula from my dads Z-80 microprocessor book that gives u a rough idea of the frequency:

F=1/3RC

The book says F is the frequency but I believe it is the clock period in seconds. R is the resistance (Ohms) of the resistor and C the capicitance of the capacitor (in Farads).

I have made the oscillator and hooked up to the speaker (it is making a nice tone as I type this). I was wondering can someone explain to me how it works I know the gates are used as amplifiers and the resistor and capacitor are used for feedback, but how does the circuit work?!

Also a weird thing that it does is that when I put my finger near the capacitor the pitch of the tone seems to go up dramatically this maybme means that some of the electrons are discharging on me instead of the capacitor, lowering the overall capacitance of the capacitor?

Posted on 2003-08-06 16:42:54 by x86asm
First off realize that R*C (Ohms * Farrads) produces a unit called "Seconds" ;)

This is why you often hear the term "R.C. Time Constant". R*C forms a constant since they are both fixed devices.

So this is 2/3rd of your eqation alone. 1/time = frequency. This is a well known fact

Next, why the 1/3 factor against this frequency. Well its really 3*RC. It only looks like a 1/3 because we are asking for frequency in this equation. The 3 * RC is because of exponential mathematics essentially.

Ok, why the exponential?

This is due to the capasitor. Capasitor and Inductors are first order devices. They theoretically dont have internal resistances and losses. They deal with electric fields rather than current. Being a first order device introduces exponential rates of change. (Im loosely refering to calculus here). Basicaly, in a nut shell "rule of thumb", they wont respond instantly in some way, and hence will follow an exponential rate of change. For capasitors, the voltage doesnt change all to willingly. For inductors, its the current..

To be frequent, it must change between at least two states (high and low). In a nut shell, they are suggesting that 3 time constants is the total amount of time for a 0->1 and a 1->0 change.

The Inverting gate 7404, internaly has trigger thresholds at values closer to 4v and 1V than 5V and 0V. As well, one time constant in an exponential is:

(1 - e^-1) = 1 - 0.367 = 0.632 or 63% rise towards 5V (or alternately 63% fall to 0).

3RC / 2 state changes = 1.5 RC for each state! This implies that each state has:

(1 - e^-1.5) = 1 - 0.223 = 0.776 or 77% rise befor the 7404 will trigger another state change.

In conclusion, your circuit provides voltage and current through a resistor and into a capasitor from the output of the 7404. The input takes very little current (so we will assume it to be 0). The input is connected betweent he resistor and the capasitor to measure the voltage found on the capasitor as time passes. As current flows in and out of capasitor its voltage will rise and fall exponentially by the equation:

Rise:

VCap = (5v-PresentVoltage_Low) * (1 - e^(-t/1.5RC) ) where t is time variable in seconds

Fall:

VCap = (PresentVoltage_High) * (e^(-t/1.5RC) ) where t is time variable is seconds.

After the initial start up cycles the Present voltage values will be the 'trigger' voltages that causes a change of state.

So to find an overall frequency, you add up the time for each change of state (1.5 RC + 1.5 RC = 3 RC). Now that we have the time per oscillation, to find the frequency is trivial:

1/time = 1/ 3RC = Frequency.

I hope i explained this well enought. I did it in a hurry, and didnt "edit" it for flow of thought ;)

:alright:
NaN
Posted on 2003-08-06 18:30:13 by NaN
BTW:

Everything in nature has some degree of CAPASITANCE and RESISTANCE.

So when you touch the capasitor and you find the frequency changing, your adding more capasitance and resistance into the RC time equation, and hense changing the time constant for oscillations.

My guess is your adding more resistance in parallel to the resistor from the output. Parallel resistances create a smaller total and any one of the two. Rt =1/[ 1/R1 + 1/R2 ]. So having a smaller R makes a smaller RC time constant, which generates a higher frequency....

:NaN:
Posted on 2003-08-06 18:34:04 by NaN
Yes NAN is right. It's the capacitance and the inductance of your 90% water finger you put in the EMF (eletromagnetic field) of the oscillator components. An RC oscillator has very poor self sheilding charateristics. If the resistor you were using was a toroidal ferrite core than the frequency shift would be very slight. If a grounded Faraday sheild was covering it , there would be no change at all. Don't confuse EMF (electro motive force) or voltage with the other. Maybe I should have said EMI (electro-magnetic interference)<----ie, your finger.
Posted on 2003-08-08 16:27:27 by mrgone
I'm gonna go old school here and not attempt an analysis of a circuit I've never seen.

X, can ya post it? Like? Mucho gracius.

But while we're here, her's my fav time formula for RC circuits. (Sorry, its one of the rare cases where I remember the answer but not the derivation):

| Vss - Vi |
time = RC ln ________
|Vss - Vf |

Where

R = resistance in ohms

Vss = steady state voltage the cap is tending to

Vi = the initial voltage of the cap

Vf = final voltage the cap gets to then 'time' is called.

ln = log to base e (natural log)

So, say you have a circuit that charges a 1 uf cap from 0 to 2.5 V from a 5 V source thru 1K.

Vss = 5 V (what voltage the cap charges to)

Vi = 0

Vf = 2.5

(Vss - Vi) / (Vss - Vf) = (5 - 0) / (5 - 2.5) = 5/2.5 = 2

ln(2) = .693

RC ln(2) = .693 * 10e-3

Posted on 2003-08-13 21:59:36 by Ernie

I'm gonna go old school here and not attempt an analysis of a circuit I've never seen.

X, can ya post it? Like? Mucho gracius.

But while we're here, her's my fav time formula for RC circuits. (Sorry, its one of the rare cases where I remember the answer but not the derivation):

| Vss - Vi |
time = RC ln ________
|Vss - Vf |

Where

R = resistance in ohms

Vss = steady state voltage the cap is tending to

Vi = the initial voltage of the cap

Vf = final voltage the cap gets to then 'time' is called.

ln = log to base e (natural log)

So, say you have a circuit that charges a 1 uf cap from 0 to 2.5 V from a 5 V source thru 1K.

Vss = 5 V (what voltage the cap charges to)

Vi = 0

Vf = 2.5

(Vss - Vi) / (Vss - Vf) = (5 - 0) / (5 - 2.5) = 5/2.5 = 2

ln(2) = .693

RC ln(2) = .693 * 10e-3