Close
0%
0%

Servo Motor Control with Arduino Due

In this project, we will see how to control servo motor with Arduino due

Similar projects worth following
446 views
The project describes about how to control servo motor with Arduino due.

Servo Motors:

We have used here SG90 Servo Motor. Servo Motors are recognized for their precise shaft movement or position. These are not offered for high-speed applications. It is having low speed, medium torque as well as precise position application. These motors are utilized in robotic arm machines, flight controls as well as control systems. These motors are also utilized in some printers and fax machines. It is available in various shapes and sizes.

Its three wires namely one is for positive voltage, second is for ground and the last one is for position setting. A Servo Motor is an integration of DC motor, position control system as well as gears. In servo, we have a control system that takes the PWM signal from the signal pin.

It decodes the signal and acquires the duty ratio from it. After that, it equates the ratio to the values of the predefined position. If there is a variation in the values, it regulates the position of the servo accordingly. So the axis position of the servo motor relies on the duty ratio of the PWM signal to the SIGNAL pin.

  • 1 × Arduino Due
  • 1 × SG90 Micro-servo motor
  • 1 × Arduino IDE

  • 1
    Run a Program

    #include

    Servo myservo; // providing a name

    int angle = 0; // variable to store the servo position

    void setup() {
    myservo.attach(2); // attaches the servo on pin 2 to the servo object
    }

    void loop() {
    for (angle = 0; angle <= 0 1 180 180; angle +="1)" { goes from degrees to degrees, in steps of degree myservo.write(angle); tell servo go position variable 'angle' delay(15); waits 15ms for the reach } (angle="180;">= 0; angle -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(angle);
    delay(15); // waits 15ms for the servo to reach the position
    }
    }
    </=>

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates