LUNA NSL32-SR3 Updated SPICE Modelling update // jcm(c)2020

The SPICE model for the LUNA/Silonex NSL32-SR3 opto-coupler that I published in 2008 was having a hard time converging properly in some circuit situations and I thought it would be a good idea to re-tool things a little …

Instead of using a single source to model the output photo-cell there are now two current sources that flank a 1 Tera-ohm resistoralthough this resistor forms an upper limit (an impossibly huge one) its purpose is to provide a DC path that helps simulations start off on the right path so the entire model will then converge correctly (everything being mathematically “monotonic” internally) …

The input LED circuit modeling is still the same but the cell resistance is now modeled from the diode current (its LOG transform actually) instead of diode voltage … both LED current and output resistance functions are now interpolated more accurately by using third order polynomials on both sides of the model … seen here being “poly-fitted” in Freemat v4 :

Because the LED is an exponential function we can take the LOG of the current, and then interpolate the transformed data, to be then EXPonentiated the (continuous) interpolation function back to its corresponding raw data domain and image … because the opto-cell resistance has a 1/x relationship to LED current we LOG-LOG transform both sides of the data, interpolate the transformed sets and then double exponentiate the output of the (continuous) interpolation function, again, back to its corresponding raw data domain and image …

… in this manner two current sources and a near-infinite resistor can be made to mimic a floating “opto-cell” resistor

The SPICE coding details are offered here :

Notice the use of 3rd Order Polynomial functions on both sides of the model. Interestingly, (yes I had to check) going to 4th Order modeling (potentially achieving higher local accuracy) already started to create overshoot in the output values and was therefore of no benefit. So, the conclusion is automatic …

3rd order modelling, both on the input and output ports, is the most appropriate for my set of chosen data points – yielding the highest levels of local accuracy possible against proper overall full-range behavior …

we can confirm the output values match well against our starting data, checking with basic AC and DC analysis at first … for example, from linearized small-signal/AC model values :

simulated results: AC Cell Resistance against LED Voltage (bias) 

Vd:         Rcell:

1.75v … 27.8 ohm
1.70v … 250 ohm
1.65v … 3.52k ohm
1.60v … 51.27k ohm
1.55v … 556k ohm
1.50v … 3.51Meg ohm

The new NSL32-SR3 SPICE model works well in all major forms of circuit simulations: AC-analysis (linearized circuit equivalents), DC-analysis and – ultimately – Transient Analysis, shown in action below (inside TINA-TI v9.0) setting the speed of an Univibe LFO circuit where the output cell equations are operating in a non-linear large-signal simulation environment!

Directly with a voltage source, first at Vd = 1.57v

(near bottom edge of vibeLFO speed range – not that of model) :

… at Vd = 1.67v

(near upper edge of vibeLFO speed range – not that of model) :

and “commensurately” for values in between …

the opto-coupler SPICE model can then also be driven directly by a current source as well, shown here with a single current driving the series connected opto-coupler LED’s

… at Id = 125uA

(near bottom edge of vibeLFO speed range – not that of model) :

… at Id = 1.8mA

(near upper edge of vibeLFO speed range – not that of model) :

and “commensurately” for values in between …

the full “high accuracy” modeling range is still fairly modest by professional standards (my data set: 2.5uA to 2.05mA taken from one test unit), and so this model should still not be taken as a full solution … of course, it suites my purposes in many applications and in research:


  • opto-control of Univibe LFO’s
  • analogue current-controlled opto-potentiometer design
  • current-mode opto-coupler drivers
  • circuit behavior near the limit points of opto-compressors
  • optical based NFB-servo DC correction circuits
  • original opto-phasor drive circuits

… just to name a few!

To be clear once more: there is no timing modeling included here // THIS IS A STATIC MODEL only and cannot be relied upon for accurately simulating circuit behavior when either side is subject to rapidly varying (ie., dynamic) activity !

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

360+ Pro Fuzz/Preamp


360+ DIY Kit


Mu3 DIY Kit


IFMTA (book)




Champ (PDF)


Univibe+ PCB