Please look at the circuit attached . I am feeding sq. wave to the opamp and expecting a triangular ramp signal at the output. I am getting it for sure , but i am also getting the ripple of ~70mV at the square wave change over.
Please help me to remove the ripple.I am probing at the "Out".
1. What's a ripple in this case. The term is far from a clear meaning. Are you talking about a simulation or a real measurement?
2. I guess, you are observing non-ideal OP effects. They are present in any real OP circuit.
3. As a first step, use an OP of sufficient quality rather than the poor class B output stage LM324.
I have some doubt if your circuit can work properly because the pos. opamp input is biased with Vcc/2. The opamp output must be at Vcc (saturation). Any dc feedback is missing.
The bias would be O.K. if you assume a 0/5V square wave input signal. But some kind of feedback (time-continuous or -discrete)
is actually necessary to set the integrator level.
The discussed ripple problem shows however, that the circuit has been (at least partly) operated out of saturation.
So I was confident, that dipnirvana has managed the feedback/integrator reset problem somehow.