Author Topic: ZENER DIODES IN LTSPICE  (Read 82713 times)

0 Members and 1 Guest are viewing this topic.

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
ZENER DIODES IN LTSPICE
« on: November 03, 2016, 12:08:37 am »
Hello again.
I'm having another bit of trouble with LTSpice ver 4.23.
I need to use a 3.3volt zener diode.
There is a generic Zener Diode in the library but this does not allow for editing.
There is an option within the properties of this Zener Diode to select another diode.
There are quite a few diodes listed. Leds, Schottky, TVS, Rectifier, Silicon, and Zener, however
there does not seem to be any Zener with a breakdown voltage less than 4.7volts.
Also, none of the diodes are editable.
Even selecting LED in the generic components does not allow editing.
How many other components have this same problem.
I may just select a screen full of components and try them all.
Any one have any suggestions? Please keep it clean.
Going to meditate for a while.   \$\Omega\$ \$\Omega\$ \$\Omega\$ \$\Omega\$ \$\Omega\$

Thank you
BILL.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: ZENER DIODES IN LTSPICE
« Reply #1 on: November 03, 2016, 01:46:38 am »
This might help (import a model) -

http://www.linear.com/solutions/4678

http://www.linear.com/solutions/1083


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13288
Re: ZENER DIODES IN LTSPICE
« Reply #2 on: November 03, 2016, 03:16:09 am »
v4.23 should have the BZX84C3V3L 3.3V Zener.  However if you need to go lower, the quick & dirty method is to alias an existing model and override the breakdown voltage.  You then right click the model name and type in the new one manually as you wont be able to pick it from the diode list.

Code: [Select]
.model BZX84C2V7L ako:  BZX84C3V3L bv=2.7
« Last Edit: November 03, 2016, 03:19:42 am by Ian.M »
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: ZENER DIODES IN LTSPICE
« Reply #3 on: November 03, 2016, 03:17:57 am »
There's a BZX84C3V3 in this  standard.dio

http://ltwiki.org/?title=Components_Library#Diodes

Just carefully copy the whole line and paste it on to the end of your  \lib\comp\standard.dio  file.
.  That took much longer than I thought it would.
 
The following users thanked this post: Axk

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: ZENER DIODES IN LTSPICE
« Reply #4 on: November 03, 2016, 10:23:50 pm »
Good morning to everyone.
The version of LTSpice  I am using is 4.23I  see CAPTURE-1
I have had a look through the list of diodes and am unable to find BZX84C3V3L 3.3V Zener Diode you both mentioned.
I right clicked on the diode and then the PICK NEW DIODE button.
It doesn't show up in the list.
I may have to add it as Posted by: StillTrying.  I have saved a link to the web page and will try a few things in a few days.
After doing a backup of the libraries  first.

I was able to string 5 diodes together to give me a 3.5V Zener Diode.

I am unable to try Ians suggestion as I am unable to edit any of the diode properties unless there is another way of doing it.  see CAPTURE-3
Any idea on that problem?

Speaking of the diode list. 
I found something you may not realize.
By clicking on any of the column names eg.  Part No.    Mfg.     Type etc,
you can sort the list in any direction you want.
see CAPTURE-2

Once again,
Thank you for your help and suggestions
BILL.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13288
Re: ZENER DIODES IN LTSPICE
« Reply #5 on: November 03, 2016, 11:37:35 pm »
To change a diode to use one defined in a  .model statement, simply right click on the text of the diode's type on the schematic and edit it to the new model name.  Alternatively you can access the generic SPICE component properties dialog, bypassing the diode selector by ctrl-right clicking the diode.

If you've never updated LTSPICE, you should run 'Sync Release' from its Tools menu, which *should* bring all standard libraries up to date (unless your computer previously had the clock set way into the future) or something else is blocking updates.  IIRC you may need to run as administrator to do the update as it needs to write to the program directory.

As a last resort, I've attached the LTSPICE standard.dio file as delivered by the most recent time I updated, today.  Back up the one in your lib\cmp folder and replace it with this one, renamed to remove the .txt. 
« Last Edit: November 03, 2016, 11:39:41 pm by Ian.M »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #6 on: November 04, 2016, 12:42:55 am »
Hello again.
I'm having another bit of trouble with LTSpice ver 4.23.
I need to use a 3.3volt zener diode.

