Question about LM339 simulation

Thread Starter

BlackMelon

Joined Mar 19, 2015
93
Hello,

Please refer to the attached images. I have got the LM339's LTSpice model from https://github.com/evenator/LTSpice-Libraries/blob/master/sub/LM339.sub
I connected the circuit like that shown on the image and expected the output voltage, Vout, to be 0. However, the output is +5V. I would like to know if this is my mistake or something wrong with the model?

Thank You
 

Attachments

MrChips

Joined Oct 2, 2009
21,374
Your pin-2 is connected to 0V.
The comparator cannot compare down to 0V with a single voltage supply.
Shift pin-2 upwards to some voltage higher than 0V.
 

Thread Starter

BlackMelon

Joined Mar 19, 2015
93
Thank you guys! Your comments are very helpful. Actually, the voltage source V2 is a sinusoidal wave. I added a DC offset, so the wave will not swing below the ground. :)
 
Top