Totally wrong simulation values

Can someone help me here, I definitely must be doing something wrong. I tried the same schematic in QSPICE, and got correct values (corresponding to experiments on breadboard).

I have tried several different simulation models for 2N3904, a LIB file, and some other plain TXT files too, they all work in QSPICE, but not here. So I don’t think the model itself is the culprit (but I am not sure).

With these components, the transistor is saturated, and the collector voltage should be less than 1V. And collector current around 12 mA.
However, in KiCad I get this:

If you can package the project in a zip file (there is an option for that in the project manager in KiCad) and post it here, someone else can try it out and perhaps find out what goes wrong. Without the project (including the spice model for the transistor), it is somewhat hard to guess.

There is 646mV over the Base- Emitter diode, so that is a positive sign. But you do have a very low Hfe, of only 2. This reminds me of a swapped emitter and collector. What happens if you change the pin assignment? Misnumbered pins is a common cause of errors in ngSpice.

1 Like

Bingo!! This did the trick. I was about to follow hmk’s advice, the I saw your post.
Now it looks fine!
In fact, I get exactly the same values, to the decimal, as in QSPICE.
Thanks!

2 Likes

Look at pin sequencing for Q1. Ngspice expects CBE as 1-2-3, but 2N3904 has EBC.

A tip: ALWAYS enable pin numbering for every part when simulating. Makes life much easier.

2 Likes