Snip...

Thank you
BILL.

Hi Bill,

There are several ways to do this. This is the way that I like to use. It puts the model for the Zener right on the schematic so the LTspice file is not dependent on having any other files. This is important if you want to share your model with others.

I did a Google search for 'BZX84C3V3 SPICE MODEL' and I found a Diode Inc model.

The Diodes Inc model was included in a large file with all their Zener diodes. I cut out the one that was needed and pasted it into a SPICE directive.

I drew the schematic in LTspice the normal way and included any zener diode from the library of parts. You do this to get the right symbol.

A diode can be defined as an intrinsic diode which has the SPICE prefix D. In the case the diode was defined by a .SUBCIRCUIT statement, so the SPICE prefix has to be changed from 'D' to 'X'. Right click on the diode and change the Prefix to X. Change Value to match the name of the subcircuit.

These pictures will help:




Here is the model



This is a DC sweep. You can plot I versus V.

And here is the result.



Like most low voltage zeners the BZX84C3V3 has a soft knee.

I have attached the model for those playing along at home.

You can cut and paste from this model into your model.

Regards,

Jay_Diddy_B


« Last Edit: November 04, 2016, 12:45:51 am by Jay_Diddy_B »
 
The following users thanked this post: RonFred2

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: ZENER DIODES IN LTSPICE
« Reply #7 on: November 04, 2016, 01:34:39 am »
Yes, but if you paste this on to the end of your  \lib\comp\standard.dio  file, then a 'BZX84C3V3 Zenner conveniently appears in your "Pick new diode" list.

Code: [Select]
.MODEL PH_BZX84C3V3 D ( IS=7.035E-16 N=0.9809 BV=3.3 IBV=0.005 RS=0.3487 CJO=3.162E-10 VJ=0.6687 M=0.3164 FC=0.5 mfg=Philips type=zener )
I've not looked to see if there's one in Ian.M's new standard.dio.
.  That took much longer than I thought it would.
 
The following users thanked this post: anishkgt

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #8 on: November 04, 2016, 02:14:02 am »
Yes, but if you paste this on to the end of your  \lib\comp\standard.dio  file, then a 'BZX84C3V3 Zenner conveniently appears in your "Pick new diode" list.

Code: [Select]
.MODEL PH_BZX84C3V3 D ( IS=7.035E-16 N=0.9809 BV=3.3 IBV=0.005 RS=0.3487 CJO=3.162E-10 VJ=0.6687 M=0.3164 FC=0.5 mfg=Philips type=zener )
I've not looked to see if there's one in Ian.M's new standard.dio.

If you do this, and send your .asc file to somebody else. You will get an error like 'model not found'.

If you include the model on the LTspice schematic like this:




And you send the file to somebody they will have the models too. If the model also exists on the host computer, the one on the schematic is the one that is used.

Because the Philips model is an intrinsic diode model the Prefix is D.


These are the results from the Philips model:



This is a little different to the Diodes Inc. model. It is definitely I good idea to run the models in a test circuit.

I have attached the model.

Regards,

Jay_Diddy_B
« Last Edit: November 04, 2016, 02:18:24 am by Jay_Diddy_B »
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: ZENER DIODES IN LTSPICE
« Reply #9 on: November 04, 2016, 02:41:12 am »
If you do this, and send your .asc file to somebody else. You will get an error like 'model not found'.
No, you'll be fine, but they wont. ;D
.  That took much longer than I thought it would.
 

Offline neko efecktzTopic starter

  • Regular Contributor
  • *
  • Posts: 153
  • Country: au
Re: ZENER DIODES IN LTSPICE
« Reply #10 on: November 04, 2016, 03:49:31 am »
Thanks IAN.
That did the trick.
I first tried the sync to update all files and was informed that I have the latest versions.
I then renamed STANDARD.DIO TO STANDARD.DIO.REPLACED then copied your version over and renamed it as you suggested.
It now contains the 3.3v zener plus maybe a few more various Diodes.

Something I noticed is that the file I had was one long string of text, where the one you sent was one line for each Diode.

