Skip to content

Commit

Permalink
Upload TEMP sweep examplex #935
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Sep 8, 2024
1 parent 0a96a96 commit 8d3344e
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 0 deletions.
51 changes: 51 additions & 0 deletions examples/ngspice/BJT_TEMPER_swp.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Qucs Schematic 24.3.99>
<Properties>
<View=-226,-121,1120,618,1.04201,0,0>
<Grid=10,10,1>
<DataSet=BJT_TEMPER_swp.dat>
<DataDisplay=BJT_TEMPER_swp.dpl>
<OpenDisplay=0>
<Script=BJT_TEMPER_swp.m>
<RunScript=0>
<showFrame=0>
<FrameText0=Title>
<FrameText1=Drawn By:>
<FrameText2=Date:>
<FrameText3=Revision:>
</Properties>
<Symbol>
</Symbol>
<Components>
<R R2 1 160 150 15 -26 0 1 "1k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<IProbe Pr1 1 240 100 -14 -56 1 2>
<.DC DC1 1 70 380 0 38 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0>
<R R1 1 90 150 -74 -20 0 1 "300k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<.SW SW1 1 250 380 0 64 0 0 "DC1" 1 "lin" 1 "TEMP" 1 "-40" 1 "85" 1 "200" 1>
<GND * 1 160 270 0 0 0 0>
<Vdc V1 1 300 140 18 -26 0 1 "12 V" 1>
<GND * 1 300 180 0 0 0 0>
<_BJT Q2N2222A_1 1 160 230 15 -30 0 0 "npn" 0 "8.11e-14" 0 "1" 0 "1" 0 "0.5" 0 "0.225" 0 "113" 0 "24" 0 "1.06e-11" 0 "2" 0 "0" 0 "2" 0 "205" 1 "4" 0 "0" 0 "0" 0 "0.137" 0 "0.343" 0 "1.37" 0 "2.95e-11" 0 "0.75" 0 "0.33" 0 "1.52e-11" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "3.97e-10" 0 "0" 0 "0" 0 "0" 0 "8.5e-08" 0 "TEMPER" 1 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 1 "1" 0 "no" 1>
</Components>
<Wires>
<160 100 160 120 "" 0 0 0 "">
<160 180 160 200 "" 0 0 0 "">
<90 100 160 100 "" 0 0 0 "">
<90 100 90 120 "" 0 0 0 "">
<90 230 130 230 "" 0 0 0 "">
<90 180 90 230 "" 0 0 0 "">
<160 100 210 100 "" 0 0 0 "">
<160 260 160 270 "" 0 0 0 "">
<270 100 300 100 "" 0 0 0 "">
<300 100 300 110 "" 0 0 0 "">
<300 170 300 180 "" 0 0 0 "">
<160 200 160 200 "Vce" 180 170 0 "">
</Wires>
<Diagrams>
<Rect 430 387 387 297 3 #c0c0c0 1 00 1 -40 20 84.3719 0 0 2 10 0 0 0.002 0.01 315 0 225 1 0 0 "" "" "">
<"ngspice/sw1.v(vce)" #0000ff 0 3 0 0 0>
<"ngspice/sw1.i(pr1)" #ff0000 0 3 0 0 1>
</Rect>
</Diagrams>
<Paintings>
<Text 40 -80 12 #082dff 0 "ra3xdh:\nThe TEMPER represents a global temperature in Ngspice. \nBut the DC sweep requires TEMP as the parameter to sweep. \nThese variable names are a bit ambiguous. \nHere is an example of the temperature sweep.\n\n">
</Paintings>
52 changes: 52 additions & 0 deletions examples/ngspice/BJT_T_swp.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<Qucs Schematic 24.3.99>
<Properties>
<View=-257,-171,1108,578,1.02807,0,0>
<Grid=10,10,1>
<DataSet=BJT_T_swp.dat>
<DataDisplay=BJT_T_swp.dpl>
<OpenDisplay=0>
<Script=BJT_T_swp.m>
<RunScript=0>
<showFrame=0>
<FrameText0=Title>
<FrameText1=Drawn By:>
<FrameText2=Date:>
<FrameText3=Revision:>
</Properties>
<Symbol>
</Symbol>
<Components>
<R R2 1 170 130 16 -21 0 1 "1k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<IProbe Pr1 1 240 80 -12 -57 1 2>
<R R1 1 100 130 -76 -20 0 1 "300k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<Vdc V1 1 310 120 18 -26 0 1 "12 V" 1>
<GND * 1 310 160 0 0 0 0>
<GND * 1 170 250 0 0 0 0>
<.DC DC1 1 70 340 0 38 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0>
<.SW SW1 1 240 340 0 64 0 0 "DC1" 1 "lin" 1 "TEMP" 1 "-40" 1 "85" 1 "200" 1>
<_BJT X2N2222A_1 1 170 210 15 -20 0 0 "npn" 0 "14.34f" 0 "1" 0 "1" 0 "0.2847" 0 "0" 0 "74.03" 0 "0" 0 "14.34f" 0 "1.307" 0 "0" 0 "2" 0 "255.9" 1 "6.092" 0 "0" 0 "0" 0 "1" 0 "0" 0 "10" 0 "22.01p" 0 "0.75" 0 "0.377" 0 "7.306p" 0 "0.75" 0 "0.3416" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "411.1p" 0 "3" 0 "0" 0 "0.6V" 0 "46.91n" 0 "26.85" 1 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 1 "1" 0 "yes" 1>
</Components>
<Wires>
<170 80 170 100 "" 0 0 0 "">
<170 80 210 80 "" 0 0 0 "">
<100 80 170 80 "" 0 0 0 "">
<100 80 100 100 "" 0 0 0 "">
<270 80 310 80 "" 0 0 0 "">
<310 80 310 90 "" 0 0 0 "">
<310 150 310 160 "" 0 0 0 "">
<170 240 170 250 "" 0 0 0 "">
<170 160 170 180 "" 0 0 0 "">
<100 160 100 210 "" 0 0 0 "">
<100 210 140 210 "" 0 0 0 "">
<170 180 170 180 "Vce" 190 150 0 "">
</Wires>
<Diagrams>
<Rect 440 357 387 297 3 #c0c0c0 1 00 1 -40 20 84.3719 0 0 2 10 0 0 0.002 0.01 315 0 225 1 0 0 "" "" "">
<"ngspice/sw1.v(vce)" #0000ff 0 3 0 0 0>
<"ngspice/sw1.i(pr1)" #ff0000 0 3 0 0 1>
</Rect>
</Diagrams>
<Paintings>
<Text 50 -100 12 #082dff 0 "ra3xdh:\nI have added the property UseGlobTemp=yes/no \nThe default is yes. If set to yes it uses global temperature. \nOtherwise the device uses temperature defined in Temp. \nThe temperature sweep will be possible for device using default parameters.">
<Text 50 -130 12 #000000 0 "https://github.com/ra3xdh/qucs_s/pull/925">
</Paintings>
51 changes: 51 additions & 0 deletions examples/qucsator/BJT_T_swp_qucs.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<Qucs Schematic 24.3.99>
<Properties>
<View=-167,-51,979,578,1.22452,0,0>
<Grid=10,10,1>
<DataSet=BJT_T_swp_qucs.dat>
<DataDisplay=BJT_T_swp_qucs.dpl>
<OpenDisplay=0>
<Script=BJT_T_swp_qucs.m>
<RunScript=0>
<showFrame=0>
<FrameText0=Title>
<FrameText1=Drawn By:>
<FrameText2=Date:>
<FrameText3=Revision:>
</Properties>
<Symbol>
</Symbol>
<Components>
<.DC DC1 1 40 340 0 38 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0>
<.SW SW1 1 220 340 0 64 0 0 "DC1" 1 "lin" 1 "TEMP" 1 "-40" 1 "85" 1 "20" 1>
<R R2 1 140 140 15 -26 0 1 "1k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<IProbe Pr1 1 220 90 -12 -58 1 2>
<GND * 1 140 260 0 0 0 0>
<Vdc V1 1 280 140 18 -26 0 1 "12 V" 1>
<GND * 1 280 180 0 0 0 0>
<R R1 1 70 140 -77 -21 0 1 "300k" 1 "26.85" 0 "0.0" 0 "0.0" 0 "26.85" 0 "european" 0>
<_BJT Q2N2222A_1 1 140 220 8 -26 0 0 "npn" 0 "8.11e-14" 0 "1" 0 "1" 0 "0.5" 0 "0.225" 0 "113" 0 "24" 0 "1.06e-11" 0 "2" 0 "0" 0 "2" 0 "205" 1 "4" 0 "0" 0 "0" 0 "0.137" 0 "0.343" 0 "1.37" 0 "2.95e-11" 0 "0.75" 0 "0.33" 0 "1.52e-11" 0 "0.75" 0 "0.33" 0 "1" 0 "0" 0 "0.75" 0 "0" 0 "0.5" 0 "3.97e-10" 0 "0" 0 "0" 0 "0" 0 "8.5e-08" 0 "TEMP" 1 "0" 0 "1" 0 "1" 0 "0" 0 "1" 0 "1" 0 "0" 0 "1.5" 0 "3" 0 "1.11" 0 "26.85" 1 "1" 0 "no" 0>
</Components>
<Wires>
<140 90 140 110 "" 0 0 0 "">
<140 90 190 90 "" 0 0 0 "">
<140 170 140 190 "" 0 0 0 "">
<140 250 140 260 "" 0 0 0 "">
<250 90 280 90 "" 0 0 0 "">
<280 90 280 110 "" 0 0 0 "">
<280 170 280 180 "" 0 0 0 "">
<70 90 140 90 "" 0 0 0 "">
<70 90 70 110 "" 0 0 0 "">
<70 220 110 220 "" 0 0 0 "">
<70 170 70 220 "" 0 0 0 "">
<140 190 140 190 "Vce" 160 160 0 "">
</Wires>
<Diagrams>
<Rect 430 377 387 297 3 #c0c0c0 1 00 1 -40 20 85 0 0 2 10 0 0 0.002 0.01 315 0 225 1 0 0 "" "" "">
<"Vce.V" #0000ff 0 3 0 0 0>
<"Pr1.I" #ff0000 0 3 0 0 1>
</Rect>
</Diagrams>
<Paintings>
<Text 20 -10 12 #082dff 0 "Temp Sweep Qucsator">
</Paintings>

0 comments on commit 8d3344e

Please sign in to comment.