QSPICE what is wrong?

Alec_t

Joined Sep 17, 2013
14,218
Edit:
It 'works' in LTspice. I see a similar plot to yours, for the voltage across R4, when using the default transistors. However, when using 2N3904 and 2N3906 I get a series of 250us wide pulses repeating at 10.9ms intervals. In both instances the voltage peaks at almost 9V. Perhaps transistor beta is critical?
Where is your node n05?
What are you expecting the circuit to do?
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,218
Interesting. Both the pulse width and the pulse spacing are dependent on the choice of transistors, to an extent greater than I would have expected.
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,485
I did manage to make it to work. I found the transistor model that works.

gen1a.PNG

I even breadboarded this exact circuit using BC547B/BC557B to see if it would work in the real world.

QSPICE results.

gen1.PNG

And the real circuit:
RigolDS43.png



And I do not know what is wrong with the BC8xx models included in QSPICE.
 

Attachments

Papabravo

Joined Feb 24, 2006
20,994
Where did the model statements for the Qspice implementation come from? Are they identical to their LTspice cousins?
In order to check this, you may have to enter the values for each parameter into a spreadsheet so you can do a side by side comparison. Alternatively, you could write a Python script to read a .model card for a transistor and output it in a standard format. this would allow you to automate the comparison process.
 

Papabravo

Joined Feb 24, 2006
20,994
I just checked my Qspice installation for the BC107 and the BC177, and neither one of the models was present. My preliminary inference is that the models came from another source and have not been verified.

They are present in my LTspice XVII (17.0.35) installation which has been merged with the library from @Bordodynov
They are not present in my LTspice (17.1.10) installation.

So, I have to ask again where they came from?
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,485
I just checked my Qspice installation for the BC107 and the BC177, and neither one of the models was present.
I added these models because the circuit did not want to work with the Qspice BC8xxx models.
So I inserted my models (BC107/BC177). But that still didn’t solve the problem, the simulation still didn’t work.

Good news.
Now after the auto update of QSPICE, the circuit started to work with BC107/BC177.
 
Last edited:

Papabravo

Joined Feb 24, 2006
20,994
I added these models because the circuit did not want to work with the Qspice BC8xxx models.
So I inserted my models (BC107/BC177). But that still didn’t solve the problem, the simulation still didn’t work.

Good news.
Now after the auto update of QSPICE, the circuit started to work with BC107/BC177.
Just for the record, are those models the same as the ones in the library of @Bordodynov ?

.model BC107 NPN(Is=40.72f Vaf=21.03 Bf=407 Ise=40.72f Ne=1.305 Ikf=1 Xtb=1.5 Isc=594.8p Nc=2.033 Ikr=3.726 Rc=1.393 Cjc=6p Mjc=.3821 Cje=12.5p Mje=.4869 Vje=.5391 Tr=114n Tf=441.1p )

.model BC177 PNP(Is=336.7f Xti=3 Eg=1.11 Vaf=55.46 Bf=154.4 Ise=412.1f Ne=1.429 Ikf=.2994 Nk=.7028 Xtb=1.5 Br=3.99 Isc=1.03n Nc=1.958 Ikr=9.726 Rc=1.833 Cjc=11p Mjc=.2223 Vjc=.5 Fc=.5 Cje=33p Mje=.3333 Vje=.5 Tr=10n Tf=847.7p Itf=2.198 Xtf=23.26 Vtf=10 Vceo=50 Icrating=100m mfg=Philips)
 

Thread Starter

Jony130

Joined Feb 17, 2009
5,485
Just for the record, are those models the same as the ones in the library of @Bordodynov ?
No.
.model BC107 NPN(Is=14.34f Xti=3 Eg=1.11 Vaf=220 Bf=400 Ne=1.307 Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 Tr=7u Tf=1ns Itf=.6 Vtf=1.7 Xtf=3 Rb=10 Vceo=0.44 Icrating=44m mfg=AB)

.model BC177 PNP(Is=14.34f Xti=3 Eg=1.11 Vaf=220 Bf=400 Ne=1.307 Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 Tr=7u Tf=1ns Itf=.6 Vtf=1.7 Xtf=3 Rb=10 Vceo=0.44 Icrating=44m mfg=AB)

From here:
http://www.burd.pl/dydaktyka/pracownia_dypl/pracownia_dypl.htm
 

Papabravo

Joined Feb 24, 2006
20,994
No.
.model BC107 NPN(Is=14.34f Xti=3 Eg=1.11 Vaf=220 Bf=400 Ne=1.307 Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 Tr=7u Tf=1ns Itf=.6 Vtf=1.7 Xtf=3 Rb=10 Vceo=0.44 Icrating=44m mfg=AB)

.model BC177 PNP(Is=14.34f Xti=3 Eg=1.11 Vaf=220 Bf=400 Ne=1.307 Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 Tr=7u Tf=1ns Itf=.6 Vtf=1.7 Xtf=3 Rb=10 Vceo=0.44 Icrating=44m mfg=AB)

From here:
http://www.burd.pl/dydaktyka/pracownia_dypl/pracownia_dypl.htm
Thanks. I'll do a comparison

AND,
Can you explain why the two model cards from your library are identical in every parameter. This would normally be highly unusual for an NPN/PNP pair? Certainly, the models from @Bordodynov do not share this property.
 
Last edited:

Papabravo

Joined Feb 24, 2006
20,994
I think the only reliable model among the four is the BC177 from @Bordodynov It has more reasonable looking paramters for a PNP device and a manufacturer's ID. The other three models look as though they were "slapped" (a term of art) together.
 

Attachments

Bordodynov

Joined May 20, 2015
3,166
I place the Qspice directives on the Qspice cirquit:
.inc standard.bjt
.inc standard.dio
.inc standard.mos
and then use. True they must be present in the schema folder. You can also make these files npnmy.txt and pnpmy.txt, then put them in the Qspice system folder. Use them instead of the standard names. This way you can select transistors from the list and see the model text at a glance. These files will not be erased during an update.
Recently there was an attempt to make a HSPICE-style BJT model. An error was introduced and bipolar transistors were modeled incorrectly. Now 10/07/2023 "Fixed an error in the implementation of the HSPICE-style BJT model parameters IBE and IBC".
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,218
Just curious. Is Qspice still in the beta phase or is it now mature? I haven't installed it yet and wonder if it's worth doing?
 

Bordodynov

Joined May 20, 2015
3,166
Qspice continues to make changes. The latest major change is the addition of parallel capacitance to the controlled sources. I missed this as I use it a lot in my LTspice models. When converting the model to Qspice I had to remove this parameter (Cpar) and add an external capacitance. Qspice is more accurate in counting unstable circuits. In other programs, such as Multisim, the circuit works well, without parasitic oscillations, but Qspice will not miss it.
You may want to familiarize yourself with:
https://kazus.ru/forums/showthread.php?t=122365
It's true that everything is in Russian, but now it's not a problem. There are translators built into the browser.
There are many examples showing the capabilities of Qspice.
 

Papabravo

Joined Feb 24, 2006
20,994
@Alec_t

Officially, the "Beta" phase lasted from the announcement on 9 May 2023 until late July 2023. During that time invitations to download were issued to people who preregistered for the "Beta" program. Since late July the download has been available to the public at large.
 
Top