Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (668.18 KB, 38 trang )
<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">
TRƯỜNG Đ I H C CÔNG NGH THÔNG TIN &Ạ Ọ ỆTRUY N THÔNG VI T - HÀNỀ Ệ
TRƯỜNG Đ I H C CÔNG NGH THÔNG TIN &Ạ Ọ ỆTRUY N THÔNG VI T - HÀNỀ Ệ
To complete this report, first of all, I would like to send it to the teachers in the Department of Computer Science, Vietnam - Korea University of Information and Communication Technology.
In particular, I would like to send my regards to Dr. Nguyen Vu Anh Quang for enthusiastically guiding and helping me complete this report, my deepest thanks.I would like to sincerely thank the teachers in the Department of Computer Science for enthusiastically teaching and creating the most favorable conditions for me during the project implementation.
I would like to thank the students, the previous class students who enthusiastically helped me during the implementation process.
Because of my limited knowledge, during the process of implementing this project, I inevitably made mistakes, and I look forward to receiving the guidance of the teachers. Finally, I would like to send to the teachers who have helped me a most respectful thanks, wish everyone good health and success!
Group,Dolphins
</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">TEACHER'S COMMENTSACKNOWLEDGEMENTLIST OF TABLESLIST OF FIGURESABSTRACT
1. Line Following Robot3. Timeline
CHAPTER 1: INTRODUCTION1. Introduction
2. Background:3. Problem statement4. Objectives5. Methodology6. Limitations7. Organisation of Report8. Summary
CHAPTER 2: IDEAS OVERVIEW
CHAPTER 3: DESIGN AND IMPLEMENTATIONCHAPTER 4: RESULTS AND DEVELOPMENTREFERENCES
</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">12
</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7"><b>1. Line Following Robot</b>
Line Following is one of the most important aspects of robotics. A Line Following Robot is an autonomous robot which is able to follow either a black line that is drawn on the surface consisting of a contrasting color. It is designed to move automatically and follow the line. The robot uses arrays of optical sensors to identify the line, thus assisting the robot to stay on the track. The array of four sensors makes its movement precise and flexible. The robot is driven by DC gear motors to control the movement of the wheels. The Arduino Uno interface is used to perform and implement algorithms to control the speed of the motors, steering the robot to travel along the line smoothly. This project aims to implement the algorithm and control the movement of the robot by proper tuning of the control parameters and thus achieve better performance. In addition the LCD interface is added in order to display the distance travelled by the robot. It can be used for industrial automated equipment carriers, small household applications, tour guides in museums and other similar applications, etc.
<b>2. Bluetooth Controlled Car</b>
A remote-controlled vehicle is any mobile machine controlled by means that are physically not connected with the origin external to the machine.In this project, we make use of Bluetooth technology to control our machine car. We do not call this a robot as this device does not have any sensors. Thereby, senseless robots are machines. The project aims are to design a Bluetooth control Arduino car and write a program into the Arduino microprocessor. Arduino car contains an Arduino microcontroller with basic mobility features. In this project, we make use of Bluetooth technology to control our machine car.
After doing this only we can say that we have been able to create as per our goal described. The device can be controlled by any smart device with android. The major reason for using Bluetooth-based tech is that we can change the remote anytime - mobile phones, tablets, and laptops and physical barriers like walls or doors do not affect the car controls.
<b>3. Timeline</b>
<b>TimeImplementation content</b>
April 4 to April 11 Find out information about two cars, buy neccessary materialsApril 12 April 20 Assembling the line detector and control car with the armApril 21 to April Code the logic for both vehicles, with operations such as line
</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">30 detection, control, and arm picking
May 5 to present Check the operation of the two vehicles, fix errors, bug if any
</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10"><b>1. Introduction:</b>
● Line following robot is a machine that can follow a path. The path can be visible like a black line on a white surface. Sensing a line and maneuvering the robot to stay on course, while constantly correcting wrong moves using feedback from the sensor forms a simple yet effective system.
● Bluetooth controlled car is responsible for moving according to the control panel on the computer that has pre-programmed program information via Bluetooth, can go forward, backward, turn left, turn rightor can recognize obstacles, distance and avoid obstacles.
<b>2. Background:</b>
● As technology becomes increasingly important in today's world, it's invaluable to not only learn how to use technology, to understand how tocreate it as well.. Most of the projects have limited scope to only specificdisciplines. This would limit ones innovation and creativity. This project inspires to make connections across several disciplines rather than learning topics in isolation as it combines mechanical, electronic, electrical and programming skills.
○ -It gives a visual grasp of math and science.○ -It brings out innovation and creativity○ -It enhances problem solving skills○ -It builds logical thinking
<b>3. Problem statement</b>
There are many problems that humans cannot solve on their own, and must have help from machines and robots to do it. such as medical endoscopy, exploring Mars, the moon, …
Line following robot and bluetooth controlled car were created to be ableto solve a number of problems:
● Industrial automated equipment carriers.● Entertainment and small household applications.● Tour guides in museum and other similar applications.● Second wave reconnaissance operations.
<b>4. Objectives</b>
● The project's objectives are:○ About line following robot:
■ -The robot must be able to follow a line
■ -The robot must be able to perform different levels: adjusting when the line changes
self-● -Robot must be insensitive to environmental factors such as light,
</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">external environment
○ About bluetooth controlled car:
■ -The robot must be able to adjust to the direction the user wants
■ -Robot has the ability to adjust speed, sensitivity■ -Robot must be insensitive to environmental factors such
as light, external environment
<b>5. Methodology</b>
● After being assigned the job of making 2 cars by the teacher, my group learned about embedded programming and learned the parts to start working on, the group studied and consulted through the arduino homepage, youtube,...
● The logic is derived for the intelligence of the robot. It is programmed and burn it to the Arduino by using the software Arduino 2.1.0● The accuracy and viability of the program and electronic components is
tested in the simulation software Proteus 8.1.5 .
● After the successful simulation result it is implemented in the hardware.● After finishing the programming,electrical and electronics part, the
stable,reliable and flexible mechanical design and fabrication is completed.
=> The team started testing code loading on real cars.
<b>6. Limitations</b>
About Line Following Car:
● Calibration is difficult, it is not easy to set the perfect value, so many times when the car is running correctly the next day, another line will be wrong.
● Some curves are not implemented effectively and must be avoided.● The turning radius must be at least 150m for the robot to rotate
About Arduino Control Car :
● Align the bluetooth wire correctly to be able to connect to the phone● Set the correct direction of the tires so that the car can run in the right
direction when we control.
● The most difficult part of this car is about the gripper arm, it takes a lot of time to buy accessories such as low voltage, servos to repair because small mistakes also lead to parts burning.
2
</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12"><b>7. Organisation of Report</b>
This report is a documentary delivering the ideas generated, concepts applied, activities done It contains four chapters. The following is a description of information in this thesis:
● Chapter l : An overview of the project such as simulation software before embarking on real installation, the set goals to be achieved, the gaps in the car making delaying the scheduled completion time.● Chapter 2: Description of the idea proposed when implementing 2 cars,
clearly describe the unit that develops the robot car hardware.● This chapter describes sensor array, Arduino, Bluetooth connected to
vehicle via app, engine control system, swing arm system, it also describes project methodology and explains software development hard for the design of the robot.
● Chapter 3: This chapter describes the sensor array, Arduino, the motor control system, the diagram of the 2 cars, the Arduino working logic so that the car does not conflict, Explain the process and make the wiring diagram for the car.
● Chapter 4 : Contains all the results obtained from the software experiments that include the algorithm implemented in a program of 2 cars.
● Finally, chapter 5 will summarize the project. The conclusion, suggestions or recommendations for improvements that can be implemented in future are discussed within this chapter.
<b>8. Summary</b>
About Line Detector :
● Line Follower is one of the most important aspects of a robot. A line robot isan automated robot that can follow a black or white line drawn on a surface with a contrasting color. It is designed to move automatically and follow the drawn line. It is designed to run in line and carry the ball to the finish line in the school's robo car competition.
About Arduino Control Car :
● Bluetooth HC -05 is the most important in this remote control car. It helps us connect to control the car in the direction we want, In addition, low voltage isequally important, it helps us to control the servos so that the car is not overloaded in moving. This vehicle is designed to be used to meet the ball to enter the track car in the competition.
</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13"><b>1.1. Basic operation</b>
The basic operations of line follower are as follows:
● Capture line position with optical sensors mounted at the front end of therobot. For this a combination of IR-LED and Photodiode called an optical sensor has been used. This makes a sensing process of high resolution and high robustness.
● A Steering robot requires a steering mechanism for tracking. Two motorsgoverning wheel motion are used for achieving this task.
● On detecting no black surface, the robot moves in a circular motion until a line is found.
<b>1.2. Block diagram</b>
<b>1.3. Circuit diagram</b>
4
</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14"><b>1.4.Hardware required1.3.1. Optical Sensor</b>
<b>- The BFD-1000 line detection sensor bar is designed to detect black lines and </b>
white lines. On the sensor bar, there are 5 infrared sensors pointing to the ground to detect the line, an infrared sensor is placed in front and along with it is a cruise switch to signal an object. Digital output signal is easy for process.
● <b>Specifications</b>
- Operating voltage: 3.3 ~ 5V.- Detection distance: 0.5~40mm.- Easy digital output for microcontroller.- There are LED display output for each sensor.
- Built-in 5 line detection sensors, 1 obstacle avoidance sensor and a touch-sensitive cruise switch.
- Output includes 7 signal pins of digital sensor and 2 power input for device
- Dimensions: 128 x 45 x 12mm.
<b>1.3.2. Arduino Uno R3</b>
- Arduino Uno R3 is an open source microcontroller board based on Microchip ATmega328 microcontroller developed by Arduino.cc. The
</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">board is equipped with Digital and Analog input/output pin sets that can be interfaced with various expansion boards. Arduino Uno circuit is suitable for those who are new to electronics, programming... Based on the open platform provided by Arduino.cc, you can easily build yourself a fastest project (programming Robot, etc.) autonomous vehicles, controlLED on and off, etc.).
<b>● Some parameters of Arduino UNO R3</b>
Operating voltage 5V DC (powered via USB port only)
Number of Digital I/O pins 14 (6 hardware PWM pins)
Maximum Output Current(5V)
500 mAMaximum output current
</div><span class="text_page_counter">Trang 24</span><div class="page_container" data-page="24">○ · The loop function is the core of the Arduino code and executes repeatedly until the power is disconnected.
<b>1.4. Process Explaination</b>
● When the car starts, the sensors will send analog signals to the arduino UNO board, then the arduino UNO board will send digital signals to the arduino L298N board. The Arduino L298N sends control signals to the motor through the digital (Digital) and Pulse Width Modulation (PWM) pins. These types of control signals are used to control the rotation direction and speed of the motor connected to the L298N module. Regarding the navigation mechanism, at the beginning, the sensor in the middle will be onthe line and the two sensors on either side will be on the white background.From there, the two sensors on either side will signal the respective motors to move forward. When one of the two sensors on either side reaches the line section (turning left or right), the side entering the line will stop providing the signal and the motor on the corresponding side will stop. Finally, when all sensors stop transmitting (to the destination), the vehicle will stop.
<b>1.5. Programming</b>
<small>const int LA1 = 3;const int LA2 = 5;const int LB1 = 6;const int LB2 = 9;</small>
<small> analogWrite(LA1, 0); // Lop phai di lui analogWrite(LA2, 100); // lop phai di toi analogWrite(LB2, 0); // lop trai di toi analogWrite(LB1, 100); // lop trai di lui</small>
<small>//**********5 Channel IR Sensor Connection**********//#define ir1 A0</small>
<small>#define ir2 A1#define ir3 A2#define ir4 A3#define ir5 A4</small>
<small>//*************************************************//</small>
</div><span class="text_page_counter">Trang 25</span><div class="page_container" data-page="25"><small>void setup() {</small>
<small> pinMode(LA1, OUTPUT); pinMode(LA2, OUTPUT); pinMode(LB1, OUTPUT); pinMode(LB2, OUTPUT);</small>
<small> pinMode(ir1, INPUT); pinMode(ir2, INPUT); pinMode(ir3, INPUT); pinMode(ir4, INPUT); pinMode(ir5, INPUT); Serial.begin(9600);}</small>
<small>void loop() {</small>
<small> int s1 = digitalRead(ir1); int s2 = digitalRead(ir2); int s3 = digitalRead(ir3); int s4 = digitalRead(ir4); int s5 = digitalRead(ir5);</small>
<small> if ((s1 == 1) && (s2 == 1) && (s3 == 0) && (s4 == 1) && (s5 == 1)) { analogWrite(LA1, 0);</small>
<small> analogWrite(LA2, 120); analogWrite(LB2, 120); analogWrite(LB1, 0);</small>
16
</div><span class="text_page_counter">Trang 26</span><div class="page_container" data-page="26"><small> if ((s1 == 1) && (s2 == 1) && (s3 == 1) && (s4 == 0) && (s5 == 1)) { analogWrite(LA1, 0);</small>
<small> analogWrite(LA2, 120); analogWrite(LB2, 0); analogWrite(LB1, 0); delay(200); }</small>
<small> if ((s1 == 0) && (s2 == 0) && (s3 == 0) && (s4 == 1) && (s5 == 1)) { analogWrite(LA1, 10);</small>
<small> analogWrite(LA2, 0); analogWrite(LB2, 120); analogWrite(LB1, 0); delay(200); }</small>
<small> if ((s1 == 0) && (s2 == 0) && (s3 == 1) && (s4 == 1) && (s5 == 1)) {</small>
</div><span class="text_page_counter">Trang 27</span><div class="page_container" data-page="27"><small> analogWrite(LA1, 0); analogWrite(LA2, 0); analogWrite(LB2, 120); analogWrite(LB1, 0); delay(200);</small>
<small> }</small>
<small> if ((s1 == 0) && (s2 == 1) && (s3 == 1) && (s4 == 1) && (s5 == 1)) { analogWrite(LA1, 0);</small>
<small> analogWrite(LA2, 0); analogWrite(LB2, 150); analogWrite(LB1, 0); delay(200);</small>
<small> }</small>
<small> if ((s1 == 1) && (s2 == 1) && (s3 == 0) && (s4 == 0) && (s5 == 0)) { analogWrite(LA1, 0);</small>
<small> analogWrite(LA2, 120); analogWrite(LB2, 0); analogWrite(LB1, 20); delay(200); }</small>
<small> if ((s1 == 1) && (s2 == 1) && (s3 == 1) && (s4 == 0) && (s5 == 0)) {</small>
18
</div>