I am using a TL074CN comparator to compare a fullwave rectified input voltage with a DC voltage of 1.4 V as shown in the above figure. At the output of the comparator, I am receiving a square wave which goes from +12V to -12V.
The figure 2 above shows the square wave generated in microsecond level. As you can see the waveform is very unstable at the moment. So far what I tried was
1) I also added a 100u capacitor at the output of the opmamp but it doesn't stabilize the waveform , it instead curves the waveform at the edges
2) I added a 10K resistor at the output but it doesn't help either.
3) I switched the TL074CN with an LM324N and still did not stabilize the waveform
Is there anything which I can do to make this square wave stable?