Servo Position Feedback System With Arduino

by DhananjayKhengare001 in Circuits > Microcontrollers

2961 Views, 4 Favorites, 0 Comments

Servo Position Feedback System With Arduino

Untitled.png

Hey their, This is my first instructable . MY project allows you to receive your servo's position

on your serial monitor or serial plotter of your Arduino IDE. This makes easy to program arduino robots which use servo motors like humanoid robots bipedal robots spider robots etc; as you can track your servo position and upload motion in form of servo position in degrees into your Arduino.

(please vote me for the Arduino contest)

Step 1 : Tools Required

IMG_20190519_200557.jpg
IMG_20190519_200841.jpg
IMG_20190519_200709.jpg
  1. Arduino nano(or any)
  2. Breadboard
  3. Few jumper wires
  4. Servo motor(SG-90)
  5. Trim-pot (Potentiometer)
  6. Screw driver (optional)
  7. Arduino IDE

Connections

schematic.bmp.png
IMG_20190519_202250.jpg
IMG_20190519_202218.jpg
  • Note:- I have used a variable resistor to control the servo as it makes easy to control the servo shaft
    1. servo shaft can be turned by hand also
    2. Connect mid pin of the trim-pot to Arduino pin A2.
    3. Connect the servo signal pin to Arduino pin D9.
    4. Connect the other Negative and Positive wires as shown in the Schematic image.
    5. Note:- some servo are tight from inside and are hard to rotate with hand so,take care of servo instead of using hand use the trim-pot to rotate the servo.

Uploading the Program to Arduino

The main work to make arduino to function as we want so,let us upload the code to the arduino.

Connect your arduino to your PC and upload the code.

Code is given in the video description.

Testing Our System

Untitled.png

Finally the last thing to do;testing our servo feedback system.

Open your serial monitor of Arduino IDE and test the system.

Note:- the position feedback can be seen on the serial plotter "you will see some kind of big and small fluctuations on the serial plotter the fluctuations are the PWM signals sent by arduino to the servo in intervals of time."