How can I plot BJT linearity of a simple emitter follower

I’ve been reading Douglas Self’s excellent book on small signal design.

He provides this spice simulation of the simple emitter follower to demonstrate it’s dubious linearity when following the negative voltage swing. I would like to be able to simulate this in NGspice myself (I can draw the schematic, voltage source etc) I’m just not sure how to get it to graph properly with the left axis being a relative output. Thank-you everyone.

You pretty much start by drawing a schematic. Without knowing anything more about your KiCad and (ng)Spice knowledge it’s impossible to give anything but the most generic advise.

Have you seen:

The FAQ section of this forum is much more extensive then the “average” faq list. It has got a whole lot of quite in depth articles, and also some indexes to some common questions.

I don’t know very much about ngspice myself, but in one of my dabblings I managed to make a “transistor curve tracer” simulation. Main addition is that it’s a very simple “getting started” (does the BJT model even work, pin assignment correct etc.) and that it draws multiple plots in one widow. I added the project to one of holger threads which are already summarized in the “getting started” above. A direct link is:

Apologies, I’ll post the circuit.

I’ll read the articles you posted as well.

What I’m looking for is a DC sweep analysis from say -10V - +10V to test the linearity. I can do that by removing the capacitors so the DC sweep signal passes.

I’m using a MPSA42 model but I’ve tried other BJT models and it still shows what appears to be perfectly linear behavior to me. (Vout tracks Vin sans the bias including into the negative) Maybe I’m doing the wrong test or something (I’m bypassing the capacitors). I can’t seem to figure out how Douglas Self did it.

I’ll post the schematic he showed in his book upon request, but currently I can only post one embed at a time.

This FAQ explains how to increase your forum level to be able to post attachments, such as a zip of your project.

Did you also read the whole ngSpice website and the ngSpice manual? Best I know ngSpice can also do DC analysis. I think the “operating point” analysis opens all capacitors and shorts all inductors while calculating voltages, and if that fails, you can simply increase the timestep and use a simulation duration that is well beyond the grasp of those capacitors.

Or your remove all capacitors, and the resistors too, put a variable voltage on the BJT input, and measure the emitter current. All those extra passives seem to be added mostly as a practical means for hand measurement on a breadboard, but you can just skip them in a simulation.

Emitter followers are pretty linear by themselves. If you look at the graph you first posted, it looks horrible, at first sight, but the Y-axis goes from 0.98 to 0.998. So you’d have to zoom in pretty far to see a difference. But also, I guess it’s quite possible that most BJT models do not include changes in their parameters with their set points. To be sure I’d have to dive deeper into how BJT models work, I only have a limited knowledge of those things. Getting reliable results out of a simulator can be a bit difficult. One of the complexities is that you have to match the accuracy of your models with the things you are attempting to simulate. All models are models. I.e, they are a simplified approximation, and some models are simplified more to speed up the simulation. As a result, you (probably) can’t do simulations on BJT parameters like this without knowing quite a lot more about the different BJT models.

On a side note:
My dream project is to make (a few) mini SMU('s). Something like 20V 500mA, but with 16bit or so ADC and DAC’s and some switchable amplifiers and current shunts to add a few extra decades. Goal is to be able to do measurements like this mostly automated.

I’ve not read the NGspice website just yet and I’ll continue my investigation. The reason I am asking about the left side scaling is say you have a fairly low impedance load (lets take the 3.9K here).

If you were to pass a 5V signal to it you’d have half a percent asymmetric distortion at -5V swings roughly with such a low. It is quite easy to see the linearity with a scale like this compared to just trying to peep the voltage relative to each-other.

Here is me doing a DC analysis sweep. -15 - +15V. Obviously the comparison is just in → out.
I can get the measurement V(in) called bias on my chart but I removed the bias for this measurement, and V(out). This is with 12V rails.

So I have the info here (can see the where it clips and where it begins to saturate on the positive rail as well, into a 2k9 load) But I don’t know how to compare Vout to Vin in the way as the chart above.

I’m less confused about how to graph / do a DC analysis, but how to add a custom input signal or formula to get out a graph that shows the difference between Vin and Vout on the sweep