Well that's solved that problem, but I still want to be able to print to my laser printer without first saving to a .PDF file.
Is the problem I am having there common?
See My Previous post. I think I called it  PRINTING WITH LTSPICE

Thank you for your help,

BILL.
 

Offline flair4ever

  • Newbie
  • Posts: 5
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #11 on: January 29, 2018, 05:06:13 am »
hello, Jay

Thanks for your input. I tried to duplicate your example but failed. I right click the model but unfortunately, I cannot change the prefix of a generic diode mode.

I ran your model and it works great. I am wondering how did you make a diode model's prefix as "X".

Thank you!

 

Offline flair4ever

  • Newbie
  • Posts: 5
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #12 on: January 29, 2018, 05:09:46 am »
I just found the solution: ctrl+right click
thank you all the same

Hope it helps to others
 
The following users thanked this post: RonFred2

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #13 on: October 26, 2019, 03:36:42 am »
Hey,

Apologies for necro-posting. It is almost Halloween 2019 as I type this. So, maybe it's seasonally appropriate raise a dead thread.  At any rate this thread is a top google hit for zener in ltspice and that brought me here.

The thread has been very helpful, but also quite confusing to me. Almost certainly because of my lack of skill. Both electronics and spice are all unknown unknowns to me.

I ran both of the models listed here and looked at a datasheet and as nearly as I can make out they don't have a lot in common.

The .model version seems very unlike a zener and the subckt only seems to fit at very low currents. I hacked a spice resistor to fit the Zz for the points listed in the datasheet. The .model version needs some series resistance to be in the ball park so I added that.  I've attached a test file.

* variableR.asc (2.85 kB - downloaded 1487 times.)


Questions:

1) Is this a very silly way of looking at the problem?
2) Have I made any obvious blunders?
3) how should one use a datasheet to test models or make simple models for testing?

TIA,

Tom.

« Last Edit: October 26, 2019, 03:43:14 am by TW »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #14 on: October 26, 2019, 04:02:44 am »
Tom,

I have rearranged your models a little. I have changed the models to measure the Zener voltage while sweeping the current in a logarithmic manner.




The modelling result is:




I will try and measure a 3v3 Zener on a curve tracer.

I have attached my model

Regards,
Jay_Diddy_B
* zener models.asc (3.62 kB - downloaded 489 times.)
 
The following users thanked this post: TW

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #15 on: October 26, 2019, 04:19:46 am »
Jay,

Thank you for that!

Tom
 

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #16 on: October 27, 2019, 02:26:57 am »
I found a model for the 1N4728A. It's a less obscure part than the BZX84C3V3.
 
http://ltwiki.org/files/LTspiceIV/Vendor%20List/Diodes%20Incorporated/Spice/spicemodels_zener_diodes.txt

Code: [Select]
*SRC=1N4728A;DI_1N4728A;Diodes;Zener <=10V; 3.30V  1.00W   Diodes Inc.
*Zener
*SYM=HZEN
.SUBCKT DI_1N4728A  1 2
*        Terminals    A   K
D1 1 2 DF
DZ 3 1 DR
VZ 2 3 0.972
.MODEL DF D ( IS=125p RS=0.620 N=1.10
+ CJO=364p VJ=0.750 M=0.330 TT=50.1n )
.MODEL DR D ( IS=25.0f RS=1.24 N=3.00 )
.ENDS

I happened to have one of of those to hand. Its provenance is dubious and my test methods are poor. FWIW, as nearly as I could make out the part did this for me:
Code: [Select]
reverse V mA Forward V mA
1.68         0.5          0.65 0.5
1.8         1          0.66 1
2.3         5          0.74 10
2.5        10                  0.76 20
2.8        20          0.79 40
3.0        40          0.82 80
3.3        80          0.83  100
3.38       100



Tom.
« Last Edit: October 27, 2019, 02:38:30 am by TW »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #17 on: October 27, 2019, 02:09:03 pm »
Hi Tom and the group,

I had a few minutes to put a couple of Zener diodes on my HP 4155B Semiconductor Parameter Analyzer.

This is Zener I tested:



These are the specifications, it is supposed to be 3.3V at a test current of 76mA




If I plot the VI curve I get:



Voltage 0.5V/div on the X axis
Current 5mA/div on the Y axis.

If I plot V versus Log current, I see:



