Electronic – Triggering a MOSFET causes the ESP32 to reboot

esp32mosfet

I have an IRLZ44N MOSFET gate connected to a ESP32 Dev board IO pin. When I drive the IO pin high, it will put the ESP32 into a reboot cycle, rebooting each time the MOSFET is triggered high.

This happens when I have a 47k pull down on the gate (or no pull down) and also when using any series resistor, 100-390 Ohms between the IO and the gate.

The drain is connected to a hacked 12V piezoelectric humidifier mister, which pulls about 200mA. Previously I was using an NPN transistor, at one point I noticed it was getting very hot (anomalously). Also when the gate is floating, sometimes it will allow current through the drain. Also sometimes the loads may be disconnected, could this damage the MOSFET potentially?

enter image description here

Best Answer

Using PWM on the output pin to gradually bring the power up did solve the issue, I in turn used a 22uF cap on the gate to perform the same action, with success. Initially a 4.7uF cap solved this issue, although when another load (separate to the schematic) was connected, this also failed. Using a 22uF cap did in turn solve the issue. As Chris Stratton pointed out in the comments this is a brown out issue, which does make things simpler to understand in my head. I have a 12v 2A PSU connected to this device, it makes sense that there is a power spike when the mister circuit is turned on. I have left my cap on the the gate of the FET. This is working, although I am not sure as to whether this is ideal.