Tuesday, October 20, 2020
Home Arduino Strarter Kit SG90 | Arduino Mini Servo Motor

SG90 | Arduino Mini Servo Motor

SG90 is one of the most popular servos in the market. It is not only cheap but also powerful mini servo. This motor is suitable for RC Airplane, Helicopter, Quadcopter, or Robot.
USA purchase link
UK purchase link
Germany purchase link

Specification

  • Operating Voltage is +5V typically
  • Torque: 2.5kg/cm
  • Operating speed is 0.1s/60°
  • Gear Type: Plastic
  • Rotation : 0°-180°
  • Weight of motor: 9gm
  • Package includes gear horns and screws

How does the SG90 Mini servo work :

A servo motor consists of three components: a small DC motor, a potentiometer, and a control circuit. The motor is connected by gears to the control wheel. As the motor turns, the potentiometer’s resistance changes, so the control circuit can accurately regulate how much movement there is and in which direction.

SG90
SG90 inside

They are controlled by sending an electrical pulse of variable width, pulse width modulation (PWM). A servo motor can normally only turn 90° in each direction for a whole of 180° movement. The PWM sent to the motor defines the position of the shaft, and based on the duration of the pulse given by the control wire; the rotor will turn to the desired position. The servo motor requires a pulse every 20 milliseconds (ms) and the duration of the pulse will determine how far the motor rotates. For example, a 1.5ms pulse will make the motor rotates to the 90° position. Shorter than 1.5ms moves it in the counter-clockwise direction toward the 0° position, and any longer than 1.5ms will rotate the servo in a clockwise direction toward the 180° position.

Variable Pulse width control servo position

SG09 Wire Configuration:

The SG90 has three connection wires. The Red is the Vcc, Brown is Gnd and Orange is Signal.

Sg90 out

 Arduino Wiring :

Firstly connect SG90  Vcc+ to Arduino +5V.

Then Connect SG90  GND to Arduino GND

Lastly, Connect SG90 Signal to Arduino 10.

Arduino Code :

#include <Servo.h>
Servo servo;
int angle = 10;
void setup() {
  servo.attach(8);
  servo.write(angle);
}
void loop() 
{ 
 // scan from 0 to 180 degrees
  for(angle = 10; angle < 180; angle++)  
  {                                  
    servo.write(angle);               
    delay(15);                   
  } 
  // now scan back from 180 to 0 degrees
  for(angle = 180; angle > 10; angle--)    
  {                                
    servo.write(angle);           
    delay(15);       
  } 
}

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

KY-032 | OBSTACLE AVOIDANCE SENSOR

The KY-032 obstacle avoidance sensor is an infrared obstacle avoidance sensor. It comes with the 37 in 1 starter kit for Arduino. It helps...

HIH-4000 | Humidity Sensors

The HIH-4000  sensors are one of the highly efficient humidity sensors you can buy. The HIH-4000 is an analog humidity sensor. It is useful...

KY-026 | ARDUINO FLAME IR SENSOR

The KY-026 Arduino Flame Sensor is a low-cost starter sensor. It normally comes in the starter kit of Arduino like the ky-039. It can...

KY-039 | ARDUINO HEARTBEAT SENSOR

The KY-039 Heartbeat sensor is one of the cheapest sensors to get a start on Arduino like the Sound sensor. It cost less than...

Recent Comments