1
\$\begingroup\$

For the circuit in the figure (both in Altium Designer 16, and Proteus 8), by using the standard NPN Spice model, I had a really hard time trying to make the simulation converge.

I tried Trapezoidal, and Gear from order 2 to 6, trying to increase GMIN parameter, changing tolerances, minimum timestep, etc. I was unable to make this oscillator run with the standard NPN Spice model.

When changing the NPN into a 2N3904 model, the solution converged with no problems in both softwares.

My question is why this happen?, which model components are in the 2N3904 which are not in the NPN model?... I though both models were the same (the same Gummel and Poon), just changing the values of the parameters. Or the parameter values in the 2N3904 are more "gentle" for allowing the oscillator to run?

Thanks in advance.

enter image description here

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Your \$R_1\$ and \$R_3\$ are too small for the default \$\beta=100\$ value. So increase their values. I'd recommend \$2.7\:\text{k}\Omega\$, to start. The simulation may still be slow/difficult because the storage times of the NPN are set to zero, by default. But it may, at least, "work" somewhat better if you wait for it. When you switched to a 2N3904, your \$\beta\$ got a lot better than the default value. That is why it worked. But if you really want it to work better then set TF or TR or both to some non-zero value, on the order of some dozens of nanoseconds or something. Should work then. \$\endgroup\$
    – jonk
    May 4, 2018 at 3:37
  • \$\begingroup\$ The \$T_f\$ and \$T_r\$ values are a great detail!. They are set both as zero in the \$NPN\$, and around \$300p\$ and \$230n\$ in the \$2N3904\$. With those values runs imperfecty, but reducing it to dozens, it runs smoothly. Resistors were not needed to be changed. So bad I cannot mark your comment as answer! \$\endgroup\$
    – Brethlosze
    May 4, 2018 at 4:12
  • 1
    \$\begingroup\$ I'm usually torn about such things. If I write an answer, it should be broadly informative. I was only interested in just helping you out, quickly. But others here complain that if there isn't an answer, then the question may be removed at some point in the future and not be available then. I'm not certain about all these arguments. I just try and help. But I'll write up a short answer for you. \$\endgroup\$
    – jonk
    May 4, 2018 at 4:24
  • 1
    \$\begingroup\$ hyprfrcb I see you accepted @jonk's fine answer. I thought I would add some important Design Rules for you to remember. Since these are pulse operated into saturation, hFE reduces Vce to Vce(sat) where they are mostly rated at Ic/Ib=10 meaning hFE drops to 10 or about 10% of its max linear value when saturated. When both collector and base resistors come from the same supply (5V), then always choose Rb/Rc=10 to 20. So changing Rb from 100k to 10k~20k will work all the time, but f will rise with a lower Rb. The other is if you try with more than -5V on Vbe , it needs a diode to clamp \$\endgroup\$ May 4, 2018 at 7:31
  • \$\begingroup\$ I tries this suggestion, but for this particular case this stabilizes the system, i.e. no oscillations. \$\endgroup\$
    – Brethlosze
    May 7, 2018 at 2:54

1 Answer 1

2
\$\begingroup\$

NPN uses a default BF=100 parameter. Your circuit shows a collector resistor that is 100 times smaller than your base resistor, plus it must drive the next stage through a capacitor. These things suggest to me strongly that your collector resistor is too low in value (or that your base resistor should be lower.) If you don't change the default BF=100 value with the NPN model, then I'd recommend either increasing the collector resistor values or else reducing the base resistor values. Or, just increase \$\beta\$ by setting BF=200 or so.

The other aspect is charge storage within the BJT. The two parameters I'd want to change would be either TF or TR or both. TF is computed from the BJT's unity-gain bandwidth and TR is computed from the saturation time constant. In the NPN model, both these values are set to 0 which is not at all realistic and will cause problems in a circuit like this.

TF isn't actually constant in a real BJT, but the simpler models assume it is. (In reality, it varies with the collector current.) It is used to model the excess charge stored in the BJT when its emitter-base junction is forward biased and used in order to calculate the BJT's emitter diffusion capacitance. (You can work out the value using a power supply, small signal source, and an oscilloscope.) If you have no clue about its value, just use TF=300p. With RF BJTs, though, it will be smaller than that.

TR is more complicated to measure and models the excess charge stored in the BJT when its collector-base junction is forward-biased. It calculates the BJT's collector diffusion capacitance. If you have no clue about its value, just use TR=20n.


So, I'd probably just accept the NPN model but set things up like this:

.model MYNPN ako:NPN NPN(TR=20n TF=300p BF=200)

Or something similar. You might be able to get away with a lower BF. But given your resistor values, I'd avoid the temptation and stick with a higher value for BF than the default.

\$\endgroup\$
7
  • \$\begingroup\$ I already checked the resistor. Leaving 1k is indeed problematic, and raising it improved the circuit too. Also, i noticed that i should put the base of one of the transistors into ground with a hige resistor. I suppose that is simply for referencing the values. Thanks. \$\endgroup\$
    – Brethlosze
    May 4, 2018 at 4:47
  • 1
    \$\begingroup\$ @hyprfrcb I hoped it helped a little. With TR and TF both zero, spice is stuck with something that "looks infinitely fast" as a device and this can make the solution quite difficult. That problem, plus the BF problem, were the only ones I felt had to be adjusted, though. Glad it helped. \$\endgroup\$
    – jonk
    May 4, 2018 at 4:51
  • \$\begingroup\$ I realized the Proteus probes destroy the convergence. I will prepare a proper answer for this later. \$\endgroup\$
    – Brethlosze
    May 4, 2018 at 23:02
  • 1
    \$\begingroup\$ @hyprfrcb I didn't know about the probes in Proteus. Do they load down the circuit? \$\endgroup\$
    – jonk
    May 4, 2018 at 23:13
  • 1
    \$\begingroup\$ @hyprfrcb The over-arching problem with this design is the need to set \$V_E\$ above ground to help minimize significant variation of the base current during oscillation. The lack of a midpoint Thevenin voltage for the base also works against reducing the base current variation, too \$\endgroup\$
    – jonk
    May 5, 2018 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.