# PWM rise and fall time, frequency and duty cycle setting to control voltage using a MOSFET

I'm designing a circuit to control voltage between 2.8 and 4.0 volts using a PWM and 3 DMN1019USN-13 MOSFETs in parallel (to handle the load current), the PWM square wave will be low level 0v and height level 3.0v..

The load is a resistive heater (0.2 Ohms) between the positive pole of Li-ion battery (4.2v - 40 amp nominal current) and the drain pin of the MOSFETS.

A shunt resistor of 0.01 Ohms attached between source pin of MOSFETS and the negative pole of the battery to estimate the current.

Question How much rise and fall time, frequency, duty cycle setting to be used with this MOSFET, the idea is that I cannot determine these factors from datasheet and need help to get a full knowledge in this field..

Below is the datasheet for reference.

DMN1019USN-13

• How exactly does your heater look like? And what are you trying to heat? – Harry Svensson Feb 19 '18 at 8:17
• Hi again Harry, heater is a coil of tungsten (diameter around 5mm) wrapped around a steel tube, the device is a portable fuel analysis system to study its vapour characteristics and finally to determine its quality. – Mohamed Sayed Feb 19 '18 at 8:25
• The goal is to control the temperature of the heater (by temp over resistance equation) to analyze the fuel characteristics at various ignition temperatures, and its not possible to just put a temp sensor on the steel tube.. – Mohamed Sayed Feb 19 '18 at 8:31

This answer will be related to this one and this one. So rather than diving deep into the abyss, I'll more or less present the information because the person asking has proven himself/herself/itself to know what s/he/it is doing.

Here's the important data from the datasheet

• $t_{D(ON)} = 7.6\text{ ns}$ = delay when turning on.
• $t_{D(OFF)} = 22.2\text{ ns}$ = delay when turning off.
• $t_r = 57.6\text{ ns}$ = rise time for output to go from 10% of VDD to 90% of VDD.
• $t_f = 16.8\text{ ns}$ = fall time for output to go from 90% of VDD to 10% of VDD.

If you would ignore the delays and only focus on the rise and fall time, then the maximum PWM you can use is $\frac{10^9}{57.6+16.8}\approx13 \text{ MHz}$. So if you would use the PWM at this frequency you would get triangle waves at the output => definitely not wanted. These transitions are when the MOSFET conducts a lot of current and has a lot of voltage across them => a lot of power.

So a good rule of thumb, in my opinion, is that the transitions should only occur about 1% of the total time. The less the percentage, the lower the frequency and the higher the efficiency will be.

So the maximum PWM frequency I would go for would be $\frac{t_r+t_f}{T}=\frac{1}{100}\rightarrow T = 100(t_r+t_f)=7.44\text{ µs}$.

$\frac{1}{7.44\text{ µs}}=134 kHz$, this is a reasonable max frequency.

The delays won't really affect the switching frequency, they will just skew the PWM in time, which you won't really care about. There are some other delays however, the gate of the MOSFET has a capacitance (not an actual component that you can remove, it's a part of the MOSFET, like your belly button is a part of you). When you are making the gate go high and low, then you are charging/discharging this parasitic capacitor, so this means that the rise time and fall time will be slower because you will be charging/discharging the gate with an MCU that can source and drain like 20-40 mA. So in reality you might want to use 100 kHz instead as your maximum switching frequency. Also the gate resistance will make it even slower, but it will remove the ringing, the price for low/no ringing is slower transition times. And it is a good price to pay. Well worth it. If you want to actually drive it in higher frequencies, like 130 kHz or maybe even 250 kHz, then you will need a MOSFET driver chip.

Either way, so we know that 100 kHz is, in my opinion, the maximum switching frequency. What about the lowest?

"heater is a coil of tungsten (diameter around 5mm) wrapped around a steel tube", this has some mass, I don't know what exactly, but 5 mm is pretty small. I am fairly certain that you can drive things fairly correctly with just 50 Hz PWM. If your heating element had been connected to a lot of thermal mass and used for something less important, then 1 Hz PWM would've sufficed.

But if I were you I would just go as high as high as the MCU will allow, and under 100 kHz and call it a day.

"I'm designing a circuit to control voltage between 2.8 and 4.0 volts using a PWM", are you talking about the average voltage of the PWM? => you will use a duty cycle of $\frac{2.8}{4.2}=66\%$ to $\frac{4.0}{4.2}=95\%$, if you are, then nothing is weird. Everything is good.

"The load is a resistive heater (0.2 Ohms) between the positive pole of Li-ion battery (4.2v - 40 amp nominal current)", wasn't it 20 amp nominal current?

I presume that your schematic looks something like this right now. Put your mouse over the graph's and look at what elements that light up. The two graph's on the left indicate (in green) the voltage across the elements they are connected to. The right graph (white) indicate the power across the heater. Have a look at the average power across the heater.

"I was taking about the voltage that pass through the heater that will alert its heating temperature.", hmm, I'm still not following, but maybe that doesn't matter. I think I probably don't need to understand it either.

• (1) "I'm designing a circuit to control voltage between 2.8 and 4.0 volts using a PWM", I was taking about the voltage that pass through the heater that will alert its heating temperature. (2) It's the nominal safe current out of the battery (as we calculated the system of the heater+shunt resistor+mosfets will consume around 19 amp, these 40 amps are related to the battery for safe usage).. I'll carefully read your two answers that you mentioned and your reply here, going to do some searches and will get back if things not clear for me .. – Mohamed Sayed Feb 19 '18 at 9:26
• "if I were you I would just go as high as high as the MCU will allow, and under 100 kHz" - I would go for the lowest frequency that doesn't cause significant variation in temperature during the PWM cycle, to minimize switching losses and the effects of inductance and capacitance. Measure heater voltage and current (to get resistance) just before the end of the PWM pulse, where the values are most stable. – Bruce Abbott Feb 19 '18 at 10:36
• @BruceAbbott Hmmm, since it is for analyzing fuel characteristics at various ignition temperatures, I would assume that, for analytical reasons, that you want to minimize the variation => go as high as you can within bounds. - Determining what the lowest frequency is that doesn't cause "significant variation in temperature" is difficult for OP to measure because measuring the temperatyure directly is according to OP not feasible. - So if you are blind and got no cane and want to find a door, then make the door as big as you can so you can't miss it. Make the variation as low as you can. – Harry Svensson Feb 19 '18 at 11:07

You might want to have a driver circuit to have as low switching time as possible. The longer the switching time the more power is dumped in the MOSFET. The half-open state should be avoided there for. If the driver time is not a problem I would still recommend a protection resistor of about 10 ohms on the input to avoid rush currents when you turn it on.

The shunt resistor is of no use more than for debugging or for reference unless you have a capacitor afterwards which levels out the pulses since you don't want to have the half-open state.

To answer you question. It depends on how you design the above.

• I'm an aviator who likes electronics as a hobby, I'm neither an engineer nor professional at it, do you mean by switching time the period of the off stage of the square wave? And what do you mean by half-open state? I'm using a MCU to generate a programmatically controlled PWM (square wave) signal to control MOSFETs – Mohamed Sayed Feb 19 '18 at 8:50
• The off state is the low period of the square wave. The half on-state is when the MOSFET is in the state when it's not fully open or fully closed. As stated by Harry that state should be avoided and he suggested about 1% in that state. In my opinion that depends on the setup and purpose. – Johan Holtby Feb 19 '18 at 10:51
• Bruce Abbott has a good point and you should take that advice but I can't answer there in that thread since I don't have enough reputation.... :(. – Johan Holtby Feb 19 '18 at 10:55