As a branch in the application of autonomous vehicles, Wheeled Mobile Robots WMR is considered the most widely used type of mobile robot.. Therefore, I decided to select the topic "Contr
Trang 1HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING
Trang 22
Preface
With the development of technology, the implementation of self driving vehicles has become one of the most well known issues which has drawn a great amount of interest -from researchers and engineers around the world As a branch in the application of autonomous vehicles, Wheeled Mobile Robots (WMR) is considered the most widely used type of mobile robot Therefore, I decided to select the topic "Control 4 wheel mobile robot -with Android device via Bluetooth" for the project In this project, I desire to design a 4 -wheel WMR which is controlled by user through a android smart phone and bluetooth connection
-After a complete deployment of the system, the robot satisfied my desire as from the beginning With a view to expanding the application scope of the system, it can be said that the solution is plausible for the deployment in several certain environment such as household or offices However, there are still several limitations for the implementation of the system
During my research, I would like to sincerely thank teacher M.S Đinh Thi Lan Anh for helping me a lot in the process of researching, designing and completing this project Due to limited knowledge of the first time doing a project, it is inevitable that there will be shortcomings and limitations, so I am looking forward to getting suggestions and reminders from teacher to complete my project
Sincerely thanks!
Performing student
Nguyen Thanh Nam
Trang 33
TABLE OF CONTENTS
CHAPTER 1 INTRODUCTION ABOUT THE WHEELED MOBILE ROBOT (WRM) 6
2.3.6 Overall Hardware Structure and Funding for the Project 18
CHAPTER 3 SOFTWARE DESIGN AND TEST RUNNING 20
Trang 44
LIST OF FIGURES
Figure 1.1 UAV is used to carry cargo in Turkey 6
Figure 1.2 Legged robot with 6 legs inspired by insects 7
Figure 3 Robot with tracks used to defuse bombs1 8
Figure 4 The first WMR designed by W Grey Walter1 8
Figure 6 Industrial used WMR for transporting goods1 - 9
Figure 1.7 The Model of a Wheeled Mobile Robot (WMR) 10
Figure 2.10 The schematic of the Motor Driver L298N 14
Figure 2.9 The full 4 wheel WMR after assembling components- 19
Figure 3.1 Flow chart of the main program for the robot 20
Trang 55
LIST OF TABLES
Table 2.1 Technical specifications for the WMR 12
Table 2.2 Specifications of the Lithium battery Icr18650 13
Table 2.3 Specifications of the Motor Driver L298N 13
Table 2.4 Specifications of the 1:48 geared DC motor 15
Table 2.5 List of components used in the Hardware Design and funding
for the project
18
Table 3 List of commands from the Android app.1 21
Trang 66
CHAPTER 1 INTRODUCTION ABOUT THE WHEELED MOBILE
ROBOT (WRM) 1.1 Overview about the Wheeled Mobile Robot (MWR)
It is considered that Wheeled Mobile Robot is a branch in the research and application of Mobile Robot Simply put, a wheeled mobile robot (or WMR in short) is a mobile robot which utilizes the use of wheel(s) Therefore, an understanding about the Mobile Robot could be an appropriate approach for a throughout research of the WMR
1.1.1 The Mobile Robot
a) Definition of Mobile Robot
Derived from the definition of the word ‘robot’ and the word ‘mobile’, the definition of a mobile robot could be stated as follows
Mobile robot is a type of equipment containing mechanical and electrical components having the capability to move in an environment, which is used to replace human labor to perform some certain tasks
Indeed, the difference between the mobile robot and other types of robots comes from the ability to move and travel to different positions or places, which is the definition of the word ‘mobile’ itself Although this feature may be limited to be in the surrounding – a rather relative term as the area could vary from, for example, several cm2 to several km2, the location of the mobile robot is not fixed
A demonstration of this feature could be seen in a comparison between an unmanned aerial vehicle (UAV) and a robotic arm (a type of stationary robot) While the structure of an UAV and the robotic arm are somewhat similar in the sense that they both consists of mechanical and electrical links and actuators, the UAV could travel distances in the sky, contrasting to the robotic arm being fixed in a specific location in a factory
Figure 1.1 UAV is used to carry cargo in Turkey Source: https://www.dailysabah.com/
Trang 77
Figure 1.2 Robotic arm is used to carve wood Source: https://designrobotics.net/
b) Classification of Mobile Robot
Mobile Robots are categorized based on two criteria, which is the working environment of the robot of its actuator it used to move
Regarding the first criterion, there are five types of mobile robots:
- Robots working on land or at home, which is usually referred to as Unmanned Ground Vehicles (UGVs)
- Robots transporting or delivering materials and supplies in a factory or similar working environment
- Aerial Robots, normally called Unmanned Aerial Vehicles (UAVs) or drones
- Underwater Robots, which is usually called Autonomous Underwater Vehicles (AUVs)
- Polar Robots, which is implemented to navigate icy environment, such as the North Pole or the South Pole
On the other hand, types of Mobile Robots can be into three categories based on their actuators:
- Legged Robot (human-like legs using in an android or animal like ones)
Trang 88
-
Figure 1.4 Robot with tracks used to defuse bombs Source: http://www.igrnews.com/
1.1.2 The Wheeled Mobile Robot
As mentioned in the beginning of this chapter as well as in the section above, Wheeled Mobile Robot falls into the category of mobile robot using wheels to move in the working space
Ever since the first implementation of wheeled mobile robots, namely Elmer and Elsie, in the late 1940s by neurobiologist W Grey Walter, WMRs had been a subject of great interests for both researching purposes and application
Figure 1.5 The first WMR designed by W Grey Walter Source: http://www.theoldrobots.com/
During the process of working on the thesis, the team has read a certain number of articles and books which study about algorithms, models, and control schemes etc of the WMR Moreover, it could be argued that the scope of application of WMRs is wide, ranging from outer space to factories and to even households To begin with, a well known -implementation of WMR could be ‘Curiosity’ – a car-sized mobile robot launched by NASA in 2011 for the purpose of exploration on Mars Additionally, industrial WMRs could also be implemented for transportation of goods or materials Lastly, in the form of vacuum robots, WMRs had taken a part in the daily life of many citizens around the world
Trang 99
Figure 1.6 The mobile robot ‘Curiosity’ Source: https://mars.nasa.gov/
Figure 1.7 Industrial-used WMR for transporting goods Source: https://www.controleng.com/
In conclusion, in this section, I have introduced some basic information about the definition
of the wheeled mobile robot, which is based on the definition of mobile robot, as well as some of the application of the WMR for researching or for commercial purposes However, before being able to implement a WMR for any abovementioned purposed, ones should acquire a decent amount of knowledge about the system of an WMR Therefore, in the following section, the modelling of the WMR one of the most essential parts will be – – discussed
1.2 Model of the Wheeled Mobile Robot
Ones visually observe the operation of a WMR may think this is a rather easy task given the fact that it is just about controlling wheels to move Nonetheless, in the perspective of
an engineer, the control of a WMR is far more complicated than controlling wheels (although controlling wheels is not a simple task, either) Before any control schemes could
be applied, the engineer must beforehand determine the relation of the WMR with its working space as well as that with its actuators, which is motors and wheels in this case With this view, mathematical models of the WMR are derived to correctly represent those relations
Trang 1010
Figure 1.8 The Model of a Wheeled Mobile Robot (WMR)
The working plane of the WMR is represented by a global coordinate (Xg, Yg) and a moving plane (Xm, Ym) attached to the robot Consequently, the pose of the robot in the plane is defined by its state vector:
끫뤤(끫뤪) = �끫뤴(끫뤪)끫뤲(끫뤪)
where x(t) and y(t) are the position of the vehicle in global coordinate (Xg, Yg), and φ(t)
is the angle between the direction the mobile robot is moving and the global x-axis
Noted that both main wheels have to be placed on a common axis and be controlled by separate motors The third wheel is under the control of no motor and can move freely Other variables in the system worth to be noticed are as follows: r is the wheel radius, L is the distance between two wheels on the axis, R(t) is the instantaneous radius of the vehicle
on its trajectory, and d is the distance between the common axis and the third wheel [1]
끫뢾2
− 끫뢾
끫뢾끫롾
Trang 11끫뢮=1
(1.6)
where the unknown disturbance 끫븞끫뢢끫뢰is omitted Furthermore, since the WMR is assum
to work on an equipotential plane, the forces and torques acting on the vehicles by the influence of gravitation 끫뢨끫뢰are also not present
Therefore, the dynamic model written in matrix form can be obtained [1] as:
끫롾2
Trang 1212
CHAPTER 2 HARDWARE INPLEMENTATION OF THE WMR 2.1 Technical Specifications
The technical specifications for the WMR is
5 Distance between two wheels on the axis L 0.185 m
2.2 Block Diagrams
Figure 2.1 Block Diagram of the WMR
The Block Diagram illustrates basic parts of the vehicle and the interaction between them Specifically, the whole WMR including a microprocessor, the motor driver, two motors (left and right), a blu toothe receiver The microprocessor receives the command from Android phone and send control signal to the motor driver so as to control the whole mobile robot
Trang 1313
2.3 Hardware Design
Derived from the Specifications and the Block Design mentioned in previous sections, components in each block are selected as below However, since available components purchased in the market are not authentic, the outcome product may not meet the desired specifications
2.3.1 Power Supply
The power of the vehicle is supplied using a series of three Lithium rechargeable batteries Icr18650
Table 2.2 Specifications of the Lithium battery Icr18650
Figure 2.2 Lithium Icr18650 batteries
2.3.2 Motor Driver
The Module applied in this block is the Motor Driver Module L298N
Table 2.1 Specifications of the Motor Driver L298N
Trang 1414
Figure 2.3 The Motor Driver Module L298N
The L298N is a dual channel H Bridge motor driver capable of driving a pair of DC - motors That means it can individually drive up to two motors making it ideal for building two-wheel robot platforms
-Internal circuit diagram of L298N Motor Driver module is given below:
Figure 2.4 The schematic of the Motor Driver L298N
In order to have a complete control over DC motor, I have to control its speed and rotation direction This can be achieved by combining these two techniques:
- PWM – For controlling speed
- H Bridge For controlling rotation direction.- –
2.3.3 Motor
After comparing several types of motor on the market, I decided to choose the 1:48 geared
DC motor (Smart Car Robot Plastic Tire Wheel with DC 3 6v Gear Motor for arduino) is the most chosen and used type today for simple robot designs
Trang 15-15
Figure 2.5 The 1:48 geared DC motor
Below are some parameters of the motor:
- Tire Parameter Center hole: 5.3MM x 3.66MM
- Wheel size: 65x26mm
- Motor Weight: (g) 50
- Motor Size: 70mm*22mm*18mm
- Noise: <65dB
Table 2.4 Specifications of the 1:48 geared DC motor
2.3.4 Microcontroller
In this project, I choose the Arduino Uno R3 Module to control the WMR because it has itself an extremely easy- -touse application development environment, with a very simple programming language Also, it has a very low price and the open source hardware and -software
Trang 1616
Figure 2.6 Board Arduino Uno R3
Arduino Uno R3 board‘s central processing unit is an AVR microcontroller Atmega328 The main structure of Arduino Uno includes the following parts:
- USB plug: This is the communication port for us to upload code from the PC to the microcontroller It is also the serial communication for data transmission between the microcontroller and the computer
- Power plug: to run the Arduino, we can power it with the USB port above, but in other cases when we can’t connect it to the computer, we can use a source of 9V to 12V instead
- There are 14 input / output pins numbered from 0 to 13, beside that, there is a grounding pin (GND) and a reference voltage pin (AREF)
- AVR microcontroller: this is the central processing unit of the entire board With each Arduino model there are different chips In this Arduino Uno we use ATMega328
Figure 2.7 Parts of Arduino Uno R3
Trang 1717
- The detailed parameters of Arduino Uno:
Processor:
Operating voltage:
Input voltage (operational):
Input voltage (limit):
Digital I/O pins:
Analog input pins:
Maximum current in each pin:
14
6 40mA 50mA
32 KB (ATmega328)
2 KB (ATmega328)
1 KB (ATmega328) 16MHz
2.3.5 Communication
a) Bluetooth connection
Bluetooth communication is RF communication based on 2.4 GHz frequency with range
of about 10 meters This is one of the most common and very commonly used interfaces in data transmission over short distances, in audio systems, in hands free devices, computer -peripherals, etc
For the purpose of communication between Android phone and Arduino, in this project I choose Bluetooth connections because of its convenience
b) Module Bluetooth HC-05
The HC 05 Bluetooth module is the device of choice for implementing projects based on Bluetooth communication The HC 05 Bluetooth module is a simple wireless -communication device based on the Bluetooth protocol
-This module is based on the BC417 single chip Bluetooth IC which complies with the Bluetooth v2.0 standard and supports both UART and USB interfaces
Generally speaking, the HC 05 Bluetooth module, or HC 05 sub module, to be precise, - - comes with the BC417 IC along with the flash memory Such modules come as surface mount boards, and some third party manufacturers use this board to build a more complete system with the necessary pins and parts
-HC-05 pinout:
- KEY: this pin is used to select AT Mode or Data Mode
- VCC: this pin can supply power from 3.6V to 6V inside the module, which has a source ic converted to 3.3V voltage and supplied to IC BC417
- GND (Mass): connected to the source pin GND