Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to get a LM311 comparator into LTspice?

Flyback

Well-Known Member
Hi,
I have made the symbol, with correct numbering as per subckt file.
I then pasted the subckt file into the LTspice schem.
I then right clicked the symbol and made "prefix" be "x" and "value" be "LM311".

However, it still doesnt work , as attached.

I got the subckt file from ti.com

 

Attachments

  • LM311.asc
    12.9 KB · Views: 8
...Aaah...maybe i have gone outside the common mode range for inputs...just tried square wave 2v to 3v and its working. Sorry.
Even so, wow, i didnt realise LM311 was that useless as not to be able to accept a 0v,5v square wave input when its given a 5V single supply?
 

Attachments

  • LM311.asy
    515 bytes · Views: 7
Last edited:
i didnt realise LM311 was that useless as not to be able to accept a 0v,5v square wave input when its given a 5V single supply?
You just have to (gasp) follow the data sheet limits, which is 0.5V above the lower supply voltage (ground here). and 2V below the upper supply voltage (below).

The LM339 comparator has -1.5V upper limit, but the input can go down to zero when powered from a single 5V supply.

1745788721068.png
 

Latest threads

Back
Top