simulate this circuit – Schematic created using CircuitLab

I am a beginner at circuit design, and I am having trouble using the Vout of differential amplifier as Vref of comparator. The other input of comparator is a potentiometer connected to Vcc and ground.

The problem I'm seeing is that, with a fixed voltage value of 2.32 V at the output of LTC1050, when I change the voltage output of the potentiometer, the output of LM358 also changes incrementally (not switching from 0 to Vcc based on which input voltage is larger, as expected of a comparator circuit).

The op-amp comparator (LM358) works as expected when I set Vref to be the voltage divider output of Vcc and ground. What is different about the Vout of differential amplifier? What should I do differently to make it work?

Any help would be greatly appreciated.

In case you want more info: I am trying to convert PWM to DC, amplify it with differential amplifier, and compare it to potentiometer value to drive an h-bridge. I am stuck at the part connecting the differential amplifier and comparator.

Per suggestion, here is a picture of my circuit. The only added part from the circuit diagram is 7.5V of power supply (2A max current) fed into 5V voltage regulator (L7805CV3) to produce 5V supply for all power lines.

enter image description here

  • 1
    \$\begingroup\$ This question will have much more value if provided a schematic. \$\endgroup\$
    – Eugene Sh.
    Jun 16, 2016 at 16:45
  • 4
    \$\begingroup\$ What do you mean by differential amplifier? Differential input, differential output, or both? How about a schematic with part numbers? If you click edit on your post, there is an icon with a pencil over a schematic which lets you draw diagrams. \$\endgroup\$
    – Jack B
    Jun 16, 2016 at 16:50
  • 1
    \$\begingroup\$ We do engineering here, not hand waving. Closing. \$\endgroup\$ Jun 16, 2016 at 16:55
  • \$\begingroup\$ I didn't know about the draw feature - thanks for the info. What does closing mean..? This question is no longer viewable to others? \$\endgroup\$
    – JJ. Doe
    Jun 16, 2016 at 17:08
  • 1
    \$\begingroup\$ Thanks for all the suggestions - I tried to address them with the edits. Hopefully the post is a little more meaningful now, and I would really appreciate help on this problem. \$\endgroup\$
    – JJ. Doe
    Jun 16, 2016 at 17:39

1 Answer 1


The simple answer is: don't use an op amp as a comparator. Especially, don't use an early op amp such as an LM358 as a comparator with a single 5 volt supply. Use a real comparator - if you like oldies, an LM311 will give you much better results.

Your LM358 is not remotely able to drive a high level anywhere near 5 volts. 2 volts is more like it. I suspect this is what you're seeing in your "incremental" level shift.

If you do use an LM311, make sure to connect a pullup resistor from the output to +5.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.