I need a fast (100kHz) switching on-off LED driven with a constant current. With an OpAmp (TL082) and a p-channel SIPMOS (BSS84P) I get a fixed current source. I then placed a n-channel enhancement mode MOSFET (BSS123) and drive the gate with the output of a controller. To limit the current, I have a 100E resistor (R3) in front of the gate. Please see the appended schematic.
What I see is that the BSS123 switches far too slow. While the signal at the gate switches very fast (fall time is approx. 150ns), the voltages measured at D1 rises in approx. 100us (see picture below). I thought that R2 influences the speed, but it has no impact at all, I see the 100us with 50E and 200E. The BSS123 has a low input capacitance of 60pF maximum, and the switching delays as of the datasheet are a few ns.
What is also strange for me is that the voltage rises linear.
Probably I am missing an important point. Thanks!