Electronic – Drive a 20A load (12V) with an MCU at 3.3V

esp32high-currentmosfet

I need to switch on/off a cooler system that draws 20A at 12V using an ESP32 GPIO pin.

The ESP32 GPIO pins work at 3.3V logic with maximum 40mA of current.

Do you have a simple and safe solution to solve this problem?

I thought of using a MOSFET (e.g IRL540) with a resistor of 1k between the GPIO pin and the MOSFET gate:

schematic

simulate this circuit – Schematic created using CircuitLab

Could it be a good solution?

Editing afters some comments

The cooler system is composed by three Peltier Cells that drains maximum 20A. It is attached to a power supply that transform 220AC to 12V DC – 20A max.

Diode between Drain and 12V to protect the MOSFET
I've updated the schema with the diode between drain and 12V, Can you please confirm is it mounted in the right way? Thanks

Best Answer

The choice of switch depends on your preference for size of heatsink and far more choices if you choose low Vt (threshold) logic-level SMT. and use twisted pairs for lower RF impedance and lower EMI.

If using a higher Ron , such as your choice of FET you would need a small CPU heatsink and 2W fan to cool 20W of switch losses of 1V on a proposed 12Vx20A =240W load that would only get 11V at this current and less on startup.

Consider the Switch Power loss vs contact resistance

R [mΩ] . . . . Pd [W] @ 20A . . . Type . . . . . Heat
78 . . . . . . . . 31 . . . . . . . . . . . . IRL540 . . . fail
8 . . . . . . . . . . 3.2 . . . . . . . . . . many SMT . . . needs >=5W heatsink 1 THT part $18
400µOhm . . . 160 mW . . . . . . SIR178DP-T1-RE3 $2.46 . . . needs SMT DIY soldering /w Cu area.enter image description here

Last option probably would need heavy traces or wire to large terminal block for welding wire to minimize cable resistance to same as switch on a small copper breadboard.

Be sure to include reverse diode from Drain to 12V because all wire has inductance and if your fridge has a pump, much more energy stored will kick back.