LM311 LTspice hangs when using hysteresis schmitt trigger

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
Hi.
I just installed LM311 pspice files from ti.com. In the attached LTspice XVII file, the LM311 comparator works fine when R6 schmitt trigger hysteresis is removed. When I add R6, I cannot Run the simulation because it almost hangs, runs too slow (might take all day).

The same circuit with R6 added works fine with LM393 or TL1011 comparators. But not with LM311. Any thoughts? Many thanks.
 

Attachments

Papabravo

Joined Feb 24, 2006
21,158
Attached is TI_lm311.zip which is exactly as I downloaded from Texas Instruments. To import this into LTspiceXVII, I opened lm311.lib and right clicked on LM311 and chose "Create Symbol." LM311.asy is autogenerated. Thanks.
Does TI represent that their models will work in LTspice?
I ask because models that do are available, but maybe not directly from TI

EDIT: The model you downloaded is complex. It may be compatible with TINA and was generated in 2019. The older behavioral models have been around since 1990 and do work in LTspice. You pays yer money and takes yer chances.
 
Last edited:

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
hi,
This what I see using my LM311 model.
E
View attachment 258242
No this is what I get with LM393 or with TL1011. It should turn the mosfet on and off between vout 5.2 - 5.3 V. See attached picture. So it didn't hang for you? Is it because you changed the asy file? I have LM311 in my parts and wanted to use them. Not sure how to fix the simulation ( I know TI doesn't officially support LTspice but I hoped that this would work?)
 

Attachments

crutschow

Joined Mar 14, 2008
34,280
Note that the D1n4007 is a slow recovery diode designed for mains rectification, and will have high losses in a switching regulator.
Use a Schottky type.
 

eetech00

Joined Jun 8, 2013
3,858
Hi.
I just installed LM311 pspice files from ti.com. In the attached LTspice XVII file, the LM311 comparator works fine when R6 schmitt trigger hysteresis is removed. When I add R6, I cannot Run the simulation because it almost hangs, runs too slow (might take all day).

The same circuit with R6 added works fine with LM393 or TL1011 comparators. But not with LM311. Any thoughts? Many thanks.
What is target output voltage?
What is the target switching frequency?
 

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
What is target output voltage?
What is the target switching frequency?
I don't have a target switching frequency. I'm using a 6V Lead Acid Battery. What I need is 5V output from it. Current 1 Amp max. What I am using right now is a linear supply I built myself, op-amp connected to the base of a P-CH mosfet. But at 1 Amp the power mosfet with a small heat sink operates at about 90 degrees Celsius. I find it too hot.

So I want to build an SMPS that can drop only 1 Volt. Everything available on the market needs at least 2 volts forward drop. I found a low dropout smps (P-CH based) and it cost over $50. So I'm building my own and hopefully it will work. SLR acid batteries operate between 6.4-6.0v. My idea is to drop one volt to 5.2-5.3V with switching, and then clean the rest linearly for a noiseless 5V out. It is working with the simulation so far. Attached is the design and its output. From the graph, at 1 Amp the TLV1805 will switch at under 2 Khz. The TLV1805 incorporates push-pull stage. I switched to TINA because of it.

If the idea is correct, this should run cold even with a small mosfet such as the irfhs9301 (parts I have in stock). Any buck_TLV1805.pngSMPS_output.pngother ideas are welcome. Thanks.
 

eetech00

Joined Jun 8, 2013
3,858
Hi

This is using your original approach with some mods to the values.
I made a new transistor based LM311 model from T1 schematics. It works well.
See below.

1642900269526.png

I showed a resistor divider for the reference voltage but the TL431 would be more precise/stable.
There's about 50mV (or less )ripple at 5V@1A load.

EDIT: Changed driver to push/pull type. Increased output capacitor value.
 

Attachments

Last edited:

Thread Starter

farhadsaberi

Joined Sep 8, 2020
20
Hi

This is using your original approach with some mods to the values.
I made a new transistor based LM311 model from T1 schematics. It works well.
See below.

View attachment 258480

I showed a resistor divider for the reference voltage but the TL431 would be more precise/stable.
There's about 50mV (or less )ripple at 5V@1A load.

EDIT: Changed driver to push/pull type. Increased output capacitor value.
Great thank you. I will make a LM311 version and a TLV1805. Could you please share you LM311 LTspice files? TI has updated the model and it breaks LTspice.
 
Top