Open sandorex opened 3 years ago
Yes that looks like a bug, caused by roundoff error if I had to guess.
i have the same problem, after hours of scratching my head trying to work out what i did wrong i narrowed it down to this as the simplest circuit that produces the error
set the simulation speed as low as possible and press the button. the transistor conducts 5.5A for about 2ms then goes back to it should. id does the same thing again on release of the button. it only seems to do it if the mosfet DS voltage exceeds about 50v
$ 1 0.000005 0.00855774612778704 47 5 43 5e-11 f -448 -576 -400 -576 32 1.5 0.02 g -400 -480 -400 -464 0 0 t -160 -592 -112 -592 0 1 -99.70226988881826 0.29773011118173504 100 default w -400 -672 -112 -672 1 w -112 -672 -112 -608 0 w -112 -576 -112 -480 0 w -112 -480 -400 -480 0 w -400 -592 -400 -672 0 r -400 -560 -400 -480 0 1000 s -512 -576 -448 -576 0 1 true w -400 -672 -512 -672 0 w -512 -672 -512 -576 0 R -400 -672 -400 -704 0 0 40 100 0 0 0.5 o 3 1 3 x83013 9.94567563433957 0.0001 0 1 0.00009999999999999999 0
I believe I have reproduced the behavior in a circuit that lacks a switch.
$ 1 4.0000000000000003e-7 5.459815003314424 59 5 50 5e-11
t 480 336 544 336 0 -1 2.259790053677791 0.23069765531759812 240 default
t 544 384 480 384 0 1 -2.259790053677791 0.24020940285051967 160 default
w 480 336 480 368 0
w 544 352 544 384 0
w 480 400 480 432 0
w 480 432 608 432 0
g 432 432 432 448 0 0
r 432 336 432 432 0 1000
r 432 240 432 336 0 1000
w 432 336 480 336 0
w 432 432 480 432 0
w 432 240 608 240 0
r 608 240 608 320 0 100000
c 608 368 608 432 0 1e-8 2.258652079026427 0.001
R 432 240 432 208 0 0 40 5 0 0 0.5
r 608 368 608 320 0 390
w 544 320 608 320 0
t 736 368 784 368 0 1 -4.591097668602047 0.40890233139795285 160 spice-default
w 784 384 784 432 0
w 784 432 608 432 0
w 784 240 784 352 0
w 608 240 784 240 0
o 13 1 0 12554 2.258652079026427 0.0001 0 2 13 3
o 20 1 0 12291 5 0.0001 1 2 20 3
o 17 1 4 12291 0.40890233142318716 0.0001 2 1
I don't know if anyone ever suspected the switch was part of the problem, but this case rules it out.
Optocouplers are affected as well
Potential clue; when editing the NPN's model, setting Reverse Beta to infinity reduces the leakage bug 100-fold (without completely eliminating it) in forward active mode, but amplifies it in reverse active mode.
The NPN transistor for some reason conducts even though it shouldn't, I don't know the validity of the circuit but it probably shouldn't do that?
My guess is the whole issue is caused by the second mosfet and the zener
Steps to reproduce
(code below)
Hope this helps to make the simulator at least a little better