Circuit.js – Electronic circuit simulator on the web
lushprojects.com
lushprojects.com
I love this tool because you can export links or export circuits as text files.
Clock circuit I made that uses faster and slower buttons to adjust the speed: https://tinyurl.com/2nvlulfl
8-bit binary multiplier (LSB on top): https://burlette.net/multiplier.txt
I found Paul's sim by chance and really liked it because it was the first electronics sim that I had seen that was properly interactive and visual in its approach. I thought it was a great tool for building intuition about circuits. However, at a certain point it became clear that Java in the browser was on its way out, and this really needed to become a plug-in free experience if it was going to continue to be useful.
This was about the time that V8 was coming along and revoluationizing the performance of JS. Originally there was no license attached to the project, so I asked Paul if he was OK in me trying to port it to run on JS using the GWT framework. He was fine, but said he'd done old experiments with some of his other sims and found that JS wasn't performant enough, but with the strides in JS performance I was more optimistic.
I took the Jave code and commented just about everything out to get a minimal implementation of the standard LRC circuit just to see the performance. Once I was comfortable with that working I started adding every feature and every component back. Most of the work was replacing the Java graphics primitives with the equivalents from GWT.
Once the initial version JS version was out I did quite a lot of work mostly on UI features, especially the 'scopes. They were rather weak in the original and still not as good as I would really like, but much improved.
I have thought about monetizing and extending with EDA features, socials, etc. but its never been enough of a priority to do it. I kind of like its simplicity as it is.
It has been used a lot in education and a couple of teachers have contributed to the code to support their uses in classrooms.
It's kind-of amazing that it still has a very distinctive niche that nobody else has really gone after in quite the same way. I think a lot of that is because Paul's original vision and work on the Java version was so good.
There is a bit more context and some tutorials here: http://lushprojects.com/circuitjs/
For person trying to learn circuit theory and logic design, would you recommend a resource that can be followed along?
Also, any recommendation for kids? I think this area can be explored by kids in the same way programming.
https://www.ebay.com/itm/D274D-SN74H74N-Flip-Flops-Dual-D-Ty...
edit: I didn't get the "JK". You got me there. Well played.
It's a full SPICE based simulator done entirely clientside
I am interested in simulators, especially in simulators of analogue circuits. Do you have any recommendations on where to start reading about algorithms that lie at the core of simulators?
Also, how was the experience developing such product with JS?
I answered a similar question on Electronics StackExchange where someone asked about how to build a circuit simulator: https://electronics.stackexchange.com/a/394069
From a software developer perspective: lots and lots and lots of automated tests, each of which builds a circuit, runs a simulation, and makes sure we don't see any behavior regression. More lines of code in tests than in the core simulation engine or device models!
Outside of that most simpler stuff (e.g. analog math using opamps, discrete stuff) works perfectly fine. I love it for education and quick "sanity check" simulations.
The JS experience wasn't great. We used emscripten and the tooling barely worked for the simulator core. The rest of the app wasn't bad, but we used polymer / webcomponents which was a big mistake IMO
[0] https://www.amazon.com/Continuous-System-Simulation-François...
For information about the theory behind this, see Electronic Circuit & System Simulation Methods by Pillage
It looks nice but Jesus... $1550AUD a year for the designer edition?
Old tools were inaccessible to use because there's nothing to look at with a text-based tool, and inaccessible for engineers to develop because programming was so arcane. Look at Berkeley spice written in C. It's a lot of old-school parsing and implementing matrix methods.
The new stuff that's more accessible to use is more accessible for a software engineer to develop, but it's arguably even less accessible to other engineers and scientists to add their contributions. This creates an issue where the tools remain as good-looking toys that never get any serious technical chops.
Splitting the implementation is the way to go, but neither side would be happy about the interface. There's also the issue of platform because good engineering tools only run locally.
I don't know what the answer is, but it's not Python. We already have python, and yet, there isn't an explosion of collaboration to make great tools for the physical sciences and engineering. It's too much of a compromise for both sides.
I would argue that python is actually ideally suited as a solution for many if not most things, just because there isn't large adoption in a subgenre of engineering, doesn't mean it isn't the right solution.
The primitives are there, its easy to comprehend, and there is a large amount of adoption in the scientific community outside EE.
I see lots of stuff that used to be done in things like matlab or mathmatica being done in python directly these days. At least at one of the places that I worked at, where we were a huge matlab shop for doing model design / algorithm simulation, has migrated most of their stuff to python.
Things like antenna design, RF simulation and a number of other things have a lot of of folks writing python code.
I think you misunderstood me. The choice of tools for front and backend have to be independent. The only really successful projects implemented in one language are all in C++, and that's difficult for everyone to approach.
If you are talking about practical implementation of those models, I have seen many non open source projects use those backends (things like pandas, sklearn, etc.) with things like django or flask as a frontend.
Also, they typically don't allow the user to specify maximum power for every component and check that the voltages and currents are within safe limits.
The Micro-Cap simulator has the smoke test feature, for example. It's now abandoned and free for download.
The website however is now dead, but thanks to the Internet Archive we can still access it to download the software.
https://web.archive.org/web/20220117133700/http://www.spectr...
That software would be a great candidate for a crowdfunding campaign to purchase the source rights from the author and release it as Open Source.
Edit: and it works great with WINE under Linux.
Which is exactly why the simulator/community should address it.
With time you gain the experience to know which circuits are problematic and which are easy-going.
JavaScript Circuit Simulator - https://news.ycombinator.com/item?id=9896436 - July 2015 (22 comments)
It's not accurate enough to 100% rely on, but it's good enough for simple stuff that I could do without a sim, but prefer to have at least some kind of review on my work before I actually send off for board.
This auxiliary switch was initially meant to block only half the output voltage and use the inductor as an LC resonance with the output capacitances of the half bridges to flip them around after they just calmly turned off.
The calm turn off is fading over input/output currents of the converter to other phase(s) of the converter; this is to virtually eliminate any (inherent) need for filter capacitors at the input and output of the converter by ensuring the phase currents, when added up, result in a time-invariant current for the converter as a whole (like how 3-phase grid supply theoretically (i.e., with active power factor correction) doesn't need the (mains-side) smoothing capacitors in a computer power supply, because a the (virtual) resistor the grid operator prefers to see has constant power draw from the grid).
The issue was that the auxiliary switch still suffered from hard-turn-on (i.e., no ZVS-on for it) which turns out to be somewhat of a problem when the goal is to take in e.g. up-to 60kV (+20% peaks/surges on top of 50kV nominal) from an MVDC line, and convert it down to something a "just" 1.6 MW induction motor with it's inverter can comfortably handle (e.g. situation in a Siemens Vectron MS, except that those only go up to 25kV AC): the first stage would take in 60kV, output 30kV, and that switch would have to block +- 15kV.
At the expense of the auxiliary switch seeing up-to full output voltage, sightly coupling the inductors across phases should allow the coupled fraction of the full current of the phase who's auxiliary switch is currently on to fully charge/discharge the much smaller output capacitance of the auxiliary switches in the other phases while the entire current in itself charges/discharges it's own [phase's] half bridges.
I'm sorry the switches in the falstad links aren't automated; the modified 3L-FC switches between which of the two controls is on, and briefly activates the center switch while both control inputs are off. The weakly-coupled transformer has one activate the switch when the red graph gets closest to the 0V center line, and deactivate it when the yellow current in the same scope has completed the sine-half-wave/crosses the 0A center line the first time (again) after the switch was activated. The result should be that the green voltage across the simulated output capacitance of the half bridges on the right scope transitions quickly to the other polarity while the switch is active, and then stays there with only mild ripple until the switch is activated again. I believe in the 5-phase converter it would be activated not the first time afterwards the red goes back to (almost) zero, but the one second time, so the (with-switch-active) current half-waves are distributed round-robin.
[0]: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB...
[1]: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgDOB0Y...