<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simulation problem with optocoupler 6N136 in EAGLE Forum</title>
    <link>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8980988#M14675</link>
    <description>&lt;P&gt;Oh thanks! That helped. I didn’t notice that there are two missing contacts in Linear Voltage-Controlled Current Sources. Now the correct model netlist looks like this:&lt;/P&gt;&lt;PRE&gt;* Library of Vishay 1 Mbd high speed optocouplers
* Copyright VISHAY, Inc. 2016 All Rights Reserved.
*
* Symbol Pin -&amp;gt; Model Node
*    A           1
*    K           2
*    E           3
*    C           4
*    B           5 
*    VCC         6 
.SUBCKT 6N136 DA DK QE QC QB  VCC
DIN DA 9 DT8811VB
VT 9 DK 0
CIO DA QC 0.6e-12
QOUT QC QB QE QF290D
RFX QB QE 1e6
Hd T1 0 VT 800	;I-V
Rdly1 T1 T2 0.1
Cdly1 T2 0 1P
Bdly1 VCC QB {I =  (-2e-7 + 5e-6*v(T2) -1.7e-8*v(T2)*v(T2))}
.MODEL DT8811VB D 
+ IS=4.5E-18 N=1.40 RS=3.8
+ BV=3.000e+000 IBV=0.5e-006  XTI=4
+ EG=1.52436 CJO=18E-12 VJ=0.75 M=0.5 FC=0.5
.MODEL QF290D NPN 
+ IS=2.691e-016 NF=1.000e+000 ISE=6.586e-018
+ NE = 1.082e+000 BF = 176 BR = 1.000e+000
+ IKF = 7.300e-003 VAF = 1.000e+002 VAR = 2.800e+002
+ EG = 1.110e+000 XTI = 1.068e+000 XTB = 0.000e+000
+ RC = -1e+000 RB = 2.500e+001 RE = 40
+ CJE = 2.500e-012 MJE = 1.740e-001 VJE = 1.250e-001
+ CJC = 7.24e-012 MJC = 2.573e-001 VJC = 1.100e-001
.ENDS 6N136&lt;/PRE&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 11:43:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-22T11:43:02Z</dc:date>
    <item>
      <title>Simulation problem with optocoupler 6N136</title>
      <link>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8977711#M14673</link>
      <description>&lt;P&gt;So, I have a SPICE model of the 6N136 optocoupler (Vishay). I created a separate library (based on similar symbols and footprint) for simulation, attached SPICE there (everything went well). Next, I drew a simple circuit for simulation, created a simulation model ("Add Model"), and everything went well. But during the simulation I get the following error - "&lt;STRONG&gt;Error: too few devs: gdly1 vcc qb numparm__________00000001&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;My netlist:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;* SpiceNetList
* 
* Exported from optoTest.sch at 21.08.2019 12:47
* 
* EAGLE Version 9.4.2 Copyright (c) 1988-2019 Autodesk, Inc.
* 
.TEMP=25.0

* --------- .OPTIONS ---------
.OPTIONS ABSTOL=1e-12 GMIN=1e-12 PIVREL=1e-3 ITL1=100 ITL2=50 PIVTOL=1e-13 RELTOL=1e-3 VNTOL=1e-6 CHGTOL=1e-15 ITL4=10 METHOD=TRAP SRCSTEPS=0 TRTOL=7 NODE

* --------- .PARAMS ---------

* --------- devices ---------
R_R2 N_4 0 10k 
R_R1 0 N_6 50 
R_R3 V_OUT N_3 10k 
V_V2 N_3 0 DC 5V AC 0 
X_OK1 V_IN N_6 0 V_OUT N_4 N_3 6N136 
V_VCUR_1 N_1 V_IN 
V_V1 N_1 0 DC 2V AC 0 

* --------- models ---------

* (model found in library)

* Library of Vishay 1 Mbd high speed optocouplers
* Copyright VISHAY, Inc. 2016 All Rights Reserved.
*
* Symbol Pin -&amp;gt; Model Node
*    A           1
*    K           2
*    E           3
*    C           4
*    B           5 
*    VCC         6 
.SUBCKT 6N136 DA DK QE QC QB  VCC
DIN DA 9 DT8811VB
VT 9 DK 0
CIO DA QC 0.6e-12
QOUT QC QB QE QF290D
RFX QB QE 1e6
Hd T1 0 VT 800	;I-V
Rdly1 T1 T2 0.1
Cdly1 T2 0 1P
*Gdly1 VCC QB VALUE {-2e-7 + 5e-6*v(T2) -1.7e-8*v(T2)*v(T2)}
Gdly1 VCC QB {val = (-2e-1 + 5*v(T2) -1.7e-2*v(T2)*v(T2))*1e-4}
.MODEL DT8811VB D 
+ IS=4.5E-18 N=1.40 RS=3.8
+ BV=3.000e+000 IBV=0.5e-006  XTI=4
+ EG=1.52436 CJO=18E-12 VJ=0.75 M=0.5 FC=0.5
.MODEL QF290D NPN 
+ IS=2.691e-016 NF=1.000e+000 ISE=6.586e-018
+ NE = 1.082e+000 BF = 176 BR = 1.000e+000
+ IKF = 7.300e-003 VAF = 1.000e+002 VAR = 2.800e+002
+ EG = 1.110e+000 XTI = 1.068e+000 XTB = 0.000e+000
+ RC = -1e+000 RB = 2.500e+001 RE = 40
+ CJE = 2.500e-012 MJE = 1.740e-001 VJE = 1.250e-001
+ CJC = 7.24e-012 MJC = 2.573e-001 VJC = 1.100e-001
.ENDS 6N136

