Controlling Three ServoMotor By Three Potentiometer

Introduction

 
In this blog, I am going to explain about controlling three Servomotor by three Potentiometer. It can be controlled by Servomotor by the Potentiometer. The circuit connection can be highly difficult but it will be used in real-time projects.
 
Parts Of List
  • Arduino Uno
  • Servo Motor-3
  • Potentiometer-3
  • Bread Board
  • Hook Up wires 
Potentiometer
 
A Potentiometer is informally a pot and is a three-terminal resistor with a sliding or rotating contact, which forms an adjustable voltage divider. If it has only two terminals, which are used- one end and the wiper, it acts as a variable resistor or rheostat.
 
 
Figure1 - Potentiometer
 
Servo Motor
 
 
Figure 2 - Servo Meter 
  • It is small and cost-effective.
  • It is used for small Robotics and radio controls.
Connection From Servomotor To Arduino Uno
  • Connect the GND and VCC in the three motors commonly to the Arduino board.
  • Vin pins are connected in the digital pin, as mentioned in the program.
Connection From Potentiometer To Arduino Uno
  • Connect GND and VCC in the three Potentiometer commonly to the Arduino board.
  • Vin pins are connected in the digital pin, as mentioned in the program.
Programming
  1. #include < Servo.h > Servo myservo3;  
  2. Servo myservo5;  
  3. Servo myservo6;  
  4. int potpin = 0;  
  5. int potpin2 = 1;  
  6. int potpin3 = 2;  
  7. int val = 0;  
  8. int val2 = 0;  
  9. int val3 = 0;  
  10. void setup() {  
  11.     myservo3.attach(9);  
  12.     myservo5.attach(10);  
  13.     myservo6.attach(11);  
  14. }  
  15. void loop()   
  16.   
  17. {  
  18.     val = analogRead(potpin);  
  19.     val = map(val, 3, 1023, 0, 176);  
  20.     myservo3.write(val);  
  21.     delay(25);  
  22.     val2 = analogRead(potpin2);  
  23.     val2 = map(val2, 3, 1023, 0, 176);  
  24.     myservo5.write(val2);  
  25.     delay(25);  
  26.     val3 = analogRead(potpin3);  
  27.     val3 = map(val3, 3, 1023, 0, 175);  
  28.     myservo6.write(val3);  
  29.     delay(25);  
  30. }  
Explanation
  • Connect Potentiometer and the Servometer in Arduino board and rotate the Potentiometer and see the output in the Servometer.
  • It can be applied for the home Application also. 
Output
 
 
Figure 3 - Output