Bob Scott is correct. The 2 in my equation should be 4. The corrected formula is:

f = (R2/R1)*(1/(4*R*C))

## NEED FORMULA TO FINS FREQ. OF OSCILLATOR

Hi again,

START_QUOTE

Prove it. Explain please. Use math.

Bob

END_QUOTE

Bob, sorry i forgot to reply to that part.

Im not sure, but what do you think, that i pulled these numbers

out of the air or something?

I got another idea, why dont you prove it? Go to the Linear Tech

site and download Switchcad (i think they are up to version 2 or 3

by now). I think you can get the spice model for the LF353 from

the National Semi site, but if you have any problem finding it just

yell and i'd be glad to send you the file. Draw the circuit as a

schematic using the LF353 spice model (heck they might even have

one in that software by now) and set the power supplies to +9v

and -9v. Do a simulation run, then drop the power supplies to

+8v and -8v and do another simulation run. Compare the two runs

and do the math for the sensitivity:

S(F,v)=dF/dv

where

S(F,v) is the frequency sensitivity with respect to voltage, and

F is frequency, and v is the absolute value of both power supply

voltages.

Also, since the sensitivity comes in so low (0.1 percent approximately)

i dont see a problem.

BTW, i also give a brief circuit analysis course on the web if you are

interested. Most people dropped out once we got to simultaneous

equations however, so i stopped updating the site.

START_QUOTE

Not with an equation like "R=(1/f-d)/K/C". The equation is in an ambiguous format. What do you divide by what first? I assume you mean "R=1/((f-d)*K*C)

END_QUOTE

Bob, the formula just the way it is written is not ambiguous to

anyone who understands algebra. Do i have to state all the rules?

Well ok, here are a few that apply:

1. Do everything inside parens first

2. Next do multiplication and division, before addition and subtraction

3. Next do addition and subtraction

With these in mind, we look again at

R=(1/f-d)/K/C

Rule 1 says we have to do (1/f-d) first, and inside we find 1/f-d

which is one division and one subtraction, and rule 2 says mutiply and

divide before add and subtract so we have to do 1/f first, then subtract

d. This gives us a result we'll call x. The equation is now reduced to

R=x/K/C.

Since we have two divisions to perform we divide x by K and then divide

that result by C. The final result is R.

BTW didnt i give an example of using the formula with a worked out

design example?

If after that the formula still bothers you then use this:

R=(1/f-d)/(K*C)

This is algebraically perfect so you dont have to decide what

to divide by first.

rshayes:

Oh yes that looks much better. The only reason i included a delay

constant was to make the formula more accurate at higher frequencies

too, where the op amp delay starts to have quite a bit of significance.

If you ignore the delay constant, you will now find all of our formulas

are the same, or very close.

START_QUOTE

Prove it. Explain please. Use math.

Bob

END_QUOTE

Bob, sorry i forgot to reply to that part.

Im not sure, but what do you think, that i pulled these numbers

out of the air or something?

I got another idea, why dont you prove it? Go to the Linear Tech

site and download Switchcad (i think they are up to version 2 or 3

by now). I think you can get the spice model for the LF353 from

the National Semi site, but if you have any problem finding it just

yell and i'd be glad to send you the file. Draw the circuit as a

schematic using the LF353 spice model (heck they might even have

one in that software by now) and set the power supplies to +9v

and -9v. Do a simulation run, then drop the power supplies to

+8v and -8v and do another simulation run. Compare the two runs

and do the math for the sensitivity:

S(F,v)=dF/dv

where

S(F,v) is the frequency sensitivity with respect to voltage, and

F is frequency, and v is the absolute value of both power supply

voltages.

Also, since the sensitivity comes in so low (0.1 percent approximately)

i dont see a problem.

BTW, i also give a brief circuit analysis course on the web if you are

interested. Most people dropped out once we got to simultaneous

equations however, so i stopped updating the site.

START_QUOTE

Not with an equation like "R=(1/f-d)/K/C". The equation is in an ambiguous format. What do you divide by what first? I assume you mean "R=1/((f-d)*K*C)

