Electronic – Unable to connect amplifier output to comparator in opamp

amplifiercomparatoroperational-amplifier

I am amplifying a signal for a current transformer (CT) with an op amp. This amplified output signal I need to compare using op amp comparator.

The supply voltage is 12V and the IC is an LM358. When I give the output of the amplifier to the comparator, the comparator gives an output signal of 7 volts irrespective of voltages at inverting and non inverting terminal, which should be either high Vcc or low 0V as it is a comparator.
Can you help me with a solution?

enter image description here
enter image description here
enter image description here

Best Answer

There are many things wrong with this circuit. From the left:

The CT probably requires a load resistor. If it outputs 30mA at full scale (as your schematic appears to show), that should go into a resistor. For example, 100 ohms would give you 3V volts RMS if the CT can work with that high a resistance. The voltage will be AC and in that example it would be +/-4V peak from the tranformer with just the load resistor.

The circuit following it is a DC amplifier with gain 1+ (R2/R1). It cannot handle voltages below 0V and the op-amp will do unpleasant things (phase reversal at a minimum) if the input goes more than a few hundred mV below ground. You probably want some kind of precision rectifier circuit here rather than an amplifier, but that will depend on what exactly you are trying to do and how well you are trying to do it.

The following circuit is indeed a comparator but the common mode range of the LM358 does not include the power supply rail so the top part of the pot range will do nothing of value. R3 is unnecessary.

Your relay drive circuit will only give you about 9V (or less, depending on values) on the relay coil when 'on' because the LM358 output does not swing to the positive rail and the emitter follower transistor drops 700 or 800mV. There is also voltage drop across R6, which is unnecessary. It would be better to reverse the comparator and drive the transistor as a low-side driver, in which case you need the base resistor and you also would need a flyback diode across the relay coil.

It's a bad idea to drive a relay without hysteresis in the comparator, otherwise you will likely get chattering around the control point. That can be accomplished by adding a bit of positive feedback to the comparator.