Arduino board pin triger Power MOSFET Problem

Hi,these days I encountered a strange circuit problem.
I use a mcu pin to triger a Power MOSFET,schematic as following picture LOAD1,
the mcu pin was programmed OUTPUT HIGH,so to open the drain and source of the N type MOSFET,then power the 5V load.That is what I want.
But,actually,the board will be reset always untill I take off the 1k resistor that connect GND.
I measured the Vgs, it is always zero when connect the load(in reset status),but if not connect load,the board pin is HIGH as programmed,and the board is not in reset status.
I tried 3 different Power MOSFETs, and I isolate the mosfets from PCB board to test,same problem.(IRLML2402 AO3400 IRLML0030)
Another problem makes me puzzle more.In my circuit,I have two 12V load(as following picture LOAD2&LOAD3


),I use the same MOSFET,the same 1k resistor connect GND,but they did not show the problem, they can work.
So puzzled,help me.
Thanks.

LOAD1 is a laser-based particle detect sensor,LOAD2 is DC Motor ,LOAD3 is 4 infrared diodes in series.

And I find that the laser-based particle detect sensor won't work if the mcu triger pin have a resistor connect GND.This special module may cause the problem.

Show us a good image of your ‘actual’ wiring.

Wire cct. as seen in B2.

Is it really 1k? What if you use higher values?

Measure the current from output pin to resistor, and from GND to resistor?

Yes, I confirm the value of the resistor,I tried 10k resistor,not solved.
And I measured the current of the pin connect with Gate and 1k resistor which connect GND,without the LOAD1, when pin output HIGH,the current is about 4mA.
But if connect LOAD1,the current will be zero.because Vgs is zero.
But this pin set to OUTPUT HIGH,so the mcu reset.

I replace the particle detect sensor with a 5v LED,it just works fine.

Add the freewheel diode.

How do you power the load?

The 5v load is powered from MCU board 5v pin.

What is the load ?

The Arduino can power only light loads.

Show us a good image of your ‘actual’ wiring.

I get that point, the LOAD is a module,a particle detect sensor module,so I can not draw its circuits.
It's maximum current is less than 120mA in specification.The actual current I measured is change from 40mA~60mA.
The module is like this,HPM Series Particulate Matter Sensors | Honeywell

Try an external 5V power supply whos GND is common with the Arduino GND.


Let's see the wiring to the Arduino ?

Yes,It works with 1k resistor connect GND with an external 5v PSU.
So why? The load current is too large?But I see mega board 5v pin could output several hundreds mA.

Another question is why take off the resistor,it works?It seems the power is not the reason.

How are you powering the Arduino mega ?

Let's see the wiring to the Arduino ?


Did you set the pin controlling the MOSFET as an OUTPUT pin ?

Show us your complete sketch ?

Welcome @lean,

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

code is simple
int pinPM = 6;

void setup() {
  Serial.begin(9600);// put your setup code here, to run once:
  delay(5000);
  pinMode(pinPM, OUTPUT);
  digitalWrite(pinPM,HIGH);
}

void loop() {
  delay(30000);// put your main code here, to run repeatedly:
  digitalWrite(pinPM,LOW);
}

wiring is simple,the following pics,first pic is the test circuit,in 2nd pic when connect a 5v LED,test the Vgs=5v,works fine,in 3rd pic when connect the module,test the Vgs=0v,not work.
Whatever Megao or UNO,same phenomenon.

Sure, the problem has been solved,take off the resistor or use external PSU.
But why ?What happened in MCU?

Are you using the correct transistor leads ?

image

It is always a good idea to power external devices from their own source.

Having said that, the part about it not working only if the resistor is not connected is odd. You said you had tried different resistors and mosfets.
Seems like something is shorting out the power to the MCU, causing it to go into reset. So, an oscilloscope to probe the MCU Vin pin and the gate pin simultaneously may help.
Could the breadboard be the problem? Try a different one.