I created an Op Amp integrator with LM358 to convert square wave to triangle wave as shown below.
Though the circuit sometimes works as I expected, but sometimes when I restart my signal generator square wave output, the output will be exceed voltage rail.
(The yellow one is the output of signal generator and the blue one is the output pin of the Op Amp, both 1V/div )
I am 90 percent sure that this problem raised because my generator not outputting perfect waveform on the beginning and the waveform take some time to become stable. And this will make the integral result go to voltage rail and cannot be integrated back. However, I am not sure how to solve this and make the circuit more stable and always start working. I hope this can be bettered because latter I want to connect it to a 555 timer and the timer, just like my function generator, not start working perfectly as I observed on the scope days ago.
Thanks for any suggestion.
Thanks to vangelo's suggestion, I changed the cap to a 224 one. And then the circuit works a lot of better that I turned on and off the signal generator ten times and all of them works well. However, I found I can still repeat my problem by screw the R3 to a low resistance. (Originally the connected side measures about 5kOhm and now I turned it to about 2kOhm) And here I finally captured how the circuit go out of control. (Same scope configuration as the above and before this experiment I checked probe again and it's OK)
The screenshot was taken by one shot but what happening, if in Auto mode of scope, I can notice triangle wave after turning signal output on in several seconds or frames maybe. And in that way it is after my generator works stable state that the circuits go wrong... Also, I found another problem is when the signal was turned off, the output of Op Amp is about 3.6V but not 2.5V, I believe this is caused by offset voltage and offset current. Should I compensate it in this application and how?