Go Down

Topic: Arduino with IRL540N not working (Read 572 times) previous topic - next topic

SlonCHL

May 18, 2017, 06:21 pm Last Edit: May 23, 2017, 07:37 am by SlonCHL
I'm trying to control a 3V-6V, 1.3A(stall current) motor with that MOSFET but it's not spinning. I'm using 4xAA(6.25V) batteries. The datasheet I'm referring to is http://www.vishay.com/docs/91300/91300.pdf

I have everything hooked up as below:
- MOSFET gate to 150ohm resistor to digital pin 3
- MOSFET drain to motor
- MOSFET source to battery ground and arduino ground
- Other end of the motor to batteries

I output a PWM value of 142(multimeter says 2.83V) to the MOSFET gate. Based on the datasheet it should provide the motor with enough voltage and current but the motor is not getting any voltage, sometimes it goes to 0.03V but I think that's from the arduino pin.

I have also tried to:
- supply the gate with 5V
- swap the drain and source connections
- used the MOSFET at the high side
but it still doesn't work

Also, the motor works when it's connected directly to the batteries.

MarkT

Its n-channel, should be low-side with source grounded.

Assuming you've got the pin-out right, it sounds like a dead MOSFET.  Remember power MOSFETs are
static sensitive, this one in particular has a +/-10V absolute maximum gate/source voltage rating - exceeed
that and the gate oxide will blow and ruin the device.

Take proper anti-static precautions with MOSFETs, most have no protection zeners.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SlonCHL

Its n-channel, should be low-side with source grounded.

Assuming you've got the pin-out right, it sounds like a dead MOSFET.  Remember power MOSFETs are
static sensitive, this one in particular has a +/-10V absolute maximum gate/source voltage rating - exceeed
that and the gate oxide will blow and ruin the device.

Take proper anti-static precautions with MOSFETs, most have no protection zeners.
According to the datasheet it's gate-drain-source from "left" to "right", I even tried with 3 other IRL540 from the pack I bought. Btw I sure I didn't exceed 10V at the gate since none of my power supply are that high voltage

Maybe it's really a pack of dead MOSFET

MarkT

The danger to the gate oxide is from static, not the supply.  Handling precautions are needed.   Never
do electronics in a room with a nylon carpet!   Did your devices come in anti-static packaging?  If not
that's why they don't work.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SlonCHL

The danger to the gate oxide is from static, not the supply.  Handling precautions are needed.   Never
do electronics in a room with a nylon carpet!   Did your devices come in anti-static packaging?  If not
that's why they don't work.
I don't think it came in any anti static packing but it did came wrapped in bubble wraps. Tbh I haven't come across any post about dead MOSFET due to static, is there really a high chance my MOSFET is dead because of it?

manufwi

Yes it is very easy, just touch them without having touched ground on a dry day with different fabrics on you and pouf ;-)
You can test them easily though: 5v to gate, source to ground 5v to led and 500 resistor to drain should light on the led then ground the gate, should switch it off.
Bye
Manu

TomGeorge

#6
May 22, 2017, 05:07 am Last Edit: May 22, 2017, 05:13 am by TomGeorge
Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Also a picture of your project so we can see your component layout.

Have you checked the value of your 150R resisitor?

Can you post your code?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

SlonCHL

#7
May 23, 2017, 09:41 am Last Edit: May 23, 2017, 09:49 am by SlonCHL
Yes it is very easy, just touch them without having touched ground on a dry day with different fabrics on you and pouf ;-)
You can test them easily though: 5v to gate, source to ground 5v to led and 500 resistor to drain should light on the led then ground the gate, should switch it off.
Bye
Manu
I would try that but I think there's something else going on with my mosfet(more info below)

Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Also a picture of your project so we can see your component layout.

Have you checked the value of your 150R resisitor?

Can you post your code?

Thanks.. Tom... :)
Circuit design:


Project:








Code:
Code: [Select]
void setup()
{
  pinMode(5, OUTPUT);

}

