LT spice 1N4007 model

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
Hi, I am trying to model a power supply circuit that uses 1n4007 diodes. LT spice does not have the model on it. I have searched a lot for it but can't find anything. I have tried using other ones with close enough specifications. But with no avail. Every time I try a different diode I get a totally different result so I am hopeful that that is my only problem.
If someone can also guide me a bit on what the most important attributes is and how they work to look for when comparing specs. I have searched and tried but I am a bit stuck.

Any help would be appreciated
Thanks
 

crutschow

Joined Mar 14, 2008
23,508
In the Windows\Program Files (x86)\ LTC\LTspiceIV\lib\cmp, rename the standard.dio file to standard.dio.bu (to backup the file).
Add the attached file in that same folder to replace it.
Rename the file standard.dio
That has models for 1N4001 through 1N4007.
 

Attachments

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
Excellent! thank you. I now am having much better results already. Although not right yet.
This is an dual channel power supply. With the two channels capable of 0v-15v and 0v - -15v respectively. If anyone need more info about it just ask. I will post the schematic as soon as my computer syncs up with my cellphone and I can transfer the photo.

I am also having trouble finding an model for the LM317 Voltage regulator.
 

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
Hi I might seem like an complete idiot But I have trouble linking the component correctly. The one voltage regulator that i linked seemed to be a fluke. I'm getting an error that goes like "Missing schematics fr the hierarchy: "
Now the schematic files is probably the .asc file. But all downloads of the component also comes with different files. Any assistance would be nice.
 

MikeML

Joined Oct 2, 2009
5,444
Most components you add require two parts: a symbol and a model. The former is a .asy (the LTSpice symbol) and the latter could be a .mod, .sub, .txt, etc (the Spice .SUBCKT, always a text file).

Sometimes, you can use the existing LTSpice symbol and hook it up to an imported .mod file (if the pin order and number matches). For example, importing a new OpAmp model; just use the existing symbol.

Read this.
 

wayneh

Joined Sep 9, 2010
16,114
In the Windows\Program Files (x86)\ LTC\LTspiceIV\lib\cmp, rename the standard.dio file to standard.dio.bu (to backup the file).
Add the attached file in that same folder to replace it.
Rename the file standard.dio
That has models for 1N4001 through 1N4007.
Ooh, don't tell them over at the Yahoo group that you're doing it that way. They seem hell bent on only using include commands. :rolleyes:
 

crutschow

Joined Mar 14, 2008
23,508
Ooh, don't tell them over at the Yahoo group that you're doing it that way. They seem hell bent on only using include commands. :rolleyes:
That's interesting.
I find it annoying to have to use the .include command so I embed the models as much as possible, such as for added op amps, comparators, and voltage regulators, thus they act exactly like the models that come with LTspice.
It does require that you copy the appropriate .asy symbol and then modify it with the LTspice symbol editor to point to the proper model file.

The only .include command I have to use is for the CD4000 models since there were more symbol files then I care to modify.
 

AnalogKid

Joined Aug 1, 2013
8,140
In the schematic there is a missing connection between the diode bridge negative output and the input to the negative regulator. Since this provides the bias current for the positive regulator reference offset, it might be why the circuit is not behaving. Also, there should be no difference in operation with any of the 1N400x diodes. Each pair of diodes in series is acting as a 1.4V zener diode.

In the standard application, the LM317 has a minimum regulated output voltage of 1.25 V. If you want the output to be adjustable all the way down to GND, you fool the regulator by connecting the bottom of the adjustment divider to a voltage about 1.5 V below GND. It decreases the regulation accuracy a little bit because now you effectively have two regulators in series, and the diode Vf has a hefty temperature coefficient. Still, the output should wander around only a few millivolts as the circuit components warm up.

ak
 

wayneh

Joined Sep 9, 2010
16,114
That's interesting.
I find it annoying to have to use the .include command so I embed the models as much as possible...
I think they frown on that primarily because the models you build are then less portable. They won't work for anyone else unless they are set up just like your LTspice installation. I believe they also say that installing updates to LTspice may break your setup.

I find this one of the more annoying interface issue with LTspice. That and the backwards verb-noun approach to using tools. The rest of the world uses noun-verb; select an item and then perform a task on it.
 

crutschow

Joined Mar 14, 2008
23,508
I think they frown on that primarily because the models you build are then less portable. They won't work for anyone else unless they are set up just like your LTspice installation. I believe they also say that installing updates to LTspice may break your setup.
...............
Yes, updates are a problem with that approach. I have to save my library files as a backup and then replace them after the update is installed.
Mostly I just ignore updating it. ;)
 

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
Hi guys, sorry for taking so long for replying but I've been extremely busy. I have succeeded in linking the components thanks to that video mikeML posted. The problem i have now is that I get an error saying "too many parameters for sub circuit type". After searching for some solution's I've realized that my problem lays in the SpiceOrder in the .asy and .mod file not matching up. They are (8 19 1) and (8 1 19) respectively.

My question is how should i go by fixing this myself? is there an easy way? can I just change the order of one of the files?
 

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
Thank you. That makes my error different. I think I have fiddled with everything just to much. I shall do a reinstall and see what happens.
 

Thread Starter

Cyberduke

Joined Mar 5, 2011
49
In the schematic there is a missing connection between the diode bridge negative output and the input to the negative regulator. Since this provides the bias current for the positive regulator reference offset, it might be why the circuit is not behaving.
ak
After fiddling my way to being an aftermarket component pro, I made that adjustment to the circuit. That was the issue.(The missing connection.) I would like to thank everyone for the help in this issue. Just because I am so glad I am including an final output graph over a 1K resistor.
The output is for different values of the variable resistor.

Thanks again guys:)
 

Attachments

Top