# Using MOSFET to control heating element using PWM and calculations

I am panning to build a soldering station and would like get myself clear about driving MOSFET to control heating element using microcontroller.

Microcontroller will be ATmega328p (Arduino Pro Mini) and MOSFET planning to use is IRLZ44N. Heating element rated 50W at 24V .

1. I am planning to use PWM frequncy around 30 kHz. Is there anything bad with this frequencey particulary for this application?

As per MOSFET datasheet.

• $t_{d(on)} = 11 ns$
• $t_r = 84 ns$
• $t_{d(off)} = 26 ns$
• $t_f = 15 ns$.

If I want to limit total ON and OFF time within 1% of a PWM cycle. Then least PWM cycle druration I can have will be ($t_{d(on)} + t_r + t_{d(off)} + t_f) \times 100 = 13600 ns$. So I can use PWM frequencey upto 73529 Hz (73 kHz) without problem. Could you please confirm my calculations are correct?

1. Is it necessary to have MOSFET driver circuit instead of driving MOSFET directly with MCU output pin for this application?

My calculation tells I can directly drive MOSFET with MCU output pin. As per the datasheet $Q_g = 48 nC$. With PWM frequencey 30 kHz, maximum current required to charge/discharge MOSFET gate will be:

$48 \times 10^{-9} / (1 / 30000) = 0.00144 A = 1.44 mA$.

(Update: My above calculation is incorrect as per @Unimportant's comment below. Without resister it would take $48/95 = 505 mA$ to charge the gate, which is undesirable for ATmega328p IO pin. So, there should be a resister or gate driver)

So, current will be well within the allowed limit (40 mA) and I think MOSFET can be directly driven by IO pin in my application. Could you please confirm my finding?

• PWM cycle duration you have mentioned is for the condition given in the datasheet. In practical total switching time will be more than you calculated. – CNA Mar 28 '18 at 6:52
• @Dhans However, it would be safe to drive it at 30KHz, isn't it? – Junaid Mar 28 '18 at 7:23
• Is there a point in driving the heating element that fast? With the heat capacity of the tip, I would think 100 Hz or even less would be plenty, and save you some switching losses. – Dampmaskin Mar 28 '18 at 8:04
• way too fast for a high-inertia system like a soldering iron. if you want good perf, it's far better to focus on PID tuning than overclocking the heater drive. – dandavis Mar 28 '18 at 9:59
• But you cannot spend the entire PWM period transitioning, so you do not have 1/30000 transition time. You want the transitions to be fast, say 300ns for 30Khz for example, that makes 48nC/300nS = 160mA. – Unimportant Mar 28 '18 at 10:42