Stefan Schippers
10/26/2021, 1:27 PMngspice/led_driver.sch
. there is an ideal switch devices/switch_ngspice.sym
, may be you can use it. The diode has a 'swmod' model where you control the on threshold, hysteresis, ron, roff and so on.
The model looks like:
.MODEL swmod SW(VT=0.1 VH=0.01 RON=0.01 ROFF=10000000)