sharpie7 / circuitjs1

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

Transformer problem #698

Closed BrennoMaturino1 closed 2 years ago

BrennoMaturino1 commented 2 years ago

Today i was making a oscillator circuit based on a CFL ballast and the transformer suddenly started generating infinite energy and oscillating itself even without the transistors, i think you guys will understand better with the video

Edit: Here is my circuit: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWcMBMcUHYMGZIA4UA2ATmIxAUgoqoQFMBaMMAKADcRsUQUFDPuzblSoAWKmDRRpMBCwAu4DP0l5wo0eBRqJIBoRjw4BLHjwJtew0ZMZx+BGHNFiyKgBM6AMwCGAVwAbeQUlfhQUTTANHgjpCH1rI3htc1cGDGgcSDBsDGJsPDAsAsJGMAk4EE9fQOCAd3VI6KjI5SgWBpbQxp58doAnbvDWlTaqQjwjDp6i0bmBkGJ5pfBJaQmphpXZmbHp7bWuoXaGrh4+Ht5+SGmuq8vxE4FV7gPhFnF+XEjLUTAwvpiKDQUiubAAGnK4OwnBAhFgkFIGH+mEgfAQXDK8TA0AIaGIcDIjkIOGw2DK5ES+AI2AxCFEKCKBFEeH4tzaqk4kB+Omm33ABh4ZgFImmKRFQrUOxuDXFO350vZ8zle1O3POKmi9xlQ1i-OGT31fUw3DQvIAzjxHvyuFR+bp5P0-HQxRhTcbreqdbauZp9RcbgB7HgQM5iRGuf4FR5UsiEPi8aSm0MsIA

https://user-images.githubusercontent.com/67515570/147778248-cb8c1614-962d-469c-929e-0cc59ede1d75.mp4

pfalstad commented 2 years ago

uncheck "aproximacao trapezoidal"

this should be unchecked whenever a transformer or inductor is connected to a switch. the trapezoidal approximation is more accurate in general, but less stable (prone to oscillation) when the transformer is switched.