sharpie7 / circuitjs1

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

NPN&PNP behave funny #729

Closed riddicc closed 2 years ago

riddicc commented 2 years ago

Hi! It is about this circuit. When I turn on a PNP rapidly, a seemingly unrelated NPN goes mad... Why is that? Furthermore the PNP does not work as expected, because the left FET has high leakage... Is that realistic? Thx. Bye.

pfalstad commented 2 years ago

Looks like a convergence/roundoff error issue. If you look at the console, the simulator is constantly having trouble converging even with no change in the circuit. So no, it's not realistic.

Duckle29 commented 2 years ago

This circuit also has issues with this https://tinyurl.com/yaepqntf

pfalstad commented 2 years ago

Yes.. To fix that one, you just need to add a capacitor to simulate the capacitance between the MOSFET gate and drain.

https://tinyurl.com/yd8d4pon