Professional Documents
Culture Documents
COE 399 Final Report PDF
COE 399 Final Report PDF
Prepared by:
Hamad Ali Hamad Al-Hajri
ID# 206501
Abstract
This report describes the summer training experience in the Center of
Communications and Computer Research at KFUPM - Research Institute. I worked in
USAD 1 project with a team of two students to design the controlling unit that is
installed on a four wheels motorbike and a control station to send the user commands
to the Robotic Warrior. In addition, we setup a wireless network to connect the control
station with the controlling unit and also we designed the required software that is
needed for the digital devices to work properly. In this report I describe all the
components of the project and work done on them. Also, I demonstrate some of the
software that I develop in this project.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 2
Table of Contents
ACKNOWLEDGMENTS …………………………………………………………………….……….. 4
INTRODUCTION …………………………………………………………………….……….……….. 4
1. WORK PLACE ……….….………….………………………………………………………… 5
2. ACCOMPLISHED WORK ……………………………………………………….…………... 6
2.1 The Robotic Warrior System …………………………………………………………. 8
e) Actuators …………….………………………………….……………. 16
a) Client PC …………………………………..………………………… 18
b) Joystick ……………………………………………………………….. 19
CONCLUSION ……………………………………………………………………………………… 21
REFERENCES ………………………………………………………………………………………… 23
APPENDIXES ………………………………………………………………………………………… 24
A. Progress Report 1 ……….…………………….…………………………………………… 24
B. Progress Report 2 ….………………………………………………………………….…… 25
C. Progress Report 3 …………………….……………………….…………………………… 26
CERTIFICATE ………………………………………………………………………………………… 27
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 3
List of Figures
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 4
ACKNOWLEDGMENTS
The project team wishes to acknowledge the unlimited support of the USAD 1
project supervisors, Dr. Mansour Al-Dajani, Dr. Moustafa ElShafiai and Dr. Abdul-Hafid
Bouharaoua. The team would also like to thank faculty who work previously in this
project, or who attend the final demo of the project. The project team members also
appreciate each other and their fervor during this project.
INTRODUCTION
In this report I will explain my role in designing and implementing remotely
controlled vehicle for security applications. I worked in small team of me and Mr.
Mohammed Al-Marouf who is a student in System Engineering Department at KFUPM.
We worked in the Center of Communications and Computer Research (CCCR) at
KFUPM - Research Institute. We started our work in the 5th of July 2008 and finished the
summer training after eight weeks in the 27th of august 2008.
In our summer training, we worked under the supervision of Dr. Mansour Al-Dajani,
who is the director of the center in which we worked. In addition, Dr. Moustafa
ElShafiai and Dr. Abdul-Hafid Bouharaoua advised, directed and monitor us through
whole the training period; and they attended our final demo of the USAD 1 project in
25th of august 2008.
In the training period we designed and solved many systems. The main problems
and systems that we solved and designed are:
• User interface that was installed in the control station (client PC) to send the user
commands to the vehicle.
• Commands (receiver/sender) software that was installed in the server PC to
receive the commands wirelessly from the control station PC and send them to the
control unit through serial connection.
• The hardware of the control circuit that was set in the vehicle besides software that
was installed in the main part of the control circuit which is a PIC microcontroller.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 5
Those are the main systems that we designed. However, we designed and
prepared some other systems such vision system and power supplying system.
1. WORK PLACE
The summer training program was at KFUPM and specifically at the Center of
Communications and Computer Research (CCCR) - Research Institute. The research
institute (RI) plays an important role in the field of research and development at
KFUPM. The RI's projects benefit both the kingdom's private and public sectors. At the
same time, it has responded effectively to provide new research and technical
services as the needs have arisen. The RI is divided into six main centers as the
following:
The RI's clients are more than 250 clients during the few past years in both fields:
projects and laboratories services. Those clients include big names of international and
local companies and organizations such as Petroleum Energy Center (PEC) - Japan,
Johns Hopkins University - USA, Saudi Arabian Oil Company (Saudi Aramco) - KSA,
Saudi Basic Industries Corporation (SABIC) - KSA, and others.
The Center of Communications & Computer Research (CCCR) which the summer
training program was in it introduces many services to companies and organizations
such as consultations, training and performing projects in communication and
computer areas. The center also contains many labs such as:
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 6
2. ACCOMPLISHED WORK
When we start working in the smart systems laboratory at Center of
Communications and Computer Research, we was asked to finish all required things
that are needed for the USAD 1 project to work properly; by designing and
implementing and testing any software and hardware that required for the project. In
addition we were responsible to coordinate the work of other departments on some
parts of the project.
The USAD 1 project is divided into two main systems. We can name first system as
the robotic warrior system (the vehicle), and the second system as the control station.
The main components of the robotic warrior system is a four wheels motorbike, PC
works as server, wireless router, microcontroller circuit, actuators and power suppliers.
For the control station, the main components are PC works as client, steering wheel
with its pedals and joystick. The following figure will illustrate the idea of the project:
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 7
• Fixing the project components on the bottom wood plate such as PIC
microcontrollers, H-Bridge, Relays board and fans.
• Fixing the wireless router and the server PC parts on the upper wood plate.
• Writing a program that deal directly with the PIC microcontroller through
serial cable (visual basic language).
• Modifying the code of those programs, so that the joystick and the steering
wheel can be used now to perform actions.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 8
In the following sections I will give detailed descriptions and explanations about
each part of the main systems of the USAD 1 project and the work done on it.
2.1 The Robotic Warrior System
This part of the USAD 1 project is much bigger and more complicated than the
other, figure 2. The main objective of our work in this
project is to remotely control all functions of this system
through wireless medium. The most important functions of
that system are the ability of carrying some kind of
weapon with good aiming to the targets, the ability to
move with high maneuverability and the ability to give a
good vision for the surrounding environment to the
controller. To this functions and achieving the project
objectives we built this system with the following
components.
The Robotic Warrior System was built on a four wheel motorbike, figure 3, to
facilitate its movement. The objective of using this kind of vehicle is to give the
system a high maneuverability. Also this
vehicle is capable to be derived on
ordinary or rugged ways. In addition, its
speed, size, power and durability make it
more suitable for our project than the other
choices. However, using this motorbike is not
better than design a special vehicle that
satisfies all the requirement of this project; Figure 3: Four wheels motorbike
but the long time, much of effort and the high cost that needed to design and
build such vehicle make this choice undesirable.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 9
The Work Done on This Motorbike: This motorbike was sent to the mechanical
workshop to change and add some parts that facilitate controlling the motor and
make fixing the electronic components possible. First thing they take out the seat
and attach a metal plate. Then they fix two sticks to carry the vision devices and
the weapon. Also they put carrier for the two servo motors that are responsible for
holding and releasing the break and accelerator pedals; and connecting these
pedals to the servo motors by metallic wires. In addition they set a holder for
steering motor and place gear disk under the steering wheel to connect the
steering wheel with the steering motor.
b) Server PC
The server PC is disassembled and then fixed on the upper wood plate in the
motorbike as it appears in figure 4. Important
parts are fixed such as motherboard, power
supply, hard disk drive and CD – Rom drive
while some parts are ignored to save a space
on the wood plate such as floppy disk drive.
This PC is connected to the wireless router by
an Ethernet cable and also connected to the
PIC microcontroller by a serial cable through Figure 4: Server PC
COM1 port.
The server/client programs are written by visual basic language and by using
Microsoft Visual Basic 6.0. The server
program works automatically in the
server PC when the operating system
(windows) starts. This program keeps
listening until it receives a connection
request from the client PC (figure 5). Figure 5: Server program
After the server program accepts this
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 10
request, the client PC can now sends commands to the server PC and the server
PC itself receives those commands, transfers them to COM1 port to the PIC
microcontroller that executes those commands.
The program that is dealing with videos transmission is installed in the server
PC. This program is called "CamGuard Security System" and its version is 4.0.12.133.
It is required to be installed only on the server PC, because the user can see the
videos in the client PC without installing this program again in the client PC.
c) Wireless Router
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 11
d) Controlling Unit
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 12
i) Microcontrollers' Board
We have used two microcontrollers. They are PIC 18F452. Each
microcontroller is fixed on a flash lab board. And we fixed those two flash lab
boards with electrical connectors on one bigger board to facilitate the
connectivity to the microcontrollers, figure 8 and 9.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 13
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 14
ii) H-Bridge
To derive and control the steering motor, an H-Bridge board is used.
This device control the current following to
the motor according to the signal received
from the microcontroller. The microcontroller
sends pulses with period of 20 mille second.
These pulses are changing periodically
between 0 and 5 volts. As the average of
the received pulses increased the H-bridge
raises the supplied current to the steering
motor. Figure 11: H-Bridge
This kind of H-bridge has several operation modes. The mode that was
used in this project was the analog mode. The H-Bridge recognizes the
digital pulses from the microcontroller as analog input by obtain the
average of these pulses, figure 11.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 15
the port B and port D in the master microcontroller. Each one of these 16
pins in the microcontroller sends signals for one of those relays, figure 12.
Work done on the controlling unit We start by testing and recognizing the
operation of each device in the controlling unit. Then we worked in developing the
software for the two microcontrollers. Finally, we worked in the connection
between the various parts of the controlling unit. Figure 13 shows the schematic
diagram of the controlling unit.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 16
e) Actuators
Figure 15: Actuators – steering motor Figures 16, 17: Actuators – camera
6 A and 12 DC volts shown in figure 15. Other actuators are the turning/tilting metal
boxes. The main function of these actuators is to carry the vision device and the
weapon and aiming those to specific points by turning or tilting its upper part. Each
one of these turning/tilting boxes is controlled by four relays. The turning/tilting
boxes appear clearly in figures 16, 17.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 17
f) Power Suppliers
To providing the required power, a high current +12V and tow 6V batteries
(two 6 V are parallel connected) were used. Moreover, DC to AC Inverter was
used to generate an alternative current of 220V to supply the PC and wireless
router. This DC to AC power inverter takes DC input voltage between 10 to 15 volts
and gives 220 volts as an AC output voltage. Also, it has a continuous output
power of 500 watts. All these power suppliers are shown in figure 18.
g) Vision Devices
Vision devices in this project are the cameras. There are two cameras fixed
on the motorbike. The first camera (front camera) is
used to see the destination and the surrounding
areas of the motorbike, while the second camera
(weapon camera) which is in a higher level than the
first one, is used for the weapon. Both cameras are
from the type "Creative PC-CAM 350" as shown in
figure 19. Figure 19: Vision devices
The cameras are connected to the server PC by USB cables. Videos are
transmitted to the client PC wirelessly by using "CamGuard Security System"
program (UDP Protocol).
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 18
2.2 The Control Station
a) Client PC
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 19
b) Joystick
In the client program (joystick and steering wheel version), the x and y
coordinates of the joystick are very important to perform actions in USAD 1 project.
The joystick of type "Genius" has 8 buttons, and for every button there is a specific
value for it. The joystick is responsible for controlling the turning/tilting boxes. For
example if the joystick is moved to the right, then the x
value will increase and if the joystick is moved to the left,
then the x value definitely will decrease. Similarly, the
same things repeated here for the y value and the
movement of the joystick (forward/backward), figure 22.
c) Steering Wheel
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 20
Different speeds of the steering can be achieved through the speed wheel
buttons.
• Solution: This problem was solved by using PIC 18F microcontroller that is
available in the System Engineering Department and we also agree that the
Rabbit microcontroller which we have is not suitable for this project.
• Problem: Insufficient number and the short period of PWM channels in the
PIC 18F microcontroller.
• Solution: To solve the problem of the short period of the PIC 18F we created
three programmed PWM channels for controlling the tow servo motors and
the steering motor. However, the programmed PWM channel is so accurate
especially with big programs. To decrease the affects of this problem we
used two PIC 18F microcontrollers. One of these microcontrollers, which is the
slave one, was dedicated for controlling the two servo motors and the
steering motors only, and the other one, which is the master one, for
performing the rests tasks.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 21
the control station through wireless connection. Then, these commands are
sent to the master PIC microcontroller. In addition, the master microcontroller
controls the servo motors and the steering motor by sending the commands
to the slave microcontroller to the through SPI serial communication.
CONCLUSION
At the end of our training period we finished our assignments. We presented and
made a demo for our work in the last day of the training. That demo showed that we
successfully did all the assignments. In general, in this project we tried to reach the
highest quality as much as we can, while we maintain a low cost and short time.
By completing all of our assignment, the first phase of the USAD project has been
completed. The second phase of this project which will be USAD 2 will start from the
base of our work and will take our comments and suggestion in account.
I have learned many things in this training period and I got a lot of experiences.
That can be summarized in the following points:
• Get experience in dealing with projects that are used in the real world-working
environment.
• Improved my ability in taking responsibility of a given works and projects.
• Improved my ability in finding problems solutions.
• Improved my ability in self-learning.
• Improved my ability in working under the pressure and short of time.
• Improved my ability in working within a team.
• How to communicate with the employees from different departments.
• Improved my knowledge in PIC microcontrollers.
• Getting familiar with visual basic language which is a new programming
language for me.
• Improved my knowledge by working with the different components of the
project such as relays board and actuators.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 22
Beside all the above experiences, it was the first time to do a complete project
and dealing with some issues that not related directly to my major like the mechanical
issues in this project.
In fact, I benefit a lot from COE courses in the summer training, specially
networking courses such as COE 344 (computer networks), COE 441 (local area
networks) and COE 446 (mobile computing). Also, I benefit a lot from course COE 400
(system design laboratory) that is closer to what I took in the summer training. We
learnt design, implementation, debugging, and documentation of a system and here
in the summer training, we did the same thing.
Really, the summer training period goes very fast and I really enjoyed it. A lot of
knowledge, experiences, stresses, and challenges during this few weeks. I found that
these weeks are valuable and full of knowledge, experiences, and relationships which
can be gained from the real work environment and its challenges.
I would like to suggest that before starting the summer training or the coop
program, a meeting should be done between the students and the coordinator to
prepare the students before they surprise with real life work. Regarding the courses, I
think that it will be useful if the student take COE 400, COE 344 and any other elective
network course before going to the summer training or the coop since it is used a lot in
the real life.
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 23
REFERENCES
1. The Research Institute Annual Report (2005-2006).
2. www.kfupm.edu.sa/ri
3. www.wikipedia.org
4. www.thetech.org
5. http://computer.howstuffworks.com
6. www.microsoft.com
7. www.dslreports.com
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 24
APPENDIXES
A. Progress Report 1
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 25
B. Progress Report 2
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 26
C. Progress Report 3
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri
Summer Training Report 27
CERTIFICATE
Remotely Controlled Vehicle for Security Applications "USAD 1" Hamad Al-Hajri