# Op-Amp oscillator

Discussion in 'The Projects Forum' started by vikaskumardabas, May 8, 2014.

Apr 12, 2012
4
0
Hi,
i,hv just made a op-amp square wave generator

But It has On time=350ms
Off time =300ms (checked on Digital Scope)

IC-lm358

i dont know what is the problem , they must have equal time for on off
but not.

File size:
36.1 KB
Views:
42
2. ### #12 Expert

Nov 30, 2010
18,076
9,691
The output of the chip is not equally positive and negative during its operation.
Check the graph of output voltage vs current. Page 5, bottom left, 2 graphs.

ps, that is not a square wave generator. It is a simulation of a square wave generator.

Edit. I certainly got that one wrong. Sorry.

• ###### LM358.PDF
File size:
282 KB
Views:
33
Last edited: May 8, 2014

Apr 12, 2012
4
0
ok..
#12, what do you mean by:
"ps, that is not a square wave generator. It is a simulation of a square wave generator."

and i cant understand what datasheet wants to say.

4. ### Dodgydave AAC Fanatic!

Jun 22, 2012
8,286
1,447
look at the datasheet on page 9, top left circuit uses half an lm358 as an oscillator, use that design and it will work. To alter the frequency, alter R1, or C1, or both.

Apr 12, 2012
4
0
sorry buddy,
'Dodgydave' it is still showing positive output half larger than zero output.

It is happening real not simulators .

& frequency is not so concern here. +ve and -ve half must be equal

6. ### Dodgydave AAC Fanatic!

Jun 22, 2012
8,286
1,447
the output will swing from 1/3 to 2/3 of the single supply,so if your using a 12v supply,it will go from 4v to 8v. Altering R4 alters the swing ratio.

Apr 12, 2012
4
0
You mean voltage at positive pin..
well thanks for help .
i'm getting a hard time as my teacher a analog expert hopes that i find solution but i can't.

Again thanks.

8. ### AnalogKid AAC Fanatic!

Aug 1, 2013
8,080
2,285
Your original post has times of 300 ms and 350 ms. Lets assume that the correct numbers are 325 and 325. 25 ms out of 650 ms is an error of 3.8%. So where is something in the circuit off by something like that?

The opamp output. The hysteresis network is referenced to +12V, but the timing resistor gets up to only around 10.5V (working from memory here). That's a 12.5% difference. This means that the hysteresis centerpoint is less than 6.0V.

The opamp output (and therefore the sawtooth waveform on the timing capacitor) swings between 10.5V and 0.1V for a centerpoint of 5.3V. Check the opamp datasheet for the actual numbers. This is different from the hysteresis centerpoint because the timing capacitor does not have a separate resistor directly to the +12V the way the hysteresis network does. The sawtooth wave center and hysteresis center are not equal. There's probably some arithmetic involved, but I think that's where to start looking.

ak

Last edited: May 9, 2014