Newbie's help powering up a circuit [SOLVED]

Hi everybody,

I need to power up a simple BJT amplifier circuit but i don’t know what symbols I should use to have my sinusoidal input wave, my Vsupply and how to simulate/visualize the amplified output wave.

Well, actually, i guess the Vsupply is just a VDC symbol, i think,… but what Vin symbols should I opt for?

Thanks in advance for any suggestions.

Simplest way is to use the “Simulation_SPICE” library and use VDC for the supply and VSIN for the input.
You’ll need to AC couple Vin through a capacitor,
And don’t use references like Rc and Re, both ERC and ngspice hate that. Use R3 and R4.

thank you for your speedy reply.

I am afraid that I am not familiar with the lingo, yet (“Simulation_SPICE” library), what is it?

is this what you meant? if so, this is what a DC sweep of V" and a transient look like on Vout.

Not really what I was hoping for, unless I am missing something very important.

V2 is floating in your picture.
You should connect the negative side to the ground.

“Simulation_SPICE” is a symbol library, just like resistors and transistors etc. And it seems you’ve already found it.
Why is the other end of V2 not connected to “0”? It’s your power supply.
And Q? is a big no-no. Q1 would be better.

A tip: on every symbol, always tick “Show pin numbers”. It’s a tremendous help when doing simulation.

This is my schematic and my simulation. Looks fine, I think:

Transient simulation with step 1u, final time 10m.

Ok the loose end of V2 was embarrassing (i had planned to connect it, honestly, but since I was working till 1am, it seems that my brain decided to forget).

I reproduced the circuit exactly as you did

but i just don’t get the same simulation as you (wrong simulation settings?)

As you can see I miss the signal (which somehow you found)

What am i doing wrong?

During the simulation KiCad calculates the voltages and currents though all nodes / wires., but it does not show them because showing them all would create a mess.

To show the graph of a signal, click on the Add Signals icon:

(Or use the Probe icon next to it and then click on a wire in the schematic).

Thank you for your reply Paulvdh,
I did try both methods you described. Thats why i added the signals window in the screenshot, (i don’t have the R3-pad2 signal that ML9104 has, outlined in blue) and, probing anywhere on the circuit didn’t give me that beautiful sinusoidal curve obtained by ML9104.
Ok, i am on my way to lecture now and won’t be able to sit in front of pc til later to try again.
Thank you

The net names are assigned randomly if you don’t add a label, for example R3 pad 2 is the same as Q1 pad 3.

There are also some differences between your schematics, like “dc(1)” vs. “dc 15” and “sin(0 1 1k)” vs. “sin(0 .1 1k)” (the .1 probably means 0.1). Make sure these aren’t the cause of the problem.

What Jonathan_Haas said. A net always has at least two ends, and which one ngspice chooses to show is pretty random.
Note that I reduced the input voltage to 0.1 V.
At 1 V the signal is distorted/clipped.

The parameters for the voltage sources are different compared to what ML9104 posted.

I’m not very proficient in the spice language, but I think you’re using 1v instead of 100mV for V1, and only 1Vdc instead of 15Vdc for V2. Then Q1 will have a too low Base-Emitter voltage and will not turn on at all.

1 Like

Good catch. Yes, V2 is wrong.

Thank you all.
I managed to reproduce the sinusoidal output curve and learned about the difference, in KiCAD, between inputting ‘value fields’ for symbols and ‘spice models’.

Perhaps, i could grab some free theory tips regarding the fact that the circuit is not working as expected. When i did the math to calculate the value of all the resistors, I thought i was going to build a bias-bjt that operated as an amplifier (in its active region).
I was expecting to see the output wave of greater magnitude than the input wave.
Not sure whether it is an optical illusion or how to interpret those waves after simulation; adding both signals on screen (below), the output wave doesn’t seem to be amplified.

Congrats! You got the sim working.
The problem now is, that you have so much DC offset on your signals that observing the AC response is pretty much impossible.
So what to do?
A simple way is to AC-couple the output as well like this:

Now, both input and output are DC referenced to ground. So here’s a sim of input vs. output (same transient parameters as before):

Nice, huh? It shows a gain of around -2.3, which corresponds well with the component values chosen.

however, i still get a tiny,if any, amplification.
yes, i obtained the signals using the prob this time (where you indicated with red circles) and I included the .tran in the screenshot to make sure that I am simulating with the correct steps/values as you

p.s.: i noticed that the values, below the simulation window, differ from yours; how is it possible if we run the same simulation of the same circuit?

There’s another problem, which I only noticed now after looking at the DC values:
Q1 has the wrong pinout!
You’ll need to go into the Q1 “Spice model…” and tick “Alternate node sequence” and enter 3 2 1.
Why? Because Q1 has C=3, B=2 and E=1. But Spice always expects that transistors have sequence CBE=123.
I attach a (now) correct simulation where Q1 is not electrically upside down. Input is 1 VAC and the DC levels are correct.
Sorry I missed that.

As you see, lots of traps when using Spice. Transistors will work when C and E are swapped, but with miserable hFE, which explains the DC offset.

Show us your final results!

PS: the reason we get different results is that I’m actually using a BC857(nexperia) Spice model for Q1. Your next sim should be identical to mine, small-signal transistors aren’t very different when used correctly…

1 Like

It worked!
There is no way that I could have ever known/learned that trick without your help and the overall help of this forum. Thank you.
I have the feeling that I am falling in love with this “thing”, and that is a dangerous thing.
And a big thanks to everyone else who took part in my learning experience.
Much appreciated.

p.s.: One small thing though, is the fact that in my case, there is no difference between 0.1V and 1V on V1, (or at least i didn’t notice any). I am very happy anyway and, perhaps, pretend you never mentioned it :wink: )

1 Like

Glad to help.
But pay attention:
Having ngspice is no excuse for not doing the circuit calculations first! I skipped that due to laziness, and thus missed a nasty error, which was only corrected at the end. I should have been suspicious of the very high DC level at the Q1 collector right from the start.

Enjoy this new experience.

Thanks ML9104,
I did all the calculations necessary to work out the resistors and currents values.
I was only given 2 initial values and 1 conditions: Vcc=15V and Ic=10mA, the condition was that the quiescence point had to be in the middle of the active region.
I chose a a Vce of 7.5V, of which 3/4 as Vrc-drop and 1/4 as Vre-drop.
After doing all the calculations, i learned that I needed a capacitors to modulate the Vin and, I didn’t know about (your trick of adding another capacitor and resistance at the collector out) coupling the Vout to ground too to to have both input and output referenced to the ground. It’s only my 6th week of electronic lectures and i guess I have LOT more to learn.
And, I like to learn as much as possible as fast as possible.

I guess I should take some time to learn ngspice basics, at least, otherwise, i don’t think it would have ever been possible to work out the 123 vs 321 spice interpretation mathematically.

Or, am i wrong again?