----- Original Message -----
From: "BrianW" <
[email protected]>
Newsgroups: sci.electronics.cad
Sent: Sunday, November 16, 2003 5:03 AM
Subject: How to simulate LED using Micro-Cap?
Hello,
I am using the student version of Micro-Cap and like it so far. The
problem is i don't see a way to simulate a LED. They have a animated
LED, but is really just animation and doesn't simulate current, etc.
I posted a question to the yahoo groups Micro-cap group but haven't
heard back. Maybe if someone else has any other suggestions of a
beginner's simulation program that would be good also. At this point
I like to type in the circuit and see if my calculations are the same
as the simulation.
Hello Brian,
first of all the SPICE-simulators are more or less compatible,
at least with the the basic elements.
If you like a very good and free simulator, then go with LTSPICE.
It is really the best you can get.
www.linear.com/software
There is a users's group too.
www.groups.yahoo.com/LTSPICE
I have been interested in diode(LED) modelling too. The available
models are very rare and the question with all models is what
behaviour they model.
The basic diode model consists of an ideal diode plus a series resistor.
http://www.eng.abdn.ac.uk/~eng186/spice/part1.html (ref. 1)
http://www.ece.wpi.edu/Research/Analog/Resources/samplab.pdf
The forward voltage Vf:
-----------------------
Vf = N*Vt * ln(I/Is+1) + I*Rs (1)
The reverse formula for the current I:
I = Is*(exp((Vf-I*Rs)/(N*Vt))-1) (2)
Vt is the temperature voltage Vt=k*T/e
Now we have to deal with the temperature dependence of Is.
----------------------------------------------------------
More definitions:
IST0=Is@T0, IST1=Is@T1,
T0 : e.g. 300.15 (273.15+27) TNOM=27 in LTSPICE
T1 : the actual temperature, in Kelvin of course
If we neglect Rs at the moment, we will get this formula:
IST1 = IST0*((T1/T0)**(XTI/N))*exp(EG*(T1-T0)/(T0*N*VT1))
Diode forward current after combining both formulas:
I=IST1*(exp(VF1/(N*VT1))-1) (3)
XTI is 3 in LTSPICE and PSPICE. The given document (ref. 1) claims
XTI is 2 in SPICE. So check it with the simulator you use.
These are the basics.
You have to model the parameter N, Is from (1) and (2) and
EG from either (3) or you gamble with Eg in the simulator until
your temperature coefficient of Vf is as expected.
Eg is probably about 3V for LEDs. If you don't set Eg correctly,
then the temperature coefficient of Vf will be wrong(e.g.positive).
Check the ready models you will find for this if you need the
forward voltage dependent from temperature.
Best Regards,
Helmut
PS: You could work out the formulas for N, Is and Eg. It's
only basic math. Ok, you need a long breath not to make a mistake.
I am really wondering why nobody on earth have published it
in the internet. Maybe I will publish it sometimes in the
LTSPICE users group.