Low voltage when powering MOSFET over arduino

Thread Starter

Bjetr97

Joined Nov 15, 2018
6
Hi, i'm having some issues powering my MOSFET over arduino. I've tried on both an unoriginal UNO, and an original NANO; same problem on both.

Components used:
MOSFET: IRLP3034PbF
Arduino NANO/UNO
Red 5mm LED (indicator whether MOSFET is open or closed)
220 mOhm and 10kOhm resistor
MOSFET1.png For some reason, when I try to power the MOSFET with my arduino, it doesn't recieve enough voltage from the arduino.
I measured the voltage over the Digital output and ground to be 1.11 volts. 10mA flows in total, 99% of it through the resistor.
With the resistor disconnected, the voltage is 5v, and the MOSFET opens completely.
When the MOSFET opens, it appears the arduino can't sustain voltage to the LED either, giving it only 1.7V at 11mA.

When only the LED (and 220Ohm resistor) is wired to the output, the LED lights up just fine.

Does anyone know what may cause this? I'm at a loss
 

wayneh

Joined Sep 9, 2010
17,496
I speculate that your resistor isn’t really 10k. You can’t push 10mA thru 10k with just 5V.

Another possibility is that you have your pinout wrong for your MOSFET.
 

dl324

Joined Mar 30, 2015
16,844
Welcome to AAC!

A cropped schematic:
upload_2018-11-15_14-26-18.png
Measure the voltage on the gate with the digital I/O HIGH.

The LED might not be happy if you try driving it with 50mA for long. Most specify a continuous current of around 20mA.

As an FYI, the hump style of drawing went out of fashion over 50 years ago. Now we use connection dots if crossing wires connect.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

@thedoc8 , For mosfets the threshold voltage is of more importance than the maximum gate voltage.
It determines when the mosfet is going to conduct.
As the mosfet is driven by a Arduino Nano, wich works on 5 Volts, you want a low threshold version of the mosfet.

Bertus
 

thedoc8

Joined Nov 28, 2012
162
Hello,

@thedoc8 , For mosfets the threshold voltage is of more importance than the maximum gate voltage.
It determines when the mosfet is going to conduct.
As the mosfet is driven by a Arduino Nano, wich works on 5 Volts, you want a low threshold version of the mosfet.

Bertus
Got it, so does one need max vgs to fully close the fet..? Is it fully closed at the low threshold for this device. Thanks
 

dl324

Joined Mar 30, 2015
16,844
Got it, so does one need max vgs to fully close the fet..? Is it fully closed at the low threshold for this device.
Vgs(th) is when the device just starts conducting. For lower RDSon, you need Vgs to be higher. The curves should be in the datasheet (this is for a P channel MOSFET):
upload_2018-11-17_7-35-24.png
upload_2018-11-17_7-35-46.png
upload_2018-11-17_7-36-15.png
 

Audioguru

Joined Dec 20, 2007
11,248
The curves in a datasheet are for a "typical" one that you cannot buy, you get whatever they have which might be minimum or maximum.
The datasheet for your Mosfet shows that it s maximum allowed gate-source voltage is 20V that is not needed since it shows that all of them turn on very well with 4.5V to 10V.

A DOOR opens and closes, not a Mosfet. A Mosfet turns on and turns off.
 

ian field

Joined Oct 27, 2012
6,536
Gate voltage is what...? Spec sheet says VGS 20volts if it is the correct spec sheet.
That's the Abs max rating - regular power MOSFETs usually need VGSthr around 6 - 8V. logic level types were originally developed for TTL thresholds, but should work with most MOS processors. Probably cutting it fine with 3.3V stuff though.

MOSFETs salvaged from the local regulators on an old PC motherboard usually come in somewhere around 1.5V.
 

Thread Starter

Bjetr97

Joined Nov 15, 2018
6
Welcome to AAC!

A cropped schematic:
View attachment 163886
Measure the voltage on the gate with the digital I/O HIGH.

The LED might not be happy if you try driving it with 50mA for long. Most specify a continuous current of around 20mA.

As an FYI, the hump style of drawing went out of fashion over 50 years ago. Now we use connection dots if crossing wires connect.
Drew that schematic a bit too quick, the LED is driven with one of the I/O.

Upon some further testing i noticed that if I used the arduinos' 5v pin to drive the MOSFET (and LED), the mosfet opens, and the LED is lighting at full brightness... (13mA measured)
The LED should only be drawing 13ish mA at 5v, but it only gets 1.7v, drawing a whopping 0.9mA

With the 10KOhm resistor connected, the I/O voltage to ground is 1.03V (at 0.013mA).
With the 10KOhm resistor disconnected, the I/O voltage to ground is 5V (with a current I can't measure, meaning less than 0.001mA)

New, bigger, and upgraded schematic below for your viewing pleasure (still with humps)
MOSFET1.1.png
 

Thread Starter

Bjetr97

Joined Nov 15, 2018
6
I speculate that your resistor isn’t really 10k. You can’t push 10mA thru 10k with just 5V.

Another possibility is that you have your pinout wrong for your MOSFET.
I read the results wrong, it was 0.10mA, not 10mA
I am 99.9% sure the correct I/O pin is used.

I just can't understand why the I/O is not "able" to keep the voltage up, considering the low amperage? digitalWrite should give 5v, and I've confirmed it does, but can't seem to keep it there with any load whatsoever...

The NANO is genuine and brand new, so any destroyed pin should be unlikely..

EDIT: The pins on the mosfet should be correctly wired. Works fine with the 5v output on the arduino.
 

wayneh

Joined Sep 9, 2010
17,496
I read the results wrong, it was 0.10mA, not 10mA
I am 99.9% sure the correct I/O pin is used.

I just can't understand why the I/O is not "able" to keep the voltage up, considering the low amperage? digitalWrite should give 5v, and I've confirmed it does, but can't seem to keep it there with any load whatsoever...

The NANO is genuine and brand new, so any destroyed pin should be unlikely..

EDIT: The pins on the mosfet should be correctly wired. Works fine with the 5v output on the arduino.
So if I understand you correctly:
1) If you trigger your MOSFET by applying a genuine 5V to the gate, that part of the circuit works fine - the LED lights up.
2) The measured output voltage of the Arduino is 5V as long as the 10K resistor load is not there.
3) Adding the resistor pulls the output down and the MOSFET is no longer fully on.
Have you tried just not using the resistor? If the Arduino can sink a tiny current at that pin, meaning it really goes to 0V and not "open", you don't really need the resistor. It's good form to have it there, since it will turn the MOSFET off if the Arduino output goes open, but your circuit should work without it, at least for testing.

