开云体育

Date

Re: How to Set BJT Temperature

 

eewiz,
?
More elaboration follows.
?
In SPICE, every transistor has two parts in the netlist.? They can be in either order, but both must be there.? You need to:
  • Define the specific transistor type (e.g., "LoB5551"), and
  • Add an instance of that transistor type to your netlist or schematic.
?
Defining the transistor type uses either a .MODEL statement or a .SUBCKT block, which can be on the schematic itself or in a separate library file.? Adding a transistor symbol to the schematic adds an instance of that transistor.? In the netlist, it will begin either with "Q" or with "X".
?
For purpose of this discussion, let's consider only the .MODEL case.? Changing the temperature of a .SUBCKT transistor model is potentially much more complicated and I won't consider that here.? I hope you have only .MODEL cases to consider.
?
If the bipolar transistor is in LTspice's library or your own library and uses just a .MODEL statement, then the netlist line that adds an instance of that transistor starts with a Q.? A netlist line starting with Q tells SPICE this is a transistor, just the same way that "R105" tells SPICE you want a resistor.? In schematic form, add your NPN or PNP symbol, then click "Pick New Transistor" and choose one from the list.? Doing that creates a netlist line that starts with a Q.
?
Next, you need to get that "Temp=20" added to the netlist line that starts with Q.? Here are two ways to do that.? Do one OR the other, not both:
?
(1)? Ctrl-right-click on the transistor symbol.? Double-click in the Value2 attribute line.? Type "Temp=20" there, without the quotes.? Also double-click in that line's "Vis." column to make it visible, and click OK.? Done.
?
(2)? Alternatively, right-click on the TEXT next to the transistor with the transistor's model name.? Add "Temp=20" (without quotes) after the model name, with a space separating it from the model name.? (For example: "LoB5551 Temp=20")? This works like method #1 does, except that you would lose the "Temp" portion if you later Pick a different transistor from the menu.? I like #1 better.
?
Andy
?


Re: How to Set BJT Temperature

 

Do not add the Temp setting to the .MODEL statement.? That's the wrong place.? It won't work there?
?
Add it to the component instance line.? In Netlist form, it's the one starting with a Q.
?
In schematic form, add it to the symbol, on one of its Attribute lines, after the part name.
?
Andy


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

On Fri, Feb 7, 2025 at 03:00 PM, mstokowski wrote:
On Fri, Feb 7, 2025 at 12:00 PM, eetech00 wrote:
Can't the "^" xor operator be retained for compatibility, and make the new xor() function optional?
Noted. We are looking to add this back to the grammar.
?
--
Michael Stokowski
LTspice Team
Analog Devices Inc.
Thank you Michael


Re: How to Set BJT Temperature

 

I don't have access to my pc, but if I remember rightly, right click on the component, put your temp statement after the device name with a space between?


How to Set BJT Temperature

 

Hello All:
?
On 24.0.12, I am attempting to individually set the beta and temperature of two distinct transistors.
The help file says:
Syntax: Qxxx Collector Base Emitter [Substrate Node] model [area] [off] [temp=<T>]
?
First I renamed two existing MMBT5551 transistors to LoB5551 and HiB5551.
Then I copied the MMBT5551 model onto my schematic twice, changing the model names and altered each Bf parameter as shown below.
?
.model LoB5551 npn (Bf=80 remaining-unaltered-parameters)
.model HiB5551 npn (Bf=300 remaining-unaltered-parameters)
?
Those model name and beta changes worked as expected.
?
Then I attempted to set each transistors temperature three different ways as shown below.
?
Neither
.model LoB5551 npn temp=20 (Bf=80 remaining-unaltered-parameters)??? (e.g. temp before params)
nor
.model LoB5551 npn (Bf=80 remaining-unaltered-parameters temp=20) ?? (e.g. temp within params)
nor
.model LoB5551 npn (Bf=80 remaining-unaltered-parameters) temp=20??? (e.g. temp after params)
works.
?
All produce
* Unrecognized parameter "temp" -- ignored
?
I also tried adding the sharp braces (e.g. temp=<20>) to precisely match the help file's syntax with no success.
?
Please help me understand the Q syntax related to setting a BJT's temperature.
?
All for now


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

开云体育

Thank you very much. Please make it soon.

