Problems with mosfet

Thread Starter

jakethehusky

Joined Mar 24, 2016
22
Hey

I was working on a little project to control rgb leds with an Arduino, however it can't work directly with the Arduino (to high current) so I asked my local electronic shop for some mosfets that would do the job.

However I am unable to get it working.

On the mosfet itself it has 3 lines of text,
IRLZ44N
I*R P513P
WA9Y

But the bill says IRFZ44N N-Ch 55. Did they gave me the wrong ones ?

To test it I used a simple circuit, The arduino's digital output connected with the gate of the mosfet, the drain to the positive side of my DC power supply unit and the source to a led that is than connected to the ground of my DC power supply.

Like this the led stays on, no matter what I do,

EDIT: I have already tried reversing drain and source, same result
 

kubeek

Joined Sep 20, 2005
5,794
Probably, but those two are so close that I wouldn´t worry.
As for your problem, it is an N channel fet, so you would want your LED and the resistor connected between +V and drain, and the source connected to gnd.
 

jpanhalt

Joined Jan 18, 2008
11,087
To test it I used a simple circuit, The arduino's digital output connected with the gate of the mosfet, the drain to the positive side of my DC power supply unit and the source to a led that is than connected to the ground of my DC power supply.
Therein lies most of your problem. The LED should be connected to the positive supply, the cathode (negative) side of the LED should go to the mosfet drain, and the mosfet source should go to ground.

You should also the the "L" version, which take less voltage to turn it on. The L version will turn on quite well at just 3 volts gate-source. It is fully characterized at 4 volts.

John
 

Thread Starter

jakethehusky

Joined Mar 24, 2016
22
Therein lies most of your problem. The LED should be connected to the positive supply, the cathode (negative) side of the LED should go to the mosfet drain, and the mosfet source should go to ground.

You should also the the "L" version, which take less voltage to turn it on. The L version will turn on quite well at just 3 volts gate-source. It is fully characterized at 4 volts.

John
Well I have changed my test a little, I connected my pwm pin from my Arduino to the gate. The led is connected to the drain and to the positive side and the source is connected to the negative side.

When I connect the positive side and the negative side to the +5V and GND from the Arduino it works. but when I connect the positive and negative to my DC power supply unit it just stays on.
 

jpanhalt

Joined Jan 18, 2008
11,087
The arduino and power supply must have a common ground. That is, the ground of the power supply and arduino must be connected together.

And yes, a schematic always helps to avoid confusion.

John
 

jpanhalt

Joined Jan 18, 2008
11,087
This is the sentence I focused on.
When I connect the positive side and the negative side to the +5V and GND from the Arduino it works. but when I connect the positive and negative to my DC power supply unit it just stays on.
The fact that it works with the arduino supply is strongly suggestive that the pin assignments are correct. Nowhere does the TS mention connecting the two negative (common) rails.

John
 

ian field

Joined Oct 27, 2012
6,536
Hey

I was working on a little project to control rgb leds with an Arduino, however it can't work directly with the Arduino (to high current) so I asked my local electronic shop for some mosfets that would do the job.

However I am unable to get it working.

On the mosfet itself it has 3 lines of text,
IRLZ44N
I*R P513P
WA9Y

But the bill says IRFZ44N N-Ch 55. Did they gave me the wrong ones ?

To test it I used a simple circuit, The arduino's digital output connected with the gate of the mosfet, the drain to the positive side of my DC power supply unit and the source to a led that is than connected to the ground of my DC power supply.

Like this the led stays on, no matter what I do,

EDIT: I have already tried reversing drain and source, same result
Reversing source and drain would forward bias the parasitic "body diode".

An unconnected gate has capacitance that can store a static charge that keeps it switched on.

In theory; MOSFETs can be damaged by static charges - but I've only had a small number of failures, YMMV.
 

Thread Starter

jakethehusky

Joined Mar 24, 2016
22
Thanks for all the help guys, connecting the ground of my Arduino to the ground of the DC power supply fixed my problem. Even though it works here is a schematic : 935086293b50cbb5ad60870183671e85.png
 

jpanhalt

Joined Jan 18, 2008
11,087
Hi Jake,

Glad it worked for you. Now for some details to consider. If you are really using just 3V instead of 4.5 to 5V, the non-L mosfet might get warm.

Second, you need to consider what happens when voltage is first applied. I am only familiar with PIC's, not arduino, so these comments may not apply to you. Check the state of the pin (datasheet) when power is applied. With PIC's, it is unknown, and they are default analog inputs. I put a turn-off resistor from the gate to ground to insure the mosfet stays off until I turn it on. Also,the gate of a mosfet acts like a capacitor. If it is discharged (i.e., off) the initial inrush of current may be more than is desired for the arduino driver. Of course, that burst is short and may not cause damage; however, I usually put a current limiting resistor between the gate and the driving pin. Here is a typical circuit I use:

upload_2016-3-29_6-52-37.png

R2 is the turn-off resistor and R1 is the current limiting resistor. R1 is 200 Ω, which limits current at 5 V to about 25 mA . Of course, it slows down the mosfet turn on, but that should not be a problem in your application. As they say, these details are offered with an overabundance of caution. Component values are not critical.

John
 

Thread Starter

jakethehusky

Joined Mar 24, 2016
22
Hi Jake,

Glad it worked for you. Now for some details to consider. If you are really using just 3V instead of 4.5 to 5V, the non-L mosfet might get warm.

Second, you need to consider what happens when voltage is first applied. I am only familiar with PIC's, not arduino, so these comments may not apply to you. Check the state of the pin (datasheet) when power is applied. With PIC's, it is unknown, and they are default analog inputs. I put a turn-off resistor from the gate to ground to insure the mosfet stays off until I turn it on. Also,the gate of a mosfet acts like a capacitor. If it is discharged (i.e., off) the initial inrush of current may be more than is desired for the arduino driver. Of course, that burst is short and may not cause damage; however, I usually put a current limiting resistor between the gate and the driving pin. Here is a typical circuit I use:

View attachment 103323

R2 is the turn-off resistor and R1 is the current limiting resistor. R1 is 200 Ω, which limits current at 5 V to about 25 mA . Of course, it slows down the mosfet turn on, but that should not be a problem in your application. As they say, these details are offered with an overabundance of caution. Component values are not critical.

John
I'll probably put in some pull down resistors, but I will be using it for controlling an rgb led strip, so that's why I need mosfets. But thanks everyone for the great help !
 
Top