Live data from Hacker News

Circuit.js – Electronic circuit simulator on the web

lushprojects.com

31–40 of 64 posts

Re: Circuit.js – Electronic circuit simulator on the web

#31
post #27
post #25

Earlier quoted context omitted.

If you buy modern power electronic semiconductors, you can usually find so m spice models from the manufacturer (though they do indeed typically not model thermals).

Spice models are not easy to find, in my experience. Given some random transistor on Digikey, I'd say the odds are less than 20% that I can find the corresponding spice model.

Fair, but that should generally not be so restrictive that it causes a problem with "having SPICE models for actually purchasable components".

Re: Circuit.js – Electronic circuit simulator on the web

#32
post #23

Earlier quoted context omitted.

Downvoters must read first: https://en.wikipedia.org/wiki/Flip-flop_(electronics)

Yeah, I got the joke. I was (and still am) tempted to downvote though because puns and pun chains are low effort and reddit-esque. "What you posted didn't register at first", "I'll have to think about that for a bit", "Why can't we post flip flop puns? This community is too gated ", etc.

By that rationale, the effort you put into getting the joke should have precluded you from responding.

Re: Circuit.js – Electronic circuit simulator on the web

#33
post #23

Earlier quoted context omitted.

Downvoters must read first: https://en.wikipedia.org/wiki/Flip-flop_(electronics)

Yeah, I got the joke. I was (and still am) tempted to downvote though because puns and pun chains are low effort and reddit-esque. "What you posted didn't register at first", "I'll have to think about that for a bit", "Why can't we post flip flop puns? This community is too gated ", etc.

Personally I don't mind some "reddit esque" (or whatever you want to call them) comments here and there. The level of those present on HN is low anyway. They could/should be less in some cases, but they don't bother much as the majority is still mostly insightful comments or interesting discussions. Imagine a completely sterile online community without any communication side-tracked, even if it's just a tiny bit, from the informational topic. That just wouldn't feel right to me. The equivalent of a "everyone got a stick up their lower half" workplace. Yuck.

Re: Circuit.js – Electronic circuit simulator on the web

#34

Absolutely amazing! I feel like this could be nicely packaged into a proper product, along with a teacher's guide and then sold to schools. I feel like a lot of people have given up on fundamental electronics as there's just so much other stuff to spend time on, stuff like this could make it a tiny bit more approachable again.

We do something like this at CircuitLab https://www.circuitlab.com/ -- lots of universities are customers. :)

Re: Circuit.js – Electronic circuit simulator on the web

#35
post #29
post #7

Many years ago I helped write https://www.multisim.com It's a full SPICE based simulator done entirely clientside

Cool, thank you for sharing. 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?

Author of the CircuitLab https://www.circuitlab.com/ (YC W13) mixed-mode (analog and digital) simulation engine here. The "core algorithm" is probably LU decomposition on a sparse matrix: https://ultimateelectronicsbook.com/systems-of-equations/#lu... .

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!

Re: Circuit.js – Electronic circuit simulator on the web

#39
post #5

The site of the creator of the simulator has a newer version: http://www.falstad.com/circuit/ 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

Yes, Paul did the original as a Java Applet. I did the port to run in the x-compile to allow it to run in the browser. After that we cooperated on it for a while. I stepped back a few years ago to focus on other things, but he's kept up with improvements. Kudos.

I posted that rather quickly, so a bit more information for those who are interested (inspired by some of the comments on the thread).

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/

Re: Circuit.js – Electronic circuit simulator on the web

#40
post #29
post #7

Many years ago I helped write https://www.multisim.com It's a full SPICE based simulator done entirely clientside

Cool, thank you for sharing. 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?

Continuous System Simulation by Cellier/Kofman [0]. The focus is mainly on Modelica, but analog circuits are a "special case" of this.

[0] https://www.amazon.com/Continuous-System-Simulation-François...

Post reply on HN