On 2025-02-07 23:00, mstokowski via groups.io wrote:
On Fri, Feb 7, 2025 at 12:00 PM, eetech00 wrote:
Can't the "^" xor operator be retained for compatibility, and make the new xor() function optional?
Noted. We are looking to add this back to the grammar.
?
--
Michael Stokowski
LTspice Team
Analog Devices Inc.
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

On Fri, Feb 7, 2025 at 12:00 PM, eetech00 wrote:
Can't the "^" xor operator be retained for compatibility, and make the new xor() function optional?
Noted. We are looking to add this back to the grammar.
?
--
Michael Stokowski
LTspice Team
Analog Devices Inc.


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

On Fri, Feb 7, 2025 at 09:16 AM, mstokowski wrote:
Hi eT,
?
Note that in LTspice 24.1.1, the xor operator “ ^ ” is no longer supported. One of the lines in the library must be changed:
?
From:
BEXOR P 0 V=IF(V(YTD) > 0.5 ^ V(IN) > 0.5, 1, 0)
?
To:
BEXOR P 0 V=IF(XOR((V(YTD) > 0.5), (V(IN) > 0.5)), 1, 0)
?
I tested this using your test fixture. Additional parens optional, of course.
--
Michael Stokowski
LTspice Team
Analog Devices Inc.
?
Hi Michael,
?
That's very "Trumpian" of you....just kidding? :-)
?
Can't the "^" xor operator be retained for compatibility, and make the new xor() function optional?
?


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

Yeah, WTF?
Its like tRump and the american way of life!

On Fri, Feb 7, 2025 at 2:20?PM Andy I via <AI.egrps+io=[email protected]> wrote:
On Fri, Feb 7, 2025 at 12:16 PM, mstokowski wrote:
Note that in LTspice 24.1.1, the xor operator “ ^ ” is no longer supported. ..
ARE YOU JOKING???
?
Your post comes about four and a half weeks too early (April 1).
?
Why is Analog Devices so intent on destroying LTspice??
?
Andy
?



--
AC2CL

I do not think there is any thrill that
can go through the human heart like that felt by the inventor as
he sees some creation of the brain unfolding to success...
Such emotions make a man forget food, sleep, friends, love, everything.

- Nikola Tesla


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

On Fri, Feb 7, 2025 at 12:16 PM, mstokowski wrote:
Note that in LTspice 24.1.1, the xor operator “ ^ ” is no longer supported. ..
ARE YOU JOKING???
?
Your post comes about four and a half weeks too early (April 1).
?
Why is Analog Devices so intent on destroying LTspice??
?
Andy
?


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

开云体育

It can't be good to compromise reverse compatibility like this.

On 2025-02-07 17:16, mstokowski via groups.io wrote:
Hi eT,
?
Note that in LTspice 24.1.1, the xor operator “ ^ ” is no longer supported. One of the lines in the library must be changed:
?
From:
BEXOR P 0 V=IF(V(YTD) > 0.5 ^ V(IN) > 0.5, 1, 0)
?
To:
BEXOR P 0 V=IF(XOR((V(YTD) > 0.5), (V(IN) > 0.5)), 1, 0)
?
I tested this using your test fixture. Additional parens optional, of course.
--
Michael Stokowski
LTspice Team
Analog Devices Inc.
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


Re: Please help me use an IC PSpice model with multiple .subckt in the lib file

 

Hi eT,
?
Note that in LTspice 24.1.1, the xor operator “ ^ ” is no longer supported. One of the lines in the library must be changed:
?
From:
BEXOR P 0 V=IF(V(YTD) > 0.5 ^ V(IN) > 0.5, 1, 0)
?
To:
BEXOR P 0 V=IF(XOR((V(YTD) > 0.5), (V(IN) > 0.5)), 1, 0)
?
I tested this using your test fixture. Additional parens optional, of course.
--
Michael Stokowski
LTspice Team
Analog Devices Inc.


Re: Zener diode stabilizer

 

On Fri, Feb 7, 2025 at 07:07 AM, Tony Casey wrote:
Of course, I mean Rs, not R2.
Also, R2 not R1, in the very first sentence.
?
(No problem.? Hopefully everyone understood what you meant.)
?
Andy
?


Re: Stretch mode LTspice64

 

I think in all the older versions, it was named "Drag".
?
Andy
?


