Newbie help with simple bjt_bias simulation

Ok Fair enough, that was a silly question. i will work out those curves myself and try to understand whats behind each one of them.
I must admit that I got so excited, I was trying to get a few weeks ahead of schedule with lectures and try to reproduce&simulate a JFET 2N3819.

what did i do:

  1. I reproduced the circuit (I believe now I understand the symbols-spice issue) however,
  2. I used a Q_NJFET_DGS as that exact model doesn’t seem to be on KiCAD library,
  3. changed the value field,
  4. created a spice library for the jfet (called jfet_2n3819.lib) and added it through the component properties (as I did for the BJT)
  5. run a simulation with the following:

What am i doing wrong this time?

There’s no Spice model.

Thank you for the reply.
Interestingly, even before reading it, i thought: why don’t you use another JFET (as I looked on the web and I couldn’t find a spice model for that particular transistor)?
So, I tried 3 more transistor JFET from the KiCAD library. It turns out that it was really hard to find spice models for these too in fact, i couldn’t find a spice model for any of them.

Is it like this for most other components too?

Am i wrong to conclude that learning to write your own spice model using info from manufacturer’s data-sheet is the only way forward here?

I am taken aback of the fact that this is an actual assignment due in a few weeks and I am pretty sure that the tutor will be able to offer students with a spice model taken from the LTSpice database. I guess I could wait and use that one

As already posted earlier:

So, it’s not for “most” of them, but for all of them. Out of the box, just the basic parts such as voltage sources, resistors, capacitors and such are supported.

You can of course write your own spice models, but plenty of others have already done that, or have made collections of “stuff” found on the 'net.

This may be a good place to start:

But just as a lot of KiCad symbols are generic and you have to add a footprint link yourself, you also have to add a link to the spice model to use for those schematic symbols.

A few mins after I posted my last reply, I found it (or at least that’s what they say on their [webpage](SPICE simulation of JFET field effect transistors - Lab4Sys.com))

    .MODEL 2N3819 NJF VTO=-2.9985 BETA=1.3046M LAMBDA=2.2507M RD=1 RS=1 
  •  CGD=1.5964P CGS=2.4199P PB=500M IS=33.582F KF=0 AF=1
    

Now, KiCAD does not have the symbol, so i went through this line of thinking:
use any other JFET change its name and value, add the spice model from a file.lib that i create and voila’!

Too easy, something didnt work out

I noticed that

  1. the first line of the error msg says: ‘No Compatibility Mode Selected’ - How/where from do i enable such compatibility mode? I looked everywhere i.e. in settings, symbol parameters,…
  2. the msg is still pointing to the other (original) JFET that I used, bf246a; i thought that changing the symbol’s name/values wouldn’t do the trick but maybe changing the name of the file.lib as well as its content could work.
    .MODEL bf246a NJF VTO=-2.9985 BETA=1.3046M LAMBDA=2.2507M RD=1 RS=1
  •  CGD=1.5964P CGS=2.4199P PB=500M IS=33.582F KF=0 AF=1
    

I was wrong.

Am i really off-track here? (maybe I should take a break)

One of the things you should try to learn is to stand on your own legs before you can run.

A hint, do a search: Search results for 'compatibility mode' - KiCad.info Forums

For the next issue, read the second line of your error message.

warning, can’t find model 'bf246a" from …

Apparently you’ve been able to change that yourself (in previous screenshots it was “q_njfet_dgs” or “2n3904”) and you should be able to change that again. Make some notes, etc.

We’re happy to help, but we’re also volunteers with a limited amount of time and expect some effort from your side.

As previously mentioned in my post, I’m not an NGspice expert. Regardless, the errors you’re seeing are clearly called out in the message…

To resolve the Errors, a couple of choices to consider:

  1. Spice Models: Either download or, type the data into text file and Include in schematic.
    The ‘data’ can come from spec sheets and/or from LTspice’s model info (thus, you can copy to your text file).
    Models/etc need to correctly parrot the shematic’s Pin, Names, Labels…etc (meaning, if your transistor shows pins 123 but, the text file shows 456, well, you get errors. All references need to be accurate.

  2. If you build the schematic in LTspice and it works but want to do the same circuit in Kicad, just make sure your data is accurate and if errors result, it will be easier to problem solve.

Images below show:
Simple examples in LTspice
Simple example in Kicad with an Include file for Diode
LTspice Data Panel for getting data to paste into a text file

HI Paulvdh,
thank you for your tips.

I am trying to learn to stand up on my legs and what you think it being an attempt to run perhaps should be considered more as fast crawling.
I do not expect you to devote your free time to help me in fact, if i receive a reply today of next week it will still be highly appreciated.

Apparently you’ve been able to change that yourself (in previous screenshots it was “q_njfet_dgs” or “2n3904”) and you should be able to change that again. Make some notes, etc.

I did say that I tried 3 or 4 more transistor from KiCAD library and those you see are not name/values i changed, but just the transistors/symbols i used earlier. Changing the symbol again will give me the same error with a different

warning, can’t find model 'different_name_here" from …

Maybe, as i already realized, i was getting too excited and “crawling” too fast. So, i will take a break and focus on some theory.

If you take a schematic symbol from KiCad’s library it does not have any spice model attached. To add that, you hover over the schematic symbol on your schematic, press e to edit it’s properties, and then there is a button at the bottom of the properties window to adjust the spice stuff:

This is also pretty much explained in the help file for the schematic editor installed with KiCad itself:

And there is a tutorial for ngSpice in KiCad on:

So there is plenty of stuff to read for a bit of self study.

Thanks BlackCoffee,

but perhaps Paulvdh is right; small steps!

The fact that i could simulate 1st a BJT bias curve and then a capacitor charging curve is enough for a few days. I need to reboot.

Thank everyone

@paulvdh showed you where to find the Spice model menu.
This is what it should look like (model for a BC547 BJT):

For jelly bean parts, nexperia seems to the manufacturer with the best selection of models.
This is also a good link:

Hello everyone,
I am back with the usual newbie’s questions.
But, firstly, i better ask whether the forum moderators prefer to have a new thread for a different questions? or is it OK to file them up on this newbie’s topic?
I have run, successfully, a few DC sweep simulations this week and now I would like to add/learn about transient simulation, i.e. sinusoidal functions over time. More details to be added maybe in a new thread
Any inputs will be welcome and appreciated

edit.: maybe I just will

new topic/subject = new thread.

1 Like

The reasons for a new thread become more obvious the longer you are here.

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