![]() end control the servo's direction and the position of the motor Servo.write(135) // Turn SG90 servo Right to 135 degrees Servo.write(90) // Turn SG90 servo back to 90 degrees (center position) Servo.write(45) // Turn SG90 servo Left to 50 degrees control the servo's direction and the position of the motor Int servoAngle = 0 // servo position in degrees It contains all the functions required for controlling the SG90 servo. Before reaching the Arduino code, I want to write few words about the file. The Arduino sketchīelow you can find the Arduino sketch that controls the servo’s direction, the position of the motor and the speed of the SG90 servo. In this tutorial, I use the SG90 servo powered directly from the Arduino via USB. And finally, connect the orange wire from the SG90 servo to a digital pin (pin 9) on the Arduino.Īrduino makes the things simple. Connect the red wire from the servo to the +5V on the Arduino. So you have to connect the brown wire from the micro servo to the GND pin on the Arduino. The servo motor has three leads, with one more than a DC motor. Take a look inside of the SG90 micro servo SG90 is cheap enough to throw away when they break. ![]() Well, there are other high-end servos with a bit more muscle than the SG90 servo, but these high-end servos can’t beat the price of the SG90 servo. All these specifications are really impressive for this little plastic box. At 4.8V, the speed of the servo is 0.12 sec/60°. You need torque to control the position of an object, for example, and this little box that weight 0.32 oz (9.0 g) can provide at 4.8V a torque of 25.0 oz-in (1.80 kg-cm). Let’s make a short overview of the SG90 specifications. Even it’s cheap, less than $5, don’t try to rotate the servo motor by hand because this may damage the motor. The Tower Pro SG90 servo is one of the cheapest servo motors that you can find on the market.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |