Home Arduino Projects Arduino Projects: Servo Potentiometer Control

Arduino Projects: Servo Potentiometer Control

by Nikodem Bartnik

Servos are useful devices, not only in robotics but almost everywhere. They are powerful, cheap and easy to use. You can also easily transform them to work in a continuous manner and use them as normal motors in your robot.

It can move an ultrasonic sensor around to make a radar or be used to turn the front wheels in an RC car or close the lock of your door. As you can see servos are really useful and you should know how they work. Today, you will make your first project with a servo and a potentiometer.

The potentiometer will work as an input on the analog pin A0 of Arduino and after mapping the values of the analog read function, we will set it to the servo.

Arduino Servo-Potentiometer project

Let’s start with the components needed for the project:

Arduino Projects: Servo Potentiometer Control

First, Let’s connect all the components together.

You can find the diagram that will let you do so below.

Because the legs of my potentiometer are too short to connect the cables to it directly, I plugged it to a small breadboard and connected the cables to it.

The servo I used is a standard size servo motor, but it does not matter, any type will just do.

You can find a cheaper micro servo motor which you can as well make use of for this project. To connect it to the Arduino, I used the cables with male-male connectors.

Arduino Projects: Servo Potentiometer Control
Arduino Projects: Servo Potentiometer Control

As I said I used a standard servo motor

Arduino Projects: Servo Potentiometer Control

But you can also use micro servo like this one

Arduino Projects: Servo Potentiometer Control

Those small blue micro servos are very popular and you can find them virtually in every electronic or RC shop.

Now we can upload a program to the Arduino.

The Code

Here you go!

With hope this gave you a glimpse of how a servo works and how to use it, I will suggest you go ahead and customize the design to make it a little more complicated and gradually build something more advanced using this as a foundation. Try adding a delay at the end of the loop to see what happens.

You might also like:

Related Posts

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy