I'm attempting to control the speed of a slot car using an Arduino and a MOSFET.
I'm new to MOSFETs, however, and while my setup works for a moment, eventually the MOSFETs (N-Channel) open up, and they no longer regulate the car's speed.
I'm using this slot car set and this MOSFET.
The wiring is like this.
The slot car controller ground and the MOSFET source are connected to the Arduino's GND. The Arduino control line is connected to the MOSFET gate and the Arduino GND through a resistor. The other line from the slot car runs to the MOSFET drain, and I put a diode over the rails of the track to prevent reverse voltage spikes.
I'm able to fluctuate the speed of the car for a while, but eventually, the MOSFET goes out and no longer works. The slot car power supply is 17V DC.
Here are some more photos: https://i.stack.imgur.com/Kt2Mp.jpg
What could be causing the MOSFET to burn out? The car flying off the tracks, maybe? Or, could it be heat? Would a heat sink attached to the MOSFET eliminate my problems? Do I have the right MOSFET?