LM358 Square Wave Oscillator Help

Status
Not open for further replies.

RKG

New Member
I am going to be using a LM358 as a Square Wave Oscillator for a college project but am having some trouble in calculating what Resistor and Capacitor values I'll need to use to produce a frequency of 1Hz. I'll be using the oscillator on pg 14 of this document: **broken link removed**

I've found many equations during my research but am unable to find one that relates to the LM358.

The most common equation I have found is: T=2RC ln[(1+λ)/(1-λ)] Where λ=R1/R1+R2

Of course this does not take into account R3 of the LM358 circuit. Can I leave R3 out of the equation or do I change the equation to this: λ=R1/R1+R2+R3 ?

Any help would be much appreciated.
 
Last edited:
If you can type a question...

Wrong reply. Please neglect this post.
 
Last edited:
First look at how an oscillator with an ideal opamp behaves:

The output switches rail-to-rail (0 to 10V). The voltage at node N1 switches between 1/3 and 2/3 of V+ (3.333V and 6.666V). The period of the oscillation is proportional to R4*C1, which exhibits the classical exponential charge/discharge voltage vs time between the 1/3V+ 2/3v+ limits at node I1.

Now look at what happens if you use an LM358, which is not a rail-to-rail output opamp. Note a lightly-loaded LM358 pulls close to 0V, but it only pulls to (V+) -1.2V when high. This effects what happens at node N2, which no longer is switching between 1/3 and 2/3 of V+, which creates an asymmetric output, and changes the period. I'll leave it to you to derive the equation; I use LTSpice so I dont have to.

In fact, this shows why, when building an RC oscillator, you are better off using a LM555. It is much less effected by power supply and load variations than this oscillator.
 

Attachments

  • DF169a.png
    33.7 KB · Views: 665
  • DF169b.png
    35.9 KB · Views: 505
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…