END_QUOTE

Bob, the formula just the way it is written is not ambiguous to

anyone who understands algebra. Do i have to state all the rules?

Well ok, here are a few that apply:

1. Do everything inside parens first

2. Next do multiplication and division, before addition and subtraction

3. Next do addition and subtraction

With these in mind, we look again at

R=(1/f-d)/K/C

Rule 1 says we have to do (1/f-d) first, and inside we find 1/f-d

which is one division and one subtraction, and rule 2 says mutiply and

divide before add and subtract so we have to do 1/f first, then subtract

d. This gives us a result we'll call x. The equation is now reduced to

R=x/K/C.

Since we have two divisions to perform we divide x by K and then divide

that result by C. The final result is R.

BTW didnt i give an example of using the formula with a worked out

design example?

If after that the formula still bothers you then use this:

R=(1/f-d)/(K*C)

This is algebraically perfect so you dont have to decide what

to divide by first.

rshayes:

Oh yes that looks much better. The only reason i included a delay

constant was to make the formula more accurate at higher frequencies

too, where the op amp delay starts to have quite a bit of significance.

If you ignore the delay constant, you will now find all of our formulas

are the same, or very close.

LEDs vs Bulbs, LEDs are winning.

- Craig Kendrick Sellen
**Posts:**32**Joined:**Thu Jan 25, 2007 1:01 am**Location:**Carbondale Pennsylvania USA-
**Contact:**

### triangle & square wave osc.

Dear BOB, or MrAI or anyone eltz.

I think I made a misscalation The oscillator should run at 500 to 540Hz, using back to back 22uF's. Can you recalate? PLEASE? CRAIG

I think I made a misscalation The oscillator should run at 500 to 540Hz, using back to back 22uF's. Can you recalate? PLEASE? CRAIG

Hi again Craig,

You say you want 500Hz to 540Hz output and you want to use two

22uf caps back to back, but im afraid using caps that large for

an output around 500Hz would not work as well as using a smaller

cap and resulting resistor. Using two 22uf caps back to back (in

series that is to create one 11uf cap) would result in a resistance of

about 93 ohms, which is a little too small for the output of an LF353 to

properly drive, being that the current will be much more than the

LF353 was designed for. Since the input of the first op amp is

at virtual ground, the load on the second stage would be around

100 ohms, which means too much output current would be required.

The solution is simple however...simply use a smaller cap.

Using a single 0.1uf cap, you can use a resistor of 10.2k to get

around 500Hz output and a resistor of 9.45k to get an output of

around 540Hz.

If you would like to use instead another value cap just post here

and someone will calculate the two extremes of resistance you

would need for that cap. For example, maybe you have some

0.22uf caps laying around, or 0.05uf or something like that...

just post here what you already have. As mentioned however,

22uf caps wont work at 500Hz because the required resistance will

be too low.

You say you want 500Hz to 540Hz output and you want to use two

22uf caps back to back, but im afraid using caps that large for

an output around 500Hz would not work as well as using a smaller

cap and resulting resistor. Using two 22uf caps back to back (in

series that is to create one 11uf cap) would result in a resistance of

about 93 ohms, which is a little too small for the output of an LF353 to

properly drive, being that the current will be much more than the

LF353 was designed for. Since the input of the first op amp is

at virtual ground, the load on the second stage would be around

100 ohms, which means too much output current would be required.

The solution is simple however...simply use a smaller cap.

Using a single 0.1uf cap, you can use a resistor of 10.2k to get

around 500Hz output and a resistor of 9.45k to get an output of

around 540Hz.

If you would like to use instead another value cap just post here

and someone will calculate the two extremes of resistance you

would need for that cap. For example, maybe you have some

0.22uf caps laying around, or 0.05uf or something like that...

just post here what you already have. As mentioned however,

22uf caps wont work at 500Hz because the required resistance will

be too low.

LEDs vs Bulbs, LEDs are winning.

