I'm trying to build a simple voltage comparator using LM324N. Here is the circuit:
simulate this circuit – Schematic created using CircuitLab
The strange thing that happens is that after apply the input voltage, a small part of it gets clipped off. Here are the pictures of the circuit and the resulted voltages:
I've connected all of the grounds and negative terminals (i.e., CH1, CH2 and the negative terminals of the input voltage and power supply) together. Also using another LM324N and applying input voltage with a resistor didn't solve the problem. As soon as I disconnect the input voltage from LM324N, it gets back to its normal shape which is a sine wave with 3V amplitude.
How do I stop the voltage from clipping on the opamp input?