• 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 » Simple Servo Motor Controller Circuit using Arduino

Simple Servo Motor Controller Circuit using Arduino

Last updated on 29 July 2025 by Admin-Lavi Leave a Comment

Servo motor is small machine part.

It can turn to exact position.

People use it in many things like robots, CNC machines and factory machines.

This post for Simple Servo Motor Controller Circuit using Arduino show how to control servo motor using Arduino.

It also use push buttons, capacitors, resistors and IC 7809 for power.

Coding:

#include <Servo.h>

Servo myservo;  // Create a servo object

int servoPin = 9;  // Pin connected to the servo signal
int button1Pin = 2;  // Pin connected to the first push button
int button2Pin = 3;  // Pin connected to the second push button

int angle = 0;  // Initial servo angle

void setup() {
  myservo.attach(servoPin);  // Attach the servo to the specified pin
  pinMode(button1Pin, INPUT);  // Set the push button pins as input
  pinMode(button2Pin, INPUT);
}

void loop() {
  int button1State = digitalRead(button1Pin);
  int button2State = digitalRead(button2Pin);

  if (button1State == HIGH) {
    angle += 1;  // Increment the angle
    if (angle > 180) {
      angle = 180;  // Limit the angle to 0-180 degrees
    }
  } else if (button2State == HIGH) {
    angle -= 1;  // Decrement the angle
    if (angle < 0) {
      angle = 0;  // Limit the angle to 0-180 degrees
    }
  }

  myservo.write(angle);  // Set the servo's position
  delay(15);  // Delay for smooth movement
}

Code explanation:

  • Code set start angle, button pins and servo pin.
  • In setup() button pins set as input and servo are connected to servo pin.
  • In loop() code check button press.
  • If button 1 is pressed angle goes up and if button 2 is pressed angle goes down.
  • Angle stay between 0 and 180.
  • myservo.write() set servo to new angle.

Circuit Working:

Simple Servo Motor Controller Circuit Diagram using Arduino

Parts List:

ComponentQuantity
Resistors
1/4 watt 100k2
Capacitor
100μF 25V1
Semiconductors
Arduino Uno board1
IC 78091
Servo Motor1
Tactile Switches2

In this article servo and other parts can get power from 9V using IC 7809.

Servo and Arduino must share same ground.

Arduino uses PWM (Pulse Width Modulation) to control servo position.

Servo angle changes by pulse width.

Write Arduino code to read buttons and move servo.

For example press one button servo goes one way and press other the servo goes the other way.

Arduino check button1 and button2.

When button is pressed input pin read LOW is connected to ground.

When no button is press then pull-up resistor make pin read HIGH.

Ensure voltage regulator work good with less noise the better servo will work.

Resistor and capacitor help give clean and steady power to the circuit.

How To Build:

To build a Simple Servo Motor Control Circuit using Arduino following are the connections steps to follow:

  • Collect all parts shown in circuit diagram.
  • Use IC 7809 to give stable 9V DC to Arduino.
  • Connect servo ground wire to Arduino ground pin.
  • Connect 5V from Arduino to servo power pin.
  • Connect servo signal pin (PWM) to Arduino pin 9.
  • Connect 100μF 25V capacitor with one side to 5V and other to ground.
  • Connect button1with one leg to pin 2 and other leg to ground.
  • Connect button2 with one leg to pin 3 and other leg to ground.
  • Connect 100k resistor between pin 2 and 5V.
  • Connect another 100k resistor between pin 3 and 5V.

Conclusion:

This article for Simple Servo Motor Controller Circuit using Arduino show to move servo motor.

By using buttons, resistors, capacitor and IC 7809 make circuit more strong and useful.

This circuit is good for many projects.

References:

Control a servo motor with a 2 connection toggle switch (on/off switch)

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: « Simple Arduino LED Dimmer Circuit using PWM
Next Post: Simple Heartbeat Monitor Circuit using Arduino »

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 (59)
  • Audio Circuits (99)
  • Automobile Circuits (19)
  • Battery Charger Circuits (54)
  • Free Energy (13)
  • Heater and Temperature Controllers (10)
  • High Voltage (1)
  • Indicator Circuits (42)
  • Inverter Circuits (16)
  • LDR Circuits (18)
  • LED and Lamps (123)
  • Meters and Testers (30)
  • Motor Controllers (18)
  • Oscillator Circuits (34)
  • Power Supply Circuits (93)
  • Remote Control Circuits (7)
  • Security and Protection (26)
  • Sensors and Detectors (99)
  • Solar Circuits (22)
  • Timer Circuits (32)
  • Transistor Circuits (65)
  • Transmitter Circuit (14)
  • Tutorials (6)
  • Water Level Controller (4)

Recent Posts

  • Electronic Eye Circuit using IC 4049
  • Sound And Light Metronome Circuit using Transistors
  • Simple LED Circuit
  • IR Burglar Alarm Circuit
  • LED Blinking Circuit using 555 Timer

Recent Comments

  1. Admin-Lavi on FM Transmitter Circuit (100 meters range)
  2. DEVINDER SINGH on FM Transmitter Circuit (100 meters range)
  3. Admin-Lavi on Constant Voltage, Constant Current Battery Charger Circuit
  4. Bill on Constant Voltage, Constant Current Battery Charger Circuit
  5. Admin-Lavi on Long Range FM Transmitter Circuit (2km)

Copyright © 2025 | New Circuit Ideas