This shows the voltage with currents from 1uA to 100mA

This Zener has very soft curve.

By contrast a 6.2V Zener looks like this:







'Zener' diodes above about 5.6V are not Zener diodes, they are avalanche diodes and have a much sharper knee.

Regards,
Jay_Diddy_B

« Last Edit: October 27, 2019, 02:10:55 pm by Jay_Diddy_B »
 
The following users thanked this post: TW

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #18 on: October 27, 2019, 02:25:21 pm »
Hi,
If I compare the Diodes Inc Model versus the measured VI curve.







There is a large error for low currents.

I have never found low voltage Zener diodes to be really useful due to these very soft curves.

Regards,
Jay_Diddy_B
« Last Edit: October 27, 2019, 02:27:34 pm by Jay_Diddy_B »
 
The following users thanked this post: TW

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5661
  • Country: gw
« Last Edit: October 27, 2019, 03:50:34 pm by imo »
Readers discretion is advised..
 
The following users thanked this post: TW

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #20 on: October 28, 2019, 01:01:09 am »
@imo

Those are some interesting references that you have provided.

https://www.onsemi.cn/pub/Collateral/AND8250-D.PDF talks about the creation of a model for MMBZ5232. This is a 5.6V with a fairly well defined knee. The Zzt= 11 \$\Omega\$

https://people.eecs.berkeley.edu/~hu/PUBLICATIONS/Hu_papers/Hu_Melvyl/Hu_Melvyl_91_01.pdf describes the construction of a model for 1n5236 This is a 7.5V with a Zzt=6 \$\Omega\$ Again this has a sharp knee.


https://prod-ng.sandia.gov/techlib-noauth/access-control.cgi/2017/1713790.pdf It is not clear what Zener diode they are modeling in this paper.

The text indicates:

Figure 3-1: Measurement of a MMSZ5221BT1 Zener Diode. Swept ranges shown in (a-d)
focus on capturing data for specific model parameters.



Figure 3-1 shows breakdown in the 8.8 to 9V region. The MMSZ5221BT1 is supposed to be 2.4V


https://www.aeng.com/articles/Zener.pdf is about modeling a 1N4623 this is a 4.3V Zener. This is probably the most relevant because it has a soft knee.

This is illustrated clearly on the Microsemi datasheet:



Regards,

Jay_Diddy_B

« Last Edit: October 28, 2019, 01:05:19 am by Jay_Diddy_B »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #21 on: October 28, 2019, 01:13:29 am »
Hi group,

This is my attempt at modeling the behavior of the 1N4728A.



and these are the modeling results:



This is a reasonable good fit to the measured result:




Regards,
Jay_Diddy_B
 
The following users thanked this post: TW

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5661
  • Country: gw
Re: ZENER DIODES IN LTSPICE
« Reply #22 on: October 28, 2019, 12:01:10 pm »
There are more params in the ltspice diode model as the usually used in the component libs.
For example, in a different thread where we messed with TC of a zener I had to add Trs1 and Trs2 parameters, and, indeed, the resulting TC was pretty different afterwards..

http://ltwiki.org/LTspiceHelp/LTspiceHelp/D_Diode.htm
Readers discretion is advised..
 

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #23 on: October 28, 2019, 06:27:38 pm »
Thanks for all the replies.

I'm in way over my head but feel like I'm learning a bit even if just from propinquity. For instance Jay's use of "B" sources was a revelation to me. Also, the soft knee of the 1n4728a was exactly the symptom I was seeing in my circuit that I didn't understand. Good stuff. Much appreciated!

With the caution that I don't know what I'm doing and suspect this approach will cause problems with some simulations I think these resistor value functions give a decent fit for my 1n4728a up to 100mA:

reverse: R={4.48*(I(V1)**-0.878)}
forward: R={0.885*(I(V1)**-0.972)}

Where V1 is a zero voltage just used to get the current.

It might be possible to wrap those up in some logic for use in some simulations. I suspect it isn't a great idea and it's not obvious to me how to construct it.

Cheers!

