Looking through this answer about the 6N137 optocoupler I wonder where one can get all those paramaters like Is, Rs, N, various internal resistances, etc. that are used to simulate the optocoupler. I tried looking through the relevant datasheet but didn't find any. So, where should I seek those parameters (in case they are not mentioned in the datasheet) to model optocouplers properly?

  • \$\begingroup\$ I’m confused. The linked question/answer uses a 6N137 subcircuit already provided by the manufacturer. Are you asking how the manufacturer came up with its own model? \$\endgroup\$
    – Ste Kulov
    Mar 26 at 19:07
  • \$\begingroup\$ No, I asked how should I come up with model parameters in case no spice model or internal characteristics(like saturation current and etc.) is provided by the manufacturer. Should I simply build a model(or, in other words, guess the values of the internal characteristics) so that its graphics(like V-I) represent ones in datasheet? \$\endgroup\$
    – LevGor
    Mar 28 at 8:14
  • \$\begingroup\$ Oh. Ok. That wasn’t clear to me. So you’re basically asking how to create SPICE models for optocouplers. It depends how accurate you want it to be to real life. Datasheets only give you a subset of information required, so you can only derive a rough model from them, which might be or not be good enough for your application. periblepsis‘s answer gives a great starting point on how to tackle the LED portion of the opto using only datasheet information. Sometimes that’s good enough, but other times you’ll need to take physical samples and run them through measurements to get what you need. \$\endgroup\$
    – Ste Kulov
    Mar 28 at 19:48

2 Answers 2


Each aspect of an IC, such as the 6N137, has to be considered to make a complete model. It helps to have some understanding of what tools are available within Spice and how to apply each of them to modeling problems. That takes both experience (with Spice) as well as study.

But I can help with thoughts about the LED portion, for example.

Let's look at this datasheet from Vishay (end-of-life'd by them in 2024, I see):

enter image description here

It's obviously a lousy chart. You can see that it just has two lines, joined at a knee. At best, I think, they may have taken three measurement points: \$1\:\text{mA}\$, \$10\:\text{mA}\$, and \$50\:\text{mA}\$. Then they just took out a ruler. So it's not much to go on.

But I can say a few things.

The equation is \$R_{_\text{TOT}}\approx \frac{\eta\,\cdot\,V_T}{I_{_\text{D}}}+R_{_\text{S}}\$. (Actually, the first term should include the saturation current in the denominator, but it is so tiny there's no reason to include it.) The first term is based on the Shockley diode equation's slope and the second term is simply the added bulk resistance of the device.

\$R_{_\text{TOT}}\$ is about \$3.4\:\Omega\$ at \$50\:\text{mA}\$ and about \$10\:\Omega\$ at \$5\:\text{mA}\$. You can see how that was estimated by looking at the red and green information. Just those two estimates, plus an assumption of \$V_T=25.9\:\text{mV}\$, suggest \$R_{_\text{S}}=2\frac23\:\Omega\$ and \$\eta\approx 1.42\$.

It's very ham-handed. But it gives a tentative \$R_{_\text{S}}=2.5\:\Omega\$. (It will be adjusted, later.) I also, at this point, take note that \$\eta\$ is larger than 1, which it should be. If it had solved out as less than 1, I would have questioned my process and/or the chart.

There's the Shockley diode equation bit to now worry over (\$\eta\$ and \$I_{_\text{SAT}}\$.) Focus on the low-current end of the chart where the value of \$R_{_\text{S}}\$ has a minor impact (at most \$25\:\text{mV}\$ at \$10\:\text{mA}\$) and allows a more microscopic view for these last two parameters.

While I have a possible starting value of \$\eta=1.5\$ (rounding), I need a starting \$I_{_\text{SAT}}\$. Compute as \$I_{_\text{SAT}}= 5\:\text{mA}\cdot\exp\left(\frac{5\:\text{mA}\,\cdot\, 2.5\:\Omega\,-\,1.31\:\text{V}}{1.5\,\cdot \,25.9\:\text{mV}}\right)\approx 1.5\times 10^{-17}\:\text{A}\$.

There's enough to start a chart (using Desmos, for example.) Zoom into the low end while working. If nailing things at \$5\:\text{mA}\$, but under-shooting at \$10\:\text{mA}\$, then boost \$\eta\$ and lower \$I_{_\text{SAT}}\$. Like that. Etc. It doesn't take long to twiddle it into shape.

In this case, I find \$\eta=1.7\$ and \$I_{_\text{SAT}}=8\times 10^{-16}\:\text{A}\$.

However, I also found that at \$50\:\text{mA}\$ the resulting voltage went too high. To reduce that end of the curve, I had to adjust \$R_{_\text{S}}=2\:\Omega\$ to make it work right.

So, here's the resulting Desmos curve:

enter image description here

And it hits on the key points pretty well. So I'd be satisfied with this result:

  • \$R_{_\text{S}}=2\:\Omega\$
  • \$\eta=1.7\$
  • \$I_{_\text{SAT}}=8\times 10^{-16}\:\text{A}\$

The link you provided specifies many more parameters. And the simulation model does require them. But I usually just pick up the parameters from another diode using ako to copy all of them and then just modify the ones I'm changing.

Here's an example using LTspice:

enter image description here

Which also gets pretty close, even though all those other parameters are coming from a small signal low-leakage diode and not an LED at all.

I have written code that does this pretty well with three points from a chart, where that chart is more realistic. But in a case like this where it seems pretty clear a ruler was used, it would be more of a manual process for me (assuming I cared to put in the time for it.)


The same way you do with any datasheet when you have no model: make a model, reproduce the test circuits from the datasheet in simulation, adjust the model parameters until you get a match.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.