Maker Pro
Maker Pro

LTspice error - undefined subcircuit: inv

njmike

Feb 4, 2012
5
Joined
Feb 4, 2012
Messages
5
Hi I'm just starting out with LTspice and wanted to do a simple experiment with a 555 timer.

I'm using a model file from http://www.irtc-hq.com/IRTCLIB1.txt (the "555" model). I have a .include spice directive for this file on my hard drive. I'm using the DIP8 assembly in LTspice to model the 555 and have all connections made. I'm learning so I know some of this may not be right :)

When I go to simulate, I get this error: "undefined sub circuit: inv" - what did I do wrong to miss? I did edit the DIP8 assembly to have the "X" prefix and in the value I put "555".

Here's the contents of my ".asc" file (having upload issues). Would appreciate any help, I'm kinda stuck.

"""
Version 4
SHEET 1 880 680
WIRE 16 -80 -544 -80
WIRE 464 -80 16 -80
WIRE 544 -80 464 -80
WIRE 544 32 544 -80
WIRE 192 96 112 96
WIRE 464 96 464 -80
WIRE 464 96 416 96
WIRE -544 144 -544 -80
WIRE 192 160 -32 160
WIRE 544 160 544 112
WIRE 544 160 416 160
WIRE 192 224 -96 224
WIRE 544 224 544 160
WIRE 544 224 416 224
WIRE -544 288 -544 224
WIRE -96 288 -96 224
WIRE 16 288 16 -80
WIRE 192 288 16 288
WIRE 480 288 416 288
WIRE -96 400 -96 368
WIRE 112 400 112 96
WIRE 112 400 -96 400
WIRE 368 400 112 400
WIRE 480 400 480 288
WIRE 480 400 432 400
WIRE 112 496 112 400
FLAG 112 496 0
FLAG -544 288 0
SYMBOL Misc\\DIP8 304 192 R0
WINDOW 3 0 -116 Center 2
SYMATTR Value 555
SYMATTR InstName U1
SYMATTR Prefix XN
SYMBOL voltage -544 128 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 10
SYMBOL cap 368 416 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C1
SYMATTR Value .01µf
SYMBOL res 528 16 R0
SYMATTR InstName R1
SYMBOL res -112 272 R0
SYMATTR InstName RL
SYMATTR Value 1k
TEXT -584 464 Left 2 !.include H:\\LTSpice\\models\\IRTCLIB1.txt
TEXT -584 520 Left 2 !.tran 1 startup
"""
 

GonzoEngineer

Dec 2, 2011
321
Joined
Dec 2, 2011
Messages
321
Dump the Spice...grab a soldering iron and build it!;)

Simulation prorams are just a stupid, interim, step to get where you are going.

You will never get a job just because you know how to use spice.....but you will get a job if you actually learn how to build it!:D
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
Hi njmike
welcome to the forums :)

I tend to agree with gonzo,

In 40 years of electronics, I have NEVER used a simulation program.
Maybe for more complex circuits for which there is no other examples available then simulation prog's can have a place.

On so many forums, I see so many people wasting time with sim. programs rather than just building the cct and see how it goes.

so njmike, you may have gathered from my above comments I cant help you directly ;)

but a warm welcome anyway :)

Dave
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Simulations have their place.

However that place is pretty much limited to simplifying the design process, i.e. you can see if you've done anything really stupid.

When it comes to building something, you may find other factors come into play (i.e. reality).

If your simulation package is giving you grief with a trivial circuit, then you have to weigh up whether it's easier to spend time figuring out the software or building the damn thing.

In your case, I'd go with GonzoEngineer.

And welcome to Electronics point.

edit: OK, I've used simulation software to model the behaviour of discrete switchmote regulators. These can be a bit of a pain in real life and with a simulator you can easily see what's likely to happen at various loads and voltages.

But even that you've got to be careful. One simulation package I used attempted to start with everything in a stable state. In one design it meant that the regulator ran in a linear mode rather than oscillating. In practice it would be highly unlikely ever to get into this state, but it was valuable to know that it could.
 
Last edited:

njmike

Feb 4, 2012
5
Joined
Feb 4, 2012
Messages
5
Hey folks, thanks for the tips and welcome to the forum!

I wholeheartedly agree the best thing to do is to just get your hands dirty and build the damn thing :)

With a little one running around the house the majority of my free time is in front of a computer, so hence my desire to use a simulator. I enjoy a full-time career as a software developer, so I certainly don't expect to get a job as an EE or anything just by using a sim haha. I just hope to dabble here and there.

