Only using n-channel mosfets to turn on dc motor

This is my sketch


This is my code

#define PWM 11
void setup() {
  pinMode(PWM, OUTPUT);
  digitalWrite(PWM, 1);
}

void loop() {
  analogWrite(PWM, 50);
  delay(2000);
  analogWrite(PWM, 100);
  delay(2000);
  analogWrite(PWM, 150);
  delay(2000);
  analogWrite(PWM, 200);
  delay(2000);
  analogWrite(PWM, 250);
  delay(2000);
  analogWrite(PWM, 0);
  delay(2000);
}

is it safe if i try irl?
because i was try without using 150r resistor and this happen

The flyback diode is oddly positioned but I doubt if that matters in a simulation. It is the same with that 150R current limiting resistor which is also not optimally positioned.
What is the specification of that motor in Proteus ?

You need a "logic level" MOSFET that can be turned fully-on with 5V (Vgs).

What is the specification of that motor in Proteus

is IRLZ44N logic level MOSFETS?

The IRLZ44 is not what I would call a "logic level" MOSFET, but it will work fine with 5V Arduinos and medium current (up to 10A) motors. You always need to look at the data sheet, for example at this plot from the IRLZ44 data sheet:

Hi,
This would be better, flyback diode across the motor, the MOSFET already has one internally.

Tom.. :grinning: :+1: :coffee: :australia:

With your gate voltage being critical place R1 on the other Side of R2, it is acting as a voltage divider. I am assuming the 10K is to guarantee the state of the MOSFET truing setup etc. until your code gains control.

Hi,
As @gilshultz has pointed out, move the 10K.

Tom.. :grinning: :+1: :coffee: :australia:

1 Like

Edit. I took another look and I had R1 and R2 backwards. Usually the first component is 1 but you have it the other way around.

R1 limits the amount of current drawn from the IO pin when activating the transistor. At 5v that would be about 33mA here. Without R1 it could potentially draw enough to damage the IO pin. Once saturated, the transistor could stay energized from internal capacitance so a path to ground is needed to bleed that charge.

Unless it's for a high frequency signal, the off time trailing isn't a huge issue here. I'd actually go higher on the resistance values. Maybe an R1 of 1k and R2 of 1meg depending on the transistor specs. @jremington would probably be better to comment on specific values though.

FYI

Always check Vds to confirm it is fully turning on.

R1 limits the amount of current drawn from the IO pin when activating the transistor.

is that your mean if i remove R1?
image

Edit. I took another look and I had R1 and R2 backwards. Usually the first component is 1 but you have it the other way around.

I'm referring to your original setup of R1 and R2

Wire your setup according to the diagram in post #9.

What transistor? I see a MOSFET that draws current when the gate is being turned on or off to charge/discharge the capacitance, Miller being one of them. Once on or off it will not draw any current other them maybe pico amps because of leakage. The schematic in 9 is correct. The 10K R1 is there to determine the state of the output pin while being reset until your code sets it up. R2 helps prevent oscillation, I prefer 50 Ohms but higher will work, just slows the turn on/off which will cause the MOSFET to dissipate more power. In this case it does not matter. The processor has a rating to allow for capacitive loads where this should not exceed that rating even if connected direct to the gate.

A MOSFET IS a transistor.

1 Like

The IRL Z44N is in fact a logic level gate drive mosfet. I know, I am using one myself to drive a 12v automotive relay. I have left it in test mode switching the relay on and off every 5 seconds for 4 hours without fault.

IRL Z44N Datasheet

Very First Line on the Datasheet:

  • Logic Level Gate Drive

Confused on how your claiming this is not a "Logic Level" MOSFET?
You also claim its only good for 10A motors when it is rated for a continuous drain of up to 47A and a pulsed drain of 160A

Perhaps we are looking at 2 different IRL Z44N Mosfets??






IRFZ44N and IRLZ44N, different animals.

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

2 Likes

OOF! :person_facepalming:

The Devil is always in the details.

Yes, with high enough gate drive, not 3 V provided by a microprocessor output.

You need to study the data sheet drain current versus Vgs curve, at port output voltages, in order to understand my points.

The IRLZ44N is not a good choice for microprocessor circuits.