How to run small brushed motor for mini quadcopter with Arduino

Hi Guys, I have read the question on many forms, How to run small brushed motor for mini quadcopter. So with this article i am going to show you some various way to drive low voltage DC motor.

Many various type of motor driver module, IC and mosfet are available in the market to drive small brushed DC motor. But if you are looking motor driver for mini quadcopter then you need very lightweight driver.

Today I am using D10N05 SMD Mosfet Transistor to drive the motor. In this article you can see how I used this mosfet transistor.

This is a N-channel mosfet and it have three pins Gate, Drain and Source. Source pin is the input for negative voltage from the battery and drain for the negative output for the motor and gate pin is the input for PWM signal. Below is the circuit diagram to show you how i connect the mosfet with Arduino pro mini and mini quadcopter motor.

arduino mini motor driver mosfet

 

Testing Code for Arduino

I am also sharing the Arduino code to test above circuit diagram to make sure it’s working fine with the PWM signal. In this code, we are writing an analog value 0 to 255 for pin number three to make fading PWM signal for a mosfet.


#define fadePin 3

void setup(){
  pinMode(fadePin, OUTPUT);
  Serial.begin(9600);
}

void loop(){

  for(int i = 0; i<360; i++){
    //convert 0-360 angle to radian (needed for sin function)
    float rad = DEG_TO_RAD * i;

    //calculate sin of angle as number between 0 and 255
    int sinOut = constrain((sin(rad) * 128) + 128, 0, 255); 

    analogWrite(fadePin, sinOut);

    Serial.println(sinOut);
    delay(15);
  }
}


Here is the video tutorial

Subscribe to our channel to get cool projects!
Related Post

Related Post

7 Comments
  1. mahiv 2 years ago

    how can i turn this motor anti clockwise

  2. mahiv 2 years ago

    how can i turn this motor anti clockwise and do you have a sketch for that

  3. Luke griffiths 2 years ago

    If you want to make the motor go anti clockwise, just switch the negative and positive wires of the motor around. Hope that helped.

  4. CAMP 1 year ago

    If you want to control the motor to go in both directions you need to either built or buy an H-bridge. They can be found pretty cheap around but for an added knowledge you can build your own with a few MOSFETS. Hope it helps

  5. rudbenxc 1 year ago

    hola, disculpa pero aprecio que el motor no gira a su maxima y me pasa lo mismo con otros mosfet que experimento, no sabes como mejorar esto para que gire a su maxima?? dato es que en los motores con nucleo dc (cc) tengo buenos resultados pero alguna alternativa para girarlo a sumaxima los que no tienen nucleo

  6. Jordan 1 year ago

    Hi there, has anyone build a successfully flyable drone this way? I built an octocopter, but it looks like the battery can’t handle the amps drawn. When I fire off all 8 motors some are very weak. Any insight?

  7. Kian 2 months ago

    Where can i buy the D10N05 SMD Mosfet Transistors ?

Leave a reply

Your email address will not be published. Required fields are marked *

*

or

Log in with your credentials

or    

Forgot your details?

or

Create Account