Anyway, I love to figure out problems but this one just has me stumped. If I probably do a lot of reading on SPICE I could probably figure it out, but I at least wanted to accomplish something simple in LTspice.

Mike
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
This may be helpful.

My guess is that your definition of the 555 ewquires further definitions (inv) and it can't find them.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The .asc file is not so useful. Can you supply the netlist? This is where the circuit with all its components and nets is put down. Here we should be able to find the missing parts.

In addition to steve's link here is another useful site: http://hackaday.com/2011/02/08/555-timer-circuit-simulation-software/

And: while I agree that a simulation can never completely replce the hands on experience of a real circuit, for me it has always been a useful tool to get started. And even to find errors in a circuit. It is sometimes much easier to experiment in the simulator than with real hardware. However, almost every simulation result should be taken with a grain of salt and finally the simulation awaits the proof of the real world.


Harald
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Yeah, something we've seen here is base current so high that Vbe was in the order of several volts. The simulation is great at estimating the Vbe at currents so high that any real device would have emitted smoke long before.

If you're simulating something, it's vitally important that you look at the actual operating parameters of the various devices and make sure they're reasonable.

A simulator may not alert you to the fact that you're exceeding various parameters, such as Vce, Ic, Ptot, etc.

With simulation you lose the ability to stick your finger on things to see if they're hot, or to watch where the smoke is coming from.

Having said that, there are some things you really can't do without simulation. I can't imagine anyone designing (say) a processor or some other tightly coupled lump of complex logic without simulation.
 

njmike

Feb 4, 2012
5
Joined
Feb 4, 2012
Messages
5
The .asc file is not so useful. Can you supply the netlist? This is where the circuit with all its components and nets is put down. Here we should be able to find the missing parts.

In addition to steve's link here is another useful site: http://hackaday.com/2011/02/08/555-timer-circuit-simulation-software/

And: while I agree that a simulation can never completely replce the hands on experience of a real circuit, for me it has always been a useful tool to get started. And even to find errors in a circuit. It is sometimes much easier to experiment in the simulator than with real hardware. However, almost every simulation result should be taken with a grain of salt and finally the simulation awaits the proof of the real world.


Harald

Hi Harald, here is the netlist:

======
"ExpressPCB Netlist"
"SwCAD III Version 4.13n"
1
0
0
""
""
""
"Part IDs Table"
"U1" "555" ""
"V1" "10" ""
"C1" ".01µf" ""
"R1" "R" ""
"RL" "1k" ""

"Net Names Table"
"0" 1
"N002" 5
"N004" 6
"N001" 8
"N005" 12
"N003" 14

"Net Connections Table"
1 1 1 2
1 2 2 3
1 3 1 4
1 5 2 0
2 1 2 0
3 1 3 7
3 5 1 0
4 1 4 9
4 1 8 10
4 2 1 11
4 4 1 0
5 1 5 13
5 3 2 0
6 1 6 15
6 1 7 16
6 4 2 0
=========


Thanks for the link, I will review that.

Mike
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Hi Mike,
that netlist seems incomplete. There is no subckt for the NE555.

Anyway: Why bother with importing another manufacturer's model into LTSPICE when there is a built-in model? In LTSpice schematic select "Add component" (the little AND-Gate symbol) from the menu. From the selection list that pops up, open the folder "misc". There you will find the 555 ready for use.

Harald
 

njmike

Feb 4, 2012
5
Joined
Feb 4, 2012
Messages
5
Hi Mike,
that netlist seems incomplete. There is no subckt for the NE555.

Anyway: Why bother with importing another manufacturer's model into LTSPICE when there is a built-in model? In LTSpice schematic select "Add component" (the little AND-Gate symbol) from the menu. From the selection list that pops up, open the folder "misc". There you will find the 555 ready for use.

Harald

Hi Harald,

Well check that out - I didn't see the NE555 model in LTspice; must have looked over it! The netlist component U1 is my 555 timer. I named the value "555" (according to instructions) because that was the name of the model in the IRTCLIB1.txt file.

I w ill give this a shot.

Thanks!
 

njmike

Feb 4, 2012
5
Joined
Feb 4, 2012
Messages
5
Thanks to all that helped. I actually used the LTspice-provided timer and tweaked it a bit so at least I can experiment with changing values and seeing affects.

Mike
 
Top