* --------- simulation ---------
.control
set filetype=ascii
DC V_V1 0 5 0.01 
write optoTest.sch.sim V(V_OUT) V(V_IN) I(V_V1) I(V_VCUR_1) I(V_V2)
.endc

.END&lt;/PRE&gt;&lt;P&gt;I understand that the problem is in the line "&lt;STRONG&gt;Gdly1 VCC QB {val = (-2e-1 + 5 * v (T2) -1.7e-2 * v (T2) * v (T2)) * 1e-4}&lt;/STRONG&gt;", more precisely in the parameter, but I don’t understand what is wrong. The same model works correctly in TINA TI and OrCad Capture.&lt;BR /&gt;What could be the problem ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 07:56:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8977711#M14673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T07:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Simulation problem with optocoupler 6N136</title>
      <link>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8979075#M14674</link>
      <description>&lt;P&gt;When dealing with models, you need to consult the simulation manual if in doubt ... in the NGSPICE manual shipped with EAGLE, you will find the general format for linear VCCS part as:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;GXXXXXXX N+ N− NC+ NC− VALUE &amp;lt;m= val &amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore as you can see you are missing the two controlling nodes NC+ and NC-.&amp;nbsp; In other simulators, the syntax is different.&amp;nbsp; You can find the syntax of other simulators online and compare them. I found the format you are using here &lt;A href="https://www.seas.upenn.edu/~jan/spice/PSpice_ReferenceguideOrCAD.pdf" target="_blank"&gt;https://www.seas.upenn.edu/~jan/spice/PSpice_ReferenceguideOrCAD.pdf&lt;/A&gt;&amp;nbsp;which shows that you are using a format that only specified the + and - node of the current source and no controlling nodes .. that is fine, then the conversion would be 1 to 1 if you just use an arbitrary source in ngspice which has the following format:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;BXXXXXXX n+ n- &amp;lt;i=expr&amp;gt; &amp;lt;v=expr&amp;gt; &amp;lt;tc1=value&amp;gt; &amp;lt;tc2=value&amp;gt;
+ &amp;lt;temp=value&amp;gt; &amp;lt;dtemp=value&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Please let me know if that makes sense to you and if the conversion works for you.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 16:29:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8979075#M14674</guid>
      <dc:creator>edpataky</dc:creator>
      <dc:date>2019-08-21T16:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Simulation problem with optocoupler 6N136</title>
      <link>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8980988#M14675</link>
      <description>&lt;P&gt;Oh thanks! That helped. I didn’t notice that there are two missing contacts in Linear Voltage-Controlled Current Sources. Now the correct model netlist looks like this:&lt;/P&gt;&lt;PRE&gt;* Library of Vishay 1 Mbd high speed optocouplers
* Copyright VISHAY, Inc. 2016 All Rights Reserved.
*
* Symbol Pin -&amp;gt; Model Node
*    A           1
*    K           2
*    E           3
*    C           4
*    B           5 
*    VCC         6 
.SUBCKT 6N136 DA DK QE QC QB  VCC
DIN DA 9 DT8811VB
VT 9 DK 0
CIO DA QC 0.6e-12
QOUT QC QB QE QF290D
RFX QB QE 1e6
Hd T1 0 VT 800	;I-V
Rdly1 T1 T2 0.1
Cdly1 T2 0 1P
Bdly1 VCC QB {I =  (-2e-7 + 5e-6*v(T2) -1.7e-8*v(T2)*v(T2))}
.MODEL DT8811VB D 
+ IS=4.5E-18 N=1.40 RS=3.8
+ BV=3.000e+000 IBV=0.5e-006  XTI=4
+ EG=1.52436 CJO=18E-12 VJ=0.75 M=0.5 FC=0.5
.MODEL QF290D NPN 
+ IS=2.691e-016 NF=1.000e+000 ISE=6.586e-018
+ NE = 1.082e+000 BF = 176 BR = 1.000e+000
+ IKF = 7.300e-003 VAF = 1.000e+002 VAR = 2.800e+002
+ EG = 1.110e+000 XTI = 1.068e+000 XTB = 0.000e+000
+ RC = -1e+000 RB = 2.500e+001 RE = 40
+ CJE = 2.500e-012 MJE = 1.740e-001 VJE = 1.250e-001
+ CJC = 7.24e-012 MJC = 2.573e-001 VJC = 1.100e-001
.ENDS 6N136&lt;/PRE&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 11:43:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/eagle-forum/simulation-problem-with-optocoupler-6n136/m-p/8980988#M14675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-22T11:43:02Z</dc:date>
    </item>
  </channel>
</rss>

