AUTO SERVO MOTOR ARDUINO
AUTO SERVO MOTOR
WHAT IS SERVO MOTOR
Servo refers to miscalculation sensing feedback control which is employed to correct the performance of a system. Servo or RC Servo Motors are DC motors equipped with a servo mechanism for precise control of position. The RC servo motors usually have a rotation limit from 90° to 180°. Some servos even have rotation limit of 360° or more. But servos don't rotate continually. Their rotation is restricted in between the fixed angles.
USE OF SERVO MOTOR
USE OF SERVO MOTOR
Usually, they need a servo arm which will turn 180 degrees. Using the Arduino, we are able to tell a servo to travel to a specified position and it'll go there. As simple as that! Servo motors were first utilized in the remote (RC) world, usually to manage the steering of RC cars or the flaps on a RC plane.
WATCH VIDEO
WATCH VIDEO
SERVO MOTOR WIRING
SERVO MOTOR WIRING
1.CONNECT SERVO BLACK/BROWN TO ARDUINO GND.
2.CONNECT SERVO ORANGE TO ARDUINO PWN(HERE I CONNECTED TO D-5).
3.CONNECT SERVO RED TO ARDUINO +5V.
PROGRAM
PROGRAM
/ Include the Servo library
#include <Servo.h>
// Declare the Servo pin
int servoPin = 3;
// Create a servo object
Servo Servo1;
void setup() {
// We need to attach the servo to the used pin number
Servo1.attach(servoPin);
}
void loop(){
// Make servo go to 0 degrees
Servo1.write(0);
delay(1000);
// Make servo go to 90 degrees
Servo1.write(90);
delay(1000);
// Make servo go to 180 degrees
Servo1.write(180);
delay(1000);
}

Comments
Post a Comment