I have a system that has two fan banks driven by MOSFETs. The fans are mounted on two sides of the enclosure on ~2 ft cables. After one second from system turn-on the microcontroller turns these FETs on. When the fans are already connected before system turn-on this is no problem.
What has been seen is that if the fans are disconnected during operation the system will reset. Also, if the system is running with the FETs powered and the fans are connected the system can reset. This is not consistently reproducible.
There are positive and negative spikes on the gate from -3V to +9V. I'm decently confident this is what is killing the micro and causing a reset. What I don't understand is how there can be a significant energy burst when the inductive load is removed from the system. Just to be clear the state of the FET is NOT being changed by the micro - there is no turn-off/turn-on control - only installation or removal of fans.
simulate this circuit – Schematic created using CircuitLab