Introduction: Arduino : How to Control Servo Motor With Potentiometer

Picture of Arduino : How to Control Servo Motor With Potentiometer

This instructable is the written version of my "Arduino : How To Control Servo Motor with Potentiometer" YouTube video that I've uploaded recently. I strongly recommend you to check it out.

Visit YouTube Channel

Step 1: Tutorial

Control the position of a RC (hobby) servo motor with your Arduino and a potentiometer.

*** I recommend! You not connect directly the servo motor to arduino. I suggest you use external power to the servo.

SG90 Mini RC servo motors can be used. This can damage the Arduino MG996 instant high torque.

MG996 Stall Torque: 9.4kg / cm (4.8V) - 11 kg / cm (6.0V) and Operating voltage: 4.8 ~ 6.6v.

I wanted to tell in this tutorial; connections, code generation and motor control. So I did not give more details about the engine.

Step 2: Hardware Required

Picture of Hardware Required

Hardware Required

  • Arduino or Genuino Board
  • Servo Motor
  • 10k ohm potentiometer
  • hook-up wires
  • mini breadboard

Step 3: Circuit

Picture of Circuit

Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino or Genuino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow or orange and should be connected to pin 9 on the board.

The potentiometer should be wired so that its two outer pins are connected to power (+5V) and ground, and its middle pin is connected to analog input 0 on the board.

Step 4: Code

Picture of Code

This example makes use of the Arduino servo library.

Step 5: If I Was Helpful

Picture of If I Was Helpful

First of all, I would like to thank you for reading this guide ! I hope it helps you.

If you want to support me, you can subscribe my channel and watch my videos.

Visit My YouTube Channel


Mano373 (author)2016-11-16

hi my friend I want to make an rc transmitter & receiver 4ch or more by using 2 arduino one send the positions of the servos and the second receive and output the pulses for each one and by the serial connection ..... any ideas ^_^ I will be thankful

MertArduino (author)Mano3732016-11-16

Thank you for your message. Could you give me some more details about the project?

Mano373 (author)MertArduino2016-11-18

so my friend any help ^_^

Mano373 (author)Mano3732016-11-17

I want to simulate an rc transmitter & it's receiver I'll us rf module to connect
in the first arduino we'll connect the 4 potentiometers and in it's code we'll send the tangle by the potentiometer reads to the specific servo and in this case we have to send two values for each servo first one is the tangle and the second one for witch servo we are moving
then we have 8 value to send so do you find this way food to build or you may have another way to program ...

Mano373 (author)Mano3732016-11-18

so my friend any help ^_^

Joecodes made it! (author)2016-10-28

This was a fun little project and one of my first ones. Thanks!

MertArduino (author)Joecodes2016-10-28

I was very happy for your comment. Congratulations and thank you.

MertArduino (author)2016-10-24

OK grandpa; I write like you want next time.

ahmet_024102 (author)2016-10-21

mert teşekkürler

MertArduino (author)ahmet_0241022016-10-21

İlginiz ve yorumunuz için ben teşekkür ederim.

About This Instructable




Bio: For more project and tutorial visit my YouTube channel Mert Arduino and Raspberry Pi
More by MertArduino:XY Plotter Drawing Robot | Arduino | PolargraphArduino - Balance - Balancing Robot | How to Make?Arduino - MPU6050 GY521 - 6 Axis Accelerometer + Gyro (3D Simulation With Processing)
Add instructable to: