Replies: 1 comment 2 replies
-
I spent some time working on a feature that would automatically import spice subcircuits. You can look at the branch "spiceimport". I don't feel like it's ready to be added to the main branch, and maybe it never will be, because a lot of testing would be required. But I used it to create some models like the TL431. Re parameter models, it's not really the goal of the simulator to reimplement SPICE. It's intended as a learning tool. But in order to add more components (so people can use them and learn about them), I've found it useful to make the simulator act more like SPICE. The current transistor model is right out of SPICE. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using SPICE models provided by manufacturers seems like a very powerful way to extend the number of components that can be used in circuitjs. I've done a little bit of research and found that there are basically two types of SPICE models and 3 types of files:
For parameter models one would need a compatible Java implementation of the model. Old versions of SPICE are open source, so perhaps this could be a basis for porting the models to Java and for verification. However, I'm not sure how compatible the old SPICE versions are with the model files you can download from manufactureres. At least for transistors, new models have been developed over time (see http://bsim.berkeley.edu/models/ and https://en.wikipedia.org/wiki/SPICE#Device_models).
Once basic models are supported, subcircuit models should be easy.
A way to draw custom symbols would be nice anyway, so if one were to be implemented, looking at the SPICE symbol file format would probably be worthwhile to ensure future compatibility.
I think the first step towards this goal would have to be more research on the variety of parameter models and their mutual compatibility.
What do you think of these ideas?
Beta Was this translation helpful? Give feedback.
All reactions