enter image description here In my Lm 393 comparator, my output is not coming proper square wave.picture is shown below. I have described about my circuit.

I am using voltage comparator LM393 for comparing two signals, one signal is my reference signal which is a triangle wave, with voltages 2.08 volt generated by 555 timers above 200kHZ giving to the input terminal of inverting side of LM393 and input signal or modulating signal which voltage is less than 2.08 giving from function generator as a sinusoidal signal in the range of 1 Hz to 20kHz in the noninverting side of LM393.

My question is when I am providing two signals it should be compared and give a square wave, but LM393 only taking triangle wave, sin wave is not going?

In this picture below, I am referring to this circuit, please tell me what 's wrong in this circuit, when I am taking triangle wave from 555 timer ad providing into the comparator and another signal providing from the generator.

enter image description here

  • \$\begingroup\$ Read the datasheet and ensure your CM inputs range is valid and same for supply and output should follow the differential levels. \$\endgroup\$ Commented Jun 24, 2020 at 5:32
  • \$\begingroup\$ yes, I have read it everything is okay, but still not working. \$\endgroup\$ Commented Jun 24, 2020 at 5:59
  • \$\begingroup\$ If you understand then define each pin voltage \$\endgroup\$ Commented Jun 24, 2020 at 6:00
  • 3
    \$\begingroup\$ Show your circuit. Also note the open collector asked recently and solved. \$\endgroup\$
    – Andy aka
    Commented Jun 24, 2020 at 8:11
  • 2
    \$\begingroup\$ You have a 4 channel oscilloscope - you need to use it as one. || If you show the LM393 pins 1 2 3 simultaneously you and we can see what is REALLY happening. At present your diagram plus text shows what you think or hope or guess is happening. \$\endgroup\$
    – Russell McMahon
    Commented Jun 30, 2020 at 1:40

1 Answer 1


LM393 input common mode voltage range is 0 V to Vcc - 1.5 V. In the comments you say:-

my triangle wave is going to the inverting pin (pin no -2) voltage is 4.5 volt for non inverting pin sin wave is going to the pin no -3, voltage is 5 volt , pin no-5 as VCC of LM393, 5 volts

5 V - 1.5 V = 3.5 V. It will not work properly if either input voltage goes above 3.5 V on a 5 V supply.

  • \$\begingroup\$ so, I need to increase my supply voltage of LM 393 using 6.5 volts instead of using 5 volts. \$\endgroup\$ Commented Jun 24, 2020 at 15:15
  • \$\begingroup\$ @ArijeetRoy: or reduce the input signal voltages. \$\endgroup\$ Commented Jun 24, 2020 at 15:30
  • \$\begingroup\$ okay , I reduce the voltage in the inverting side as 2 volts and give 2.5 volts into the noninverting side, it will work? \$\endgroup\$ Commented Jun 24, 2020 at 15:37
  • \$\begingroup\$ The circuit you have now provided should work (with some distortion at high signal level), but only if the audio input is AC coupled. You should put a capacitor ~1-10uF in series with each input channel. You can check that the comparator is working by varying R7 with no input. The PWM ratio should change, producing an average comparator output voltage similar to the pot voltage. \$\endgroup\$ Commented Jun 25, 2020 at 2:23
  • \$\begingroup\$ okay, I will do the same thing. \$\endgroup\$ Commented Jun 25, 2020 at 5:37

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.