I am trying to control a MOSFET with an Arduino. I have followed few tutorials and created schematic below. When I made circuit it did work, but I managed to destroy two Arduino nano clones with it. It did work fine with lightbulb on J4, then I was experimenting with fan which also worked, and small 12v air pump. With air pump it worked until I turned it off and Arduino was no longer working. It was powered with 12v from bench power supply.
The MOSFET show below is actually RFP30N06LE but I could not find it in Eagle.
OUT and T are screw terminals and are connected.
Diode is 1N4001 and the air pump was using 0.8A while working.
What did I do wrong?
Can you please advise what I could change to make this work and to be more reliable? It took me no more than 10 minutes to destroy it.
I am planning to place an optocoupler between the Arduino pin and OUT. What else could be done to protect it?

