How to control a voltage using PWM out of a microcontroller that can handle a load consumes 20 Amp current..
Load is a heating coil that has a resistance of 0.21 Ohms, power supply 4.2 v Li-Ion battery, PWM 0 / 3.3 volts ..
How to control a voltage using PWM out of a microcontroller that can handle a load consumes 20 Amp current..
Load is a heating coil that has a resistance of 0.21 Ohms, power supply 4.2 v Li-Ion battery, PWM 0 / 3.3 volts ..
I believe a simple logic level N-MOSFET will solve your problem.
Here is a schematic for driving it, assuming the heater is purely resistive. If you are going to drive a motor or something else that is inductive in the future and think that this is a good schematic for that, then you need to put a diode in parallel with your motor. Otherwise the back-emf will probably destroy your circuit.

simulate this circuit – Schematic created using CircuitLab
The 100 kΩ pull down on the gate is there so if the MCU breaks or takes too long to start up when you connect the battery, or whatever, just the MCU is non-responsive. Then the gate to the MOSFET will be drawn down to source (0 V in this case) and turn the MOSFET off.
The 10 Ω gate resistor is to reduce the ringing of the gate, the ringing quickly opens and closes the gate and messes up the output. Without the ringing it will behave as you want. Ringing is, as far as I know, not something you want.
Now you should start looking for MOSFET's that can drive 20 A, but if you only look for those that are made for 20 A, then there's no margin for error. What if the heater has 200 mΩ? That's 21 A. Your MOSFET is conducting current it's not made for, things will start to heat up and if you're unlucky, melt down. So look for a MOSFET that can safely pass 30 or even 40 A.
If you got some MOSFET's rated for 10 A, then you can use 3 or 4 of them in parallel. Just connect their drains to drains, gates to gates and sources to sources.
A heater has a slow temperature change time, so the PWM can probably go as low as 1 Hz, meaning if you want a PWM with a duty cycle of 50%, then 500 ms on and 500 ms off would most likely suffice. I can't tell for sure because I don't know how your heater looks like. But you can also safely drive the heater with 1 kHz or 10 kHz or 100 kHz PWM.
Here is a link to digikey showing some viable MOSFET's that you can put in parallel. I first looked for MOSFET's for 40 A but saw that none of them had their lowest \$R_{DS(ON)}\$ when fed 3.3 V, so I looked for all MOSFET's that were fully on at less than 3.3 V and then looked for the MOSFET's able to conduct more than 4 A.
DMN1019USN-13 is a cheap one able to conduct 9.3 A continuously if the voltage at the gate is above 2.5 V. So just get 3 of these and put in parallel like I previously described and you will be set. The \$R_{}\$ for this MOSFET is 12 mΩ, with 3 of these in parallel it will be \$\frac{12\text{ mΩ}}{3}\$ = 4 mΩ.
So if the MOSFET is conducting, then the current will be \$\frac{4.2\text{ V}}{210\text{mΩ + } 4 \text{ mΩ}} = 19.626\text{ A}\$.
The power dissipated in the heater will be
\$P=A^2R=19.626^2×210\text{mΩ}\approx80.89 \text{ W}\$
And the power dissipated in the MOSFET's will be
\$P=A^2R=19.626^2×4\text{mΩ}\approx 1.54 \text{ W}\$
And it's 3 MOSFET's, so \$\frac{1.54 \text{ W}}{3} \approx 510 \text{ mW}\$ will be dissipated per MOSFET. I think you might want a heat sink, maybe even a small fan.
Each of the MOSFET's can according to their datasheet dissipate 680 mW at room temperature. So it should be fine... The error margin is 680-510=170 mW. Maybe a little bit too close for comfort. At 75 C° they can dissipate 400 mW. So if they are near the heater they might get warmer and not able to dissipate enough heat. So you might want to add one or two transistors more (very cheap), or add a heat sink and a fan (more expensive energy wise and money wise).
With...
"Logic Level" NFET will work. To limit self heating to <1/4W (oops too much brunch wadka) how about < 2W with heatsink \$R_{on}=W/I^2=2W/20A^2 =5 mΩ \$
https://cdn-shop.adafruit.com/datasheets/irlb8721pbf.pdf
Curve says 0.2V *20A =4W typ