Hacker News new | past | comments | ask | show | jobs | submit login

We've been building a SPICE-like mixed-mode circuit simulator plus a SVG-based schematic editor, HTML5/Canvas-based plotting, in about 20K lines of CoffeeScript. No browser plugins required -- runs directly in the browser's JavaScript engine, and all simulation is client-side. (We generate and factor big matrices on the client side.) We currently do DC, time-domain simulations, and frequency-domain analysis (small signal, "Bode plots" if you're familiar with the lingo). Circuit analysis results compare well to "real" desktop SPICEs. We evaluate real and complex electrical quantities. In fact, we have a graphing calculator essentially embedded in our tool. Since it's browser-based, it's immediately Windows/Mac/Linux cross-platform, unlike most software EDA tools which are Windows-only. Check out the cross-tab copy-paste functionality as well!

If you look at any electronics forum online, it's normal to see scanned hand-drawn schematics, or static screenshots from various desktop tools. There's no reason why we shouldn't instead be sharing useful URLs that enable editing and simulation. If someone uses CircuitLab and posts a public URL, they enable the entire community to easily open their circuit, make a few changes, simulate / iterate, and share the new version.

Looking forward to hearing your feedback!




Neat stuff.

I briefly considered doing something like this myself, there are some interesting ways to monetize this if you manage to become the web circuit designer/simulator.

Some things you might want to consider:

  * be more Mac friendly -- backspace instead of delete, Cmd instead of Ctrl on Macs
  * It feels unnatural that I have to press a button on the menu to enter a placement mode. Something like drag and drop might be more natural.
  * There's no obvious way to delete stuff with the mouse
Your mileage may vary though, just me 3 cents. Other than that, looking pretty good. Good luck!


Thanks! Yes, there are some important Mac usability issues we need to take a closer look at. Ctrl-click, etc. Some of these will be limited by what kinds of UI events we have access to in-browser, but others are just tweaks we need to make on our end.


20K lines of CoffeeScript is about an order of magnitude more than I've ever dealt with in a single project. Any complaints, concerns, ideas or tips that you learned along the way?


It's about 15K of code + 5K of unit tests (Jasmine). CoffeeScript is amazing and it really enabled a project of this scope to be fun and manageable. We are very happy customers :)

No tips really. We have several subdirectory builds with independent Makefiles which all get catted together (as we started long before the v1.2.0 join option). Many thanks!


I haven't looked at it yet (in a few moments we'll see how it handles mobile devices), but if it holds up to your hype, this could be an amazing application. I have to ask, is the entire simulation client side, and what's the largest functional circuit you've created and still had good performance (as in does it seem to be able to be able to be optimized to eventually be an EDA competitor, or will it mainly be the smaller circuits as folks are learning?)


Yes, the entire simulation is currently client side.

Here's a "big" analog circuit:

https://www.circuitlab.com/circuit/fby849/bjt-cascoded-activ...

10 BJTs, and an op-amp, all in a highly-coupled, high-gain loop. If you open this one and run the time-domain simulation with the saved settings as-is, it takes my laptop a good 23 seconds to crank through 80 time points. However, that circuit generates somewhere around ~700 highly non-linear simultaneous equations that need to get solved at every timestep.

We are certainly performance-limited right now by not running closer to the hardware, but if simulation performance turns out to be a key bottleneck/feature, we'd look at things like Google's Native Client.




Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: