You need to use EasyEDA editor to create some projects before publishing
Can I simulate an opto-coupler?
3985 19
NomadAU 5 years ago
Hi, I'm still cutting my teeth on EasyEDA so this might be a real newbie question...but here goes. I'm trying to simulate a relatively complex circuit comprising multiplexers and opto-couplers.  This was not behaving as I expected it to, so I thought I'd try testing one component at a time, starting with a single opto-coupler. I created a [simple schematic](https://easyeda.com/account/project?project=31011b2ac9e04ae6909acfa5b8df91a3) containing a single TLP175A opto-coupler and connected its 'switching' terminal to a +5V supply.  I connected a 25V supply to the device's input and since the TLP175A is switched on I expected to see 25V on its output terminal.  However, I get 0V, i.e. the TLP175A doesn't appear to be turning on. What I believe should happen is the following. 1. Set the input to 0V, TLP175A output should also be 0V 2. Set the input to +5V, TLP175A output should be +25V Any ideas on what is going on here?  Is it my schematic, or is there an issue with the simulator not handling the TLP175A device? Any feedback is most welcome.
Comments
andyfierman 5 years ago
The basic problem is that you have selected a schematic symbol which does not have a spice model associated with it. To resolve this please read and play with the examples in the Simulation Tutorial: [https://docs.easyeda.com/en/Simulation/Chapter1-Introduction/index.html](https://docs.easyeda.com/en/Simulation/Chapter1-Introduction/index.html) There is at least one simulatable opto-coupler in the EasyEDA spice symbol library. Put one into a test jig schematic then inspect the spice netlist (Document > Export > Spice Netlist for this sheet) to see how the model is constructed. Then you may be able to modify it to be like your chosen device. Or you may be able to get a model for the device from the manufacturer. Either way you will need to read the Simulation Tutorial first.
Reply
NomadAU 5 years ago
@andyfierman Thanks for the quick answer.  As you might have @andyfierman guessed, I assumed all parts could be simulated...my bad.
Reply
NomadAU 5 years ago
@andyfierman So I've had a read of the tutorial\, in particular the section describing how to pick simulatable devices\.  I have found several optocouplers in the 'spice simulation' library folder\, e\.g\. SCH\_Libs\>System\>Spice Simulation\>Symbols\_ICs\-Opto\_RevB\_16Sep2013\>Optocoupler\_SMD\_KPC357\_LTV35x\_PC357\_SingleChannel is one of these\.  I've also tried another from the same section \(a 3D version that you will see I have left disconnected on the schematic\)\.  In both cases\, I get an error that seems to say there is no model for the device although both were chosen from the 'spice simulation' category\. _Circuit: good* no system model for optocoupler, you can create a model by yourselfuntitled_ _Error: unknown subckt: x1 x1\_1 x1\_2 x1\_3 x1\_4 optocoupler _ If I've followed the wrong steps, can you please show me how to correctly choose simulatable devices. Cheers, Mike
Reply
andyfierman 5 years ago
I think you have missed "KICAD Schlib" from the path you showed above. In any case, that path does not point to a library of Spice symbols. The only valid libraries of Spice symbols are under: SCHLibs > System > Spice Simulation > Spice Gate/Source/Discrete/Regulator/Miscellaneous.
Reply
andyfierman 5 years ago
This might help in how to approach using EasyEDA, in particular if you want to use simulation: [https://easyeda\.com/andyfierman/Welcome\_to\_EasyEDA\-31e1288f882e49e582699b8eb7fe9b1f](https://easyeda.com/andyfierman/Welcome_to_EasyEDA-31e1288f882e49e582699b8eb7fe9b1f)
Reply
NomadAU 5 years ago
@andyfierman I'm still very confused by the categorisation of the simulatable devices, i.e. many of the devices under the SCHLibs > System > Spice Simulation folder are apparently NOT simulatable.  Seems odd to me, but there you go. Anyhow, I cannot find the optocoupler you mentioned in your previous append (_There is at least one simulatable opto-coupler in the EasyEDA spice symbol library).  _Instead I tried using an optotransistor from ... > Spice Simulation > Spice Gate > OPTO-TRANSISTOR-4.1.  Running this with a sweep setting dc V10 0.0 5.0 1.0 does not vary the output voltage on probe outputV.  I would expect the latter to vary from 0 to 25V but no such luck. I really am at a loss to know what is wrong here, whether 1. the device I am using is not simulatable, or 2. I am using the device incorrectly, or 3. the device is working and I am misinterpreting the results I would greatly appreciate it if you could tell me in detail how to access the optocoupler you mentioned previously, and/or explain why my substitute opto-transistor is not working like an opto-coupler in this schematic. Thanks for your help.
Reply
andyfierman 5 years ago
Sorry but I don't have access to a PC at present so I can't see your schematic properly. I'll have a look later today.
Reply
andyfierman 5 years ago
Under Spice > Spice miscellaneous ![image.png](//image.easyeda.com/pullimage/shnPHjtAC6Ox3peWeWACtGjRFi7G2m8HK8GXMxOo.png) you will find: MOCM3021 MOCM3023 (simulation test jig in: [https://easyeda\.com/andyfierman/MOC3023M\_test\_jig\-33a999bae82f45e5b4a1300c4c5735b5](https://easyeda.com/andyfierman/MOC3023M_test_jig-33a999bae82f45e5b4a1300c4c5735b5)) H11L1 (simulation test jig in: [https://easyeda\.com/andyfierman/H11L1\_test\_jig\-dcd2b5879f894801ad4b3a770be60d86](https://easyeda.com/andyfierman/H11L1_test_jig-dcd2b5879f894801ad4b3a770be60d86)) PS2505 (simulation test jig in: [https://easyeda\.com/andyfierman/Public\_user\_help\-ZmaYWw5FD](https://easyeda.com/andyfierman/Public_user_help-ZmaYWw5FD)) PS2505_4 (simulation test jig in: [https://easyeda\.com/andyfierman/Public\_user\_help\-ZmaYWw5FD](https://easyeda.com/andyfierman/Public_user_help-ZmaYWw5FD)) HCNR200 OPTO-TRANSISTOR (a.k.a. 4N25) Please note that the 5 tabs shown above are the **only** verified system spice model libraries. All other spice symbols are user contributed and may or may not work. Please also note that the symbol you quoted above: "... > Spice Simulation > Spice Gate > **OPTO-TRANSISTOR-4.1**" does not exist in the: SCHLibs > System > Spice Simulation > Spice Gate library: ![image.png](//image.easyeda.com/pullimage/f2Q2wNxHUafKivAfnD7rAuqGW2iHyule6rwDhHFa.png)
Reply
NomadAU 5 years ago
@andyfierman Thanks again for the additional information you've provided.  I've used the MOCM3021 device and now get the following error: _Circuit: gooduntitled Too few parameters for subcircuit type "moc3021m" (instance: xxu4)"_ I'm guessing that one or more of the 2 pins I've left unconnected need to be connected?  Even though all I want to simulate is a simple opto-coupler? Re. the problems with searching, I have a few observations/questions... When one is in a suitable library folder for simulatable devices, e.g. SCHLibs > System > Spice Simulation > Spice Gate and I execute a search for say, opto-coupler, the following results are returned. ![context.jpg](//image.easyeda.com/pullimage/OUZvHjpuj0I3P7YoFJoKQYP4sO7ivJdGcfEQ7NiF.jpeg) However, I now realise that the search is applied to **all** folders, and the results are therefore **not** specific to the .... > Spice Gate folder.  To find a simulatable device in the returned list, one needs to select each item, one by one, to see which folder it belongs to.  In the following image, you can see that I've selected one of the results and only then can I see that it is in fact in the SCH Libs > System folder.  This is a very tedious solution to finding suitable devices. Is there any way to restrict searching to a specific folder? ![folderShown.jpg](//image.easyeda.com/pullimage/U6svCoA3TTnCz8ltGvG7UhAktr0mfx06x6D4GpkO.jpeg)
Reply
andyfierman 5 years ago
"...This is a very tedious solution to finding suitable devices. Is there any way to restrict searching to a specific folder?" I agree. Please raise this as a Feature Request. :)
Reply
andyfierman 5 years ago
BTW: your link to your project in your first post does not work. Did you mean this? [https://easyeda.com/NomadAU/optocoupler-test](https://easyeda.com/NomadAU/optocoupler-test) "I'm guessing that one or more of the 2 pins I've left unconnected need to be connected?  Even though all I want to simulate is a simple opto-coupler?" Remove the No Connect green X from pin 3 NC1. It's a pain but the No Connect symbol works to tell the schematic capture tool that a pin can be ignored so it is excluded from the netlist but in spice simulation it then creates a mismatch between the pins included in the subckt call and those actually in the subckt being called. That's what the error message is telling you. We should clarify this. If all you want is an opto transistor why not use the OPTO-TRANSISTOR from the Spice Miscellaneous section? (There are two copies: use the first in the list as the second one will be removed soon)
Reply
NomadAU 5 years ago
@andyfierman Thanks for the explanation on the NC pins - just another confusion for me :-) What I've been trying to test/simulate from the beginning is a circuit comprising cascading multiplexers and some opto-couplers.  I have no need for any opto-transistors - I simply want to have voltage isolation through an optical switch.  However, an opto-transistor can probably be substituted for the sake of the simulation.  What about 8:1 Mux though?  I can't see that in the EasyEDA simulatable devices list. The main purpose for me using EasyEDA seems to be invalidated now.  I was attracted to the idea of having a single 'product' with which I could 1. draw the schematic 2. test the circuit using simulation 3. creat the PCB 4. use the integration with JLCPCB to have the PCBs manufactured. Having made several unsuccessful attempts to do this it now looks as though I won't be able to achieve what I was hoping to do, the main step being to test the circuit **before** committing to (and paying for) the PCB manufacturing step. Thanks for your help anyhow.
Reply
andyfierman 5 years ago
Let me have a look through the gates. There are a couple of multiplexers but you may have to cascade them to make a part that does what you need. There are also some analogue switch devices or you can simply use the voltage controlled switch?
Reply
andyfierman 5 years ago
You could make a 4051 using the primitive gates in the library but if you want a more accurate model of the 4051 then that is a harder task because although there are two models that I know of, both need a lot of work to get them to run in Ngspice for EasyEDA. I am also not aware of any publicly available spice model for the TLP175A. We could develop models for these devices but, depending on the accuracy required of the models, that would not be a free service.
Reply
NomadAU 5 years ago
@andyfierman Thanks for taking the time to look for suitable components.  Since my last append I managed to get a fair representation of the TLP175A up and running using an opto-transistor.  This is working ok for my requirements, but I am still missing the 1:8 Mux.  It is probably worth pointing out that I am really not that interested in the precise electrical characteristics of either device for simulation purposes.  Instead, all I am trying to do is ensure that the wiring of the cascaded mux's and the OC's is correct insofar as I get the expected 'active path' through the circuit when I present a set of signals on the Mux control pins.  I have found an 8 channel Mux in the LtSpice libraries (ADG408T) that simulates what I need just fine (using Orcad Capture Lite) so I was wondering how much effort it would be to 'port' its Spice model to one of the 8 channel Mux in EasyEDA?
Reply
andyfierman 5 years ago
@NomadAU, You will find a simulatable SpiceSymbol of the ADG408BRZ device in the libraries now: [https://easyeda.com/component/b84324db075842c9a7ce69c3369c1862](https://easyeda.com/component/b84324db075842c9a7ce69c3369c1862) It is a modified-for-EasyEDA version of the model from Analog Devices but at present it does not correctly model the behaviour of the switches as they change state. In other respects it is the same as the AD model. Here's a test jig: [https://easyeda.com/andyfierman/adg408-test-jig](https://easyeda.com/andyfierman/adg408-test-jig)
Reply
NomadAU 5 years ago
@andyfierman Wow, looking forward to trying it out.  Many thanks. Can't get to your test jig though...getting a 404 error.
Reply
NomadAU 5 years ago
@andyfierman I can't see your new MUX in the libraries.  Looking for devices with names starting with ADG408... this is all I get, and neither of these are in the expected Spice Simulation folder. ![ADG408SearchResults.png](//image.easyeda.com/pullimage/AAlkiQ6oOzAyNizxbD7HQgOL8nCtSN08Wx0IiwXo.png)
Reply
andyfierman 5 years ago
My bad.... I forgot to make the test jig public. Should public now. My ADG408BRZ is under the user contribuited tab because it's not finalised yet. ![image.png](//image.easyeda.com/pullimage/a8MzJ8gpypTERCpJK5B6sjFtnaEWr3sJYNKpr8Ag.png)
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