You need to use EasyEDA editor to create some projects before publishing
Problems with subckt calls and simulation netlisting
1669 7
andyfierman 4 years ago
In trying to reply to: [https://easyeda.com/forum/topic/How-to-find-SUBCKT-that-Model-name-resolves-to-when-it-s-not-the-one-in-my-schematic-be8aaa1294a84251994c53b270931a2f](https://easyeda.com/forum/topic/How-to-find-SUBCKT-that-Model-name-resolves-to-when-it-s-not-the-one-in-my-schematic-be8aaa1294a84251994c53b270931a2f) I have created a simplified simulation to clearly demonstrate the issue: [https://easyeda.com/andyfierman/ad823-netlist-problem](https://easyeda.com/andyfierman/ad823-netlist-problem) This has shown that there are 4 problems with this simulation. 1. When first running it there is a fatal error saying that the ADA4700 has missing nodes. ![image.png](//image.easyeda.com/pullimage/qBF7bLsM2CT22PB6nqYj3ESiG3piCW4n6evD1oDf.png) 2) Inspecting the netlist shows that no subckt for the ADA4700 has been called from or pulled into the netlist; 3) Inspecting the netlist shows that the subckt for the UA741 has been pulled into the netlist; 4) The statement: \*\*\.inc ADI1\.lib \*\* has been added to the netlist **but** if the netlist is run in native LTspice, this statement has to be changed to: \*\*\.lib ADI\.lib\*\* before the AD823 model is found. \`\`\` \*\* Sheet\_1 \*\* XU1 IN OUT +5V GND OUT AD823 V1 IN GND SINE(2.5 2.5 1.5MEG) V445 +5V GND +5V .SAVE OUT IN .tran 1.2u \* UA741 OPERATIONAL AMPLIFIER "MACROMODEL" SUBCIRCUIT \* CREATED USING PARTS RELEASE 4\.01 ON 07/05/89 AT 09:09 \* \(REV N/A\)      SUPPLY VOLTAGE: \+/\-15V \* CONNECTIONS:   NON\-INVERTING INPUT \*                \| INVERTING INPUT \*                \| \| POSITIVE POWER SUPPLY \*                \| \| \| NEGATIVE POWER SUPPLY \*                \| \| \| \| OUTPUT \*                \| \| \| \| \| .SUBCKT UA741    1 2 3 4 5 *   C1   11 12 4.664E-12   C2    6  7 20.00E-12   DC    5 53 DX   DE   54  5 DX   DLP  90 91 DX   DLN  92 90 DX   DP    4  3 DX   EGND 99  0 POLY(2) (3,0) (4,0) 0 .5 .5   FB    7 99 POLY(5) VB VC VE VLP VLN 0 10.61E6 -10E6 10E6 10E6 -10E6   GA 6  0 11 12 137.7E-6   GCM 0  6 10 99 2.574E-9   IEE  10  4 DC 10.16E-6   HLIM 90  0 VLIM 1K   Q1   11  2 13 QX   Q2   12  1 14 QX   R2    6  9 100.0E3   RC1   3 11 7.957E3   RC2   3 12 7.957E3   RE1  13 10 2.740E3   RE2  14 10 2.740E3   REE  10 99 19.69E6   RO1   8  5 150   RO2   7 99 150   RP    3  4 18.11E3   VB    9  0 DC 0   VC 3 53 DC 2.600   VE   54  4 DC 2.600   VLIM  7  8 DC 0   VLP  91  0 DC 25   VLN   0 92 DC 25 .MODEL DX D(IS=800.0E-18) .MODEL QX NPN(IS=800.0E-18 BF=62.50) .ENDS .inc ADI1.lib \`\`\`that
Comments
pmc 4 years ago
If this schematic was simplified from a clone of my example in the "How to find ..." topic, then: The 741 model might be in there because I used a 741 at an earlier stage in the life of that schematic. I'm not certain of this, but I think I made the 823 by placing a 741 and changing the model name. When I make a new example by placing an ad823ar part from the pcb assembly library and changing the model name to ad823, there is no 741 in the netlist.
Reply
pmc 4 years ago
...after running a sim, which still fails on ada4700 missing nodes.
Reply
pmc 4 years ago
Found these: [https://easyeda.com/forum/topic/Missing-Node-s-fatal-error-when-attempting-to-use-subckt-defined-model-for-device-00d0621a605b4827b203e6d5c30b5ee5](https://easyeda.com/forum/topic/Missing-Node-s-fatal-error-when-attempting-to-use-subckt-defined-model-for-device-00d0621a605b4827b203e6d5c30b5ee5) [https://easyeda.com/andyfierman/ad8422-test-jig](https://easyeda.com/andyfierman/ad8422-test-jig) And installed LTSpice locally for a look at ADI.lib and ADI1.lib. Maybe just yanking the ADA4700-1 model out of ADI1.lib would be a place to start. As you've noted, the AD823 model is in ADI.lib not ADI1.lib. There is no AD823A model in either file, at least as they come with LTspice XVII. Regardless of what is in these lib files, something is recognizing the AD823 & AD823A model names and inserting the directive to include ADI1.lib - which apparently includes neither of those models. If the LTspice lib files used by EasyEDA do not include any AD823A model in any lib file, then maybe removing AD823A from whatever recognizes model names would solve the issue for that model name. In any case, I can carry on by changing the model name to e.g. myAD823A. The rest is just me trying to understand this corner of EasyEDA.
Reply
andyfierman 4 years ago
@UserSupport, @pmc, Let's not over complicate the issue. There are two things going on in this bug. 1) If an opamp symbol for any opamp - for example UA741, LM358N, TL081EE, LM3900 - is placed into the schematic and then the symbol name in the schematic is changed to some other name then the netlist for the original name **and** for the new name are both pulled into the netlist. So if the symbol for a LM3900 is placed and then the name changed to TL081EE then the netlist pulls in the subckts for both the LM3900 **and** the  TL081EE. The simulation however, runs OK using the TL081EE subckt, which in this example is correct. The syntax for Spice Symbols call their subckts has changed recently but that is not the problem because although the start of the json file for the UA741 (newer syntax) is: ``` {   "head": {     "docType": "7",     "editorVersion": "6.3.43",     "newgId": true,     "c_para": {       "name": "UA741",       "pre": "U?",       "spicePre": "X",       "BOM_Supplier Part": "",       "BOM_Supplier": "",       "Contributor": "EasyEDA",       "package": "" ``` compared to an earlier symbol for an LM3900 (old syntax): ``` {   "head": {     "docType": "7",     "editorVersion": "6.3.43",     "c_para": {       "package": "",       "name": "LM3900",       "pre": "U?",       "spicePre": "X",       "nameAlias": "Model",       "Model": "LM3900",       "link": "http://www.ti.com/lit/ds/symlink/lm3900.pdf"     }, ``` both devices show the same netlist calling both subckts behaviour described in (1) above. 2) When the opamp name is changed to AD823 the sim fails because the although the name change causes the same netlist calling both subckts behaviour described in (1) above, the call to the AD823 subckt is to the wrong LTspice built-in library. The AD823 is in the ADI.lib, not the ADI1.lib. For whatever reason, when the search for the AD823 subckt fails in the (incorrectly called) ADI1.lib, it seems then default to the ADA4700 subckt which does not pin match the AD823 and so the sim fails with the error shown. So issue (1) is a seemingly harmless but irrritating bug which **should** be fixed whilst issue (2) is the real problem which **must** be fixed. Lastly, please note that: * the AD823 and the AD823A on the Analog Devices site both point to the same AD823A model, dated 2012; * the AD823 model in the LTspice ADI.lib is a newer and -based on my previous experience of models from AD - probably better model for the AD823 than that available directly from Analog Devices.
Reply
andyfierman 4 years ago
Statement (2) is true even if a dedicated AD823 symbol is created and used. In this case no other subckt is dragged into the netlist but the wrong ADI1.lib is still called.
Reply
pmc 4 years ago
1. Thanks, Andy. Your comments and the json snippets answer more questions that I hadn't asked yet. 2. For a 3rd apparent issue: when the op amp name is AD823A, an AD library is called when there is no AD823A subckt in eitherAD library. 3. Adding here a reminder from the older topic linked above: there is \_no\_ ADA4700 subckt\. There is a subckt ADA4700\-1 in ADI1\.lib\. The earlier conjecture was that "\-" broke something\.
Reply
andyfierman 3 years ago
@UserSupport, Any news on this set of problems?
Reply
Login or Register to add a comment
goToTop
你现在访问的是EasyEDA海外版,建议访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice