Live data from Hacker News

Circuit.js – Electronic circuit simulator on the web

lushprojects.com

21–30 of 64 posts

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

#22
post #12

Earlier quoted context omitted.

That's what you say now, how do we know you won't flip flop?

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

So you are saying they should have ended the post with JK?

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

#23
post #12

Earlier quoted context omitted.

That's what you say now, how do we know you won't flip flop?

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.

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

#24
I just used it about 43 hours ago to get an understanding of a circuit idea I had ([1] being the secondary of [0], so that the abstracted switch (some bidirectional transistor approach of still-unclear nature; suffering so much ripple (+- half input voltage) requires this rippling to be low-loss) in the center can turn on with no voltage across it), which was to use loose coupling between the inductors of the phases of a modified 3L-FC buck [3] (running in divide-by-two mode as a switched capacitor converter; plans are 5 phases at 6.7 MHz for the half-bridges and 27 MHz for the resonant inductors), that has been modified by splitting the flying capacitor into two series capacitors and placing an auxiliary switch in series with an inductor between the center of the flying capacitor and the output of the 3L-FC (in a buck, that would go through an inductor and then to an output smoothing capacitor; I only aim for a 2:1 DC/DC transformer so output voltage will be a little below half the input voltage (difference is due to resistive losses in the half bridges that mostly cover up the ripple losses of the flying capacitor)).

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...

[3]: https://www.ti.com/lit/pdf/slyt807

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

#25
post #18

Circuit simulators are awesome, but they never go the next step such that they work with actual purchasable components. The user always has to read datasheets and translate everything into spice parameters. 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.

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).

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

#26
I'm super stoked that hardware / EE is getting so much more focus and interest from software engineers. It really feels like there is so much room for improvement / optimization in that space and for so many years, it was like this black box that nobody wanted to look inside.

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

#27
post #25
post #18

Circuit simulators are awesome, but they never go the next step such that they work with actual purchasable components. The user always has to read datasheets and translate everything into spice parameters. 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.

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.

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

#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?

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

#30
post #18

Circuit simulators are awesome, but they never go the next step such that they work with actual purchasable components. The user always has to read datasheets and translate everything into spice parameters. 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.

This "next step" is really on the vendor/manufacturer instead of simulator developers. It won't be addressed, either, because it's extra development and cost for the vendor to bare when a lot of low cost/generic applications won't benefit from having simulation files. Additionally, it's a lot more work for the vendor to characterize and also guarantee that their products are close in value after years of production. Some datasheets are very sparse not by mistake - they promise you exactly as much as the datasheet, no more no less (for reputable vendors anyway).

The Micro-Cap simulator has the smoke test feature, for example. It's now abandoned and free for download.

Post reply on HN