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.. The Arduino Uno interface is us
Trang 1TRƯỜNG Đ I H C CÔNG NGH THÔNG TIN &Ạ Ọ Ệ
TRUY N THÔNG VI T - HÀNỀ Ệ
GROUP REPORT MICROCONTROLLER - ROBOCAR
Ph m Quang Trung ạ Nguy n H u Tu n ễ ư â
Lecturer : Nguy n Vu Anh Quang ê
Đà N ng, ẵ May 2023
Trang 2TRƯỜNG Đ I H C CÔNG NGH THÔNG TIN &Ạ Ọ Ệ
TRUY N THÔNG VI T - HÀNỀ Ệ
GROUP REPORT MICROCONTROLLER - ROBOCAR
Ph m Quang Trung ạ Nguy n H u Tu n ễ ư â
Lecturer : Nguy n Vu Anh Quang ê
Đà N ng, ẵ May 2023
Trang 3TEACHER'S COMMENTS
Trang 4To 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
Trang 5CHAPTER 2: IDEAS OVERVIEW
CHAPTER 3: DESIGN AND IMPLEMENTATION
CHAPTER 4: RESULTS AND DEVELOPMENT
REFERENCES
Trang 6LIST OF TABLES
12
Trang 7LIST OF FIGURES
Trang 81 Line Following Robot
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
2 Bluetooth Controlled Car
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
3 Timeline
Time Implementation content
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
Trang 930 detection, control, and arm picking
May 5 to present Check the operation of the two vehicles, fix errors, bug if any
Trang 10CHAPTER 1: INTRODUCTION
1 Introduction:
● 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 right
or can recognize obstacles, distance and avoid obstacles
2 Background:
● 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
3 Problem statement
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 able
to 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
4 Objectives
● 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,
Trang 11external 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
5 Methodology
● 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
6 Limitations
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 smoothly
● The width of the path must be 45mm to cover a minimum of 3 sensors
● The path must be flat and free of obstacles
● Adjust the vehicle speed accordingly so that when cornering, the vehicle will not be faulty
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
Trang 127 Organisation of Report
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
8 Summary
About Line Detector :
● Line Follower is one of the most important aspects of a robot A line robot is
an 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
Trang 13CHAPTER 2: IDEAS OVERVIEW
1 Line Following Car
1.1 Basic operation
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
1.2 Block diagram
1.3 Circuit diagram
4
Trang 141.4.Hardware required
1.3.1 Optical Sensor
- The BFD-1000 line detection sensor bar is designed to detect black lines and
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
● Specifications
- 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
1.3.2 Arduino Uno R3
- Arduino Uno R3 is an open source microcontroller board based on Microchip ATmega328 microcontroller developed by Arduino.cc The
Trang 15board 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.)
● Some parameters of Arduino UNO R3
Operating voltage 5V DC (powered via USB port only)
Number of Digital I/O pins 14 (6 hardware PWM pins)
Maximum Output Current
Trang 24○ · The loop function is the core of the Arduino code and executes repeatedly until the power is disconnected.
1.4 Process Explaination
● 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
1.5 Programming
const int LA1 = 3;
const int LA2 = 5;
const int LB1 = 6;
const int LB2 = 9;
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
//**********5 Channel IR Sensor Connection**********//
Trang 28analogWrite(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
delay(150);
}
Trang 291.5.1 Flowchart
2 Bluetooth Controlled Car
2.1 Design and implementation
● Microcontroller Board: The microcontroller board, such as Arduino, is the central component of the Bluetooth-controlled car It provides the computational power and I/O interfaces necessary for receiving and processing commands
● Motor Driver Modules: Motor driver modules are used to control the DC motors that drive the wheels of the car These modules receive signals from the Arduino and regulate the power supply to the motors, enabling precise control over their speed and direction
● DC Motors: The DC motors are responsible for propelling the car by rotating the wheels The number of motors depends on the design of the car, with two motors beingcommon for a basic setup (one motor per driving axle)
● Wheels and Chassis: The wheels are attached to the DC motors and provide traction for the car The chassis is the framework that holds all the components together and provides structural support
● Power Supply: The power supply for the Bluetooth-controlled car can be provided by batteries, such as AA or Li-ion batteries, or a rechargeable battery pack The voltage requirements depend on the specifications of the motors and other components
20