Self Automatic Parking Car.
SELF AUTOMATIC PARKING CAR
Noor Zamri Bin Sudin
Bekm
(2)
“ I hereby declred that I have read through this report and found that is has comply the partial fulfillment for awarding the degree of Bachelor of Electrical Engineering
(Mechatronic).”
Signature : ... Supervisor‟s Name : Mohd Fairus b Abdollah
(3)
SELF AUTOMATIC PARKING CAR
NOOR ZAMRI BIN SUDIN
A report submitted in partrial fulfillment of the requirements for the degree of
Electrical Engineering (Mechatronics)
Faculty of Electrical Engineering
UNIVERSITI TEKNIKAL KEBANGSAAN MALAYSIA
(4)
I declare that this report entitle “Self Automatic Parking Car” is the result of my own research except as cited in the references. The report has not been accepted for any degree
and is not concurrently submitted in candidature of any other degree.
Signature : ... Supervisor‟s Name : Noor Zamri Bin Sudin
(5)
(6)
ACKNOWLEDGEMENTS
Alhamdulillah, praise be to Allah s,w,t and sustainer of world, most gracious, most merciful God.
Praise be to Allah s.w.t for enabling me to present this „Self Automatic Parking Car‟ progress report for my “Projek Sarjana Muda 2”.
I would like to thank En. Mohd Fairus B. Abdollah as my supervisor for his invaluable help, support and ideas to me through achieving my “Projek Sarjana Muda 2” objective. His countless contributions in this project will remind forever in my heart.
Finally, I would like to honor my parent for supporting me and their advice through my project progress.
(7)
ABSTRACT
This project is about to do research, experimenting and designing the self automatic parking systems for a model car that if it successfully done it can be used for further study and development to be implement in a real car. This system was designed to those driver who do not know how to park their car (parallel parking) manually. This system also designed as simple as possible to make it easier to use and user friendly. When driver see an empty space in parking area, driver just need to push one button and their car will move automatically until it park itself in that parking area. In order to create this system several hardware and software are used such as programmable integrated circuit (PIC), sensors, motor, driver circuit and software such as MikroC software and Proteus. The model car chassis consists of a DC motor actuated traction system and a servomotor actuated steering mechanism. Position data and parking place data is obtained by a sensory system. The controller hardware includes all the required peripherals for interfacing to the motors and sensory system.
(8)
ABSTRAK
Projek ini adalah mengenai melakukan kajian, eksperimen dan mereka bentuk sistem meletak kereta sendiri automatik untuk sebuah model kereta yang mana jika projek ini berjaya ia boleh digunakan untuk kajian di peringkat yang lebih tinggi dan mebangunkan projek ini sehingga ia boleh digunakan untuk sebuah kereta sebenar. Sistem ini telah direka bentuk untuk pemandu yang tidak mahir untuk meletak kenderaan mereka secara manual. Sistem ini juga telah direka seringkas yang mungkin agar ia mudah untuk digunakan dan mesra pengguna. Apabila pemandu melihat sebuah tempat kosong di tempat meletak kereta, pemandu hanya perlu menekan satu butang dan kereta mereka akan bergerak sendiri masuk ke tempat meletak kereta secara automatik. Beberapa perkakasan seperti litar bersepadu boleh atur cara, penderia atau sensor, motor, litar pemacu dan perisisa n seperti MikroC dan Proteus. Casis model kereta merangkumi motor arus terus yang akan menggerakkan sistem dan motor servo yang akan mengawal mekanisma sistem. Sistem penderia akan mengenalpasti data kedudukan kereta dan data kawasan tempat meletak kereta. Perkakasan untuk kawalan termasuklah semua peranti perisisan untuk menga ntara muka kepada motor dan sistem penderia.
(9)
CONTENTS
CHAPTER TITTLE PAGE
ACKNWOLEDGEMENT ii
ABSTRACT iii
ABSTRAK iv
CONTENTS v
LIST OF TABLES viii
LIST OF FIGURES ix
LIST OF APPENDICES xi
1 INTRODUCTION 1
1.1 Background of the project 1
1.2 Problem statement 2
1.3 Project objective 3
1.4 Scope of the project 3
1.5 Literature review 3
1.5.1 Previous research 4
1.5.2 Current technologies 6
1.6 Components 7
1.6.1 DC motor 7
1.6.2 Servo motor 8
1.6.3 Micro controller 10
1.6.4 Motor controller (motor driver 13
(10)
2 METHODOLOGY 17
2.0 Introduction of the methodology 17
2.1 Project flowchart 17
2.2 System flowchart 20
3 RESULT 23
3.0 Introduction of result 23
3.1 Chasis 23
3.2 Target board 24
3.3 Motor driver board 26
3.4 Sensor and servo board 27
3.5 PIC downloader 29
3.6 Software 30
3.6.1 Programming language 30
3.6.2 Simulation software 31
3.6.3 Program downloader 31
4 ANALYSIS 35
4.0 Introduction of analysis 35
4.1 Simulation test for DC motor 35
4.2 Calculation of angle of servo motor 36
4.3 Technique to create accurate servo motor PWM
signal 38
4.4 Simulation test for servo motor 39
4.5 Hardware test for servo motor 42
4.6 Hardware test for voltage regulator and controller
board (target board) 44
(11)
5 CONCLUSSION AND FUTURE PLANNING 49
5.0 Introduction of conclusion and future
Planning 49
5.1 Conclussion 49
5.2 Future planning 50
REFERENCES 52
APPENDIX A 53
APPENDIX B 57
APPENDIX C 58
APPENDIX D 60
APPENDIX E 63
(12)
LIST OF TABLES
TABLE TITTLE PAGE
3.1 Components in target board 26
4.1 Relation between steering position and angle of servo motor 44 4.2 PWM signal for servo motor for each steering positions 44 4.3 Result of hardware test for voltage regulator and controller board 46
(13)
LIST OF FIGURES
FIGURE TITTLE PAGE
1.1 Location of the sensor that attached to the rotary table 5
1.2 Picture for all system when the project was finished 5 1.3 Configuration of the supersonic transducer units 6
1.4 DC motor 8
1.5 Servo motor 9
1.6 Pulse width for servo motor 10
1.7 Pin of PIC16F877A 13
1.8 Circuit of the H-bridge 14
1.9 H-bridge L298 in chips version 14
1.10 Sharp infrared sensor 16
1.11 Ultrasonic sensor 16
2.1 Flowchart of methodology of the system 19
2.2 Flowchart of the self automatic parking system 22
2.3 Parking process 23
3.1 Width of the car 24
3.2 Length of the car 25
3.3 Dimension of target board 25
3.4 Voltage regulator and target board 26
3.5 Dimension of motor driver 27
3.6 Circuit of motor driver 28
3.7 Dimension for circuit board 29
3.8 Circuit for infra-red transmitter 29
3.9 Circuit for infra-red receiver 30
3.10 Universal PIC Serial Programmer, Model BIZ011 31
3.11 WinPic800 software 33
3.12 WinPic800 in normal condition 33
3.13 WinPic800 when error occur 34
4.1 Simulation circuit for DC motor 36
4.2 PWM signal of servo motor 37
4.3 PWM signal of servo motor when angle is 0° 38
4.4 Schematic of the servo motor circuit 40
4.5 Graph of the servo motor pulse width when in neutral
condition 40
4.6 Graph of the servo motor pulse width when turn left 41
4.7 Graph of the servo motor pulse width when turn right 41
4.8 Schematic of servo motor circuit 42
(14)
4.10 Servo motor mount to steer front view 43 4.11 Circuit of voltage regulator and controller board
(target board) 45
(15)
LIST OF APPENDICES
NUMBER TITLE PAGES
A Programming code for complete systems 53
B Simulation for complete systems 57
C Programming for simulation for DC motor 58
D Programming for simulation test for servo motor 60
E Programming for simulation test for the right
angle of servo motor to mount to steer 63
F Programming for simulation test for the right
PWM for DC motor to rotate wheel 64
(16)
CHAPTER 1
INTRODUCTION
1.1 Background of Project
This thesis is about do research, experimenting and designing the self automatic parking systems for a model car. This system is design to make the model car have the ability to do a self parking. This system consists of four major components which is categorized in mechanical part, electrical part, controller part (software) and sensory part.
In the mechanical part, things that need to give special attention are the dimension of the model car, the mechanism part such as how this model car will move forward or reverse and lastly the maneuver of the model car such as the angle for front wheel of the model car.
In the electrical part, things need to be designed are the circuit of the DC motor, circuit for servo motor, circuit for PIC micro controller and how to attached sensor and encoder to the system. The circuit of the DC motor was created to rotate the back wheel of the model car to give the model car an ability to move forward and reverse. The circuit of servo motor is used to control the front wheel of the car to maneuver the car to the left or to the right. The circuit for PIC microcontroller was used to apply the microcontroller to this system.
In the controller part, the program of this system will be written down by using MicroC software and then will upload the complete program to the PIC microcontroller by using boot loader such as Winpic800 software. PIC microcontroller will function as a brain of the system. This controller will control the system by following the instruction in the program which is written down and download to the PIC.
(17)
The last part of the system is sensory part. The sensory part consists of sensors such as infra-red sensor. The infra-red sensor is use to detect the position of the model car and also use to detect the existence of the obstacle and give signal to the controller.
1.2 Proble m State ment
Nowadays car is one of the most needed properties for people all over the world. People need car to move from one place to another and make life easier. The increasing of population in the large cities is proportional to the increasing of the vehicles used in the community which cause an increasing demand for parking bays. So it will make the parking bays become narrow and smaller. This situation is a common view in city life. Parking of a car in a parking lot may be agreed to be one of the most complex parts of the driving action.
Parallel parking is an ordeal for many drivers, but with parking space limited in big cities, squeezing a car into a tiny space is a vital skill. It is seldom an easy task, and it can lead to traffic tie-ups, frazzled nerves and bent fenders. When driver do not have confident to park their car (parallel parking) manually, they often block a lane of traffic for at least a few seconds. If they have problems getting into the spot, this can last for several minutes and seriously disrupt traffic.
Finally, the difficulty of parallel parking leads to a lot of minor dents and scratches. These accidents frequently happen because drivers do not know what happen on their backside of the car because of limited view.
(18)
1.3 Project Objective
Every project engineer will list down their objective. This objective use to give this project a motive and make sure all of the project planning will run smoothly. This is the objective of this self automatic parking car project:
First objective of this project is to develop and design a self automatic parking car system for model car.
Second objective of this project is to develop systems that will detect any obstacles during parking to avoid accidents
1.4 Scope of the Project
Generally, this is the list of the scope of the project:
To develop and design self automatic parking systems just in model car To determine and study for suitable sensor
To design the location of sensor
To determine and to study a suitable microcontroller To study and familiarize the C language.
1.5 Lite rature Review
Literature review is about doing a research or studies of the similar project. This section also gives the description of the research done on the component and system use in this project. The components uses in this project are PIC microcontroller, PIC board, sensor and motor. The improvement of computer technology especially in automatic control of vehicles maneuver will make the self-parking action is possible to achieve. Most of the researches about this subject are done to develop a self-parking strategy and some to develop driver aid systems. The studies about self-navigating cars and mobile robots are also important because of the similar control techniques that are used.
(19)
1.5.1 Previous Research
One of the previous researches about this subject is done in the Middle East technical university by Utku Avgan [1]. In this research fuzzy logic was used as a main system to control the position of the car during parking. First the equations related to the parking process was created by calculate the dimension of the car, angle of the car, speed of the car, wheelbase of the car and position of the car. Then the computer program was developed with Borland Delphi 6.0. This program is used for simulation purposes. The Borland Delphi program are the user friendly software where all the parameter of a fuzzy control systems can be easily stored, testing the systems visually, exporting the membership functions and rule maps as image files and exporting the characteristics of the system for downloading to the controller hardware of the self parking model car systems. The program allows the user to position the car and the parking point to the desired position.
One of the matter need to give the attention and that make this system look interesting is the location of the sensors. All the sensors such as long range sensor, medium range sensor and closed range sensor for position sensor was located on one rotary table as shown in Figure 1.1. This rotary table was attached to the stepper motor with rotary index sensor to make it can rotate 360 degree. The advantage of using this rotary table is the numbers of sensor use in this system become less because only one sensor need for each type of sensor use in this system. A picture of the developed system is given in Figure 1.2.
(20)
Figure 1.1: Location of the sensor that attached to the rotary table
Figure 1.2: Picture for all system when the project was finished
The other research that has been done to this subject is performed in Tottori University of Japan by Ohkita [2]. Fuzzy logic has been implemented to this research to control an autonomous mobile robot with four wheels for parallel parking.
Another interesting research about this subject is performed in Tottori University of Japan by Ohkita [2]. In this research fuzzy logic is applied to control an autonomous mobile robot with four wheels for parallel parking. This research also uses six supersonic transducers for recognizing the position and attitude of the robot. This research also uses a stepper motor to control and move the sensors to keep the suitable angle to the wall for
(21)
preventing the occurrence of dead angles. The configuration of the supersonic transducer units of this study is presented in Figure 1.3. This kind of design seems bulky when numbers of the sensors has been used but using so many sensors has an advantage of an increase in sampling rate of the input data when compared to a positioned single sensor system.
Figure 1.3: Configuration of the supersonic transducer units
1.5.2 Curre nt Technology
Nowadays automakers are starting to market self-parking cars because they sense a consumer demand. This is the list of the car which is containing the automatic self parking systems.
In 1992, Volkswagen has installed self parking systems in its IRVW (Integrated Research Volkswagen) Futura concept car. The IRVW is park with fully automatic which is driver could get out of the car and watch as it parked itself. A PC-size computer in the trunk controlled the system.
(22)
In 2003, Toyota start produced a self-parking option, called Intelligent Parking Assist, on its Japanese Prius hybrid. In 2004, a group of students at Linköping University in Sweden collaborated with Volvo on a project called Evolve. The Evolve car can parallel park autonomously. The students fitted a Volvo S60 with sensors and a computer in its trunk, which controls the steering wheel as well as the gas and brake pedals. Siemens VDO is working on a standalone driver assistance system called Park Mate, which would help drivers find a space as well as park in it [3].
Lexus LS460 L was introduced at the 2006 North American International Auto Show. The Advanced Parking Guidance System feature can parallel-park or reverse-park the LS into a preselected space with minimal brake input at the push of a button. This feature utilizes the backup camera and parking sensors. Other drive-assist features include Dynamic Radar Cruise Control, which can accelerate and brake while monitoring traffic, a Brake Hold button, which prevents creeping forward motion when the driver's foot is off the brake pedal, and the Automatic Parking Brake, which can engage the parking brake simultaneously whenever the transmission is shifted to Park.
1.6 Components
This topic will discuss about the components use in this project. Several researches were done before the components are selected for the project. Below is the components use in this project.
1.6.1 DC motor
DC motor is electric motor which is use direct current electric to rotate. A DC motor operates by converting electric power into mechanical work. This is done by forcing current through a coil and producing a magnetic field that spins the motor. The advantage and disadvantage of DC motor is:
(23)
Advantages: Less cost Easy to use
Speed can be variable Torque can be variable Rotate freely without limit. Disadvantages:
Not accurate, poor in control angle Gone too far after stop given
The conclusion obtain by doing research on DC motor, is a DC motor is not suitable to applied as a steering for model car which is accuracy is the one of the important thing but it will suit if it will be use as an actuator to move the back wheel for model car. Figure 1.4 showed the example of the DC motor.
Figure 1.4: DC motor
1.6.2 Servo Motor
Servo motors are combined of a DC motor mechanically linked to a potentiometer. Pulse-width modulation (PWM) signals transmit to the servo are translated into position commands by electronics inside the servo. When the servo is going to rotate, the DC motor is powered until the potentiometer reaches the value corresponding to the commanded position. Figure 1.5 shows the example of servo motor [4].
(24)
Figure 1.5: Servo motor
The servo is controlled by three wires that is ground (usually black/orange), power (red) and control (brown/other color). The servo will move depends on the pulses sent over the control wire, which set the angle of the actuator arm. The servo expects a pulse every 20 ms in order to gain correct information about the angle. The width of the servo pulse changes the range of the servos angular motion [4].
As shown in Figure 1.6 a servo pulse of 1.5 ms width will set the servo to its neutral position, or 0°. For example a servo pulse of 1.0 ms could set the servo to -60° and a pulse of 2.0 ms could set the servo to 60°. It‟s mean the range of this servo motor is varied from -60° to +60° equal to 120° range. The physical limits and timings of the servo hardware varies between brands and models, but a general servos angular motion will travel somewhere in the range of 180° to 210° and the neutral position is almost always at 1.5 ms [4].
(1)
1.5.1 Previous Research
One of the previous researches about this subject is done in the Middle East technical university by Utku Avgan [1]. In this research fuzzy logic was used as a main system to control the position of the car during parking. First the equations related to the parking process was created by calculate the dimension of the car, angle of the car, speed of the car, wheelbase of the car and position of the car. Then the computer program was developed with Borland Delphi 6.0. This program is used for simulation purposes. The Borland Delphi program are the user friendly software where all the parameter of a fuzzy control systems can be easily stored, testing the systems visually, exporting the membership functions and rule maps as image files and exporting the characteristics of the system for downloading to the controller hardware of the self parking model car systems. The program allows the user to position the car and the parking point to the desired position.
One of the matter need to give the attention and that make this system look interesting is the location of the sensors. All the sensors such as long range sensor, medium range sensor and closed range sensor for position sensor was located on one rotary table as shown in Figure 1.1. This rotary table was attached to the stepper motor with rotary index sensor to make it can rotate 360 degree. The advantage of using this rotary table is the numbers of sensor use in this system become less because only one sensor need for each type of sensor use in this system. A picture of the developed system is given in Figure 1.2.
(2)
Figure 1.1: Location of the sensor that attached to the rotary table
Figure 1.2: Picture for all system when the project was finished
The other research that has been done to this subject is performed in Tottori University of Japan by Ohkita [2]. Fuzzy logic has been implemented to this research to control an autonomous mobile robot with four wheels for parallel parking.
Another interesting research about this subject is performed in Tottori University of Japan by Ohkita [2]. In this research fuzzy logic is applied to control an autonomous mobile robot with four wheels for parallel parking. This research also uses six supersonic transducers for recognizing the position and attitude of the robot. This research also uses a stepper motor to control and move the sensors to keep the suitable angle to the wall for
(3)
preventing the occurrence of dead angles. The configuration of the supersonic transducer units of this study is presented in Figure 1.3. This kind of design seems bulky when numbers of the sensors has been used but using so many sensors has an advantage of an increase in sampling rate of the input data when compared to a positioned single sensor system.
Figure 1.3: Configuration of the supersonic transducer units
1.5.2 Curre nt Technology
Nowadays automakers are starting to market self-parking cars because they sense a consumer demand. This is the list of the car which is containing the automatic self parking systems.
In 1992, Volkswagen has installed self parking systems in its IRVW (Integrated Research Volkswagen) Futura concept car. The IRVW is park with fully automatic which is driver could get out of the car and watch as it parked itself. A PC-size computer in the trunk controlled the system.
(4)
In 2003, Toyota start produced a self-parking option, called Intelligent Parking Assist, on its Japanese Prius hybrid. In 2004, a group of students at Linköping University in Sweden collaborated with Volvo on a project called Evolve. The Evolve car can parallel park autonomously. The students fitted a Volvo S60 with sensors and a computer in its trunk, which controls the steering wheel as well as the gas and brake pedals. Siemens VDO is working on a standalone driver assistance system called Park Mate, which would help drivers find a space as well as park in it [3].
Lexus LS460 L was introduced at the 2006 North American International Auto Show. The Advanced Parking Guidance System feature can parallel-park or reverse-park the LS into a preselected space with minimal brake input at the push of a button. This feature utilizes the backup camera and parking sensors. Other drive-assist features include Dynamic Radar Cruise Control, which can accelerate and brake while monitoring traffic, a Brake Hold button, which prevents creeping forward motion when the driver's foot is off the brake pedal, and the Automatic Parking Brake, which can engage the parking brake simultaneously whenever the transmission is shifted to Park.
1.6 Components
This topic will discuss about the components use in this project. Several researches were done before the components are selected for the project. Below is the components use in this project.
1.6.1 DC motor
DC motor is electric motor which is use direct current electric to rotate. A DC motor operates by converting electric power into mechanical work. This is done by forcing current through a coil and producing a magnetic field that spins the motor. The advantage and disadvantage of DC motor is:
(5)
Advantages: Less cost Easy to use
Speed can be variable Torque can be variable Rotate freely without limit. Disadvantages:
Not accurate, poor in control angle Gone too far after stop given
The conclusion obtain by doing research on DC motor, is a DC motor is not suitable to applied as a steering for model car which is accuracy is the one of the important thing but it will suit if it will be use as an actuator to move the back wheel for model car. Figure 1.4 showed the example of the DC motor.
Figure 1.4: DC motor
1.6.2 Servo Motor
Servo motors are combined of a DC motor mechanically linked to a potentiometer. Pulse-width modulation (PWM) signals transmit to the servo are translated into position commands by electronics inside the servo. When the servo is going to rotate, the DC motor is powered until the potentiometer reaches the value corresponding to the commanded position. Figure 1.5 shows the example of servo motor [4].
(6)
Figure 1.5: Servo motor
The servo is controlled by three wires that is ground (usually black/orange), power (red) and control (brown/other color). The servo will move depends on the pulses sent over the control wire, which set the angle of the actuator arm. The servo expects a pulse every 20 ms in order to gain correct information about the angle. The width of the servo pulse changes the range of the servos angular motion [4].
As shown in Figure 1.6 a servo pulse of 1.5 ms width will set the servo to its neutral position, or 0°. For example a servo pulse of 1.0 ms could set the servo to -60° and a pulse of 2.0 ms could set the servo to 60°. It‟s mean the range of this servo motor is varied from -60° to +60° equal to 120° range. The physical limits and timings of the servo hardware varies between brands and models, but a general servos angular motion will travel somewhere in the range of 180° to 210° and the neutral position is almost always at 1.5 ms [4].