Arduino Uno | SG90 Servo Motor | Arduino Tutorial

In this tutorial, we’ll show you how to use SG90 Servo Motor with the Arduino Uno.

GETTING STARTED

SG90 Servo Motor is used in projects requiring precise control of angular or linear position, velocity and acceleration. SG90 Servo Motor can able to rotate from 0° to 180°. It uses a DC motor, DC motor controller, potentiometer, and set of plastic gears. We can control degree of rotation of the Servo Motor by applying Pulse Width Modulation (PWM) signal to its SIG Pin. This SG90 Servo Motor has a torque of 2.5kg/cm and has an operating voltage of 5V.

COMPONENTS REQUIRED

Components that you’ll required:

Arduino Uno

SG90 Servo Motor

Jumper Wire

Type-A to Type-B USB Cable

Please check out here to buy these components.

CONNECTIONS

Arduino Uno | SG90 Servo Motor | Arduino Tutorial | Connections

Arduino Uno | SG90 Servo Motor | Arduino Tutorial | Connections

Now, let’s see the connections.

– Connect the SIG Pin (Orange Wire) of SG90 Servo Motor to the Digital Pin 3 of Arduino Uno.

– Connect the VCC Pin (Red Wire) of SG90 Servo Motor to the 5V Pin of Arduino Uno.

– Connect the GND Pin (Brown Wire) of SG90 Servo Motor to the GND Pin of Arduino Uno.

PROGRAMMING

In order to program the Arduino Uno, you’ll need to download the software and source code from the links below.

Arduino IDE: https://www.arduino.cc/en/Main/Software

Source Code: SG90_Servo_Motor.zip

Now, let’s program the Arduino Uno.

– Connect the one end of USB cable to the Arduino Uno, and another end to your Computer.

– Open the sketch in the Arduino IDE. This program enables the Arduino Uno to communicate with the SG90 Servo Motor via Pulse Width Modulation (PWM) signal to control degree of rotation of the Servo Motor. This program requires Servo Motor library.

– Select the proper Board from the Tools menu of Arduino IDE.

– Select the proper Serial Port from the Tools menu of Arduino IDE.

– Click on the Upload button to upload the sketch.

If the upload is successful, the message “Done uploading” will appear in the status bar of Arduino IDE. After a few seconds, you should see the Servo Motor starts rotating.

WANT TO LEARN MORE ABOUT ARDUINO?

Build a strong foundation in Arduino and Open-Source Electronics with this Comprehensive Course.

eductronics™ The Complete Guide to Arduino | Arduino Course | Arduino eBook

eductronics™ The Complete Guide to Arduino | Arduino Course | Arduino eBook

WANT TO SUPPORT US?

We love to share our knowledge with you and we need your continued support to enable us to continue with our work with the same vigour and passion. If you like eductronics™ and appreciate the information and knowledge we provide, please consider supporting us. Every contribution, however big or small, helps us keep going!

Please visit our Support Us page to make a contribution online.

LIKED THIS TUTORIAL & WANT TO READ MORE?

Here is the list of some tutorials, that you may find useful.

Share this Post

About eductronics

eductronics™ is a team of skilled, experienced Makers and Inventors. We provide Courses, eBooks, Tutorials, and Projects on Microcontroller and Microprocessor-based Development Boards, Single Board Computers, Open-Source Electronics, Internet of Things (IoT), Home Automation, and Robotics.