The MG90S servo motor is a compact and efficient micro servo often utilized in the field of remote-controlled (RC) models, robotics, and various DIY projects. It is prized for its ability to provide precise control of angular position, speed, and acceleration. The MG90S is known for its high performance relative to its cost, making it a popular choice for hobbyists and educators alike.
Pin Number | Color | Function |
---|---|---|
1 | Brown | Ground (GND) |
2 | Red | Power (VCC) |
3 | Orange | Control Signal |
#include <Servo.h>
Servo myservo; // Create servo object to control the MG90S
void setup() {
myservo.attach(9); // Attaches the servo on pin 9 to the servo object
}
void loop() {
myservo.write(90); // Set servo to mid-point (90 degrees)
delay(1000); // Wait for 1 second
myservo.write(0); // Move servo to 0 degrees
delay(1000); // Wait for 1 second
myservo.write(180); // Move servo to 180 degrees
delay(1000); // Wait for 1 second
}
Q: Can I control the MG90S servo with a Raspberry Pi? A: Yes, but you will need to ensure proper logic level conversion and use a library that supports PWM output.
Q: How can I increase the lifespan of my MG90S servo? A: Avoid excessive loads, operate within the recommended voltage range, and ensure proper alignment of connected components.