Re: Zener diode stabilizer

 

开云体育

You could replace the Zener with a large capacitor. Leaving Rs at 200 ohms, and simulating for 1 second (remove the Ncycles = 5), 2200 ?F gives about 16 mV peak-to-peak. Capacitor current is only about 10mA peak-to-peak.

On 2025-02-07 10:58, John Woodgate wrote:

There is no practical answer to that question. The lower you make R2, the lower the ripple on V(2), but the Zener current goes up without limit. See if 100 ohms reduces the ripple enough for your application. If you change the Zener to one that will carry enough current without burning out, you might be able to use 50 ohms.

On 2025-02-07 10:42, jacfev via groups.io wrote:
Le ven. 7 févr. 2025 à 11:12, John Woodgate a écrit :
I am basically looking for how to optimize (calculate) the value of RS to obtain a minimum output ripple r2.
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying


Re: Zener diode stabilizer

 

开云体育

On 07/02/2025 12:56, Tony Casey wrote:
At an output voltage 7.5V the load current current will be 75mA. If the Zener current is even just 5mA, then 80mA flows through R2, so it's value must be ~8.5/80m = 106.25Ω.
Of course, I mean Rs, not R2.

--
Regards,
Tony


Re: Zener diode stabilizer

 

开云体育

The basic problem with this circuit is that the load current (through R1) is much too high. The Zener stabiliser only works well in a circuit like this if the Zener current is comparable to the load current.

In your circuit, with your choice of resistors, the load current is 53mA ant the Zener current is 3nA. The Zener might just as well not be there.

These Zeners are characterised at about 5mA. If your load current is bigger than 5mA, the Zener will become increasingly ineffective, and it's the wrong circuit. You would be better just using a regulator.

If you change R2 to 100Ω, it will just work, but the ripple will still be significant.

You can estimate out the maximum value of Rs for it to work at all.

For the output voltage to be stabilised at ~7.5V, Rs should drop no more than 16 - 7.5 ~ 8.5V. At an output voltage 7.5V the load current current will be 75mA. If the Zener current is even just 5mA, then 80mA flows through R2, so it's value must be ~8.5/80m = 106.25Ω.

Realistically, there is also a minimum value for Rs. The maximum dissipation for the Zener is 350mW. Therefore, the maximum Zener current is 0.35/7.5 = 46.6mA. Therefore the current through Rs will be 75mA + 46.6mA ~122mA. So Rs(min) = 8.5/0.122 = 69.7Ω. I don't recommend operating any device at the maximum rating!

Note, that this resistor will dissipate ~1.04W.

You don't need LTspice to work out all this.

--
Regards,
Tony




On 07/02/2025 11:42, jacfev via groups.io wrote:

I am basically looking for how to optimize (calculate) the value of RS to obtain a minimum output ripple r2.


Re: Zener diode stabilizer

 

开云体育

As John mentioned, the zener does nor affect ripple.

You would have to increase R2 or decrease Rs in order to reach an output voltage that "triggers" the zener.
At the moment, the output voltage is 1/3rd of the input. What a waste of energy!

Can you define the voltage/current you want to achieve, and what voltage and current the source is capable of?

Le 07/02/2025 à 11:42, jacfev via groups.io a écrit?:

Le ven. 7 févr. 2025 à 11:12, John Woodgate a écrit :
I am basically looking for how to optimize (calculate) the value of RS to obtain a minimum output ripple r2.


Re: Zener diode stabilizer

 

开云体育

There is no practical answer to that question. The lower you make R2, the lower the ripple on V(2), but the Zener current goes up without limit. See if 100 ohms reduces the ripple enough for your application. If you change the Zener to one that will carry enough current without burning out, you might be able to use 50 ohms.

On 2025-02-07 10:42, jacfev via groups.io wrote:
Le ven. 7 févr. 2025 à 11:12, John Woodgate a écrit :
I am basically looking for how to optimize (calculate) the value of RS to obtain a minimum output ripple r2.
-- 
OOO - Own Opinions Only
Best Wishes
John Woodgate
Keep trying

Virus-free.


Re: Zener diode stabilizer

 

Le ven. 7 févr. 2025 à 11:12, John Woodgate a écrit :
I am basically looking for how to optimize (calculate) the value of RS to obtain a minimum output ripple r2.