sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.29k stars 633 forks source link

Feature- Request #713

Closed Tonigau closed 2 years ago

Tonigau commented 2 years ago

A controlled switch would be a handy component. I tried using the Nch MOSFET(th=10, beta=200) with 32A 63V 50khz PWM & getting converge errors (doesn't error with default MOSFET parameters) So a simple controlled switch would be handy, no config just 3 terminals .

cheers

pfalstad commented 2 years ago

What about an Analog Switch? Under Active Building Blocks

Tonigau commented 2 years ago

Hello, I looked at the Analog Switch but could not get it to work. I tried again & found it needs > 35V from WaveGen to work. Thanks for the suggestion. Don't get the Convergence Fail now with the switch node, but I don't get correct duty control of inductor current ?

Buck2_Current_In_Asw.txt Buck2_Current_In_MOSFET.txt

50khz buck A_SW ckt w- Analog Switch

circuit-Conv_Fail W-MOSFET ckt w- MOSFET

pfalstad commented 2 years ago

I was going to ask why you have one side of the square wave generator connected to one of the switch terminals. Doesn't seem very useful or realistic. Then I realized my example circuit does that!

What's the issue with the inductor current?

Tonigau commented 2 years ago
_>> one side of the square wave generator connected to one of the switch terminals...
>> What's the issue with the inductor current?_

Sorted, just forgot to turn on brain first... circuit below ok . 50k Buck_Asw