You need to use EasyEDA editor to create some projects before publishing
How to associate the .subckt to a New Spice Symbol
2090 10
jmgonet 5 years ago
Hi all, I would like to create a new schematic symbol with a model, so it can be simulated, but I'm not able to complete the task: * I can see my symbol if I open _Libraries_ and search for for _IRLB3813PBF_, although I'm not sure if it is visible for other people, as it appers under _Personal_. * If I place my symbol, it comes all complete with the spice text, which is not very practical. * I believe that I have to specify somewhere the spice prefix, but I can't find where. The component I want to create is the IRLB3813PBF, by Infineon: * Its spice model is available here: https://www.digikey.com/product-detail/en/infineon-technologies/IRLB3813PBF/IRLB3813PBF-ND/2118485 * It is packaged in a TO-220AB, which is already available in the libraries. This is what I've done so far: 1. From the menu, I've created a _New Spice Symbol_. 2. I've drawn something that looks like a MOSFET, with a circle and three pins. 3. I've assigned the ``TO-220AB(TO-220-3)`` package. 4. I've numbered the pins according the the PCB package 5. I've created a new _Text_ area, and specified in its properties that it is a _spice_ text. 6. I've downloaded the spice model, which is a ``.SUBCKT``, and pasted into the _Text_ area. For this I've double-clicked on the text to open the multi-line text editor, so as to avoid the carriage-return to collapse. 7. I've updated the _spice number_ of the pins according to the inputs in the spice model. 8. I've saved the symbol and specified the manufacturer reference, the provider and a link. I've read the following tutorials: * https://docs.easyeda.com/en/SchematicLib/SchLib-Create/index.html - But there is nothing very specifc about associating the spice model. It just explains about how to use the spice number in the pins. * https://docs.easyeda.com/en/Simulation/Chapter1-Introduction/index.html - It emphasizes that _it is quite straightforward to create a spice symbol for it within EasyEDA either by editing an existing symbol or by creating a new one from scratch_, but it only provides two links about that subject, which I've followed: * https://docs.easyeda.com/en/Simulation/Chapter14-Device-models/index.html - I took from there the idea that I had to paste the ``SUBCKT`` into a text of type _spice_, but there are not more details about the procedure when I'm creating a _spice symbol_ * https://docs.easyeda.com/en/Simulation/Chapter15-Schematic-symbols-prefixes-and-pin-numbers/index.html - Important stuff but again, nothing particular to what I'm trying to do. Any help would be greatly appreciated. Regards, Jean-Michel
Comments
andyfierman 5 years ago
Have you opened and run the example simulations featuring models and subckt s associated with spice symbols?
Reply
jmgonet 5 years ago
Yes, I've run simulations, including on circuits that are mine. I've also done one simulation with a spice model included in it. I was hoping now to prepare a symbol with associated model, as it seems that there is a specific functionality for this in the main menu. Yet\, I haven't found any specific documentation about \_New \-\> Spice Symbol\_\.
Reply
jmgonet 5 years ago
Sorry, scratch the above comment; You're right about asking, because now I realize I'm going too fast. This morning I decided to progress in baby steps, and I'm blocked way before reaching the point of creating a _Spice Symbol_: * I want to use the ``.SUBCKT`` available at [Infineon Technologies IRLB3813PBF](https://www.digikey.com/product-detail/en/infineon-technologies/IRLB3813PBF/IRLB3813PBF-ND/2118485) * To be sure of the pin order, I've created a new _Schematic Lib_ called _IRLB3813PBF-NM_ (the NM is for No Model), and I've placed the pin in the same order as in the spice model. * Then I've placed the schematic lib symbol in my circuit. * Changed the name to ``IRLB3831PBF`` to match the ``.SUBCKT irlb3813pbf 1 2 3`` visible at the top of the spice model. * Changed the spice prefix to X. * Placed a text of type _spice_ in the circuit, and pasted the content of the spice model (I removed the thermal RC network, as I don't need it). The result is available here: [https://easyeda.com/jmgonet/h-bridge](https://easyeda.com/jmgonet/h-bridge) ![h-bridge-custom-mosfet-n-with-spice-subckt.png](//image.easyeda.com/pullimage/dkQLcGGXQV4XjqewXsSjEOCjQr5tvAC4qlTo19ZI.png) What happens is: nothing * Simulation behaves as if the component wasn't there. * Simulation result reports no error. * If I intentionally change the name of the component to anything like _IRLB3813PBFaaa_, results are the same, and also no errors. * If I intentionally write giberish content in the text area, like ``.MODELyyy``, still no errors showing up. My diagnostic is that, although I followed the instructions in the example [Attaching a .subckt to a symbol 01](https://easyeda.com/editor#id=38bb9615b9ae4194825f924025d312ca), I failed to link the symbol to the model so badly that the simulation doesn't even detect that a model is needed. Can you help me? Regards, Jean-Michel
Reply
andyfierman 5 years ago
You need to create a new spice symbol rather than a new schematic lib.
Reply
jmgonet 5 years ago
Hi, Ah, thanks! That's a progress. I've successfully run a simple simulation based on the following steps: * Create a _New Spice Symbol_, draw something nice and be careful to set the same pin numbers and order as in the script. * Now create a _New Schematic_, place the above symbol, and paste the script in a _spice_ text area. * Be careful to use the same name in the symbol as in the script. Now that this works I'm back to my original question: * How can I have the ``.SUBCKT`` script in the _Spice Symbol_ so I don't need to paste it in every _Schematic_? For example, I can place 2N2222 (I mean the one with model, available in _Library / System_) in my schematic, and I can run a simulation without pasting any script. How can I achieve the same?
Reply
Dominic Tisdell 3 years ago
Hi JM. Did you  end up finding a solution to your question?  I'm keen to know the answer too. Thanks and regards Dom
Reply
andyfierman 3 years ago
@domtisdell, @jmgonet, "How can I have the ``.SUBCKT`` script in the _Spice Symbol_ so I don't need to paste it in every _Schematic_?" It is not possible at present in EasyEDA to assign a spice model or subckt to a spice symbol other than by: 1. pasting the model or subckt text into the schematic; 2. asking Support if there is a model available that could be added to the EasyEDA library together with an appropriate Spice Symbol. Please read (3) in (2) in: [https://easyeda.com/forum/topic/How-to-ask-for-help-and-get-an-answer-71b17a40d15442349eaecbfae083e46a](https://easyeda.com/forum/topic/How-to-ask-for-help-and-get-an-answer-71b17a40d15442349eaecbfae083e46a)
Reply
andyfierman 2 years ago
It is also possible to add a .subckt or .model defined model to a spice symbol by opening it in the Spice Symbol Editor and doing: **Edit > Spice Model...**
Reply
andyfierman 2 years ago
More detail on **Edit > Spice Model...** here: [https://easyeda.com/forum/topic/How-to-add-a-spice-model-to-a-spice-symbol-which-does-not-already-gave-one-da9d6c16fa0842feba7d7b49bd983a42](https://easyeda.com/forum/topic/How-to-add-a-spice-model-to-a-spice-symbol-which-does-not-already-gave-one-da9d6c16fa0842feba7d7b49bd983a42)<br> <br>
Reply
jmgonet 2 years ago
Hey Andy! You didn't forget me. I... I'm impressed. I'm going to check this out. Thanks for your support.
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