Sg5010 360 servo motor: Difference between revisions

From wikiluntti
(Created page with "== Introduction == Perhaps there is 180 and 360 version. [https://www.datasheetcafe.com/sg-5010-datasheet-servo-motor/ Datasheet]. Dimensions: == Arduino == Connect the orange control wire to pin 9 or 10 and using the Servo library included with the Arduino IDE. Position “0” (1.5ms pulse) is middle, “90” (~2ms pulse) is all the way to the right, “-90” (~1ms pulse) is all the way to the left. == STL files for gripper ==")
 
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


Perhaps there is 180 and 360 version.
''No real servo does continuous rotation. Many unscrupulous distributors do not differentiate between the two types and you cannot tell from the model number which type it is.'' Mine servo does continuous rotation. ''Normal servos are 180deg and they are not continuous rotation.''


[https://www.datasheetcafe.com/sg-5010-datasheet-servo-motor/ Datasheet].  
Perhaps there is 180 and 360 version. Almost same as MG995, MG996, MG996R.  


Dimensions:
*SG: soft gears
*MG: metal gears


[https://www.datasheetcafe.com/sg-5010-datasheet-servo-motor/ Datasheet]. [https://www.oomipood.ee/product/oky8005_2_servo_mootor_3_5_8_4v_8_kg_cm_4_8v_sg5010_360_deg Oomipood].


Okystar. For Helicopter/Truck/Boat/Racing Car, /Airplane:
* Size: 40 x 20 x 44mm
* Weight: 39g
* Operating Speed:
** (4.8V no load) : 0.14sec / 60 degrees
** (6.0V no load) : 0.11sec / 60 degrees
* Stall Torque (4.8V): (8 kg/cm) (110oz/in.)
* Stall Torque (6.0V): (11kg/cm) (156oz/in.)
* Temperature Range: -30 to +60 Degree C
* Operation Voltage: 3.5 - 8.4V
* Connector Wire Length 30CM
SG5010 180:
* Power: 4.8V – 6V DC max (5V works well)
* Average Speed: 0.2sec/60degree (@ 4.8V), 0.16sec/60degree (@ 6V)
* Weight: 39g
* Torque: At 5V, 5.5kg-cm / 76oz-in, and at 6V 6.5kg-cm / 90oz-in.
* Size mm: (L x W x H) 40 x 20.0 x 38 mm
* Spline Count: 25


== Arduino ==
== Arduino ==
* Brown: GND
* Red: +5V
* Orange: Control


Connect the orange control wire to pin 9 or 10 and using the Servo library included with the Arduino IDE. Position “0” (1.5ms pulse) is middle, “90” (~2ms pulse) is all the way to the right, “-90” (~1ms pulse) is all the way to the left.
Connect the orange control wire to pin 9 or 10 and using the Servo library included with the Arduino IDE. Position “0” (1.5ms pulse) is middle, “90” (~2ms pulse) is all the way to the right, “-90” (~1ms pulse) is all the way to the left.


== STL files for gripper ==
== STL files for gripper ==
Look for MG995, MG996.
Printed: https://www.thingiverse.com/thing:969447
== Arduino 1 ==
Rotate speed. Checkt tutorial at https://microcontrollerslab.com/mg995-servo-motor-pinout-interfacing-with-arduino-features-examples/
<syntaxhighlight lang="C">
#include <Servo.h>
#define Servo_PWM 6
Servo MG995_Servo; 
 
void setup() {
  Serial.begin(9600);
  MG995_Servo.attach(Servo_PWM); 
}
void loop() {
  MG995_Servo.write(0); //Turn clockwise at high speed
  delay(3000);
  MG995_Servo.detach();//Stop. You can use deatch function or use write(x), as x is the middle of 0-180 which is 90, but some lack of precision may change this value
  delay(2000);
  MG995_Servo.attach(Servo_PWM);//Always use attach function after detach to re-connect your servo with the board
  MG995_Servo.write(180); //Turn left high speed
  delay(3000);
  MG995_Servo.detach();//Stop
  delay(2000);
  MG995_Servo.attach(Servo_PWM);     
}
</syntaxhighlight>
=== Arduino 2 ===
This code should move to desired angle, but it does not work!
<syntaxhighlight lang="C">
#include <Servo.h>
Servo myServo;
int servoPin = 9;
void setup() {
  myServo.attach(servoPin);
}
void loop() {
  myServo.write(0);    // Move to 0 degrees
  delay(1000);
  myServo.write(90);  // Move to 90 degrees
  delay(1000);
  myServo.write(180);  // Move to 180 degrees
  delay(1000);
}
</syntaxhighlight>
=== Arduino: Potentiometer ===
Use potentiometer to control this "servo". Need to be slow speed not to break the gripper.
* #4 to VCC
* #6 to GND if using
<syntaxhighlight lang="C">
#include <Servo.h>
#define Servo_PWM 8
Servo MG995_Servo; 
int potVal = 0;
 
void setup() {
  Serial.begin(9600);
  MG995_Servo.attach(Servo_PWM); 
}
void loop() {
  potVal = analogRead(A0);
  Serial.println( potVal );
  if (potVal < 300){ //Close
    MG995_Servo.attach(Servo_PWM);
    MG995_Servo.write(100);   
  }
  else if ( (potVal > 300) and (potVal < 600) ){
    MG995_Servo.detach();//Stop
  }
  else{ //Open
    MG995_Servo.attach(Servo_PWM);
    MG995_Servo.write(85);   
  }     
}
</syntaxhighlight>
=== Arduino 2 ===

Latest revision as of 11:12, 21 December 2024

Introduction

No real servo does continuous rotation. Many unscrupulous distributors do not differentiate between the two types and you cannot tell from the model number which type it is. Mine servo does continuous rotation. Normal servos are 180deg and they are not continuous rotation.

Perhaps there is 180 and 360 version. Almost same as MG995, MG996, MG996R.

  • SG: soft gears
  • MG: metal gears

Datasheet. Oomipood.

Okystar. For Helicopter/Truck/Boat/Racing Car, /Airplane:

  • Size: 40 x 20 x 44mm
  • Weight: 39g
  • Operating Speed:
    • (4.8V no load) : 0.14sec / 60 degrees
    • (6.0V no load) : 0.11sec / 60 degrees
  • Stall Torque (4.8V): (8 kg/cm) (110oz/in.)
  • Stall Torque (6.0V): (11kg/cm) (156oz/in.)
  • Temperature Range: -30 to +60 Degree C
  • Operation Voltage: 3.5 - 8.4V
  • Connector Wire Length 30CM

SG5010 180:

  • Power: 4.8V – 6V DC max (5V works well)
  • Average Speed: 0.2sec/60degree (@ 4.8V), 0.16sec/60degree (@ 6V)
  • Weight: 39g
  • Torque: At 5V, 5.5kg-cm / 76oz-in, and at 6V 6.5kg-cm / 90oz-in.
  • Size mm: (L x W x H) 40 x 20.0 x 38 mm
  • Spline Count: 25

Arduino

  • Brown: GND
  • Red: +5V
  • Orange: Control

Connect the orange control wire to pin 9 or 10 and using the Servo library included with the Arduino IDE. Position “0” (1.5ms pulse) is middle, “90” (~2ms pulse) is all the way to the right, “-90” (~1ms pulse) is all the way to the left.

STL files for gripper

Look for MG995, MG996.


Printed: https://www.thingiverse.com/thing:969447

Arduino 1

Rotate speed. Checkt tutorial at https://microcontrollerslab.com/mg995-servo-motor-pinout-interfacing-with-arduino-features-examples/

#include <Servo.h> 
#define Servo_PWM 6 
Servo MG995_Servo;  
  
void setup() {
  Serial.begin(9600); 
  MG995_Servo.attach(Servo_PWM);  

}
void loop() {
  MG995_Servo.write(0); //Turn clockwise at high speed
  delay(3000);
  MG995_Servo.detach();//Stop. You can use deatch function or use write(x), as x is the middle of 0-180 which is 90, but some lack of precision may change this value
  delay(2000);
  MG995_Servo.attach(Servo_PWM);//Always use attach function after detach to re-connect your servo with the board
  MG995_Servo.write(180); //Turn left high speed
  delay(3000);
  MG995_Servo.detach();//Stop
  delay(2000);
  MG995_Servo.attach(Servo_PWM);      
}

Arduino 2

This code should move to desired angle, but it does not work!

#include <Servo.h>

Servo myServo;
int servoPin = 9;

void setup() {
  myServo.attach(servoPin);
}

void loop() {
  myServo.write(0);    // Move to 0 degrees
  delay(1000);
  myServo.write(90);   // Move to 90 degrees
  delay(1000);
  myServo.write(180);  // Move to 180 degrees
  delay(1000);
}

Arduino: Potentiometer

Use potentiometer to control this "servo". Need to be slow speed not to break the gripper.

  • #4 to VCC
  • #6 to GND if using
#include <Servo.h> 
#define Servo_PWM 8
Servo MG995_Servo;  
int potVal = 0; 
  
void setup() {
  Serial.begin(9600); 
  MG995_Servo.attach(Servo_PWM);  
}

void loop() {
  potVal = analogRead(A0); 
  Serial.println( potVal );

  if (potVal < 300){ //Close
    MG995_Servo.attach(Servo_PWM);
    MG995_Servo.write(100);    
  }
  else if ( (potVal > 300) and (potVal < 600) ){
    MG995_Servo.detach();//Stop
  }
  else{ //Open
    MG995_Servo.attach(Servo_PWM);
    MG995_Servo.write(85);    
  }      
}

Arduino 2