Connect with us

Arduino restarting while controlling a mosfet with PWM.

Discussion in 'Microcontrollers, Programming and IoT' started by GamingAddict, Feb 24, 2018.

  1. GamingAddict

    GamingAddict

    38
    0
    Apr 26, 2017
    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: Feb 24, 2018
  2. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    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
     
  3. GamingAddict

    GamingAddict

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

    turbogt16v

    173
    4
    Mar 27, 2015
    How is mosfet connected to adruino,it needs resistor between gate and drawn
     
  5. Bluejets

    Bluejets

    3,516
    713
    Oct 5, 2014
    Post whatever you have including circuit diagram( not fritzing) so everyone can see what you can see.

    I'm guessing seperate power required.
     
  6. BobK

    BobK

    7,642
    1,662
    Jan 5, 2010
    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
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-