You need to use EasyEDA editor to create some projects before publishing
PC817 spice model or schematic issue?
5315 4
AlexeyL 3 years ago
Hello guys. Sorry for very noob question, but I'm fighting with this issue several days and can not find solution. Reason seems to be very simple, but I really can not find it. I definitely need one more pair of eyes :) Here is a link to simple project, using PC817: [https://oshwlab.com/AlexeyL/mosfet-key-simulation](https://oshwlab.com/AlexeyL/mosfet-key-simulation) **Story**: I have mosfet key module, which doesn't work on frequencies more than 1 kHz. I don't have oscilloscope and would prefer not to spend money on it (at least for now). That's why I wanted to run simulation to better understand what's going on and how to fix issue. Schematics of mosfet key is optional for this question, but it can be found on page "Mosfet key simulation" in my project. When I met problems with simulation, I started reading simulation tutorial. I didn't finish it on 100% yet, but I'm in progress :) So, I created simplified version of schematics, which has only optocoupler PC817. It can be found on page "PC817 simulation" **What is the problem? **By some reason I see that input current 12.6 mA of optocoupler causing only 59 uA (yes, uA, not mA) collector current. In real circuit it is definitely not like that. According to datasheet, collector current (Ic) should be much higher. **Question**: what I did wrong? Are there any issues in schematics? Or may be Spice model of PC817 is wrong? **What I tried**: 1\. I tried all available spice models of PC817 \(user\-provided\) in Easy EDA\, but some of them has issues\, another have similar behavior\. 2\. I exported netlist for LTspice and found this spice model for PC817: `.subckt PC817C 1 2 3 4 Igain=2.3m` `R1 N003 2 2` `D1 1 N003 LD` `G1 3 N004 N003 2 {Igain}` `C1 1 2 18p` `Q1 3 N004 4 [4] NP` `.model LD D(Is=1e-20 Cjo=18p)` `.model NP NPN(Bf=1200 Vaf=140 Ikf=100m Rc=1 Cjc=19p Cje=7p Cjs=7p C2=3e-15)` `.ends PC817C` I tried to find3rd party spice models. Unfortunately it is not that easy for PC817. I found only 2 forums where people are sharing this model and model is almost 100% the same. I tried that models - my results didn't change 3\. I decided to check\, if it is issue of Easy ADA simulator\. I installed LTSpice and run exported netlist there\. Results were the same\. So, now I'm completely lost. Help me please :) What I'm doing wrong?
Comments
andyfierman 3 years ago
Please accept my apologies. It was my mistake in the collector / emitter spice pin ordering. If you replace the PC817 spice symbol in your sim with one of my PC817A/B/C/D symbols (but not from other contributors) from the User Contributed library, your sim will now work as expected: ![image.png](//image.easyeda.com/pullimage/hxd9VSED5E1E5FvYMeGq69UScv7I6wbtifijwPBv.png)
Reply
AlexeyL 3 years ago
@andyfierman, thanks A LOT! :) I have one question regarding current model. As I can see from voltage graphs, rise time on optocoupler output is about 3 us, but fall time is about 14 us. Value of fall time is quite reasonable, but I expected rise time to be higher. According to datasheet it should be (from beginning of front of input signal to 10% of output signal (1.2V)): T = Td + Tr = 4 + 19 = 23 us (refer to Fig 10 here - [https://pdf1.alldatasheet.com/datasheet-pdf/view/43371/SHARP/PC817.html](https://pdf1.alldatasheet.com/datasheet-pdf/view/43371/SHARP/PC817.html)). I'm not familiar with spice syntax yet. As an author of PC817 model, could you please check, if rise time is simulated properly in this model? If yes, I will keep investigating why it is so short. Btw, is there any way to check spice model of component without exporting LTspice netlist?
Reply
andyfierman 3 years ago
I'm not the author of the model used for the PC817 series of optocouplers. There is no spice model available from Sharp. The model used in EasyEDA is a very basic model straight from the LTspice library. Sorry but I am not aware of any better PC817 models in the public domain. This app note describes how to make a more detailed model: [https://e2e\.ti\.com/cfs\-file/\_\_key/communityserver\-discussions\-components\-files/196/CEL\_5F00\_AN3017\_5F00\_Optocoupler\_5F00\_PSpice\_5F00\_Model\.pdf](https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/196/CEL_5F00_AN3017_5F00_Optocoupler_5F00_PSpice_5F00_Model.pdf)<br> <br> which includes an additional time constant and a curve fitting table for the CTR, neither of which which the LTspice model implements. Please contact me through signality.co.uk if you would like to discuss developing an improved model.
Reply
AlexeyL 3 years ago
@andyfierman, got it. Thanks for link! First I need to investigate this document and Spice syntax. I will need some optocoupler models, which don't exist in Easy EDA and are not provided by manufacturers. In case I will decide to develop them myself or to improve 817 model, I will definitely contact you.
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