void loop()
{
  analogWrite(5, 153);
}


And I have confirm that with PWM value of 153, the D5 pin is giving about 3.04V. Also yes, my resistor value is around 148.8 ohms

> New weird behaviour of the mosfet:
With the circuit configuration above but without plugging in the arduino ground and a little initial push at the motor shaft, my motor spins. The voltage across the motor is about 1.7V-1.8V(which I think explains why it needs a little initial push to start spinning).
With that ground left unplugged, I unplug the wire from D5 and my motor spins slightly faster(voltage across motor is about 2V). If I connect that unplugged D5 wire to ground, my motor decreases speed very very slowly(more than 30 seconds) until the motor voltage reaches 0

Other than that, I realise that, with or without the arduino ground connected, when I put an ammeter between the resistor and the gate like this:


It reads 0 amps
But when I connect the resistor to ground and put the ammeter between it like this:


It reads 15.3mA

That means the the gate isn't drawing any current at any time right? How's that possible if I can manipulate the motor voltage with the wire to D5?

TomGeorge

#8
May 23, 2017, 10:39 am Last Edit: May 23, 2017, 11:22 am by TomGeorge
Hi,
Your circuit diagram should be like this, you have gate drain and source correct on your protoboard.


The 10k makes sure that if the gate is not connected it will be kept at source potential.
google      MOSFET tutorial

You will find that the MOSFET has high impedance gate.
If you analogWrite 255 what happens?
Where did you get the IRL540 MOSFETs.

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running....

MarkT

I would say MOSFETs have a very _low_ impedance gate - but high DC resistance - ie they are large
capacitive loads that need a fair bit of current to switch rapidly - typically 500pF to 20nF for big discrete
power MOSFETs.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

TomGeorge

Hi,
I would say MOSFETs have a very _low_ impedance gate - but high DC resistance - ie they are large
capacitive loads that need a fair bit of current to switch rapidly - typically 500pF to 20nF for big discrete
power MOSFETs.
I stand corrected.
Tom.... :)
Its been most of the day since my last coffee.
Everything runs on smoke, let the smoke out, it stops running....

SlonCHL

#11
May 23, 2017, 12:07 pm Last Edit: May 23, 2017, 12:29 pm by SlonCHL
Hi,
Your circuit diagram should be like this, you have gate drain and source correct on your protoboard.


The 10k makes sure that if the gate is not connected it will be kept at source potential.
google      MOSFET tutorial

You will find that the MOSFET has high impedance gate.
If you analogWrite 255 what happens?
Where did you get the IRL540 MOSFETs.

Tom.... :)
I read that the 10k resistor is only for when the gate isn't wired or when the arduino pinmode isn't set but for my case it seems that the mosfet is roughly working only when the arduino ground isn't connected. Anyway I will try that later and get back to you

I did try to wire the mosfet gate with arduino 5V pin but it's still behaving the same only that more voltage is going to the motor. I got that IC online from Aliexpress.com

I would say MOSFETs have a very _low_ impedance gate - but high DC resistance - ie they are large
capacitive loads that need a fair bit of current to switch rapidly - typically 500pF to 20nF for big discrete
power MOSFETs.
Hmm which capacitance is that number referring to? According to the datasheet, IRL540N input capacitance is 2200pF, output is 560pF and reverse transfer is 140pF

MarkT

Total gate charge divided by Vgs is the useful "capacitance" really...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

MarkT

Also the diagrams above show a signal MOSFET with a substrate connection - VMOS power
devices do not have a separate substrate as its integral with the drain connection.  Power MOSFETs
do have an integral body diode which should be shown on the symbol, strictly speaking.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

manufwi

#14
May 23, 2017, 04:50 pm Last Edit: May 23, 2017, 07:11 pm by manufwi
The circuit looks OK. maybe try with a led and a resistor instead of your motor. Normally you could dim it with PWM...
Hmm and are 4x AA enough, that is less than 5v, does the mosfet conducts if Vd is more than Vg?

Go Up