The Tower Pro SG90 is a compact and efficient micro servo motor widely utilized in the field of robotics and electronics projects. It is renowned for its precision control and robust torque output despite its small size. The SG90 operates on a 5V power supply and is capable of rotating approximately 180 degrees, making it an ideal choice for radio-controlled (RC) airplanes, cars, boats, and various automation and robotics applications.
Pin Number | Description |
---|---|
1 | Ground (GND) |
2 | Power Supply (VCC) |
3 | Control Signal |
#include <Servo.h>
Servo myservo; // create servo object to control the SG90
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
myservo.write(0); // turn servo to 0 degrees
delay(1000); // wait for a second
myservo.write(90); // turn servo to 90 degrees (middle position)
delay(1000); // wait for a second
myservo.write(180); // turn servo to 180 degrees (maximum position)
delay(1000); // wait for a second
}
Q: Can I power the SG90 directly from an Arduino board? A: While the Arduino board can provide 5V, it may not be able to supply sufficient current for the servo under load. It is recommended to use an external power source.
Q: What is the maximum angle the SG90 can rotate? A: The SG90 can rotate approximately 180 degrees, but the actual range may vary slightly from unit to unit.
Q: How can I control the speed of the SG90 servo? A: The speed can be controlled by the rate at which you update the angle through the control signal. Gradually increasing the angle in your code will result in a slower movement.
Q: Can the SG90 rotate continuously? A: No, the SG90 is a standard servo designed for limited rotation, typically up to 180 degrees. For continuous rotation, a modified servo or a continuous rotation servo is required.
For further assistance or inquiries, please refer to the manufacturer's datasheet or contact technical support.