- Craig Kendrick Sellen
**Posts:**32**Joined:**Thu Jan 25, 2007 1:01 am**Location:**Carbondale Pennsylvania USA-
**Contact:**

### my problem

open to all;;;

Thanks for the education! but I still need the value for the potentiometer? I suspect the value for C can be reduced by a factor of ten. from 22uF to 2.2uF. I still need the value of the POT. between 500Hz to 540Hz.

This oscillator is to be used in a inductance core tester in case anybody wants to know. And the value must be pretty close, probably using 1 % componets. Can the frequency be calculated? I changed my mind, or what's left of it, to a TLO82

Thanks for the education! but I still need the value for the potentiometer? I suspect the value for C can be reduced by a factor of ten. from 22uF to 2.2uF. I still need the value of the POT. between 500Hz to 540Hz.

This oscillator is to be used in a inductance core tester in case anybody wants to know. And the value must be pretty close, probably using 1 % componets. Can the frequency be calculated? I changed my mind, or what's left of it, to a TLO82

Hi Craig,

For two 2.2uf caps back to back (in series) the resistor for 500Hz

would be 929 ohms, and for 540Hz it would be 860 ohms using

an LF353. Using a TL082 however you may find that you have

to reduce these two resistors by 200 ohms (to 729 ohms and 660

ohms) because there is some resistance in the output of that ic.

The application you are talking about will require a pot to adjust

the frequency, and you will also need a good frequency counter

to measure the output frequency as you adjust it. It is not a good

idea to try to calculate the resistor values to produce a frequency

as accurate as 1 percent.

For two 2.2uf caps back to back (in series) the resistor for 500Hz

would be 929 ohms, and for 540Hz it would be 860 ohms using

an LF353. Using a TL082 however you may find that you have

to reduce these two resistors by 200 ohms (to 729 ohms and 660

ohms) because there is some resistance in the output of that ic.

The application you are talking about will require a pot to adjust

the frequency, and you will also need a good frequency counter

to measure the output frequency as you adjust it. It is not a good

idea to try to calculate the resistor values to produce a frequency

as accurate as 1 percent.

LEDs vs Bulbs, LEDs are winning.

Electrolytic capacitors, both aluminum and tantalum, are not made to tight tolerances and tend to be unstable with time and temperature. You can get ceramic capacitors in this range, but the temperature coefficients are not very good for the high capacitance parts. Ceramic NPO capacitors are accurate and stable, but are not usually available in large values (above a few thousand picofarads).

- Craig Kendrick Sellen
**Posts:**32**Joined:**Thu Jan 25, 2007 1:01 am**Location:**Carbondale Pennsylvania USA-
**Contact:**

### revison of values

To, Mr. AL;

I reduced the capacitor to 0.22uF plastic or mylar or cermic (NPO) I guess it will havt to be (back-to-back) also to make a 0.11uF. I revamped the resistance values using a TLO82, chip. The value for 500Hz 7290 ohms. please check this?

The value for 540Hz 6600 ohms, please check this? Both were reduced by 200 ohms, like you said.

What should be the values of R1, R2. R1=10K maybe R2=200K ?

If you OK this I will use it.

I reduced the capacitor to 0.22uF plastic or mylar or cermic (NPO) I guess it will havt to be (back-to-back) also to make a 0.11uF. I revamped the resistance values using a TLO82, chip. The value for 500Hz 7290 ohms. please check this?

The value for 540Hz 6600 ohms, please check this? Both were reduced by 200 ohms, like you said.

What should be the values of R1, R2. R1=10K maybe R2=200K ?

If you OK this I will use it.

### Re: revison of values

If the caps are plastic or ceramic, they are not polarized and do not have to be "back-to-back". Just use one. Like Mr. Hayes suggests- 0.1uF in film or NPO ceramic is a good choice. Try getting 5% or better tolerance.Craig Kendrick Sellen wrote:I reduced the capacitor to 0.22uF plastic or mylar or cermic (NPO) I guess it will havt to be (back-to-back) also to make a 0.11uF.

