HUM: SERVO MOTOR TOWER PRO SG90

HUM: SERVO MOTOR TOWER PRO SG90-Uncategorized

TOWERPRO SG90

Imagine a servo motor as a servo steering wheel operated by a robot. We can determine, or set the angle, rotation speed and acceleration. The TowerPro SG90 is a very small, precise and affordable servo motor which will help you learn about the principle of servo motors. Feel free to use this tutorial for other servo motors. 

Characteristics: (check the datasheet)
Mass: 9g
Dimensions: 23 x 12 x 29 mm
Moment (4.8V): 1.8kg/cm
Temperature: 0℃ – 55℃
Voltage: 3.5V-6V
Cable length: 25cm
Connector: JR

What exactly is the moment?
When servo motor receives the movement command, it will rotate to the default position and hold it. If the external force acts upon the motor while holding position, servo motor will resist trying to hold on to it. The maximum force a servo can handle is actually the moment from the datasheet.

NOTE: do not rotate the wheels of a servo motor by hand, you could damage it

 

HOW DOES THE SERVO MOTOR WORK?

Servo motors consist of a DC motor, potentiometer and control panel. As the motor rotates, the resistance on the potentiometer changes. This way, the control panel can precisely regulate the rotation, speed, acceleration and direction of rotation.

Servo motors are controlled by sending PWM signals via the control wire. Make sure to use some of the Dasduino’s PWM pins (3, 5, 6, 9, 10 or 11). Depending on the length of the pulse, the rotor turns to the desired position. TowerPro, like most servo motors, has the ability to rotate 90 degrees in both directions, altogether 180 degrees. If you need a servo motor with fuller rotation, check the  SM S4303R servo motor.

CONNECTING THE MOTOR TO DASDUINO

ARDUINO CODE

ArduinoIDE comes with a servo library, all you need to do is call it up. Check the library’s reference.

#include "Servo.h"
 
Servo servo;  // we create a servo object for motor control
              // library supports 8 motors maximum
 
int poz = 0;    // variable in which we save the current position of the motor
 
void setup()
{
  servo.attach(9);  // signal PWM pin on the Croduino is 9
}
 
 
void loop()
{
  for(poz = 0; poz =1; poz-=1)     // returning the motor to starting position
  {
    servo.write(poz);             
    delay(15);                    
  }
}