• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Smooth Servo Rotation Circuit with Arduino and Potentiometer

Smooth Servo Rotation Circuit with Arduino and Potentiometer

Last updated on 3 November 2025 by Admin-Lavi Leave a Comment

This project shows about Smooth Servo Rotation Circuit with Arduino and Potentiometer.

Turn the knob and see servo arm moves smooth from 0° to 180°.

Easy and fun to learn how Arduino reads analog signal and makes motion.

Its a good project for beginners in robotics, automation or motor control.

Arduino Coding:

#include <Servo.h>
Servo myservo;
int potPin = A0;
int val;

void setup() {
myservo.attach(9);
}

void loop() {
val = analogRead(potPin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}

Coding Explanation:

  • Servo library is included to control servo motor easily.
  • Servo is connected to pin 9 using attach function.
  • Analog value from potentiometer is read using analogRead(A0).
  • The map function changes range 0–1023 to 0–180.
  • Servo moves to new angle using myservo.write(val).
  • Delay gives smooth movement.

Circuit Working:

Smooth Servo Rotation Circuit Diagram with Arduino and Potentiometer.

Parts List:

Component NameQuantity
SG90 Servo Motor1
Arduino Mega 25601
Potentiometer 20k1

Potentiometer gives analog voltage between 0V and 5V.

Arduino reads this voltage using analog pin A0.

Arduino converts it into a value between 0 and 1023.

This value is mapped to servo angle between 0 and 180 degrees.

When we rotate the potentiometer then the servo moves accordingly.

Formula with Calculation:

Below is the formula for Potentiometer output voltage = (Position / Full rotation) × 5V

Arduino analog value = (Voltage / 5V) × 1023

Example:

If potentiometer gives 2.5V then,

Analog value = (2.5 / 5) × 1023 = 511

Mapped servo angle = (511 / 1023) × 180 = 90 degrees

How to Build:

To build a Smooth Servo Rotation Circuit with Arduino and Potentiometer follow the below steps for connection:

  • Assemble all the parts as shown in circuit diagram.
  • Connect the servo motor red wire to Arduino 5V.
  • Connect the servo black wire to GND.
  • Connect the servo signal wire (usually yellow or orange) to Arduino pin 9.
  • Connect the middle pin of potentiometer to Arduino analog pin A0.
  • Connect one side of potentiometer to 5V.
  • Connect the other side of potentiometer to GND.

Conclusion:

Smooth Servo Rotation Circuit with Arduino and Potentiometer is simple and easy to give it a try.

Potentiometer moves servo angle smoothly.

This project teaches analog input and PWM output.

Its useful in robotic arms, camera control, and small automation systems.

References:

Using the Arduino Uno to control multiple Servos via potentiometers

Filed Under: Arduino Projects, Motor Controllers

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Temperature Controlled LED Circuit
Next Post: Digital Dice Circuit using Arduino Uno »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (35)
  • Amplifier Circuits (67)
  • Arduino Projects (66)
  • Audio Circuits (101)
  • Automobile Circuits (19)
  • Battery Charger Circuits (54)
  • Free Energy (13)
  • Heater and Temperature Controllers (11)
  • High Voltage (1)
  • Indicator Circuits (44)
  • Inverter Circuits (16)
  • LDR Circuits (24)
  • LED and Lamps (131)
  • Meters and Testers (30)
  • Motor Controllers (19)
  • Oscillator Circuits (35)
  • Power Supply Circuits (94)
  • Remote Control Circuits (8)
  • Security and Protection (26)
  • Sensors and Detectors (100)
  • Solar Circuits (23)
  • Timer Circuits (33)
  • Transistor Circuits (68)
  • Transmitter Circuit (15)
  • Tutorials (8)
  • Water Level Controller (4)

Recent Posts

  • IR Transmitter and Receiver Circuit using 555 and 4017 IC
  • Automatic Street Light Circuit using Arduino
  • Smart Street Light Control Circuit
  • Obstacle Detection Circuit with 555 Timer and Ultrasonic Sensor
  • Digital Dice Circuit using Arduino Uno

Recent Comments

  1. Henrik Arboe Jensen on Adjustable Voltage, Current Power Supply Circuit using Transistor 2N3055
  2. Admin-Lavi on FM Transmitter Circuit (100 meters range)
  3. DEVINDER SINGH on FM Transmitter Circuit (100 meters range)
  4. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  5. Bill on Constant Voltage, Constant Current Battery Charger Circuit

Copyright © 2025 | New Circuit Ideas