Unusual behaviour of comparator in LTspice simulation.

Thread Starter


Joined Aug 1, 2022
I'm trying to build a simple PWM modulator to convert the analog Audio signal into an PWM waveform, the triangle wave generator works fine and i have used an AC sine wave as an audio input, with an DC offset to match with the Triangle wave reference, but couldn't get the comparator circuit into working, I've seen the same configuration used by some circuits to generate PWM, mainly from "Great Scott" ones. I have also tested the comparator separately without high frequency, and it works fine. and can handle 200khz input with ease, below i have added the images and Spice simulation file. I have downloaded the lm393 spice model from Texas instruments website and its simulation name seems to be lm2901, as they are both similar. but for some reason, the output stays at 0V. Thank you.Screenshot (313).pngScreenshot (314).png


Joined Feb 24, 2006
That behavior is not unusual in the slightest.

Q: What kind of an output does the LM2901 have?
A: It has an open collector output, as does the LM393

Q: What are the implications of using a device with an open collector output?
A: It needs an additional component to allow the output to go high.

Q: What could that component be?
A: _______fill in the blank___________

That's a good lad.