Introduction: How to Control the SG90 Servo Motor With the Arduino UNO

About: Welcome to my instructables page! Here I post written articles of my YouTube tutorials.

In this tutorial you will learn how to control the SG90 Servo Motor with the Arduino UNO R3.

Supplies

You will need:

  • 1x Computer with Arduino IDE installed
  • 1x Arduino UNO R3 or clone
  • 1x USB Cable
  • 1x SG90 Servo Motor
  • 3x M-M Jumper Wires

Step 1: Connect Jumper Wires to Servo Connector

Connect the jumper wires to the connector of the servo motor.

It is recommended to use the same color to avoid confusion.

Step 2: Connect Black Jumper Wire to Ground on Arduino

Connect the black jumper wire to the ground (GND) on the Arduino.

Step 3: Connect Red Jumper Wire to 5V on Arduino

Connect the red jumper wire to the 5V pin of the Arduino.

Step 4: Connect Orange Jumper Wire to Pin 9 on Arduino

Connect the orange jumper wire to pin number 9 on the Arduino, since the code uses pin number 9.

Step 5: Connect Usb Cable From Arduino to Computer

Plug in the USB cable into the arduino and with the other end into the USB port of the computer.

Step 6: Open Arduino IDE and Select the Sweep Sketch

Launch the Arduino IDE software on the computer and go to "File - Examples - Servo - Sweep" to select the sweep sketch.

Step 7: Upload Code to Arduino

Click the upload button to upload the sketch to the Arduino, the servo motor should be moving now.

Congratulations on completing this tutorial!