I'm developing an automation board and want the facility to PWM dim a strip of LEDs up to 5-10 amps @12 V.
These are plain 2 wire LED strips, positive and negative, nothing special.
My esp32 will be powered via a buck converter from a variable input and I will also have a regulator to level out the 12 V supply.
I have seen projects using the TIP120 for this but I'm not too comfortable with it being at max capacity so I'm leaning toward a MOSFET. Any suggestions on the best way to power the MOSFET through PWM with 3.3 V logic?
Best Answer
I suggest using a N-channel MOSFET, connected between GND and the "-" of the LED.
There are 3 things to check when choosing the N-channel MOSFET :
simulate this circuit – Schematic created using CircuitLab
Note that you will need the R1 resistor to limit current in your LEDs (excepted if they are already "12V LEDs", in which case they have it probably already included).
Optionnaly, you might want to add a resistor (something like 10k) between gate (ie the pin of the mosfet connected to PWM) and ground to make sure the mosfet is turned off when the esp32 is off (or resseting).
If you choose a really huge N-channel MOSFET, you might need to add a resistor in series between PWM and the gate to limit the current when switching the mosfet (huge N-mos have non negligible capacitance between gate and ground), but it you can avoid it, it's best (adding it makes the mosfet switching slower, therefore increasing the heat produced in it)