1
\$\begingroup\$

I'm trying to simulate this simple LDO circuit but I'm having trouble adding my schottky diode BAT750 from Diodes Inc. into the simulation. Circuit Diode

I kept getting this error enter image description here

and I'm suspecting it's because the spice model provided by Diodes Inc. only has 1 node in their txt file.

Is there any other way to add the part into the simulation? Thanks enter image description here

\$\endgroup\$
1
  • 1
    \$\begingroup\$ @periblepsis - Hi, As you expected, it does help the site and its future viability, to have your answer properly recorded as an actual answer :) I understand you were concerned about the extra time needed, to post the kind of detailed answer which you kindly write. However since your comments were enough to answer the question (as confirmed by the OP's comment) then simply reposting them verbatim into an answer is also enough. Therefore I moved the relevant comments into a synthesised answer, with attribution, below. \$\endgroup\$
    – SamGibson
    Commented yesterday

2 Answers 2

2
\$\begingroup\$

The X prefix, means to connect the following nodes, to the subcircuit identified at the end of the statement.

The model file has a .MODEL card, not .SUBCKT; that identifier lives in a different namespace. Hence, there is no subcircuit defined.

The model is a diode (.MODEL xxx D ( ... param-list ... )), referenced by the diode component (D prefix).

There are no nodes in the file; only an instance of a .MODEL connects to nodes.

\$\endgroup\$
2
\$\begingroup\$

periblepsis:

I'm not certain (LTspice can exhibit some fancier-than-expected behavior, sometimes) but one thing that stands out like a sore-thumb to me is that your symbol shows it is an "X" type device (prefix) which means Spice will look for a .SUBCKT. But your model is of type "D" which is normally assigned to the usual diode symbols (which you cannot directly edit as a symbol to change it from a "D" to an "X".) So I think you have created a diode-looking symbol that is really an "X" symbol to LTspice. It would be better to just grab up a diode and then give it that name, perhaps?

You could, technically, create a .SUBCKT of that name and just stuff the D model into it. That might also resolve the issue.

user562960:

@periblepsis thanks for the suggestion! You solved the issue! I was told to change the prefix to "X" (you can do this by holding Ctrl and right click on the diode) if it's an external part, but it seems like it only applies to "U" part. Thanks!

periblepsis:

I'd glad it worked out. Just remember that Spice was created when computers used 80 column punched card decks. The first column specifies what the device model is. An R in the first column says to use a resistor model. A D in the first column says to use a diode model. An X in the first column says to use a user-written model inside a .SUBCKT. (Fancy extension that was deemed necessary to provide extensibility to Spice.) That's all that's going on. When you make a schematic, what really happens is a card deck is generated, called a netlist. This then goes to the ancient Spice engine.

What you did is to force an X in the first column when a D was desired. This confused Spice, since it then went looking for a .SUBCKT subroutine with that name. Of course, it didn't find it and complained. [Text removed.]

The above was originally kindly posted as comments, but is really an answer. Therefore they have been moved and reposted here, with a small amount of text removed, with attribution, in accordance with the CC BY-SA 4.0 license by following this approach to synthesize an answer from comments. The answer has been set to "Community wiki" so that I don't earn any points from upvotes on this answer, as it isn't mine. (SamGibson)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.