I am monitoring two systems simultaneously, and in one of them, the MOSFET became extremely hot and stopped working; in the other, it was under stress and caused voltage spikes on the drain, which I believe would have eventually burned it out if I had continued using it. Here is a photo of my circuit: the right side with resistors is connected to piezoelectric sensors, while the left side (connected to the analog pins on the Teensy) controls a fan. My system is designed to detect epileptic seizures, which are picked up by piezoelectric sensors placed at the base of a cage. Using code written in Teensyduino, when the signal detected by the piezoelectric sensors exceeds a threshold (325 on Teensyduino), the fan turns on and remains active for 60 seconds. The value from the piezoelectric sensors remains stable around 294 (I read this from the Serial Monitor in Teensyduino).
In particular. the mosfet is connected as follow: GATE= connected to pin 3 of the teensy (digital one); drain = connected to the ground of the fan; source = connected to the ground of the teensy and to the ground of a 12V adaptor (used to give power to the fan). The positive of the fan is soldered to the positive of the 12V adaptor. The fan is 12V, mosfet is IRLB8721 60A-30V, the adptor is 12V adapator. As you can see in the picture I added a 10k pull down resistance between the gate and the ground.
What I’ve observed is that after prolonged data acquisition – around three hours – the piezoelectric values start to fluctuate, and the fan no longer responds to commands. It turns on and off repeatedly without exceeding the threshold, or it sometimes turns on and won’t turn off, likely because the MOSFET has burned out and, as a result, is no longer correctly controlling the fan. I have tested the system many times with shorter acquisitions, and it worked perfectly; it’s only after long hours of data collection that this issue arises. Since this is an important project, I need to resolve this urgently and would appreciate your assistance.