Beruflich Dokumente
Kultur Dokumente
SummerTrainingReport
Hamad Al-Hajri
SummerTrainingReport
Table of Contents
ACKNOWLEDGMENTS ... 4
INTRODUCTION .... 4
1. WORK PLACE ... 5
2. ACCOMPLISHED WORK .... 6
2.1 The Robotic Warrior System . 8
a) Four Wheels Motorbike ... 8
b) The Server PC ... 9
c) Wireless Router ... 10
d) Controlling Unit ....... 11
i) Microcontrollers' Board 12
ii) H-Bridge 14
iii) Relays Board 14
e) Actuators ... 16
f) Power suppliers ..... 17
g) Vision devices ... 17
2.2 The Control Station 18
a) Client PC .. 18
b) Joystick .. 19
c) Steering Wheel 19
3. PROBLEMS AND SOLUTIONS ... 20
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
SummerTrainingReport
List of Figures
Figure 1: The project idea ... 6
Figure 2: The robotic warrior system . 8
Figure 3: Four wheels motorbike 8
Figure 4: Server PC 9
Figure 5: Server program . 9
Figure 6: Wireless router 10
Figure 7: Controlling unit .. 11
Figure 8: Microcontrollers' board .. 12
Figure 9: Microcontrollers' board .. 12
Figure 10: Microcontrollers' circuit diagram .. 13
Figure 11: H-Bridge 14
Figure 12: Relays board .. 14
Figure 13: Controlling unit circuit diagram 15
Figure 14: Actuators acceleration and break .. 16
Figure 15: Actuators steering motor 16
Figure 16: Actuators camera 16
Figure 17: Actuators camera 16
Figure 18: Power supplies .. 17
Figure 19: Vision devices 17
Figure 20: Client program .. 18
Figure 21: Camera program . 18
Figure 22: Joystick 19
Figure 23: Steering wheel .. 19
Hamad Al-Hajri
SummerTrainingReport
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.
Hamad Al-Hajri
SummerTrainingReport
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:
Hamad Al-Hajri
SummerTrainingReport
Smart Systems Laboratory (SSL), that "USAD 1" project is done in it.
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:
Hamad Al-Hajri
SummerTrainingReport
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.
Hamad Al-Hajri
SummerTrainingReport
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 TheRoboticWarriorSystem
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.
a) FourWheelsMotorbike
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;
but the long time, much of effort and the high cost that needed to design and
build such vehicle make this choice undesirable.
Hamad Al-Hajri
SummerTrainingReport
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) ServerPC
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).
Hamad Al-Hajri
10
SummerTrainingReport
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.
By knowing the IP address of the server PC, "Remote Desktop Connection"
which is a program under Windows operating system, can be used to access the
server PC wirelessly from the client PC. This program is very helpful feature to make
any necessary corrections of problems that may happen in the server PC.
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) WirelessRouter
The wireless router (SpeedTouch 585 v6) figure 6, as mention before is
connected to the server PC by an Ethernet
cable and it has the following static IP address:
192.168.1.64. The power cable of the router is
connected to the DC to AC converter. The
wireless standard of this router is IEEE 802.11 (g)
which works in the 2.4 GHz band with a
maximum
bit
rate
of
54
Mbit/s
and
an
Hamad Al-Hajri
11
SummerTrainingReport
d) ControllingUnit
The controlling unit in the Robotic Warrior System is responsible to recognize
the user command then carry out them by
sending the suitable signal to the various
actuators of the Robotic Warrior System.
Moreover, this unit must monitor the system
performance and take the appropriate
action in some specific cases like losing the
connection with the control station.
The
controlling
unit,
figure
7,
is
bridge, relays board and electrical connectors for connection those components.
The microcontroller is the intelligent part in this unit. It is responsible to recognize the
received command and send a various signals to the right actuators. Moreover, it
is the intelligent unit that has to take the appropriate action once an emergency
case occurs. The H-bridge controls the power delivered to the steering motor by a
PWM signal that is generated from the microcontroller. The last component of the
controlling unit is the relays board. It has sixteen relays work as on/off switches that
can be controlled by digital signal from the microcontroller.
Hamad Al-Hajri
12
SummerTrainingReport
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.
Hamad Al-Hajri
13
SummerTrainingReport
program
decreasing
the
will
end
accuracy
with
of
the
pulses.
The master microcontroller is
is
programming
used
it;
only
and
The
Ports of
for
the
direct
Master
PIC
is
used
to
carry
the
microcontroller. The user should note that when he wants to program the
master microcontroller he must place a jumper in the reset pins to connect
them and remove it when he want to send a normal command under the
RS232 protocol. The position of the reset jumper and schematic diagram of
the micro controller circuit is shown in the figure 10. This diagram shows the
orientation of the connection terminals of the two microcontrollers. In this
board there is voltage regulator. It gets 12 volt input and gives 5 volt output.
Hamad Al-Hajri
14
SummerTrainingReport
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.
iii) Relays Board
The relays were used as switches that can be controlled electronically
to
replace
the
manual
of
the
Hamad Al-Hajri
15
SummerTrainingReport
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.
Hamad Al-Hajri
16
SummerTrainingReport
e) Actuators
Different types of actuators were used in the Robotic Warrior System. To
holding and releasing the breaker and the
accelerator pedals, two servo motors were used.
The servo motor works depending on the signals
received from the microcontroller. These signals
have to have period of 20 millisecond and duty
time of one millisecond to two milliseconds.
According to the received signal, the servo
motor changes the angle of its pulley. This, in
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.
Hamad Al-Hajri
17
SummerTrainingReport
f) PowerSuppliers
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) VisionDevices
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.
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).
Hamad Al-Hajri
18
SummerTrainingReport
2.2 TheControlStation
a) ClientPC
The client PC is a normal desktop PC that is connected to "BelKin" USB
wireless 802.11 (g) adapter. This adapter will enable
the client PC to communicate wirelessly with the
server PC. The client program as shown in figure 20
requires from the user to enter the IP address of the
server PC. After entering the IP and pressing button
"Connect", a connection request will be send from
the client PC to the server PC. If there are no errors
and the server PC accepts the request, a message
"Now you are connected to USAD Server" will
appear in the title bar of the program.
There are two versions of the client program:
standard version (using buttons only) and steering
wheel and joystick version. This gives a choice for
Hamad Al-Hajri
19
SummerTrainingReport
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.
Depending on the x and y coordinates and on the
programming conditions in client program, some actions
will be performed if the joystick is moved to a specific
direction. If the user moves the joystick to the right, then
the turning/tilting box will turn to the right. However, if the
user moves the joystick to the left, then the turning/tilting box will turn to the left
and so on. Selecting any one of the turning/tilting boxes (one for front camera and
the other for weapon camera) can be done through the joystick buttons.
c) SteeringWheel
The same scenario of the joystick applies
here,
turning
the
wheel
will
change
the
Hamad Al-Hajri
20
SummerTrainingReport
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.
Hamad Al-Hajri
21
SummerTrainingReport
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.
Hamad Al-Hajri
22
SummerTrainingReport
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.
Hamad Al-Hajri
23
SummerTrainingReport
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
Hamad Al-Hajri
24
SummerTrainingReport
APPENDIXES
A. Progress Report 1
Hamad Al-Hajri
25
SummerTrainingReport
B. Progress Report 2
Hamad Al-Hajri
26
SummerTrainingReport
C. Progress Report 3
Hamad Al-Hajri
27
SummerTrainingReport
CERTIFICATE
Hamad Al-Hajri