Line Follower & Abstacle Avoiding Robot using Arduino Uno ( Industrial Bot/Medical purpose)
The main aim of any robot is to reduce human effort. According to the purpose different types of robots are designed for practical applications. In any work environment proper monitoring is always needed for better results. This smart and intelligent line follower robot can be used in industries for carrying goods from one place to another. The main reason why this robot can be employed for transportation of goods is its fit and forget ability, which means that once the robot is placed on the desired path the working of the robot is totally automatic, there is no need for controlling the robot manually. This is what makes the line follower robot more efficient and useful when compared to other conventional robots. A traditional obstacle avoiding robot cannot help in transportation of goods because there is no particular path for the robot. It will move randomly by avoiding the obstacles and will not reach the required decision. The movement of obstacle avoiding robot cannot be controlled. Considering this factor line follower robot has more useful applications. This conventional line follower robot can be made smart and intelligent by giving it the ability to detect obstacles.
Components Required:-
1) Arduino Uno
2) L298n Motor Driver Module
3) Ultrasonic Sensor
4) IR Sensor
5) 60rpm Geared Motors
6) Chassis
7) Bot Wheels
8) Jumper Wires
9) 12volt Rechargeable Battery
10) To connect sensors +v& -be connector
11) Power Jack
12) Toggle Switch
Circuit Diagram :-
Arduino uno Robot Code:-
/* * Created by Saurabh Mohod * Project: Line following robot with obstacle avoidance */ #define MA1 11 // Motor A Pin 1 #define MA2 10 // Motor A Pin 2 #define MB1 9 // Motor B Pin 1 #define MB2 8 // Motor B Pin 2 #define MAE 5 // Motor A Enable Pin #define MBE 6 // Motor B Enable Pin #define IR1 2 // IR Sensor Pin #define IR2 3 // IR Sensor Pin #define echoPin A4 // echo pin #define trigPin A5 // Trigger pin int speed = 250; int frontdist; long duration; int setdist = 8; bool A, B; // Variable void setup() { pinMode(MA1, OUTPUT); // Make All Motor Related Pin output pinMode(MA2, OUTPUT); pinMode(MB1, OUTPUT); pinMode(MB2, OUTPUT); pinMode(MAE, OUTPUT); pinMode(MBE, OUTPUT); pinMode(IR1, INPUT); // Make IR Sensor 1 Pin Input pinMode(IR2, INPUT); // Make IR Sensor 2 Pin Input pinMode (trigPin, OUTPUT); pinMode (echoPin, INPUT); Serial.begin(9600); delay(1000); analogWrite(MAE , 250); // Control Motor A Speed Maximum Value 255 Minimum Value 0 analogWrite(MBE , 250); // Control Motor B Speed Maximum Value 255 Minimum Value 0 } void loop() { frontdist = data(); Serial.println(frontdist); if (frontdist > setdist){ if ((digitalRead(IR1) == 0) && (digitalRead(IR2) == 0)){forword();} if ((digitalRead(IR1) == 0) && (digitalRead(IR2) == 1)){turnRight();} if ((digitalRead(IR1) == 1) && (digitalRead(IR2) == 0)){turnLeft();} } else { turnLeft(); delay(750); forword(); delay(1500); turnRight(); delay(500); forword(); delay(1500); turnRight(); delay(600); forword(); delay(450); } } long data() { digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); duration = pulseIn (echoPin, HIGH); return duration / 29 / 2; } void stop() { digitalWrite(MA1, LOW); // Stop Robot digitalWrite(MA2, LOW); digitalWrite(MB1, LOW); digitalWrite(MB2, LOW); } void forword() { digitalWrite(MA1, HIGH); // Rotate Both Motor in Forward Direction digitalWrite(MA2, LOW); digitalWrite(MB1, HIGH); digitalWrite(MB2, LOW); } void turnRight() { digitalWrite(MA1, HIGH); // Take Right Turn digitalWrite(MA2, LOW); digitalWrite(MB1, LOW); digitalWrite(MB2, HIGH); } void turnLeft() { digitalWrite(MA1, LOW); // Take Left Turn digitalWrite(MA2, HIGH); digitalWrite(MB1, HIGH); digitalWrite(MB2, LOW); }
Visit For More Details:-
Application :-
Industrial Applications:-These robots can be used as automated equipment carriers in industries replacing traditional conveyer belts.
Automobile applications:- These robots can also be used as automatic cars running on roads with embedded magnets.
Domestic applications:- can also be used at homes for domestic purposes like floor cleaning etc.
Guidance applications: These can be used in public places like shopping malls, museums etc. o provide path guidance.