Introduction: Servo Position Feedback System With Arduino
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: Step 1 : Tools Required
- Arduino nano(or any)
- Few jumper wires
- Servo motor(SG-90)
- Trim-pot (Potentiometer)
- Screw driver (optional)
- Arduino IDE
Step 2: Connections
- Note:- I have used a variable resistor to control the servo as it makes easy to control the servo shaft
- servo shaft can be turned by hand also
- Connect mid pin of the trim-pot to Arduino pin A2.
- Connect the servo signal pin to Arduino pin D9.
- Connect the other Negative and Positive wires as shown in the Schematic image.
- 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.
Step 3: 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.
Step 4: Testing Our System
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."
Participated in the
Arduino Contest 2019