MOSFET control with PWM

Hey there, I am struggling to control this mosfet with PWM on different settings. The mosfet I am using is an IRLZ44Z, and the range I'll be using is between 0-100V and 0-20A.
It is to put a load on a PSU but it's difficult to be accurate with different voltage values. Does anyone have an idea to solve this problem?
I thought it might be possible to calculate the values but I am not sure if it will be too much for Arduino


.

From the datasheet of the MOSFET:
VDSS = 55V
ID = 51A

So that's the wrong type of MOSFET for the voltage you're trying to switch.

I'm not sure what you mean by this. You'd have to explain in a bit more detail what you're actually trying to achieve.

In your schematic I see a 100uH inductor whose top connection is not clear (where does the righ-hand node go to?), and also something that looks like a fairly large (given the current levels you mention) shunt resistor with no clear purpose.

Btw, do you realize that 20A through 1 Ohm means a voltage drop of 20V, which will create massive problems in how you're trying to drive that MOSFET?

I'd also reconsider the 15k gate resistor; it'll dramatically reduce fast switching performance. What kind of PWM frequencies do you have in mind?

Juliyano,

please put a free-wheeling diode across your inductor, with the anode next to the MOSFET, cathode towards LOAD terminal top right (diode "arrow" pointing UP).

If you leave it the way it is, the inductor's back EMF spike when the PWM switches the MOSFET "off" will fry the MOSFET really fast.

sorry for the confusion. At the moment I am using this mosfet to test out if this setup is actually working.


I am trying to create a simulation for power supplies. So they will be in a constant load and monitored at the same time. But because there is a variety of units the voltage and amps will be changing before the simulations start.

because I am running the PWM around 21kHz-36kHz. And the coil is there so that the load will be constant. My bad the resistance what is there isn't 15k anymore it's 12k now.

wow, that's a huge coil

i'm no expert on mosfet circuits

  • is the 1 Ohm resistor needed?
  • should there be a ~10k resistor between gate and source to turn off mosfet?
  • how did you determine the gate resistor value of 15k? (see note)
  • and yes, add the flyback diode across the load

Hi,
Put the 1R load resistor in the drain circuit, NOT the source circuit.
Connect the source to the common gnd.

That way you will get proper gate to source voltage to control the load current.

Tom... :smiley: :+1: :coffee: :australia:

Hi,
This might help, feel free to comment one and all..

Tom... :smiley: :+1: :coffee: :australia:

1 Like

image
This is for both that the Arduino won't get fried and it is for the mosfet to close completely. because if you want the mosfet to close completely you need to have less voltage on the gate side with the source side. on the n channel mosfets

I can try that because this setup was recommended to my mentor, but I can try this!

no doubt a resistor is needed. why 15k instead of 100k or 1k?

for an inductor that larger drawing 20A i think you definitely need a diode capable of passing 20A as well

we tried to max the voltage to 3.7v so there was a 12k to the gate and 15k to the ground. But it might've not been needed. but now that you ask I am not sure why it is there besides the possible Arduino frying.

I will try this out. At the moment am I trying things out, so far have I had these values from testing it on different voltages with PWM.

V pwm mA
5 100 145
10 100 280 193.1034483
15 100 408 145.7142857
20 100 512 125.4901961
25 100 613 119.7265625
30 100 723 117.9445351
5 150 290
10 150 555 191.3793103
15 150 815 146.8468468
20 150 1055 129.4478528
25 150 1250 118.4834123
30 150 1460 116.8
5 225 1100
10 225 1220 110.9090909
15 225 1370 112.295082
20 225 1515 110.5839416
25 225 1770 116.8316832
30 225 2040 115.2542373

Hi,

Have you tried a lower value gate resistor shown in the diagram in post #7?

Do you have a DMM?
Can you post your Arduino code please, using code tags?
What model Arduino are you using?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

I am using an Arduinomega2560. And I am directly controlling the PWM with a screen.(4D systems to be exact gen4-uLCD-50D) so it's from 0 to 255 PWM by hand for now because I need to figure out the amp difference in voltages.


but can you tell me what de difference would make?

Between what 2 nodes is "V" measured?
Also, at your stated goal of 20A, your 1 ohm / 10W resistor will be dissipating 400W.

because it is PWM with a high frequency the mosfet will be turned of and off real quick. so it doesn't get that hot. but I have a heatsink on it for now. because I am still in a "test phase" you can say.

Hi,

That circuit is the basic way you control a MOSFET with PWM and low side switching.
R1 == 470R will current limit the gate current under high frequency PWM signals.
R2 == 10K will ensure while the 2560 is offline or booting that the MOSFET is OFF.
The load has to be in the Drain circuit because the MOSFET is controlled by a positive voltage on the gate with respect to the Source.
The source has to be at gnd, because your PWM signal from the 2560 is a voltage signal with respect to its gnd.

Have you got an oscilloscope?

"Here endeth the lesson..."

Tom.... :coffee: :coffee: :coffee: :coffee: :coffee::coffee: :australia:

1 Like

Yes, I have an oscilloscope next to me right now. I will test out your setup!

At 50% duty cycle (digitalWrite(127)) and 20A peak, your 1 ohm / 10W resistor will be dissipating 200W. That's regardless of PWM frequency.

still curious about the need for the 1 Ohm resistor.

the mosfet on resistance is 13.5 mOhm

current is determined by the PWM duty cycle. if it draws 20A when fully on, 50% duty cycle mean 10A, 25% 5A

You still haven't answered the question from Post 14. Between what two points are you measuring "V"?

Also, what is the 4th (unlabeled) column in that table?