I'm surprised the Nano can't drive a 10K load, but I'm not familiar with the specs. Maybe try a 100K or even 1MΩ.
 

Thread Starter

Bjetr97

Joined Nov 15, 2018
6
So if I understand you correctly:
1) If you trigger your MOSFET by applying a genuine 5V to the gate, that part of the circuit works fine - the LED lights up.
2) The measured output voltage of the Arduino is 5V as long as the 10K resistor load is not there.
3) Adding the resistor pulls the output down and the MOSFET is no longer fully on.
Have you tried just not using the resistor? If the Arduino can sink a tiny current at that pin, meaning it really goes to 0V and not "open", you don't really need the resistor. It's good form to have it there, since it will turn the MOSFET off if the Arduino output goes open, but your circuit should work without it, at least for testing.

I'm surprised the Nano can't drive a 10K load, but I'm not familiar with the specs. Maybe try a 100K or even 1MΩ.
The pin isn't able to drive the LED either(even with the mosfet completely on), so I'm guessing maybe the arduino is dysfunctional? The pure (true?) 5v supply from the arduino is able to power both these at the same time.
Thing is, i'm getting this problem with both arduinos', so I'm guessing the error is on my part, but can't figure out why.

On the schematics I can find on the internet, they use 1KOhm resistors, and insist on this working fine. And without the resistor, the mosfet won't turn off, since nothing is pulling it down. With 10ish mA draw, the digital I/O should be able to do this just fine?

interesting enough; if i touch the 5v output and the gate on the mosfet at the same time, it turns on, same applies while touching ground.
 

wayneh

Joined Sep 9, 2010
17,496
The pin isn't able to drive the LED either(even with the mosfet completely on), so I'm guessing maybe the arduino is dysfunctional?
OK, well an LED needs about 5mA to get bright and for some reason you're not getting that much current from your digital output pins. How certain are you that the 12V supply is staying at 12V while all this is happening? Better check it. Also, see how badly the digital output sags under the load of the LED.
The pure (true?) 5v supply from the arduino is able to power both these at the same time.
That is suspicious and points to a problem with the digital output pins.
On the schematics I can find on the internet, they use 1KOhm resistors, and insist on this working fine.
They should, since that would be a 5mA load and well within the specs.
And without the resistor, the mosfet won't turn off, since nothing is pulling it down.
Are you sure of that? The digital output pin at 0V should pull the MOSFET gate to 0V also.
interesting enough; if i touch the 5v output and the gate on the mosfet at the same time, it turns on, same applies while touching ground.
Huh? The first part makes sense, that getting the gate to 5V will turn on the MOSFET. Even the impedance of your body should be enough to make that happen. (It's dangerous for the MOSFET, to leave its gate "open" though, when you're NOT touching it.) But are you saying the MOSFET turns on while you're touching ground, and then touch the gate? Your body may be picking up enough EM interference to make that happen I suppose.
 

Thread Starter

Bjetr97

Joined Nov 15, 2018
6
OK, well an LED needs about 5mA to get bright and for some reason you're not getting that much current from your digital output pins. How certain are you that the 12V supply is staying at 12V while all this is happening? Better check it. Also, see how badly the digital output sags under the load of the LED.
That is suspicious and points to a problem with the digital output pins.
They should, since that would be a 5mA load and well within the specs.
Are you sure of that? The digital output pin at 0V should pull the MOSFET gate to 0V also.
Huh? The first part makes sense, that getting the gate to 5V will turn on the MOSFET. Even the impedance of your body should be enough to make that happen. (It's dangerous for the MOSFET, to leave its gate "open" though, when you're NOT touching it.) But are you saying the MOSFET turns on while you're touching ground, and then touch the gate? Your body may be picking up enough EM interference to make that happen I suppose.
My bad, it turned off when i touched ground and the gate at the same time.

Just realized I never specified the pin was an output, in the code. For some odd reason the gate is still able to turn "on", but is not able to sustain any current, when left unspecified (or rather; left as a high-impedance input).

Once I specified the pin as an output, the mosfet is able to turn on, and the LED is bright.
 

Thread Starter

Bjetr97

Joined Nov 15, 2018
6

SOLUTION:


For those who might have the same issue and/or symptoms, check whether you have specified the I/O (pin) as OUTPUT.
 

dl324

Joined Mar 30, 2015
16,844
SOLUTION:

For those who might have the same issue and/or symptoms, check whether you have specified the I/O (pin) as OUTPUT.
Glad you figured out what the problem was. It probably would have taken a while for us to get to something so obvious.
 
Top