Again I disagree with Mr. Al. Any output impedance the op-amp has will not change the frequency of the oscillator, therefore there is no need to add or subtract any "200 ohms". The oscillator frequency is independent of power supply voltage or op-amp impedance. There is no voltage or op-amp impedance variable in the equation.Craig Kendrick Sellen wrote:I revamped the resistance values using a TLO82, chip. The value for 500Hz 7290 ohms. please check this?

The value for 540Hz 6600 ohms, please check this? Both were reduced by 200 ohms, like you said.

f = (R2/R1)*(1/(4*R*C)).

Any voltage sag causing the current in TR1 to go down is compensated for by earlier triggering of the toggle, so you can ignore this "impedance".

10K for R1 and 20K for R2, like we've said a few dozen times, would be good choices.Craig Kendrick Sellen wrote:What should be the values of R1, R2. R1=10K maybe R2=200K ?

Bob

Hello again,

Craig:

As before R1=10k and R2=20k and these will not change.

Using an advanced circuit simulator the values come out as follows:

Using two back to back 0.22uf caps, which comes out to 0.11uf:

500Hz - 9260 ohms

540Hz - 8565 ohms

Using one single 0.10uf cap:

500Hz - 10180 ohms

540Hz - 9420 ohms

Of course using one single cap is going to be easier, unless you happen

to already have two 0.22uf caps on hand.

Also, the values for these components is based on EXACT values

of capacitances, which are never found in practice. This means

some adjustment is going to be necessary.

These values were adjusted to obtain about 0.1 percent accuracy, but

in practice for this kind of application you will still have to measure

the output frequency using a counter and adjust as needed.

If you require two set frequencies then you can use a switch to

switch in one set of resistors and pot and switch out the other set,

to get the two frequencies set by one switch.

As others and myself have mentioned, the short term stability is

pretty good, although depending on the type of capacitor used the

long term stability may require another adjustment, or perhaps even

one adjustment per month depending on accuracy needed.

The temperature stability, on the other hand, isnt as good as we would

like it to be. The circuit will change frequency with temperature to

some degree and so either the temperature has to be stabilized

(using a small oven) or the output frequency should be constantly

monitored (using a built in frequency counter) or even a phase locked

loop might be incorporated, again depending on what accuracy you

are looking for. BTW it might help to know what exactly you are

building.

There are crystal oscillators that are much more stable that might be

better for your application.

Craig:

As before R1=10k and R2=20k and these will not change.

Using an advanced circuit simulator the values come out as follows:

Using two back to back 0.22uf caps, which comes out to 0.11uf:

500Hz - 9260 ohms

540Hz - 8565 ohms

Using one single 0.10uf cap:

500Hz - 10180 ohms

540Hz - 9420 ohms

Of course using one single cap is going to be easier, unless you happen

to already have two 0.22uf caps on hand.

Also, the values for these components is based on EXACT values

of capacitances, which are never found in practice. This means

some adjustment is going to be necessary.

These values were adjusted to obtain about 0.1 percent accuracy, but

in practice for this kind of application you will still have to measure

the output frequency using a counter and adjust as needed.

If you require two set frequencies then you can use a switch to

switch in one set of resistors and pot and switch out the other set,

to get the two frequencies set by one switch.

As others and myself have mentioned, the short term stability is

pretty good, although depending on the type of capacitor used the

long term stability may require another adjustment, or perhaps even

one adjustment per month depending on accuracy needed.

The temperature stability, on the other hand, isnt as good as we would

like it to be. The circuit will change frequency with temperature to

some degree and so either the temperature has to be stabilized

(using a small oven) or the output frequency should be constantly

monitored (using a built in frequency counter) or even a phase locked

loop might be incorporated, again depending on what accuracy you

are looking for. BTW it might help to know what exactly you are

building.

There are crystal oscillators that are much more stable that might be

better for your application.

LEDs vs Bulbs, LEDs are winning.

### Who is online

Users browsing this forum: No registered users and 28 guests