Maker Pro
Maker Pro

Arduino restarting while controlling a mosfet with PWM.

GamingAddict

Apr 26, 2017
38
Joined
Apr 26, 2017
Messages
38
As the title says, im having an issue with my arduino restarting whenever theres a big load attached to the mosfet. The mosfet is being controlled by the D3 pin with PWM. An LED works fine, but if i want to attach my 10x1W LED array or a motor to the drain of the mosfet, the arduino just restarts.

Ill post the code when someone requests it.
 
Last edited:

turbogt16v

Mar 27, 2015
176
Joined
Mar 27, 2015
Messages
176
Your load takes to much power.
You need led driver to control led power,then you connect motor that takes more amps from that current and the mosfet dot have enough power.you need more amp power supply
 

GamingAddict

Apr 26, 2017
38
Joined
Apr 26, 2017
Messages
38
With the small motor drawing 1A at max, i dont think that my 5V 20A Switching power supply is the problem.
 

turbogt16v

Mar 27, 2015
176
Joined
Mar 27, 2015
Messages
176
How is mosfet connected to adruino,it needs resistor between gate and drawn
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Post whatever you have including circuit diagram( not fritzing) so everyone can see what you can see.

I'm guessing seperate power required.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
In the case of the motor, do you have a reverse biased diode across the terminals the suppress the voltage spike whenever the motor is turned off?

Also, the physical wiring can have an effect. The wiring from the supply to the the microcontroller should be separate from that to the load. If they are the same, the inductance of wiring to the load and the sudden change in current causes a voltage drop that the microcontroller will see possibly causing it to restart. This applies to both ground and power.


Bob
 
Top