Introduction: As, this robotic arm is automatic in a way that it can decides where to move and when to move, therefore it works in a closed loop system where sensor detects if there is any object in a certain range which has been provided, so it moves to pick and place it to a certain destination. The rotation of robotic arm is controlled by arduino through servo motors. Closed-loop systems are designed to automatically achieve and maintain the desired output condition by comparing it with the actual condition. It does this by generating an error signal which is the difference between the output and the reference input. In other words, a closedloop system is a fully automatic control system in which its control action being dependent on the desired output in some way. Components used: Robotic arm kit i) Base ii) Elbow iii) Gripper iv) 1 Servo for base v) 1 servo for Elbow vi) 1 Servo for gripper Arduino Ultrasonic sensor Jumper wire (for connections) 1
BreadBoard General Block Diagram: Block Diagram Degree of Freedom: Degrees of freedom, in a mechanics context, are specific, defined modes in which a mechanical device or system can move. The number of degrees of freedom is equal to the total number of independent displacements or aspects of motion. Robotic arm is built to work like a human arm. Base motion can take place as roll (clockwise and anticlockwise) or elbow as yaw (left and right). Gripper only opens up and closes at the time of pick and place. In this project, a robotic arm with 3 DOF has been designed. These 3 DOF are 2
Elbow Base Gripper Degree of rotation: Gripper 0 to 180 degree Elbow 76 degree base 0 to 180 degree Working principle of Robotic arm: Robotic arm can perform many tasks which depend on its application, as this project is the implementation of an industrial robotic arm which is capable of picking the object and placing it to its destination. It can do so, with the help of 3 major components Arduino Dc servo motor Ultrasonic sensor Arduino is the controller which is controlling the whole process by making decisions and giving the set of commands to other components. Ultrasonic sensor is for detecting objects in a certain range, when there is any object in a given range; it gives a feedback signal to arduino, in this way arduino gives command to servo motor to rotate and move in such a way to pick an object from point A to Point B and place the object there. Coding: #include <Servo.h> #define ECHOPIN 11 #define TRIGPIN 12 // Pin to receive echo pulse // Pin to send trigger pulse Servo elbow; Servo gripper; 3
Servo base; // create servo object to control a servo int pos1 = 0; // variable to store the servo position int pos2 = 0; int pos3 = 0; void setup() { Serial.begin(9600); pinmode(echopin, INPUT); pinmode(trigpin, OUTPUT); elbow.attach(3); gripper.attach(5); base.attach(6); void loop() { long duration, distance; // start the scan digitalwrite(trigpin, LOW); delaymicroseconds(2); // delays are required for a succesful sensor operation. digitalwrite(trigpin, HIGH); delaymicroseconds(10); //this delay is required as well! digitalwrite(trigpin, LOW); duration = pulsein(echopin, HIGH); distance = (duration/2) / 29.1;// convert the distance to centimeters. 4
if (distance < 15) //if there's an object,activate robotic arm { elbow.write(76); for (pos1 = 0; pos1 <= 180; pos1 += 1) { //position 1 for picking an object base.write(pos1); delay(15); elbow.write(0); for( pos3 = 0; pos3 <= 180; pos3+=1) { //180 degree rotation to grip an object (gripper's defined position) gripper.write(pos3); delay(15); elbow.write(76); for( pos2 = 180; pos2>= 0; pos2 -=1) { // position 2 for placing an object base.write(pos2); delay(15); elbow.write(0); if( gripper.read() ==180) { elbow towards position 2 //when the object is gripped by the gripper then move the base and for( pos3 = 180; pos3 >= 0; pos3-=1) { position) //180 degree rotation to grip an object (gripper's defined gripper.write(pos3); 5
delay(15); delay(5000); Field Controlled Servo motor: In a field controlled d.c. servomotor, the electrical signal is externally applied to the field winding. Hence current through the field winding is controlled, in turn controlling the flux. This motor is also known as separately excited motor or variable magnetic flux motor. In a control system, the error signal is generated by a controller by comparing the actual output with the reference input. Such an error signal is not enough to drive the d.c. motor. Hence it is amplified by an amplifier called servo amplifier. Such a signal obtained from a servo amplifier is applied to the field winding. With the help of constant current source, the armature current is maintained constant. When there is change in the voltage applied to the field winding V f, the current through field winding changes. This changes the flux produced by the field winding responsible for the change in the motor characteristics. The motor has large L f/r f ratio where L f is the field inductance and R f is and is the field resistance. Due to this the time constant of the motor is high. Control signals hence field controlled d.c. servomotor is uncommon in practice. Output Response of Field controlled DC-servo motor: 6
Transfer Function of field Controlled DC-servo motors: Mg996r High torque servo motor: θ m (s) K f = E f(s) (J m s 2 + sb m ) (R f + s. L f ) θ m E f = K f s(j m s + B m )(R f + s. L f ) Data Sheet: 7 Operating speed 4.8v, 0.18sec/60 6 v, 0.16 sec/60 Operating voltage 4.8v 6v Control system Analog Operating angle 180 degree Required pulse 500 microsecond 2500 microseconds Motor type Carbon Gear type metal Running current 500mA- 900mA
Temperature range 0 to 500 Celsius PWM period 200ms (50Hz) Arduino Uno (ATmega 328) Data sheet Operating voltage 5 volts Input voltage (recommended) 7-12 volts Input voltage (limit) 20 volts Digital I/O pins 14 PWM digital I/O pins 6 Analog input pins 6 Clock period 16 MHz DC current per I/O pins 20 ma Led_built-in Pin no: 13 Ultrasonic sensor: Datasheet: Working voltage DC 5 volts Working current 15mA Working frequency 40 Hz Measuring angle 15 Minimum range 2 cm Maximum range 4 meters 8
9