1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Line following robot STUDENT REPORT in this project, we develop the line following robot

28 10 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Ho Chi Minh City University of Technology and Education Faculty for High Quality Training Automation and Control Engineering Technology Line Following Robot STUDENT REPORT Supervisor Assoc.Prof Le My Ha Submitted by Le Tran Vu Hoang Nguyen Quoc Vinh La Gia Bao Hoang Duong Trinh Nguyen Anh Hao January 6th, 2021 TIEU LUAN MOI download : skknchat@gmail.com Contents Abstract ii List of Figures iii List of Tables iv Assignment of work v 1 2 4 10 10 11 11 12 12 13 Results 3.1 Robot 18 18 Overview 1.1 Introducing of line following robot 1.2 Objective of Study 1.3 General operating principles 1.4 Application of line following robot Hardware design and software design 2.1 Hardware design 2.1.1 Idea frame 2.1.2 Select electronic appliances 2.1.3 Cost estimation 2.1.4 Circuit Diagram 2.2 Software design 2.2.1 A algorithm idea 2.2.2 Working principle of Sensor 2.2.3 Working principle of Line following robot 2.2.4 Code TIEU LUAN MOI download : skknchat@gmail.com 3.2 Running results and review 3.2.1 Running results 3.2.2 Review 19 19 19 Discussion 4.1 Advantage 4.2 Disadvantage 4.3 Future work 20 20 20 20 Reference 21 i TIEU LUAN MOI download : skknchat@gmail.com Abstract In this project, we develop the line following robot Module L298N is chosen as the main controller.Arduino uno R3 is the brain which control the robot.We use Closed Loop control and PID control for this project.Dynamic PID control algorithm has been proposed to improve the navigation reliability of the wheeled mobile robot which uses differential drive locomotion system The experimental results show that the dynamic PID algorithm can be performed under the system real-time requirements ii TIEU LUAN MOI download : skknchat@gmail.com List of Figures 2.1 Line following car 2.2 Arduino Uno R3 2.3 Module L298N 2.4 Sensor 2.5 Motor V1 2.6 Wheel 2.7 Li-po battery 2.8 Block diagram 11 2.9 Working principle of sensor 12 2.10 Working principle of line following robot 13 3.1 Our line following car 18 iii TIEU LUAN MOI download : skknchat@gmail.com List of Tables 2.1 Parameter of Arduino Uno R3 2.2 Parameter of module L298N 2.3 Parameter of sensor 2.4 Parameter of motor V1 2.5 Parameter of Wheel V1 2.6 Parameter of li-po battery 2.7 Details of Price of components 10 2.8 Table of Circuit Diagram 10 iv TIEU LUAN MOI download : skknchat@gmail.com Assignment of work Member Private work Work in pairs Nguyen Quoc Vinh Write code Present, write report La Gia Bao Le Tran Vu Hoang Design in Solidworks Trinh Nguyen Anh Hao Design PowerPoint Hoang Duong Buying electronic appliance v Work together and complete it Discuss report by using LaTex and assemble hardware TIEU LUAN MOI download : skknchat@gmail.com Chapter Overview 1.1 Introducing of line following robot Automation is a combination of many fields such as mechanics, control, information technology and mechatronics These fields come together into systems that automate and, moreover, automate the entire manufacturing process Automation companies play an increasingly important and essential role to meet economic development goals, especially in today’s fastmoving work process It asks a highly qualified human resource to operate In the world today, there are many types of robots: Large-scale such as: Machine arms in production lines, automatic production systems In addition are robots capable of moving, doing dangerous jobs to replace humans, robots to help the elderly, sales robots etc In this project I the line of detection robots, compared to the above robots Just a small, simple robot, but this is the foundation for me to make air conditioners, more useful in the process of learning and doing of me after this A line follower robot is basically a robot designed to follow a line or path already pre determined by the user This line or path may be as simple as a physical black straight line on the floor or complex line: circle, the round number eight,zigzag In order to detect these lines, we use sensor system, it can be individual sensors connected together or expansive vision systems with many sensors The choice of these schemes is the key to decide the speed, the accuracy in line detection TIEU LUAN MOI download : skknchat@gmail.com 1.2 Objective of Study We looked up reference on the internet And they did complete this project better than us We tried to a robot must be capable of following a line: • The robot must be capable of following a line • It must be multitasking ,should be capable of taking various degrees of turns • The robot must also be capable of following a line even if it has breaks • It must allow calibration of the line’s darkness threshold • The robot must be insensitive to environmental factors such as lighting and noise 1.3 General operating principles The robot moves in a predetermined trajectory thanks to a guide, the two-wheel system is driven by two DC electric motors through a control circuit and a power circuit Often the guides will have a different color from the background color of the moving trajectory In order for the robot to move on the right orbit, it is necessary to have a sensor, which is responsible for distinguishing the guide line and the background color of the moving trajectory In order for the robot to move in the right trajectory, it is necessary to have a sensor, which is responsible for distinguishing the guide line and the background color, bringing the corresponding electrical signal to the control circuit The control circuit is responsible for receiving feedback from the sensor, thereby controlling the speed and direction of rotation of two DC electric motors so that the car always sticks and moves according to the guide.[1] 1.4 Application of line following robot It is applied in technology detection lines such as automatic movement during transportation From the industrial point of view, line following robot has been implemented in semi to fully autonomous plants In this environment, these robots functions as materials carrier to deliver products from one manufacturing point to another where rail, conveyor and gantry solutions TIEU LUAN MOI download : skknchat@gmail.com are not possible Apart from line following capabilities, these robots should also have the capability to navigate junctions and decide on which junction to turn and which junction ignore This would require the robot to have 90 degree turn and also junction counting capabilities To add on to the complexity of the problem, sensor positioning also plays a role in optimizing the robots performance for the tasks mentioned earlier Line-following robots with pick- andplacement capabilities are commonly used in manufacturing plants These move on a specified path to pick the components from specified locations and place them on desired locations The control principle is still inertia, but the robot path is detected TIEU LUAN MOI download : skknchat@gmail.com Sensor We decided used sensors We began with TCRT5000 but it is difficult because one TCRT5000 has one sensor Then we used The 5-leds bar line detector It is very convenient It is designed to detect black and white lines On the sensor bar there are infrared sensors pointing to the ground to detect the line Table 2.3: Parameter of sensor Operating voltage 3.3V ∼5V Detection distance 0.5mm ∼40mm Size 128 x 45 x 12mm Sensor line detection sensors This is a picture which we used Solidworks to draw model sensor Figure 2.4: Sensor TIEU LUAN MOI download : skknchat@gmail.com Motor We discussed between motor V1 and motor GA25 12V620RPM Motor GA25 12V620RPM make from metal so it is better than motor V1 but it is more expensive than motor V1 We reference on the internet and motor V1 is not bad It is very suitable for this project So we decided to use motor V1 because this line following car is simple Table 2.4: Parameter of motor V1 Operating voltage - 9VDC Electrical current consumption 110 ∼140mA Transmission ratio 1:48 When 3VDC 125 rotations / minute When 5VDC 208 rotations / minute Moment 0.8 KG.CM This is a picture which we used Solidworks to draw model Motor Figure 2.5: Motor V1 Wheel In this project, we used types: wheel V1 and multi-purpose wheel Because our design needs from wheels to wheels to balance so we used wheels If we used wheels V1, it would be difficult to code Using wheels is easy It is the same as wheels Table 2.5: Parameter of Wheel V1 Diameter of wheel 66mm Tire thickness 6.5mm Width wheels 27mm Axle of vehicle 5mm Width vacant of axle 3.66m TIEU LUAN MOI download : skknchat@gmail.com These are two picture which we used Solidworks to draw model wheel (a) Wheel V1 (b) Multi-purpose wheel Figure 2.6: Wheel Battery According assistant Mr Cuong, Li – po battery ( lithium polymer battery ) is very good They are light weight and have improved safety It can refresh so we just buy one time We used batteries for this project Table 2.6: Parameter of li-po battery Voltage 3.7V Capacity 500mAh Size 50 x 30 x 3.5mm This is a picture which we used Solidworks to draw model battery Figure 2.7: Li-po battery TIEU LUAN MOI download : skknchat@gmail.com 2.1.3 Cost estimation The details of price of components used in project is given below Table 2.7: Details of Price of components S.N Particulars Quantum Rate per item (VND) Total (VND) Arduino Uno R3 100.000 100.000 Module L298N 27.000 27.000 Sensor 52.000 52.000 Wheel V1 7.000 14.000 Multi-purpose wheel 15.000 15.000 Motor V1 10.000 20.000 Li-po battery 40.000 80.000 Wires 20 300 6000 Frame 25.000 25.000 Total 393.000 2.1.4 Circuit Diagram We reference on the internet and then we assembled electronic appliances completely This is our circuit diagram Table 2.8: Table of Circuit Diagram Arduino 10 11 A0 A1 A2 A3 A4 VCC GND L298N Sensor ENA IN1 IN2 IN3 IN4 ENB S1 S2 S3 S4 S5 VCC GND 10 TIEU LUAN MOI download : skknchat@gmail.com 2.2 Software design 2.2.1 A algorithm idea When the vehicle is operating, the sensor will collect information and convert it into an electrical signal to the microcontroller The received value will be compared with the preset value Based on the value of the sensor sent, determine the relative deviation between the orbit of the robot and the desired trajectory, then compare that deviation into levels Based on the deviation levels, adjust the speed of the left and right wheels to return the robot to the fund religion Specifically, to turn left the robot’s right wheel speed is one value faster than the left one correspond to the deviation levels (need to test many times), and vice versa This method is simple, but the robot runs unstable, sometimes very fast, sometimes slowly, Stability is highly dependent on the robot’s motor and mechanical construction To overcome this drawback, by applying a position controller PID mind robot Figure 2.8: Block diagram 11 TIEU LUAN MOI download : skknchat@gmail.com 2.2.2 Working principle of Sensor One sensor head will emit infrared rays If there are no obstacles, the infrared will continue The other end is the receiver that won’t get anything, it will return -1 In the case of an obstacle, the infrared rays are reflected back, the receiver will obtain and return the value In the case of a dark surface, the infrared rays will absorb all the returned infrared rays enough so the receiver returns (a) Principle sensor (b) Value sensor Figure 2.9: Working principle of sensor 2.2.3 Working principle of Line following robot If line is centered in front of robot, line following robot goes forward When the center sensor is high and the remaining sensor is low the center sensor is will always be on the line and as line is black in color If line is right of center, the robot turns right When the right sensor is high, the remaining sensor is low and the center sensor is will always be on the line and as line is black in color If no line is detected, circle unit is found 12 TIEU LUAN MOI download : skknchat@gmail.com If line is left of center, beside of the robot, it turns left When the left sensor is high and the remaining sensor is low the center sensor is will always be on the line and as line is black in color Figure 2.10: Working principle of line following robot 2.2.4 Code float Kp = 40, Ki = 0, Kd =160; float error = 0, P = , I = , D = 0, PID_value = 0; float previous_error = 0; int sensor[6] = {0, 0, 0, 0, 0}; int gia_tri_ban_dau = 150; int PID_phai, PID_trai; #define In1 #define In2 #define In3 #define In4 10 #define ENA 13 TIEU LUAN MOI download : skknchat@gmail.com #define ENB 11 void read_sensor_values(void); // doc gia tri cam bien void calculate_pid(void); // tinh PID void motor_control(void); // kiem soat dong co void dung(); void chay_thang(); void setup() { pinMode (ENA, OUTPUT); pinMode (ENB, OUTPUT); pinMode (In1, OUTPUT); pinMode (In2, OUTPUT); pinMode (In3, OUTPUT); pinMode (In4, OUTPUT); Serial.begin(9600); } void loop() { read_sensor_values(); 14 TIEU LUAN MOI download : skknchat@gmail.com calculate_pid(); motor_control(); } void read_sensor_values() { sensor[1] = digitalRead(A0); sensor[2] = digitalRead(A1); sensor[3] = digitalRead(A2); sensor[4] = digitalRead(A3); sensor[5] = digitalRead(A4); if (( sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 0) && (sensor[4] == 0) && (sensor[5] == 1)) // trai error = -4; else if (( sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 0) && (sensor[4] == 1) && (sensor[5] == 1)) error = -3; else if (( sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 1) && (sensor[4] == 1) && (sensor[5] == 1)) error = -2; else if (( sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 1) 15 TIEU LUAN MOI download : skknchat@gmail.com && (sensor[4] == 1) && (sensor[5] == 0)) error = -1; else if (( sensor[1] == 0) && (sensor[2] == 0) && (sensor[3] == 1) && (sensor[4] == 0) && (sensor[5] == 0)) // giua line error = 0; else if (( sensor[1] == 0) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 0) && (sensor[5] == 0)) error = 1; else if (( sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 1) && (sensor[4] == 0) && (sensor[5] == 0)) error = 2; else if (( sensor[1] == 1) && (sensor[2] == 1) && (sensor[3] == 0) && (sensor[4] == 0) && (sensor[5] == 0)) error = 3; else if (( sensor[1] == 1) && (sensor[2] == 0) && (sensor[3] == 0) && (sensor[4] == 0) && (sensor[5] == 0)) error = 4; } void calculate_pid() { P = error; I = I + error; // sai so truoc cong sai so hien tai D = error - previous_error; // sai so hien tai tru sai so truoc PID_value = (Kp * P) + (Ki * I) + (Kd * D); previous_error = error; 16 TIEU LUAN MOI download : skknchat@gmail.com } void motor_control() { digitalWrite(In1, LOW); digitalWrite(In2, HIGH); digitalWrite(In3, LOW); digitalWrite(In4, HIGH); PID_phai = gia_tri_ban_dau + PID_value; PID_trai = gia_tri_ban_dau - PID_value; PID_phai = constrain(gia_tri_ban_dau - PID_value, 0, 170); PID_trai = constrain(gia_tri_ban_dau + PID_value, 0, 170); analogWrite(ENA, PID_phai); analogWrite(ENB, PID_trai); } 17 TIEU LUAN MOI download : skknchat@gmail.com Chapter Results 3.1 Robot Although there are many controversies and disagreements, we did completely this project Robot completed on schedule Rugged and safe hardware during heavy travel The circuit inspection part still had errors, but was promptly corrected During the project, we had troubles Firstly,when finished assembling the parts together and loading the code The car was on, but the wheels were not working Secondly, Vehicle was not stable, has much fluctuation But we fixed it The idea of making a hybrid robot car was inspired by the team from F1 racing And we did it complete Many groups in class buy frame in the store but we designed it We can control speed by using code Figure 3.1: Our line following car 18 TIEU LUAN MOI download : skknchat@gmail.com 3.2 3.2.1 Running results and review Running results We used black electrical tape to test the robot.The result is that divine into two parts.Before using the PID control, the car moved unstable and sometimes ran out of the line When we tested on the circle road, the car can’t follow line.Then we tested on the straight road, it ran but it didn’t run straightly After using PID control the robot runs on the black road, runs according to the required algorithm, completes the task well Demonstrates the fully automatic ability of the robot tracing model It runs better than before It can run straightly on the straight road If we didn’t use PID control, the car still follow line but it is very slow It is not good for race 3.2.2 Review Complicated circuit design, assembly, and repair process takes a lot of time We had many troubles Many times, we didn’t know we wrong until the car didn’t operate And we didn’t know why we wrong? And thanks to tutor Mr Cuong, we fixed it We used PID control for the code Adjusting PID parameters still takes a long time due to manual change of numbers (test many times) We tried to understand nature of PID control but we couldn’t understand So we don’t reach desired values Because of reason so the car is not perfect And our design is not beautiful Our code is not good.The car ran badly on the circle road 19 TIEU LUAN MOI download : skknchat@gmail.com Chapter Discussion 4.1 Advantage We learned a lot of things when we did completely this project We knew how to use Solidworks to simulate electronic appliances, use LaTeX to write report, use program Arduino IDE to code and skill teamwork About the car, we know how to assemble it We know about write basic code Arduino My frame of car is different many groups.The car has followed the line This is the first time, we have had a model which we did by hand And special, we know how to real teamwork 4.2 Disadvantage Our design is not really beautiful The car is still unstable, still slightly shaking The speed of the car is not fast During the assembly process, there are still many errors leading to many changes compared to the intended Teamwork still has many problems, leading to poor work 4.3 Future work In the future, we will make frame better than it We will improve code to make the robot smarter, follow line better, more stable and run fast We will try to add more function when the robot is stability Following line is very important We can develop it to make highly application robots And we will improve skills about code and teamwork 20 TIEU LUAN MOI download : skknchat@gmail.com Chapter Reference Bibliography [1] Chu Quang Thao - Trinh Tai Tuan - Phan Cao Khanh, Report about line following robot with PID control, in: Institute of Military Technology, 4, Slideshare- Education, 2015 [2] Bac Tho 2, 2018, Ho, Instruction in about line Youtube: following robot with PID, Part https://www.youtube.com/watch? fbclid=IwAR2CsVMciYk6WYGPg-7myLxzFQSRB5O2CKpT0_ uyMbeVEWqj92b856suEDE&v=l3uJ-5UvjE4&feature=youtu.be [3] Sujeet Kumar Jha - Saurab Dulal - Manish Karn - Ahmed Raja Khan, Report line following Robot, in: KATHMANDU UNIVERSITY, 2016 [4] ANUSHA, tronics How to make Hub,20/5/2017, Arduino line followe robot, in: Elec- https://www.electronicshub.org/ arduino-line-follower-robot/ [5] Do Choi STEM, 32 Xe line - Khoa hcc Xe robot lap trinh arduino, in: Youtube, 31/12/2019, https://www.youtube.com/watch?v=hcpMSw-y81g&t=194s [6] Khin Khin Saw - Lae Yin Mon, Design and Construction of Line Following Robot using Arduino, in: International Journal of Trend in Scientific Research and Development (IJTSRD), 940-941, 2019 [7] https://icdayroi.com/ 21 TIEU LUAN MOI download : skknchat@gmail.com ... skknchat@gmail.com Abstract In this project, we develop the line following robot Module L298N is chosen as the main controller.Arduino uno R3 is the brain which control the robot. We use Closed Loop control... more useful in the process of learning and doing of me after this A line follower robot is basically a robot designed to follow a line or path already pre determined by the user This line or path... so the receiver returns (a) Principle sensor (b) Value sensor Figure 2.9: Working principle of sensor 2.2.3 Working principle of Line following robot If line is centered in front of robot, line

Ngày đăng: 09/06/2022, 10:50

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w