MG996R Servo Motor

 

 

Servo motor for the project, comes the question how to use it. As we know there are three wires coming out of this motor. The description of the same is given on top of this page. To make this motor rotate, we have to power the motor with +5V using the Red and Brown wire and send PWM signals to the Orange colour wire. Hence we need something that could generate PWM signals to make this motor work, this something could anything like a 555 Timer or other Microcontroller platforms like Arduino, PIC, ARM or even a microprocessor like Raspberry Pi. Now, how to control the direction of the motor? To understand that let us a look at the picture given in the datasheet.

Working Principle:

This High-Torque MG996R Digital Servo features metal gearing resulting in extra high 10kg stalling torque in a tiny package.  The  MG996R  is  essentially  an  upgraded  version  of  the  famous  MG995 servo,  and  features  upgraded  shock-proofing  and  a  redesigned  PCB  and  IC  control system that make it much more accurate than  its predecessor. The gearing and motor have also been upgraded to improve dead bandwidth and centering this high-torque standard servo can rotate approximately 120 degrees (60 in each direction).

You  can  use  any  servo  code,  hardware  or  library  to control  these  servos,  so  it’s  great  for beginners who want to make stuff move without building a motor controller with feedback & gear  box,  especially  since  it  will  fit  in  small  places.  The MG996R Metal Gear Servo also comes with a selection of arms and hardware to get you set up nice and fast

 

Interfacing with Arduino :

 

A servo motor has everything built in: a motor, a feedback circuit, and most important, a motor driver. It just needs one power line, one ground, and one control pin.

Following are the steps to connect a servo motor to the Arduino:

  1. The servo motor has a female connector with three pins. The darkest or even black one is usually the ground. Connect this to the Arduino GND.
  2. Connect the power cable that in all standards should be red to 5V on the Arduino.
  3. Connect the remaining line on the servo connector to a digital pin on the Arduino.

Check the image for a view of the servo connected to the Arduino.

 

 

 

Step 2: Code

 

The following code will turn a servo motor to 0 degrees, wait 1 second, then turn it to 90, wait one more second, turn it to 180, and then go back.

// Include the Servo library
#include <Servo.h>

// Declare the Servo pin

int servoPin = 3;

// Create a servo object

Servo Servo1;

void setup() {

   // We need to attach the servo to the used pin number

   Servo1.attach(servoPin);

}

void loop(){

   // Make servo go to 0 degrees

   Servo1.write(0);

   delay(1000);

   // Make servo go to 90 degrees

   Servo1.write(90);

   delay(1000);

   // Make servo go to 180 degrees

   Servo1.write(180);

   delay(1000);

}

 

Application:

  • Hexapods
  • RC airplanes
  • fixed-wing airplanes
  • helicopters
  • robotics
  • mini robot
  • mini manipulator and grippers, etc

 

Advantages:

  • If a heavy load is placed on the motor, the driver will increase the current to the motor coil as it attempts to rotate the motor. Basically, there is no out-of-step condition.
  • High-speed operation is possible.
  • High torque

 

 

Disadvantages:

  • Since the servomotor tries to rotate according to the command pulses, but lags behind, it is not suitable for precision control of rotation.
  • Higher cost.
  • When stopped, the motor’s rotor continues to move back and forth one pulse, so that it is not suitable if you need to prevent vibration

Reference:

https://components101.com/motors/mg996r-servo-motor-datasheet

https://www.electronicoscaldas.com/datasheet/MG996R_Tower-Pro.pdf

https://robu.in/product/towerpro-mg996r-digital-high-torque-servo-motor/

https://www.jsumo.com/mg996r-servo-motor-digital