Tom.
« Last Edit: October 28, 2019, 06:43:34 pm by TW »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13288
Re: ZENER DIODES IN LTSPICE
« Reply #24 on: October 28, 2019, 07:18:23 pm »
Put each of your behavioral resistors in series with a (near) ideal diode.   e.g:
Code: [Select]
.model Dideal D(Ron=10u Roff=100Meg Vfwd=0)then put the forward and backwards behavioral R + ideal D in anti-parallel with V1 in series with the whole combo.

However you haven't modeled the junction capacitance, nor any snap recovery effects, so it isn't a lot better than a properly configured standard 'native' (Berkeley SPICE) diode model which is likely to be considerably faster and more stable in the simulation.


N.B. LTspice sims can get very slow if you approach 12 orders of magnitude between Ron and Roff, hence the values chosen for the ideal diode model.
 
The following users thanked this post: TW

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #25 on: October 28, 2019, 10:21:57 pm »
Quote
However you haven't modeled the junction capacitance, nor any snap recovery effects, so it isn't a lot better than a properly configured standard 'native' (Berkeley SPICE) diode model which is likely to be considerably faster and more stable in the simulation.

Understood. However, it seems hard to get the standard model to look much like a zener in both forward and reverse. The subckt examples posted above go to some lengths and still aren't all that convincing. Is it possible to make a .model work? I suspect most of the time it doesn't matter but it was news to me and it might be worth keeping in mind.

I've attached a file with my curve fitting and Jay's .model just to show what I'm looking at.

Tom.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: ZENER DIODES IN LTSPICE
« Reply #26 on: October 28, 2019, 11:39:42 pm »
There are more params in the ltspice diode model as the usually used in the component libs.
For example, in a different thread where we messed with TC of a zener I had to add Trs1 and Trs2 parameters, and, indeed, the resulting TC was pretty different afterwards..

http://ltwiki.org/LTspiceHelp/LTspiceHelp/D_Diode.htm

The help file on diodes is useful in that it gives us the names and descriptions of the parameters within the diode model that can be adjusted.

Another useful feature of LTspice is the directive AKO: AKO means 'A Kind Of'

.model my_transistor ako: 2n2222A (BF=400)

This describes a parts with all the properties of a standard 2N2222A but with a beta= 400

We can do this with Zener diodes.

.model 1N4728A AKO: 1N750 (Rs=3.5 bv=3.3 ibv=76m ibvl=76m Nbvl=9.5)

This describes a 1N4728A as A Kind Of 1N750 with 5 parameters modified.

We can build models with the parameters stepped to explore what each of the parameters does:



Result for stepping RS





Result for stepping BV




Result for stepping IBV



Result for stepping IBVL



Result for stepping NVBL




We can see how each of these 5 parameters changes the VI curve.

Regards,
Jay_Diddy_B
 
The following users thanked this post: ogden, TW

Offline TW

  • Newbie
  • Posts: 6
  • Country: us
Re: ZENER DIODES IN LTSPICE
« Reply #27 on: October 29, 2019, 01:45:13 am »
I'm still messing about with the resistor model. I'm sure it isn't a good general purpose solution. It may not be any good at all. I dunno, but think it might work for the circuit I'm working on. It is low voltage, low current DC.

Code: [Select]
.SUBCKT 1N4728A 1 2
* Node 1 -> A
* Node 2 -> K
* Curve fit to a single, used sample. YMMV
* sampled 0.5mA - 100mA. Very likely bogus outside that range.
* y=a*I**b
***************************************
VS 1 3 0 ;shunt
RZ 3 2 R ={ if( I(VS) > 0, 0.885*abs(I(VS))**-0.972 , 4.48*abs(I(VS))**-0.878) }
.ENDS

Tom.
« Last Edit: October 29, 2019, 04:10:09 am by TW »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20629
  • Country: gb
  • 0999
Re: ZENER DIODES IN LTSPICE
« Reply #28 on: January 11, 2025, 06:46:28 pm »
I wanted a basic model which would allow you to simply put the zener voltage on the schematic, so I decided to make one.

I focused on simplicity, rather than accuracy. It's roughly based on the BZX84C & BZX384B in the Standard.dio file linked below.
https://ltwiki.org/index.php?title=Standard.dio

V = the zener's breakdown voltage. The default is 5.6V.
Iz = the zener current at which the voltage is equal to the specified breakdown voltage. This defaults to 1mA.
 
The following users thanked this post: mawyatt


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf