Logic Level MOSFET to control 12V DC Motor via 5v Arduino PWM

Thread Starter

patrickstefanski

Joined Apr 15, 2017
49
I'm currently using a DC Power supply @ 12V to power an Arduino project with a 12V Motor. The DC Power Supply is connected to a MOSFET tester board I made and to the arduino through a 5V regulator.

At this point I'm simply use the Example "Fade" sketch to ramp the PWM value from 0 to 255 and back down. I confirmed in the serial monitor that the values are indeed going up and down, so it's not the sketch.

When I turn on the Power Supply the motor just spins at full speed. Disconnecting the pin from the arduino does make the motor shut off, so the MOSFET is definitely being triggered by the Arduino, I'm just assuming it doesn't turn off like it's supposed to because of something I'm missing.

Here is the datasheet for the MOSFET: https://media.digikey.com/pdf/Data Sheets/NXP PDFs/BUK962R1-40E.pdf

The "MOSFET" pinout goes directly to the arduino PIN.

Things I've tried:
1. Adding a 470 OHM resistor in series from the Arduino pin to the MOSFET pin on the board.
2. Adding a 10k OHM resistor from the Arduino pin to logic ground.
3. The above two things together.


Any help would really be appreciated. I'm barley a hobbyist at this stuff and not able to use the datasheets properly to help me solve my problem.

Here is the schematic and board I am using for MOSFET.

question.jpg
 
Last edited:

KeithWalker

Joined Jul 10, 2017
1,043
Measure the voltage between the MOSFET gate and ground. It should be going up and down at the same rate as the values are changing on the serial monitor. If the voltage is not changing, the output pin on the arduino is not configured correctly. If it is changing between 0 and 5 volts, there is something wrong with he MOSFET or your wiring.
Keith
 

dendad

Joined Feb 20, 2016
3,564
If you remove the Arduino, does the motor stop? It should.
And, it may sound dumb, but do you have the Arduino gnd connected to the FET gnd too? We have seen cases here where just the PWM pin has been connected with no common gnd.
 

Irving

Joined Jan 30, 2016
797
Aside from the specific problem that the other guys have dealt with, if that motor has a stall current of 20A that PCB has nowhere near big enough tracks to handle that. In fact that ground track from input to MOSFET source is good for an amp maybe?

Hmm, what are those vias speckled around the MOSFET? Are they thermal vias to a ground plane on the back of the board?

And aren't they in contact with the drain track to motor out - pin?

Could that be an issue?
 

Thread Starter

patrickstefanski

Joined Apr 15, 2017
49
Aside from the specific problem that the other guys have dealt with, if that motor has a stall current of 20A that PCB has nowhere near big enough tracks to handle that. In fact that ground track from input to MOSFET source is good for an amp maybe?
Yes you're right. This board is just small test of a larger project which will have a larger PCB with properly sized traces. The motor is just spinning freely so it will never hit stall, the purpose of this little test is just to test the MOSFET/Diode segment, and it's looking like it was a good idea to do this test as it is not working as expected.

Hmm, what are those vias speckled around the MOSFET? Are they thermal vias to a ground plane on the back of the board?

And aren't they in contact with the drain track to motor out - pin?

Could that be an issue?
The back of the board is actually a "drain plane" not a "GND" plane. Extra HeatSinking
 

Thread Starter

patrickstefanski

Joined Apr 15, 2017
49
If you remove the Arduino, does the motor stop? It should.
And, it may sound dumb, but do you have the Arduino gnd connected to the FET gnd too? We have seen cases here where just the PWM pin has been connected with no common gnd.
Yes, When I pull the pin from the Arduino the motor stops.
Yes, GND connected from the MOSFET to the arduino.
 

dendad

Joined Feb 20, 2016
3,564
Load and run the standard blink program, ensuring the LED is flashing and feed your FET from pin 13.
That will test it ok.
 
Top