Stimulated/provoked by other threads related to this topic I have come up with the attached model for the LM331/231 in a test rig.
It's just an asc schematic, so cut and paste the bits within the dotted rectangle as required.
No doubt someone out there will be able to convert it to to a general-purpose sub-circuit which LTS recognises. I tried but failed, and would be interested to know how it's done.
Edit: I've fallen into a previous trap! The 311 in the title should be 331.
That's where I tried but failed. I retained just the bits in the rectangle and saved as an asc file, copied that to various LTS folders, then created a symbol. Tried adding the symbol, plus various .lib, .inc directives, to a new schematic. No joy. Error message about unknown subcircuit when the sim tries to run. Didn't know where to go from there. LTS Help says use it as a subcircuit. But how?
I did as instructed.
It looks as though the main test asc file, the subcircuit asc file and the asy file all have to be in the same folder to get things to work. It wouldn't work when trying to run a draft schematic (in the LTSpiceIV folder), with the asy file and the subcircuit asc file both in Misc and both in .sym.
That's a shame. I was hoping to be able to use the subcircuit in the same way as LT uses its .sub files, with the subcircuit in the LT /lib/sub (or subordinate) folder and the asy file in the /lib/sym (or subordinate) folder.
It would be nice if LT could provide an enhanced folder structure with, say, an 'AddOns' handler, and an enhanced folder-search engine which looked in all folders from the LT root down, to make it easier to bolt on third-party models etc. (I know, I shouldn't look a gift horse in the mouth).
Do you know if synchronising (updating) the LT program wipes out any user additions to the LT-provided folders?
BTW, I assume the LT .sub files are encoded differently from user subcircuit files in some way to make them proprietary?
I did as instructed.
It looks as though the main test asc file, the subcircuit asc file and the asy file all have to be in the same folder to get things to work. Mine runs OK, with the*.asy file in lib\Sub\Misc folder. C:\Program Files\LTC\LTspiceIV\lib\sym\Misc
I can use F2 , look in the Misc folder and select LM331m1.asy You should keep the 'hier model' in the same folder as the LM331_test1.asc file.
It wouldn't work when trying to run a draft schematic (in the LTSpiceIV folder), with the asy file and the subcircuit asc file both in Misc and both in .sym. Do not place the 'hier model in the sym folder.
That's a shame. I was hoping to be able to use the subcircuit in the same way as LT uses its .sub files, with the subcircuit in the LT /lib/sub (or subordinate) folder and the asy file in the /lib/sym (or subordinate) folder.
It would be nice if LT could provide an enhanced folder structure with, say, an 'AddOns' handler, and an enhanced folder-search engine which looked in all folders from the LT root down, to make it easier to bolt on third-party models etc. (I know, I shouldn't look a gift horse in the mouth).
I use also a second 'misc2' for trial work on models
Do you know if synchronising (updating) the LT program wipes out any user additions to the LT-provided folders?
BTW, I assume the LT .sub files are encoded differently from user subcircuit files in some way to make them proprietary?
I have upgraded about every 45 days from LTS, never over written of my work.
I do keep a full working back up on the D:\drive for LTS, just in case of some failure.
I will look at some options for making in more 'friendly'
I have made a neater version of the model, will post later.
Hello Everyone. Thanks for the LTSpice model. I have one doubt though, Why the output voltage is limited to 30-32mV range? In the datasheet it is mentioned current output is some 120uA. But here it is not the case. Thanks
Hi,
I figured this 3rd party model was worth experimenting on a V-F configuration of mine, after patching this bug.
The attached schematic functions in the *real* world, but fails to simulate!
This is my initial attempt using SPICE and would appreciate any help getting simulation to function, as well.
fritual
Hi,
I figured this 3rd party model was worth experimenting on a V-F configuration of mine, after patching this bug.
The attached schematic functions in the *real* world, but fails to simulate!
This is my initial attempt using SPICE and would appreciate any help getting simulation to function, as well.
fritual
eTech,
The symbol I used can be found in post #9 of this thread.
As for the hierarchical circuit, goto post #5 and put it in the same folder as my schematic in post #12.
The attached spec sheet circuit should match LM331 TestRig.asc in post #1.
HTH
fritual
eTech,
The symbol I used can be found in post #9 of this thread.
As for the hierarchical circuit, goto post #5 and put it in the same folder as my schematic in post #12.
The attached spec sheet circuit should match LM331 TestRig.asc in post #1.
HTH
fritual