Author Topic: in-browser circuit simulator  (Read 1808 times)

0 Members and 1 Guest are viewing this topic.

Offline mikeselectricstuffTopic starter

  • Super Contributor
  • ***
  • Posts: 13971
  • Country: gb
    • Mike's Electric Stuff
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: wilfred

Offline Dubbie

  • Supporter
  • ****
  • Posts: 1115
  • Country: nz
Re: in-browser circuit simulator
« Reply #1 on: July 25, 2018, 10:40:24 pm »
This is so much nicer to use than LTSpice. Probably not nearly as accurate, but great for testing a quick idea. The current flow visualisation is really helpful as well.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: in-browser circuit simulator
« Reply #2 on: July 26, 2018, 12:53:03 am »
That used to require Java. Good to see it's been changed.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8408
Re: in-browser circuit simulator
« Reply #3 on: July 26, 2018, 01:34:55 am »
I've used this one a few times too. The interactivity is excellent although the schematic editor is a bit fiddly (no nets, just... line segments.)
That used to require Java. Good to see it's been changed.
The Java one is still here: https://www.falstad.com/circuit-java/

It comes with source code and can be downloaded and run offline.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22408
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: in-browser circuit simulator
« Reply #4 on: July 26, 2018, 01:38:43 am »
This is so much nicer to use than LTSpice. Probably not nearly as accurate, but great for testing a quick idea. The current flow visualisation is really helpful as well.

Right, it's fixed timestep, and I think only simple Newton integration as well.  It's very easy to break, say by setting up nonlinear or near-singular* circuits, or using too large a timestep.  The main advantage is, it's easy to compute, and always has an answer -- it won't error out (as SPICE will).  It's up to you to figure out if that answer is reasonable or not, though... :)

*Singular matrix: To solve the next timestep, an equation of the form Ax2 = x1 is solved, where A is a matrix of connections, x1 is a vector of node voltages from last timestep, and x2 is the next timestep.  To solve for x2, the inverse of A is computed, and multiplied on both sides, canceling out A[sup-1]A on the left.  Basically, it's division, and when A is nearly zero, the result blows up because you're dividing by (near) zero.  A matrix has many more, and more subtle, ways in which it can be "zero" in this sense.  This is called a singular matrix.  But, in short, it's very much analogous to division by zero.

I suppose I should explain what causes a singular matrix as well: floating nodes.  This includes current loops as well as voltage nodes.  You cannot have two inductors in parallel, with no series resistance on either, because the current between the two is undefined (the total current is set by the circuit, but the current into one and out of the other is a free variable -- you've drawn a superconducting loop, after all!).  Likewise, two capacitors in series, with no parallel resistance, leaves an undefined voltage between the two.  Simple solution: always add a leakage resistor across an otherwise-insulating component, like a diode, capacitor, transformer, or such (usually a few megs or gigs), or to ground.  And where connecting inductors or transformers in parallel, include DCR.

Nonlinear circuits include pretty much anything switching, except for logic sources which are probably implemented differently, partly for convenience and speed, and partly for stability.  You can always draw your own with transistors -- but expect to add capacitors (to set how fast the transistors are switching) and to need a very small timestep.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: hans, helius

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: in-browser circuit simulator
« Reply #5 on: July 26, 2018, 04:50:30 am »
I've been using that for years. It has limitations for sure, but for a toy it's quite capable. It makes a great educational tool for beginners and it's capable enough to be a useful tool as long as one understands the limitations.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf