We are using LTspice for these examples. The help files in specific Spice programs should be consulted for interface commands.
Sweep an LED with a voltage source
1. Insert the circuit components. In this example there is one LED, one voltage source and two ground nodes.
-
- You can use one ground node if you connect the voltage source and LED together.
- The Luminus help center article “Electrical - How do I insert a diode file into LTspice?” has the procedure for inserting a custom LED in Spice. You can copy and paste an existing diode and definition into this schematic.
- Set the value of the voltage source to zero by right clicking on the symbol and changing DC value[V] from V to 0.
2. Wire the connections as shown below.
3. Insert a .dc op command. In this example it is “.dc V1 0 3.7 0.005” which is defined as source name, start of sweep, end of sweep, sweep increment. After this command has been inserted, a configuration window with more options can be accessed by right clicking on the command string.
4. Run the model. The output window will be blank after this step. If you right click on the output window and select <View> <Visible Traces> a window will open that shows the list of named traces that can be plotted. You can also plot a waveform by hovering the mouse over components and traces and clicking. The cursor changes to a voltage probe for valid voltage traces and a current clamp for valid current traces.
There are multiple ways to get numbers from these plots
-
- On the bottom left of the Spice interface there is a cursor position readout that changes as you move the mouse.
- Left clicking on a trace name will invoke a cursor. The cursor can be moved by hovering on the crosshair, so the number 1 appears, and then dragging it along the trace.
- The right click menu has an export option under the file selection choice. This allows you to save a text file and import it into Excel.
Sweep an LED with a current source
The steps are much the same as above except we use a current source. The default plot for a current source has current on the x-axis and voltage on the y-axis. LED datasheets commonly use this format.
To change the plot to the more traditional I-V curve, perform the following steps.
1. Right click on the x-axis and change the name of the plot variable to the name of the voltage trace – V(n001).
2. Right click on the y-axis trace name at the top of the plot and change to the name of the trace you want to plot. You can do math in this window to invert the trace, multiply it by a constant, add or multiply two traces together, etc.
We can use this math capability to plot the LED power against drive current as shown below and extract numerical values as discussed above.
Spice also has a piecewise linear diode model. This is computationally efficient compared to the Shockley diode equation-based diode definition. Using this format to model ESD diodes in a more complex model is a potential application of this model variation. The full syntax of this definition is found in Spice help files.
Useful Spice Resources
LTspice Simulator | Analog Devices
LTspice: Adding Third-Party Models | Analog Devices
LTspice Annotated and Expanded Help* - LTwiki-Wiki for LTspice
Simon Bramble | Analog Circuit Design | LTspice Tutorials
Related Luminus Help Center Articles
Electrical – How do I extract Spice IV parameters from an LED datasheet?
Electrical – Can I simulate a set of LED IV curves that have a single Vf bin?
Electrical – Can I calculate LED lumens with Spice?
Electrical - What is Current Hogging in Series Parallel Designs?
Electrical - How do I sweep an LED IV curve in Spice?
Electrical - How do I insert a diode file into LTspice
Electrical - Can I add reference lines to Spice plot panes?
Data Analysis - Using Python to run LTspice as a remote process.
--------------------------------------------------------------------------------------------------------------------
Luminus Website https://www.luminus.com/
Luminus Product Information (datasheets): https://www.luminus.com/products
Luminus Design Support (ray files, calculators, ecosystem items: [power supplies, lenses, heatsinks]): https://www.luminus.com/resources
Luminus Product Information sorted by Applications: https://www.luminus.com/applications
Where to buy Samples of Luminus LEDs: https://www.luminus.com/contact/wheretobuy.
Comments
0 comments
Please sign in to leave a comment.