Hi everyone

I wonder, if someone can explain to me the transient behaviour of a MOSFET in a specific situation.

I want to discharge a capacitor over a solenoid. The capacitor has 1000 muF and is charged to 20V. The solenoid has a DC resistance of 0.6 ohm.

When I discharge the capacitor manually (by just connecting + of capacitor to one end of the solenoid and - to the other by hand), I get an expected discharge curve. It looks like a regular discharge curve of a capacitor. With my DSO I captured the voltage drop across the solenoid, it‘s at max 20V.

When I use a push button to close the circuit, I get some bouncing effects but otherwise the curve looks the same. Max voltage drop is slightly below 20V.

When I use a NPN MOSFET IRF530N (low side switch), I see a completely different behaviour. The maximum voltage drop is only 12V and the curve is completely different:

Can anyone explain me what‘s going on and what I could do to get a regular discharge curve?

Thanks for your help.