Error: circuit not parsed

Hey guys, I’m new to KiCad and I’m following a few tutorials on YT. For the time being, I’m only studying the schematics part.

I’m following this very simple tutorial step by step

https://www.youtube.com/watch?v=bPBu2eHvK6I

and it gives me this error when I run the Spice simulation. So I’m stuck. Any ideas what it is?

No compatibility mode selected!
Circuit: KiCad schematic
Error on line 2 :
1m 0 net-1m-pad2 1m
unknown device type - error
Error: circuit not parsed.

KiCad 001

Changing your source from AC1 to AC 1 (with a space) should fix it.

1 Like

Damn, so easy. Thanks a bunch.

1 Like

Added a Power Flag, after reading a couple of posts and articles, and gives me this error when probing after R1:

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Warning: v1: has no value, DC 0 assumed
Reference value : 1.00000e+02
No. of Data Rows : 801
Error: vector V(GND) not found!
Error: vector V(GND) not found!

Any Ideas?

What kind of analysis are you running? Your voltage source only has a value defined for AC (small signal) analysis: AC 1. You probably need to add a DC 1 (or whatever), or even make it a sine or some other type of source. You can set these values in the spice model properties. This is at least the reason for the warning, but maybe not the error.

I’m not sure this is your problem, but you don’t need a PWR_FLAG there. The point of a PWR_FLAG is for ERC (electrical rules checking). Basically, one thing that ERC checks is that every pin marked as a “power input” has exactly one “power output” pin connected to the same net. Say you have a voltage regulator output pin (power output) connected through a fuse to the VCC pin on an IC (power input). ERC will complain that the VCC pin is unpowered because there is no power output on the same net – it doesn’t know that you can power the IC through the fuse. You would stick a PWR_FLAG on the net with the IC VCC pin to tell ERC “no really, this pin is powered, trust me”. And you would never need a PWR_FLAG on the same net as GND, because GND is already a power output. See this FAQ for details: ErrType(3): Pin connected to some others pins but no pin to drive it

I’m only learning the software, not really running any analysis. Probing here and there. Kinda frustrated that if you follow step by step most beginner schematic tutorials you always run into a problem. And there are not really that many current up to date Schematic Beginner videos for KiCad.

Thanks for the link, I was reading that same page, but couldn’t figure out what was giving me the error.

I appreciate your response. I’ve been at this all day, tomorrow with a clear head I’ll start again studying the software.

When I ask what kind of analysis, I mean what type of spice simulation: transient, AC (small signal), DC sweep, operating point, …? Different types of spice simulation will require different model parameters.

Out of curiosity, have you used other spice simulators or is this your first experience? Are you using kicad purely as a simulator, or are you also trying to make PCBs?

I think this is a pretty good first guide for ngspice/kicad: http://ngspice.sourceforge.net/ngspice-eeschema.html
It does ramp a little quickly. Ask questions if you have them. I would stop after section 4 unless you need to do digital simulations, and I personally wouldn’t be spending my spice effort simulating digital circuits. Section 8 (dual opamp models) is more advanced but very useful for simulating “real” circuits that you’re planning to make into a PCB; less useful if you’re just trying to simulate some circuits.

Thanks gkeeth. I’ll follow that guide for sure.

I was just probing without a mean, just checking out how the software behaves.

Some years back I studied the PCB part of KiCad and did some minor stuff on LTspice. Not much though. The reason that I’m making the jump to KiCad completely is that I can make the schematics in KiCad and then open that file in the PCB KiCad software, it’s more integrated and less prone to errors. Also the KiCad interface is much more user friendly.

Yeah, I plan on making PCB’s. I’m retaking spice software’s bc I’m studying to build music gear clones from classic schematics, and this helps a lot. From understanding how the music gears work, to sending to the fab a schematic for a PCB.

Any other recommendation is welcome.

Using the same schematic for simulation and pcb design is the dream. Unfortunately it’s harder than it sounds, although usually possible with some creativity. Using the same program for pcb design and simulation does help. It may or may not be worth the effort to you.

Kicad’s interface is definitely friendlier than LTspice, although LTspice can do some things that kicad can’t.

At risk of information overload, there are some useful tips here: https://www.youtube.com/watch?v=90Z6ffxzDz8 (by @Ste)

That’s what I’m after. Thanks, I’ll check the link and see what I come up with.

You must have clicked on ground. The potential of it is not calculated (since it is defined to be zero) and the error is simply telling you that.

SPICE works by calculating the potentials (which are simply voltages measured with respect to a reference, traditionally called ground) of circuit nodes. To do so it requires a reference node, which is called 0 in SPICE tradition. I haven’t researched how exactly Ngspice handles the name of the reference node, since KiCad passes the name GND to it in the netlist, but I suspect it’s smart enough to detect an absence of a node called 0 and uses the node named GND instead.

1 Like

Oh, that makes sense. That’s what it says how KiCad behaves in one of the links posted above. I didn’t understand it fully, yet, but it’s in the ballpark.

Thanks for your response!

Actually the link I found with some useful info is this one, the one I was talking about:

https://www.pspice.com/incorrect-ground-symbol-may-result-floating-node-or-convergence-problems

It’s from another program, but I think some rules apply to all spice softwares. Maybe it can help.

That is a common problem for PSpice, but ngspice and LTspice both can use “0” and “GND” interchangeably so it’s irrelevant to your problem. As hinted by @radix:

ngspice simply auto-detects the “GND” string and replaces it by “0” behind the scenes. It does this in inpcom.c with the void inp_fix_gnd_name(struct card *c) function.


KiCad/Eeschema interface for ngspice is still in its infancy, so just be aware that things can be a little quirky. Eventually things will get ironed out in time.

I hate being “that guy” who promotes his own video (the one linked above), but I seriously suggest checking it out (blame Carl for the bad scaling). It goes over underlying concepts of SPICE, which in my opinion is required to become an effective SPICE user (regardless of the software you end up using). If you don’t know the fundamentals, then it’s going to eventually trip you up. It’s somewhat analogous to someone being an expert at using the “Power Rule” for calculating derivative homework questions, but doesn’t understand the concept of how a tangent line is defined as a secant line with a [lim -> 0]. If the word problem on the exam isn’t going to wreck you, then the trend-line analysis report using discrete data you need to hand into your boss 4 years later will.

2 Likes

Thanks Ste. That clears out some of its things not being streamlined “KiCad/Eeschema interface for ngspice is still in its infancy, so just be aware that things can be a little quirky.”

I have watched the video and I watched it some years ago when I was starting out with spice. It helps a lot. Now I started using spice again it’s just a matter of getting down the basics and how it works, and get to know the quirks, and off to the races.

1 Like

Awesome, man. Sounds like you’ll do fine.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.