At negative current (i.e., positive potential of the base), the behaviour is fine until about 200mA. At that point, I expected the voltage to clip at the 5V of the supply (is BT1 supplying additional potential here?)
At positive current, I had expected a (smaller) negative gain of the BC585, instead of a 5V potential at p2.
Is the model of the transistor incorrect, or should I have chosen a different circuit to test if the transistor model works?
I fully agree with starting with something simple to see what works, and then expand on ti, but if you want to simulate, start with a schematic that actually makes sense. 12V reverse bias voltage on the base? BC585 also has a 50mA collector current limit, so any base current over 500uA is likely to saturate it already. I also don’t like using batteries as a current source. Such quick fixes are fine if you are experimenting for yourself, but if you want help from others, then present your work in a way that makes it easier for them to understand. There are at least two threads here with a lot of simulation examples, that may be a good way to start.
KiCad V8 can also calculate the operating points and show them in the schematic next to pins. That makes it easier to verify whether a simulation works.
Stop mistreating transistors in such an awful way!
Pushing 0.5 A into the base of a PNP is brute force and will certainly lead to reverse-bias breakdown in both the B-E and B-C directions. It’s anyone’s guess how the model reacts to that.
A soon as you start pulling current from the base, the transistor reacts normally and goes into saturation as indicated by your almost 5 V at p2.
But I’ve seldom seen such brutality against a poor small-signal transistor.
I’m sorry I am a newbie and I do things that newbies do.
I had chosen the 100 ohm resistor to limit the current of the 5V supply to 50 mA, but I had not taken into account that my current sweep was way too big.
Still, if I reduce the current sweep from -5mA to +5mA, the voltage p2 becomes 5V as the current goes through zero, this is not what I expected.
Regarding the batteries, I could not find a symbol of a formal current / voltage supply soon, that is why I picked the batteries, assuming the simulation would just be a discrete model of a constant current or voltage.
I very well understand that this is not how to design an actual schematic, but I was just only trying to test if the transistor model is working as expected.
Which thread are you referring to? Much of what I have seen is way too advanced for me to start (power supplies and amplifiers), and assume availability of spice models that may not me needed for me.
The right simulation sources are in the Simulation_SPICE library.
The simulation is running fine to my mind. at least with respect to the right half.
But it’s hard to say, because of your use of non-standard simulation sources.
Your p2 voltage reaches around 4.8 V, which equals 5.0 - VCE(sat) V.
Looks right to me.
The laft part is unknown territory, it’s hard to say what a model will do outside normal operation.
I also understand that the -480mV @ 5mA is not driven by the +5V supply, but by the current supply.
I may still be torturing the transistor in a way I should not do in an actual application, but I hope I validated that the simulation model is correct. Thanks again for the feedback.
If you have additional hints that I can learn from I’d be happy.
This is also wrong. I sketched the circuit myself, but used a BC557 model (I’ve never heard of a BC585, did you mean BC558? Or BC858?).
These are the traces:
first, a -5…+5 mA sweep of I1 showing the voltage across R1:
See the problem? your current source needs to generate over 1 kV at the base to force -5 mA into the base.
Not really practical, I’d say. Poor transistor.
And the model is tested to be wrong . Real transistor having reverse polarized b-e junction will be working like Zener diode. I would rather expect 10V (b-e) so about 15V at base.
Well, that’s one difference between simulators and reality. Once the magic smoke is released from your BJT it won’t work anymore, but the simulator does not release the smoke (I guess it stores it somewhere) and puts the magic smoke back in the BJT once it’s parameters get within sensible ranges again.
But I do think this part is relevant for OP:
I guess he has very limited experience with electronics, and has not realized that the collector “suddenly” jumping to (almost) +5V when the transistor goes into saturation is perfectly normal and expected behavior. Pioter at least mentioned that OP’s last screenshot does not make sense because the transistor has no power on it’s emitter.
My original question was: how do I validate if the simulation model of my transistor is correct? What would have been a good circuit to test it, instead of demonstrating how wrong the current schematic is.
I already mentioned (and apparently you discarded):
It starts with a bunch of quite big schematics, but if yo look further down there are some simple ones too such as:
Phase shift oscillator.
Quartz crystal oscillator.
astable.
And I am a bit surprised that the classical transistor amplifier with 4 resistors (and some capacitors) is not among those examples, but it’s also easy enough to draw that circuit and verify it yourself. Just showing the DC voltages and currents from it’s operating point is already a clear indication whether the transistor model works. But the most important thing is knowing what BJT’s are and how they work. The way you started with pushing 500mA into the base of a poor PNP BJT just does not make sense. Small signal transistors have an Hfe of a few hundred, and the BC585 has a maximum collector current of 50mA. And therefore it will saturate for any base current higher then a few hundred micro amp.
Previously you wrote:
And we responded with posting that this is indeed the expected behavior. Have you figured out now why this is the expected behavior?
I’m not familiar with the ‘classical 4 resistors and some capacitors’ circuit. I guess it could be something like this:
How does one use this to validate the transistor model? Just use various combinations of resistor values and manually check if the current through Re is as expected? My take was to drive the base directly, although I started with a current which was way too high.
From the other post, I ran the bip-osc.kicad_pro simulation:
This seems to be an oscillator driven by a constant voltage with spikes on it at every second. In a transient simulation, the oscillator resonated but I did not see much influence of the spikes. The intent of the schematic is not documented. I guess the spikes are intended to start resonance? I thought the schematic is way to complex to validate my transistor model.
I’m not sure if I understand the transistor behaviour in my simulation. The bf (if I’m correct similar to Hfe) in my model is 300. So if I want to drive 50 mA through the resistor (according to this datasheet the BC558 can drive 100mA), I would need a base current of 50/300 = 160uA to drive the full 5V through the 100 ohm resistor. This looks correct:
In my simulation the transistor becomes conductive at positive currents (0…160uA in the graph below), but with lower gain an non-linear behaviour. Is this unintended use or expected behaviour?
Yes that’s it. Even without any input signal (on the base normally coupled in with a capacitor) you can have ngSpice calculate the operating point and show the DC voltages in the schematic.
For the rest, it’s all pretty much off topic.This forum is for learning how to work with KiCad. not for how BJT’s work.
Treat emitter as GND (for npn GND will be (-), for pnp GND will be (+)).
Supply base with voltage source in serie with 100k resistor. In test change this voltage from 0 to 5V (+ or - depending of npn or pnp).
Connect collector by 1k resistor to 5V (+ or - depending on pnp or npn).
Ideal voltage sources are closer to what we have in real live than ideal current sources. Because of this it is better/simpler to use only voltage sources.
For example.
Everyone knows that “DC current is blocked by capacitors so only AC current flows through them.”
Try to simulate it with ideal current source and you will se that DC current can flow through capacitor infinitely.
Using ideal current source reverse polarizing semiconductor junction was your main mistake.
If you would use current source made from elements (transistor with base set at specified voltage with resistor in emitter) you would not get kVolts in simulation.
That is very much what he built in his first simulation, but apparently henkjan has trouble with interpreting the result from his simulation.
If you put that into your first simulation instead of the 500mA or 5mA, the results may be easier to interpret.
Gain of a transistor (Beta, Hfe, all the same) depends on a lot of variables, and it’s not a constant. Therefore non-linear behavior is normal and expected.
Is this what you mean Piotr? Emitter is now connected to ground, and collector is connected to +5V through a 1k resistor. I swept the voltage of V2 between 0 and 5V. V2 is driving the base via a 100k resistor.
However, the base current does not become higher than 40 µA, and the collector current does not exceed 420µA, so the output voltage hardly drops below 5V. Perhaps I am connecting the base incorrectly. Did you have another test circuit in mind?