Академический Документы
Профессиональный Документы
Культура Документы
Signature___________________ Signature___________________
Date_______________________ Date_______________________
i
ATTESTATION
We hereby declare that we are the sole author of this thesis. We authorize HTTTC
Bambili to lend this thesis to other institutions or individuals for the purpose of scholarly
research. We understand the nature of plagiarism, and we are aware of the School policy
on this. We certify that this dissertation reports is an original work by us during our
DIPET 1 program except as cited in the references.
SIGNATURE SIGNATURE
DATE DATE..
ii
DEDICATION
iii
ACKNOWLEDGEMENTS
A successful piece of thesis like this can never be achieved without the contribution of positive
thinking and hard working individuals like people who help in one way or the other to realize
this piece of work.
We will thus start by thanking the lord almighty for giving us the strength and above all
good health to carry out our studies till this level.
Our profound gratitude goes to our supervisor, Pr. NFAH EUSTACE MBAKA, his
constructive criticisms, suggestions, encouragement, severity and guidance has been an
invaluable inspiration to us.
We are highly indebted to our Co-Supervisor Mr. KOUAM for his friendly and
welcoming attitude. He did all his possible best to insure that all we were going the right
while working on this project.
We are highly indebted also to Mr. KAMDEM for his friendly and welcoming attitude.
He helped us while we were having misunderstanding in programming.
Our kind regards go to all the lecturers of the Electrical and Power Engineering
Department, to the H.T.T.T.C Administrative team andto our school and class mates.
Their relentless efforts are one of the positive reasons for the success of this report.
Thanks to our family members and relatives who helped in the financial and spiritual
aspect of this work. Finally, to all those who contributed in one way or the other to the
success of this work, we say thank you.
iv
ABSTRACT
Toll-gates are infrastructure present in almost all countries over the world. In Cameroon
they were established on asphalted road on the 7th of January 1993.incoming generated by those
toll-gates help in the maintenance of roads.
This system will be a great help in fighting against funds embezzlement if it is improved
and perform.
v
RESUME
Les pages sont des infrastructures routiers prsent dans Presque tous les pays du
monde.au Cameroun, ils ont t instaurs le 7 janvier 1993 sur les routes bitumes ; les revenus
gnrs par ces derniers (pages routiers), participent la maintenance des routes. Grer par des
hommes, les occasions de fraude ne manque
Regardant donc cette situation, nous nous sommes rappel la lutte contre la corruption
dans notre pays. Cest la raison pour laquelle nous avons dcid de contribuer notre manire en
faisant LETUDE ET LA REALISATION DUN SYSTEME DE GESTION AUTOMA-
TIQUE DUN PEAGE ROUTIER. Le systme effectue les fonctions de base dun page clas-
sique, avec quelques avantages en plus. En plus de cela nous avons effectu des recherches sur
Internet, utilis les logiciels PROTEUS (ISIS 7 Professional) pour russir sa concep-
tion, MIKROC PRO pour PIC pour ldition du programme du microcontrleur et BORLAND
DELPHI 7 pour la cration et la gestion de la base de donnes et aussi pour la communication
entre le microcontrleur et la base de donnes.
Ce systme sera dune grande aide pour la lutte contre le dtournement des recettes de
page sil est amlior et implment.
vi
TABLE OF CONTENTS
CERTIFICATION............................................................................................................................. i
ATTESTATION ............................................................................................................................... ii
ACKNOWLEDGEMENTS ............................................................................................................. iv
ABSTRACT...................................................................................................................................... v
RESUME ......................................................................................................................................... vi
TABLE OF CONTENTS ................................................................................................................ vii
LIST OF TABLES AND FIGURES .................................................................................................. x
LIST OF ABBREVIATIONS/NOTATIONS .................................................................................. xii
CHAPTER ONE: GENERAL INTRODUCTION ............................................................................ 1
I.1 Background of the study .................................................................................................... 1
I.2 Problem statement ............................................................................................................. 1
I.3 Research questions ............................................................................................................. 3
I.5 Research hypothesis ........................................................................................................... 4
I.3.1 Objective of the study ..................................................................................................... 4
I.7 Significant of the study ....................................................................................................... 4
I.3 Scope of the project ............................................................................................................ 5
CHAPTER TWO: LITERATURE REVIEW ................................................................................... 6
INTRODUCTION ............................................................................................................................ 6
II.1 Types of toll collection ........................................................................................................ 6
II.1.1 Open toll System ......................................................................................................... 6
II.1.2 Closed Toll System...................................................................................................... 6
II.2 Methods of Toll Collection ................................................................................................. 7
II.2.1 Manual collection........................................................................................................ 7
II.2.2 Automatic Toll collection ............................................................................................ 7
II.2.3 Electronic Toll collection ............................................................................................ 7
a. Electronic toll collection technologies ............................................................................. 8
1. automated toll plaza system using RFID ..................................................................... 8
2. Automated Toll Gate System Using RFID And GSM Technology .............................. 9
3. Barcode-based ETC .................................................................................................... 9
4. Automated Toll Gate System Using ANPR ............................................................... 10
5. Automated Toll Gate System Using GPS .................................................................. 10
vii
II.3 literature review on component to be used ................................................................... 10
II.3.1 Microcontroller ..................................................................................................... 11
1. General features of PIC 16F4520 .............................................................................. 11
2. Key features .............................................................................................................. 12
3. Outputs/ Inputs ports ............................................................................................... 12
II.3.2 Real time clock (DS1307) ...................................................................................... 13
II.3.3 LCD NOKIA 3310 screen................................................................................................. 14
A. Electrical Interface specification .......................................................................................... 15
II.3.5 resistors................................................................................................................. 15
II.3.6 transistors ............................................................................................................. 16
II.5.1 optoelectronic components (LEDs)........................................................................ 16
II.3.8 Capacitors .................................................................................................................... 17
II.3.11 MAX 232 ...................................................................................................................... 19
CHAPTER THREE: METHODOLOGY ....................................................................................... 20
III.1 principle of functioning .................................................................................................... 20
III.2 general bloc ...................................................................................................................... 23
III.3 study of different part of the system ................................................................................. 23
III.3.1 Implantation of clock circuits ................................................................................... 23
a. External clock .............................................................................................................. 23
b. RTC DS1307................................................................................................................. 24
III.3.2 Microcontroller implantation ................................................................................... 25
III.3.3 Power supply implantation ....................................................................................... 25
III.3.5 Serial communication RS232 ........................................................................................ 27
III.3.7 sensors implantation ................................................................................................. 27
a. Infrared sensors ........................................................................................................... 28
b. Electromechanical sensor ............................................................................................. 29
III.3.8 motor control ............................................................................................................ 29
IV.1.1 commplete system design of simulation (isis) ................................................................ 30
IV.2 printed circuit board ........................................................................................................ 30
IV.4 Realization ....................................................................................................................... 32
IV.3 program writing using MikroC for PIC ........................................................................... 33
1. RTC management ..................................................................................................... 33
2. Initialization of the UART ........................................................................................ 35
IV.5 quantification and cost estimation .................................................................................... 35
viii
difficulties encountered ............................................................................................................... 37
recommendations ........................................................................................................................ 37
Conclusion .................................................................................................................................. 38
APPENDICES ................................................................................................................................ 38
REFERENCES/BIBLIOGRAPHY ................................................................................................. 40
ix
LIST OF FIGURES
x
FIGURE 32: DATABASE TABLES 32
FIGURE 33: CONNECTION INTERFACE 32
FIGURE 34: MAIN PAGE INTERFACE 33
FIGURE 35: CAR STATATISTIC INTERFACE 34
FIGURE 36:MIKROC FOR PIC 35
FIGURE 37: PROTEUS INTERFACE 36
FIGURE 38: SYSTEM DESIGN INSIDE PROTEUS 30
FIGURE 39: COMPONENT AND COPPER SIDE INFRARED EMITTER 32
FIGURE 40: MOTOR AND MICROCONTROLLER BLOCK 32
FIGURE 41: INFARED SENSOR AND DS1307 BLOCK 33
FIGURE 42: TEST OF THE PROJECT 33
xi
LIST OF ABBREVIATIONS/NOTATIONS
xii
CHAPTER ONE: GENERAL INTRODUCTION
The most recent evolution of our century is the progress reached by the science of technology
especially in electronics and Electrotechnics world. This metamorphosis owes its success to
advanced world of electronics toll gate system. The progress known by these automated toll-gate
system remains monopolized and covers the world more and more with incredible models. This
electronics models of toll-gates are principal constitutive factors of actual technology and are
manufactured by the used of the electronics components and for this system to function correctly
in their applications; the need to be improved upon.
To contribute for progress of technology we need to design and realized an automated toll
that will help to solve the various problem faced by our toll-gate during collection. In this chapter
we shall study the background of the study, problem statement, objective of the study,
significance of the study, and the scope of the project.
Since many years, we observe the increasing of tare roads in our country which is a sign of
development. Due to that fact, toll-gate has been installed on some of that road, such that
generated revenue on that toll-gate will help. There is also many technologies involves in road
traffic and toll management. The study of this project will help somehow to fight against
favoritism. This project is a bit complex and would be expensive since we are just working on a
model. So the need of this project is to reduce significantly fraud at our toll-gates on our roads
Since many years, traffic on our roads has increased considerably and it became too heavy;
especially at the level of our toll where everything are still done manually (opening, closing,
ticket, collect), and on the same way, management of our toll-gates is submitted to many acts
of corruption from motorist and collectors, whose certain embezzle one part of incoming
generated. The Government of Cameroon has ordered an inquiry on toll gate tax collection
mechanism into how money collected from toll gate along major road across the country is being
handled. The inquiry has been ordered after claims that billions of FCA of toll gate revenue may
1
be swindled or simply accounted for by those handling the operation. The claims were made
during the third session of the national road council which held in Yaound last January 11.
In 2005, toll gate earnings stood at CFA 5 billion, but curiously in 2007, it dropped to a
meager CFA 3 billion. Its hard understanding the decrease in toll gate takings, espercially so as
statistics show a drastic increase in the number of vehicles that crossed different collection post
in 2007. The drastic drop called the attention of the prime minister who has ordered an
investigation to find out the reasons the sudden drop.
Its even difficult understanding the drastic drop given that new toll gates were
considered on the Ngaoundere-toubouro-moundou high way under the program for the security
of road taxes. The first solution envisaged towards checking the hazy management of toll gate
earnings is the gradual installation of automatic collection systems at all toll gate by the ministry
of public work to replace the present manual system. While this could take some times, plans are
underway to start with the various road networks that generate over 80percent of the overall
earnings. Sources at the program for the security of road taxes say, it the time that a heavy drop
of collection has been noticed, adding that this has affected treasury transactions of the ministry
of finances. In effect when toll gates were installed in 1995, they generated approximately
2.7billions annually. During this period, toll gate earnings were made publicly on a monthly
basis and the collectors received monthly commission depending on their performance. This
practice continued for 6 years and encouraged the transparent management of toll gate taxes. As
a result the revenue witness a 100 percent increase as toll gate earnings rose to 2.5billions the
preceding from 2002 to 2005, the revenue increased by CFA 500 million hitting a record CFA 5
billion. Since then, things took a turn for the worst as the takings started dropping and in less
than 2years, the government loose closed to CFA 2 billion, almost half of the overall earnings.
Curiously, toll gate earnings have witness a steady decline in 2006 following the creation of the
program for the security of road taxes created to ensure the transparent management of toll gate
funds. The putting in place of structure and the increased in the number of toll gates has not
reversed the steady decline in the toll gates earnings. Sources at the minister of finances say,
since the creation of the program, the management of resources from toll gates weighing stations
has always been a source of conflict. Several conflicts related to toll gates earnings have been
reported between officials of the Minister of Public Works and Finance. Some of these
complaints let to the closure of the toll gate security account and funds generated from different
toll gates are now been handled by the National Road Fund Toll gate system in Cameroon.
2
We cannot actually determine the exact amount of money pay by vehicles on high way
since there is no instrument or system to count the number of vehicles that run this road. This
inability by the state to know the number of vehicles that runs the high way will in turn move the
state to run short of cash in her treasury. The officials collecting this money are corrupt.
Looking at that situation, our project which is << design and realization of an automatic
toll-gate control using microcontroller>>will enable us to control the automatic opening and
closing of the gate, make the difference between cars and motors cycle as the dont paid toll fees,
keep the records of car passed through the toll such that we can be able to know the number and
the amount collected and stored it inside a Database.
3
I.5 Research hypothesis
The advent of electronics world has affected everything as well as the movement from analog
to digital world. Basically, the notion of automated toll gate plaza has proved to be one of the
most important things in invention to reduce man power. Everybody has an idea of where and
when to do things. This is because time management is the king in every business activities in
big cities, in the outskirts of towns like the Bamenda city. Manual operations like in toll tax
collections have influenced development negatively. It has been tested and proven that time
accessibility in the toll tax collection has had a negative impact in the manual collection process
on toll road daily. That is why in recent days one cannot do without out route system. An
automated toll gate system of a motor way which can be used by state treasury and city council,
therefore it has become a necessity.
To that effect the main advantage of our automatic toll-gate control using microcontroller
to other toll plaza reference is that one of the driving factors in research is the desire to improve
upon what already exists so. It can also significantly improve the efficiency of toll stations and
avoid the traffic congestion on roadways especially.
To achieve our system control we need a microcontroller (PIC 18F4520), a DC power supply
of 5V-12V-2A, LEDs, transistors, capacitors, push buttons, resistors, infrared sensors, motor,
RS-232 CABLE,MAX 232.
The purpose of this study project is to automate the functioning of the toll-gate, by managing:
opening,
closing,
money collecting
date and time control
data storing and retrieving
For more efficiency and control.
The source of financing the construction and the maintenance of road is a major problem
faced by third world countries in general and Cameroon in particular. It is for this reason that the
4
state of Cameroon institute toll-gates on tarred roads to ensure their maintenance. since we now
know the usefulness of the funds generated by those toll-gates, it will be of great significance If
this project is improve by using new technology offered by electronics advanced.
This researched is carried out in other to design a circuit that will manage (opening,
closing, collecting money, keeping records, time and date control) the toll gate. It will help the
administration and road users in various ways.
5
CHAPTER TWO: LITERATURE REVIEW
INTRODUCTION
Knowing what is expected to be our outcome, in this chapter we are going to study the
origin of toll collection, types and methods of toll collection, technologies involves in toll
collection, engineers work. Also, we will have a short literature review on electronics
components which are to be used to carry out this project.
In a closed toll system, patrons pay the toll based on miles of travel on the facility and
category of vehicle. There are no free-rides.
free rides. In a closed toll system, plazas are located at all the
entry and exit points, with the patron receiving a ticket upon entering the system. Upon exiting,
Patron surrenders the ticket to the collector and is charged a prescribed fee based on category
6
Of vehicle and distance travelled. It has just two stops for the vehicles whereas open system
Can have multiple stops. But closed system is expensive to construct than open system. The
General layout of an open toll collecting system is highlighted in Fig.2.
There are three methods of toll collection available. These are: (I)
( ) Manual, (ii) Automatic,
and (ii) Electronic
Manual toll collection is most widely used collection method in Asian and African
countries especially in Cameroon. It requires a toll collector or attendant. Based on the vehicle
classification, cash toll is received by the collector. The collector, who also dispenses change,
may acceptt and sell scrip, tickets, and issuing receipt to the patron. Due to manual intervention,
the processing time is highest.
Automatic toll collection is based on the use of Automated Coin Machine (ACM).
These accept both coins and tokens issued by the operating agency. Depending on the toll rate,
the use of automated coin or token collection instead of manual collection reduces transaction
and processing time as well as the operating cost.
Electronic tolll collection system is the technology that enables the automatic electronic
toll collection from the prepaid account registered on the name of vehicle owner, determining
whether the vehicle is registered or not and informs the toll authorities avoiding tol
toll violations.
7
Over last decades, electronic toll collection system has been implemented in United States and
many other countries with a new improvement in it. By this we dont have to carry a handsome
amount of cash with us relates to security as well. This system does not require any manual
operation of toll barriers and collection of toll amounts, it is completely automated toll collection
system. The vehicle owners are registered with their vehicles proper information and their
account is created, where they can recharge their account with required amount. When the
vehicle passes through the toll gate, the information is shared between RFID tag and RFID reader
and the amount is deducted from the owners account. This method reduces the traffic congestion
problems, also reduces the travel time and reduces the fuel consumption.
William Vickrey the Nobel Economics prize winner, in 1959, was the first who proposed
electronic toll system for Washington Metropolitan Area. Free flow tolling with fixed
transponders undersides of vehicles and the readers were located under the highway surfaces
(1960s and 1970s).
The most promising ETC technologies in the world are based on: DSRC (dedicated
short range communication) which covers barcode and RFID (radio frequency
identification); Video tolling that includes ANPR (automatic number plate reader); global
positioning system (GPS) ; Infrared short range communication (ISRC) based on calm active
infrared;
8
Automated Toll System using the RFID technology, it contains the RFID tag and the RFID
reader. RFID tends the Radio Frequency Identification; they consist of the tags which can
be either active or passive. Passive RFID tags do not have their own power supply: the minute
electrical current induced in the antenna by the incoming radio-frequency scan provides enough
power for the tag to send a response. Due to power and cost concerns, the response of a passive
RFID tag is necessarily brief, typically just an ID number.
The RFID reader is used to read the tag of the vehicles. The Vehicle information is
stored in the microcontroller based on the TAG number. Based on that number the Tax amount
for that vehicle will automatically transfer to the toll gate system. And that cost information will
be sent through GSM modem to a mobile phone of the owner.
3. Barcode-based ETC
Barcode-based ETC is a sub category under DSRC. In this a bar-coded sticker is attached to
the vehicle and read by a laser scanner when it passes through the toll plaza. It is the simplest as
well as oldest technology.
9
4. Automated Toll Gate System Using ANPR
It utilizes a stationary camera to record and identify the number plate of vehicles
passing through toll plaza. The identified license numbers are matched in the database
(connected with transport office) and toll is deducted. If the recorded number is not read properly
or not found in the records, it issues an enforcement violation alarm to the alert the authorities. In
this way, it simultaneously solves two objectives; identification of vehicle for deduction of
toll tax and issuing/recording violation enforcement alert.
Taking into consideration all said above, we can now located our project in automatic
collection, since we are using a coiner to collect money instead of electronic toll features. For
this project which is ours to work, we need many electronic components; each of them having
their own features and functions. As far as this project is concerned, components used are:
10
II.3.1 Microcontroller
This is a computer control system on a single chip and has many electronic circuits built
in, which can decode, write, and convert instructions into electrical signals. And executes them
one by one. The PIC 18F4520 is one of the most advanced microcontroller from microchip. It is
widely used for many applications because of its availability, low price, wide range of
application and its high quality.
This family (18F) offers the advantages like high computational performance at an
economical price with the addition of high-endurance, Enhanced Flash program memory. On
top of these features, the PIC18F4520 family introduces design enhancements that make this
microcontroller a logical choice for many high-performances, power sensitive applications.
The PIC 18F4520 has several features among which we can cite:
Alternate Run Modes
Multiple Idle Modes
On-the-Fly Mode Switching
Low Consumption in Key Modules
Memory Endurance
11
Self-Programmability
Extended Instruction Set
Enhanced CCP Module
2. Key features
the PIC 16F877A has 5 ports named A,B,C,D,E. all the ports can be configured as input
or output this by setting the ports direction using the TRISx register ( TRISx=0 input TRISx=1
output) , and has one or more function(s).
12
II.3.2 Real time clock (DS1307)
Since the time factor is important in the functioning of our system, we thought about the
DS1307 which is an IC compatible with I2C bus.
The DS1307 serial real-time clock (RTC) is a low power, full binary-coded decimal
(BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially
through an I2C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day,
date, month, and year information. The end of the month date is automatically adjusted for
months with fewer than 31 days, including corrections for leap year. The clock operates in either
the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense
circuit that detects power failures and automatically switches to the backup supply. Timekeeping
operation continues while the part operates from the backup supply.
The Nokia 3310 LCD (Liquid Crystal Display) is a pleasant small graphical display
screen, suitable for good number projects in electronics. This is a small monochrome (black and
white or only one colour) LCD 84x48 pixel display that was used in the immensely popular
Nokia 3310 phone. The display is 38*35 mm, with an active display surface of 30*22 mm, and
an 84*48 pixel display. The display is easy to interface, using standard SPI communication. This
is a very low power display (less than 1mA) but has no backlight, great for low power remote
node applications. A 1-10uF electrolytic capacitor from VOUT to GND is the only external
component needed. The figures below show a good view of the nokia screen.
This screen is better than other types of display with reasons being that it is cheaper, easier to
connect, and more of its electrical specifications compared to other kinds of display such as the
ordinary LCD display and other types of seven segment displays.
14
A. Electrical Interface specification
1 VDD Power Input. Logic supply voltage range VDD to GND : 2.7 to 3.3 Power
V
2 SCLK Serial clock. Input for the clock signal: 0.0 to 4.0 Mb/s. Input
5 SCE Chip-enable input. The enable pin allows data to be clocked in. The Input
signal is active LOW.
7 VOUT Output voltage. Add external 1-10 uF electrolytic capacitor from Power
VOUT to GND
8 RES External reset. This signal will reset the device and must be applied Input
to properly initialize the chip. The signal is active LOW.
Tableau 2: PIN description of the Nokia 3310 screen
II.3.5 resistors
For the realization of our project weve used as mall signal transistor2N222A
The2N2222A transistor rare operated in this project only in the saturation and cut-off states and
acts as witch efficiently. For this reason, we will generally speak of transistors being open when
they are in their off state, in which they do not allow the current to flow, and well also talk of
transistors being closed when they are in their saturation state where current can flow through
them freely. Thanks to this type of operation, we have used this component for motor control.
16
monochromatic radiations or inconsistent polychromatic radiations as a result of the conversion
of electrical energy when a current passes through it. They exist in various forms, colors and
sizes. They are used in this project for signalization and in infrared sensors.
by power ranking
White: the energy is distributed over the entire visible range wavelengths (380-
780nm).
Infrared: the energy is emitted outside the spectrum of visible light, beyond 700 nm
wavelength. They are used for transmitting signals from remote control sort
elementary.
II.3.8 Capacitors
A capacitor is a passive two terminal component which stores electric charge (also
known as a basin of electricity). This component consists of two conductors which are separated
by a dielectric medium. The potential difference when applied across the conductors polarizes
the dipole ions to store the charge in the dielectric medium. The capacitance or the potential
stored by the capacitor is measured in Farads (F). The circuit symbol of a capacitor is shown
17
below and its physical structure. They are basically two types of capacitor which are the fixed
and the variable capacitor.
Coin discriminators (also known as coin selectors), are available in any coin operated
machine such as vending, public phone or slot machines. Their function is to discriminate valid
coins (or tokens) from their possible imitation. This must be done in a very short time frame such
that the user does not appreciate any delay between the introduction of the coins and the
operation of the device. The problem here arises in places where a good number of currencies are
accepted (e.g. some airports); where coins of very different nominal value may have very close
physical dimensions and properties. Fraud in coin operated machines has also had an important
economic impact.
Unlike note discriminators, coin discriminators must be low cost devices which make it
impossible to use sophisticated technologies. This means that both low-cost electronic
components and sensors should be employed.
1) Coin entry,
2) Coin rolling,
3) Anvil,
4) Coin rolling ramp
5) Optical (a-a) and
Electromagnetic sensors (b-c-d),
6) Acceptation gate,
7) Coin acceptante chute,
8) Coin rejection chute
18
II.3.10 Serial cable and serial port
A popular way to transfer commands and data between a personal computer and a microcon-
troller is the use of standard interface, like the one described by protocols RS232 (older) or USB
(newer). The protocol RS232 defines the signals used in communication, and the hardware to
transfer signals between devices.
The MAX232 is an integrated circuit first created in 1987 by Maxim Integrated Products
that converts signals from a TIA-232 (RS-232) serial port to signals suitable for use in TTL-
compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts
the RX, TX, CTS and RTS signals.
19
CHAPTER THREE: METHODOLOGY
Our objective is first to be able to automated the opening and the closing of the gate,
display the date and the number of car passed, so that everybody can see, keep a record in a
database to avoid some unclear like corruption and favoritsm. In fact this project will enable us
to better manage our toll gate. To meet our expectations, in this chapter, we will see the
synoptic layout of the system to understand his functioning; also study and make the
dimensioning of each block of the system since they are many and at last we will make the
conception of the Database inside Delphi7.
The functioning of the system will be divided steps by steps, taking into consideration
when it is a car or whether it is a motorbike.
S_out
Coiner
Heigh
Tire_1
t
S_open
Tire_2 S_close
20
At the starting of the system, the LCD display welcome to Bamenda toll for
example and few seconds later the day, date and the number of car.
Step 1:
If it is a car, the motorist cut the infrared sensor height, pressed tire_1 and tire_2
sensors on the tare road and inserts coin (500 fcfa) inside the coiner. When all those conditions
are filled, the gate opens; s_open stop the opening when the gate reaches up.
Step 2:
Once the gate is open, the counter increment and display the number on the LCD screen.
Step 3:
After the gate is open and the count made, the car cross the gate and cut the second
infrared sensor which is s_out ,the gate will stay open unless the car cross completely and then,
the gate will close . S_close stop the closing when the gate reaches down.
Step 4:
Now if it is a motorbike, only the sensor height will detects. The gate will open; s_open
stop the opening when the gate reaches up,
Step 5:
There will be no count since motorbikes are no paying toll fees. Mean that the previous
number will stay unchanged since it is a car.
Step 6:
The gate will close the same way as it was a car. S_close stop the closing when the gate reaches
down.
The flowchart below describes briefly the functioning of the circuit and can help for
the programming.
21
START
INITIALIZATION
HEIGHT=1?
S_CLOSE=1?
S_OPEN =1? No
TIRE_1=1?
TIRE_2=1?
COIN=1?
Yes HEIGHT=1?
S_CLOSE=0?
S_OPEN =0?
OK=0; wait=1; open () =1; ++car; display TIRE_1=0?
TIRE_2=0?
No
COIN=0?
Yes
Open () =0;
S_OUT=1 ?
S_OUT=0 ?
End
22
III.2 general bloc
PO SIG
WE NAL
R PIC18F4520 ISA
SUP TIO
PLY N
Above block consists of ten main blocks. Each block is made up of interconnected
components playing various roles to the functioning of the circuit.
a. External clock
There are two type of oscillator namely the crystal oscillator (XT) and the resistor-
capacitor (RC). This block (crystal and capacitor) is very important because you need to mention
the type of oscillator when buying a microcontroller. It is a circuit that is used to provide the
Microcontroller with clock pulses. This clock pulses are needed for the microcontroller to
execute a program or program instructions.
23
Figure 21: external oscillator
b. RTC DS1307
The system must integrate a clock circuit which is responsible of the time and date
management. For that, we adopted the DS1307 from DALLAS. We have made a standard la
layout
of the circuit as follow.
The RTC is configured to generate 1Hz frequency on his pin 7.it will be used to control
microcontrollers interruption. We added a battery-backup, this to supply the RTC in case of
power failure.
To work properly, RTC DS1307 must be provide with:
24
III.3.2 Microcontroller implantation
Transformer
The input and output voltages, Transformation ratio, the output current and
The apparent power .Since we need a power supply of 12V dc we have the following calcul
calcula-
tions:
25
Transformation ratio (m) = Vs/Vin = 24V/220V: knowing
nowing that the 24V must be greater
than needed 12V. => m= 0.1
Primary current (Ip) = m * Is => Ip = 1A*0.1=>Ip
1A*0.1=> = 100mA.
The apparent power of the output (Ss)
( ) = Vs*Is => Ss = 24*1 = 24VA => Ss =24VA
The smotting
1= ( )
= ( )
They are two types of sensors used in our system, electromechanical sensors and
infrared sensors. They enable the microcontroller to communicate with the rest of the system and
the external world. Then, their sizing shall be made according to microcontroller characteristics
and also to the component characteristics. The microcontroller as a computer knows binary level
1 = 5V or 0= 0v; the same way sensors are read as zero (0v)
( or one (5v)) by the microcontroller.
So the sensor must be sized to get 0v or 5v at his output.
27
a. Infrared sensors
We have decided to use the most simple circuit diagram for our application since it is
just a layout. In the
he system they are called S_OUT and HEIGHT.
The emitter;
The receiver
28
The LM358 is connected as comparator. When there is no obstacle between the
emitter and the receiver (photodiode is lighten by the emitter) the warning led bright, and the
output Vs=5V ( logic 1).otherwise
otherwise when there
ther is obstacle Vs=0V (logic1).
b. Electromechanical sensor
Using mesh theorem, when the button is Using mesh theorem again, when the button
open the voltage at the microcontroller is close the voltage at the microcontroller
is equal to j0v (logic 0). pin is equal to 5v (logic 1).
29
As it name says, it is responsible of motor
motor control for opening and closing operations
during the functioning of the system. We have decided to use 5V DC motor.
The control is made through 2N2222A transistors (NPN) and BC556 (PNP). The signal
proceeds from the microcontroller
microcontr switch on the transistor to let the current flows through
the right way and command motor rotation on one direction or on the opposite one
accordingly
ngly to the transistor switched.
III.4 Programming
III.4.1 Delphi7
Figure 30:
30 Delphi7 icon
30
A. Database design
Analysis
Conception
Implementation
Everything in a database must be stored in a table format. Since car crossings data, bike
crossings data, daily crossings data and user list data have to be stored, we need to create four
tables. Steps to create tables are as follow:
31
Figure 31: Database Tables
B. Interface designing
This window enables the user to connect to the application and view information or
login if he is not yet and user.
32
2. Home page interface
On this window, we can easily get access to daily statistics and many others information such as:
Users registered
d and their function;
33
3. record form
Record form enables the users to view statistics per category and to easily print it. We have
foreseen four record forms for our project:
bikes record;
car records;
users record;
34
III.4.2 MIKROC 6 COMPILER
35
CHAPTER FOUR:: REALISATION AND SIMULATION OF THE
SYSTEM
This chapter presents the results obtained from the simulation the realization of the
project. Showing the procedure which has lead to the projects physical design. It shows the
accomplishment of the choices made in the chapter three, starting from the methodology used to
the choice of materials and tools. Under this chapter is presented the results of the simulation, the
results obtained from the implemented system and discussion about the expected results and the
actual obtained result.
We will briefly present here the simulation results in Proteus, the obtained PC
PCB boards in ARES,
procedures of the realization and the final results of each of the parts of the design. We then
discuss the testing results and outcomes obtained and the adjustment added if any.
Proteus
oteus is electronic software which enables one to both design a diagram and realize
its printed circuit. It is composed of two parts: ISIS and ARES. ISIS is for designing whereas
ARES is for printed circuit realization. The figure below shows the ARES and ISIS user interface
of proteus that enables the realization of the printed circuit of our practical peace
36
IV.1.1 Commplete system design of simulation (isis)
Commplete
after the
he realization of the diagram in environment Isis, one to make an export of
the assembly of ISIS towards ARES for
f so having the printed circuit which is process whereby
traces are made on tracing following a particular diagram. It can be realized by hands or by
software.
30
IV.2.1 General circuit PCB
1. Ares layout
2. 3D visualization
31
Figure 38: Component and copper side infrared emitter
IV.4 Realization
32
Figure 40: infrared sensor and DS1307 block
1. RTC management
The RTC is connected to PORTC. I2C protocol will be used to manage it.
33
Sbit Soft_I2C_Sda at RC1_bit;
Soft_I2C_Start ();
Soft_I2C_Write (0xD0); //address 0x68 followed by direction bit (0 for write, 1 for
read) 0x68 followed by 0 --> 0xD0
Soft_I2C_Write (address);
Soft_I2C_Start ();
Soft_I2C_Write (0x07);
Soft_I2C_Stop ();
Soft_I2C_Start ();
Soft_I2C_Write (0xD0);
Example: read_ds1307 (0) //read the second register of the ds1307 and return it.
34
{
Example: write_ds1307 (0x07, 070) //write 0x7 in control register to set SQW at 1Hz
The hardware module is available with a number of PIC compliant MCUs. The Mi-
kroC PRO for PIC Library provides comfortable work with the Asynchronous (full duplex)
mode. You can easily communicate with other devices via RS-232 .You need a PIC MCU with
hardware integrated.
35
08 Rectifier bridge 01 / 350 350 frs
09 Transformer 01 220/12V 2000 2000 frs
10 Diodes 02 150 300 frs
11 Relays 02 12V 500 1000 frs
12 Transistors 08 2N2222A, BC556 200 1600 frs
13 LED 13 50 650 frs
15 RTC 01 DS1307 2500 2500 frs
16 Quartz 02 20MHz, 32,678KHz 500 1000 frs
17 DIL support 02 40pins, 8pins 200 400 frs
18 Infrared leds 02 1500 3000 frs
19 Motor 01 5V-500mA 600 600 frs
20 Solder lead 8m 200 1600 frs
21 Carton 1000 1000 frs
22 Non polarized capacitor 04 100nF,10nF,22pF 150frs 600frs
23 Electrolytic capacitor 01 35v/2200uF 400frs 400frs
24 Electrolytic capacitor 02 10v/220uF25v/220uF 300frs 600frs
25 Labour 4000 1000 frs
Total 63500FCFA
36
CHAPTER FIVE: CONCLUSION AND RECOMMENDATIONS
Difficulties encountered
Difficulties are the things which have accompanied us throughout the design and realization of
this project. But as we say, difficult and costly achievements give high pleasure and impact us
for a lifetime being successfully or not accomplished. For that, we have met difficulties that we
can say today have broadened our conception of things especially when it comes to
microcontrollers system design. Among them we can cite the following ones:
Scarcity of good components at moderate price in the market due to the fact that sellers
in the surrounding areas are still reluctant with selling those components to a public
which is mainly compose of student when they are manufacturing their project which
according to them is a small market target.
The change in our topic which over stressed us ,due to the fact that we were having less
time to study Delphi7 and be able to use it functionalities to achieve those new objec-
tives, and it was not easy since we have not really studied the basis of database man-
agement system.
Recommendations
These recommendations and suggestions are to make good use of the design but also to
simplify and improve its realization for others, and more generally to improve the process of
any electronic system design so as to enable the expansion of students level of competency by
concentrating only on the important aspect of the works. Among those means to facilitate the
realization of project we can cite:
Partnership relation should be concluded between the university and big electronics shop in
order to make electronics component available and at moderate price.
37
We recommend that further studies should be done on the toll gate system control, for ex-
ample by adding RFID technology to render it up to date.
We recommend for well undertaking next work, to set out again the groups by taking into
account the careers in electronics and Electrotechnics because us particularly we
encountered difficulties because we were not accustomed to making electronic
achievements.
In the same way, we would like that in future years, the best projects can be subsidized if
possible and to even realize within the campus for those which are favorable.
Conclusion
This project that aimed at automated toll gate management, with the possibility of stor-
ing data collected in a Database actually came to the end. We went through the necessary steps
and obtained the results as earlier presented. Our system was able to open, close, differentiate
cars and motor-bike, discriminate bad coin from good one, count and compute amount, display
date and time, store data as it was stated in the main objectives of the work. We hope that if
this system is improved and implemented it will be of great help to the management of our toll
gates.
APPENDICES
38
39
REFERENCES/BIBLIOGRAPHY
40
[3]D W Smith (2006) PIC IN PRACTIC, PROJECT BASE APPROACH, third Edition,
Linacre House, Jordan Hill
41