Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

JIMMA UNIVERSITY

JIMMA INSTITUTE OF TECHNOLOGY


FACULTY OF ELECTRICAL AND COMPUTER ENGINEERING
COMMUNICATION STREAM
TCBTP PHASE _ IV
TITLE: PASSENGERS OVERLOADING CONTROL SYSTEM IN PUBLIC
TRANSPORTATION
PEER-GROUP 10
1. WARKENA ABAY RU 2347/10
2. MAHAMMED SHAMIL RU 1837/10
3. EPHREM ASHAGRE RU 1418/10
4. ABEBE JEMANEH RU 0972/10
5. BONTU AMENU RU 1256/10
ADVISOR: Mr. GETACHEW.A

JIMMA, ETHIOPIA

24-MAY-2021
Passengers Overloading Control System in Public Transportation

Acknowledgement
We are thanks deeply Jimma university institute of technology and faculty of Electrical and
Computer engineering for giving this chance for us to practice to do projects, and for contributing
to enhance our knowledge on doing projects
We would also like boldly to thanks Mr. GETACHEW.A for his incredible support and continuous
advice while we do the project and we are also grateful for his diligence and cooperation. Lastly,
we would like to thanks our group members for their active participation.

i
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

Abstract
Passenger overload in public transport is a series problem across the world. It incurs huge costs
in terms of life, property and maintenance of bus. The problem of overloading is generally under
control in many developed countries while it is still a challenge too many developing and under
developed nations. Every year many people are die in road accidents and time to time this number
is growing. Therefore, this project is trying to reduce such unexpected happening. The project
includes LCD (Liquid Crystal Display), alarm or sounder and indicating lamps as output from
microcontroller and two IR (Infrared Sensor) sensor, pressure sensor and power supply as input
to the microcontroller. Two (2) IR sensor are put in the bus near door of the vehicle. As the
passenger enters to the bus, sensor 1(IR1) count the number of passengers and it show the number
increment by one. Unlike if the passenger out from the vehicle sensor 2(IR2) count the number of
passengers exit the bus and it show the number of passengers decrement by one. Finally, if the
number of passengers become above the required level, the microcontroller sends an information
to the buzzer which notify the driver by making sound (alarm).
In addition to IR sensor, pressure sensor also used. This sensor is a critical factor in the safe
operation and performance of a motor vehicle. The pressure sensor is used when the two IR sensor
are not working properly and if the IR sensor only counting purpose the pressure sensor will detect
the overall load of the bus as a whole. The project has the advantage to reduce accidents, to
increase bus life time and for comfortable journey.

ii
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

Table of Contents
Acknowledgement ......................................................................................................................................... i
Abstract .......................................................................................................................................................... ii
List of figures ................................................................................................................................................ v
List of Tables ............................................................................................................................................... vi
Abbreviation ............................................................................................................................................... vii
CHAPTER ONE...........................................................................................................................................1
INTRODUCTION ........................................................................................................................................1
1.1 Background of Project .......................................................................................................................1
1.2 Problem Statement .............................................................................................................................2
1.3 Objectives of The Project ..................................................................................................................2
1.3.1 General Objective .........................................................................................................................2
1.3.2 Specific Objectives ........................................................................................................................2
1.4 Significance of The Project ................................................................................................................2
1.5 Scope of Project ..................................................................................................................................3
1.6 Project Organization ..........................................................................................................................3
CHAPTER TWO .........................................................................................................................................4
LITERATURE REVIEW ............................................................................................................................4
CHAPTER THREE .....................................................................................................................................6
SYSTEM DESIGN AND METHODOLOGY ...........................................................................................6
3.1 Methodology .......................................................................................................................................6
3.2 Component Description .....................................................................................................................7
3.2.1 Microcontroller .............................................................................................................................7
3.2.2 At89c51 .........................................................................................................................................8
3.2.3 Crystal ...........................................................................................................................................9
3.2.4 Buzzer ..........................................................................................................................................10
3.2.5 Liquid Crystal Display (LCD) ........................................................................................................10
3.2.6 Light Emitting Diode (LED)..........................................................................................................11
3.2.7 Infrared Sensor (IR) ....................................................................................................................12
CHAPTER FOUR ......................................................................................................................................14
DESIGN AND SIMULATION OF THE PROJECT ..............................................................................14
4.1 System Design ...................................................................................................................................14
4.2 Power Supply ....................................................................................................................................14

iii
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

4.2.1 Transformer ................................................................................................................................14


4.2.2 Difference of Amplifier ...............................................................................................................14
4.3 Crystal Oscillator ............................................................................................................................16
CHAPTER FIVE ........................................................................................................................................17
RESULT AND DISCUSSION ...................................................................................................................17
5.1 Test Result and Discussion ..............................................................................................................17
CHAPTER 6 ...............................................................................................................................................21
CONCLUSION AND RECOMMENDATION........................................................................................21
6.1 Conclusion.........................................................................................................................................21
6.2 Recommendation ..............................................................................................................................21
Reference.....................................................................................................................................................22
Appendix .....................................................................................................................................................23

iv
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

List of figures
Figure 3. 1 Block diagram ............................................................................................................... 7
Figure 3. 2 AT89C51 microcontroller ............................................................................................. 8
Table 3. 1 Pin description of AT89C51 microcontroller ................................................................. 9
Figure 3. 3 Crystal ......................................................................................................................... 10
Figure 3. 4 Liquid crystal display .................................................................................................. 10
Table 3. 2 Pin description of LCD ................................................................................................. 11
Figure 3. 5 Anode and cathode Of LED ........................................................................................ 12
Figure 3. 6 Working of LED ......................................................................................................... 12
Figure 4. 1 Difference amplifier .................................................................................................... 15
Figure 4. 2 Crystal quartz equivalent circuit ................................................................................. 16
Figure 5. 1 When person entered to the bus .................................................................................. 18
Figure 5. 2 When person exit from the bus ................................................................................... 19
Figure 5. 3 When the bus is empty ................................................................................................ 20

v
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

List of Tables
Table 3. 1 Pin description of AT89C51 microcontroller ................................................................. 9
Table 3. 2 pin description of LCD ................................................................................................. 11

vi
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

Abbreviation
AC…………………………………………………………. alternative current
DC……………………………….……………………….…direct current
IR……….…………………………….……………………. Infrared Sensor
IR_LED……………………………………………….……. Infrared Sensor Light Emitting Diode
LCD……………………………………………………….…. Liquid Crystal
LED…………………………………………………….……. Light Emitting Diode
RAM……………………….……………………………….…Random Access Memory
TPMS …………………….……….……….... ………………Tire Pressure Monitoring System

vii
FECE -JIT JU TCBTP Phase IV
Passengers Overloading Control System in Public Transportation

CHAPTER ONE
INTRODUCTION
1.1 Background of Project
Transportation plays a dominant role in our day-to-day life. It is the movement from one place to
other by different mechanisms like manual transportation such as on foot, horse mule and etc. This
way of transportation takes long time to destination and leads to invention of modern vehicles.
Modern vehicles such as bicycle, motorcycles, cars, train and airplane are used for transportation
those vehicles take short time to the destination but, there is challenge of passenger overloading
control system while we use modern vehicles. To overcome the problem Passengers overloading
control system is used which count the number of passengers, control entrance and existence of
passengers and gives alert if the number of passengers exceeds the total accommodation of the
vehicles. Most of the time this is done by traffic police and has an error during counting, leads to
corruption, makes life and property destruction. To avoid the problem the electronic controlling
system was invented. The current inspection system doesn’t work efficiently as the check is done
at random and it is difficult during rain and night times and it also require costly and great power
[1]. So, the better system is required in controlling public buses overloading in order to reducing
deaths and casualties since excessive passengers is one of the major causes of many deaths and
casualties when accidents occur. Passengers when travelling are required to sit one and wear seat
belts for their safety [2]. A single seat belt can’t be tightening to multiple passengers current
overloading lets passengers’ seat than recommended seating capacity and some are even travelling
without seat. Passengers overloading carries costs in terms of lives property and maintenance of
buses. Overloading passenger in buses is illegal which carries with range of risks and penalties.
There are a number of existing technics for passengers overloading control in public busses,
counting of passengers, video processing using camera capturing, infrared motion analyzer and so
on [3]. This project uses an IR sensor which is an electronic device that measures and detects
radiation in its surrounding environment so in this it uses to counts passengers who get in and out
of the public buses and also Tire Pressure Monitoring System (TPMS) which is based on direct
method of tire pressure measurement. This system contains a directs tire pressure monitoring
principle and a display unit for monitoring the pressure of the tire. The pressure sensor used a
piezoelectric resistance type pressure sensor. It is clear that, at some point we need to limit the
number of extra passengers to be accommodated.
1
Passengers Overloading Control System in Public Transportation

1.2 Problem Statement


In our country no automatic passenger monitoring system despite having station police at different
locations for manual check-up. The manual check-up system is difficult to control overloading
passengers due to some of the traffic police is not that much honesty. Some traffic police make
corruption by receiving money from the vehicle driver. This makes the traffic police to give
permission for the driver to overload passengers. So, such action leads too many injuries and death
due to passengers being overloaded and vehicle driver not wearing their safety belts.
The manual system generally has the following drawbacks: -
❖ Makes the vehicle to stop at each traffic station for check-up and the police enter to the bus
to count the number of passengers in the bus but, extra passengers try to hidden himself
from the traffic police by sleeping inside the chair or placed back side.
❖ Tedious monitoring system
❖ Extra labor spent by traffic police
1.3 Objectives of The Project
1.3.1 General Objective
The general objective of this project is to design automatic control passengers overloading in public
transportation.
1.3.2 Specific Objectives
• Making the transportation system easily monitored
• Minimize accidents occur by overloading
• To reduce costs
• To enhance system performance
• To suggest option of controlling overloading
• To knows how to construct circuit simulation on the proteus.
1.4 Significance of The Project
The passengers counting system and overloading monitoring in the can provide different
advantages. Some those are: _
➢ For human life expectancy, to reduce injuries or accident that happen in the case of
transportation
➢ For traffic police stations; to reduce load and easily know number of passengers.

2
Passengers Overloading Control System in Public Transportation

➢ For passenger, to comfort and time usage on transportation service


➢ To reduce corruption and it can also reduce over payment for a specific distance
➢ For bus life time and etc.

1.5 Scope of Project


This project concentrated on development of smart passenger counter for transportation system.
The concept of passenger counting system is on the detection of movement using infrared sensor
and pressure sensor to trigger alarm controlled by microcontroller AT89C51. The electrical
structure consists of infrared sensor that used to detect or sense motion of passengers,
microcontroller AT89C51 circuit that used to control the whole operation of the counting system
and LCD display for displaying the number of passengers. While the software programming is
based on the microcontroller AT89C51 instruction sets, it contains a program designed for counting
system as an interaction to operate the electrical structure.
1.6 Project Organization
The rest of this project is organized as follows. The previous works are reviewed in chapter two.
In chapter three the detail explanation of methodology, component description and system design
are discussed. Under chapter four simulation result and discussion, assumption undertaken and test
performed is analyzed. The last chapter of the project is all about conclusion and recommendation.

3
Passengers Overloading Control System in Public Transportation

CHAPTER TWO
LITERATURE REVIEW
There are many techniques practiced to count the number of passengers in all over the world. But
they are not accurate and done by manual checkup. Some modernized counting system
technologies are introduced but, still they are used for other purpose.
Kilavo Hassan, Anael Sam, Dina Machuve(2013)[1] investigated a system for monitoring and
reporting excessive passengers in public buses in Tanzania. The purpose of this work has been to
develop a system for monitoring and reporting excessive passengers. It is based on two PIR sensor
and Global System for Mobile Communication (GSM) modem using Arduino. The system
monitoring the number of passengers boarding in public buses and reports to the respective
authorities when a certain number of passengers exceeded. The limitation of the system is not full
work at the place of no network available.
Warsaw,Poland(2014)[2] studies a system for measuring bus passengers loading by monitoring
Wi-Fi transmission from mobile devices. Uneven loading of busses degrades passengers travel
experience for a variety of reasons. Load at the bus stop and the actual load currently aboard
travelling buses.
D.R.Kulkarni (2016)[3] people are depending on the public transport vehicles for their day to day
transportation. Considering the safety and comfort of passengers traveling by public vehicles, the
main factor is overloading of bus. We can’t avoid the overloading of the buses as some buses are
not having good frequency. But the passengers standing on the stops can definitely come to kwon
about crowd inside the bus. This needs a passenger counting mechanism and also, the passengers
counting will help to improve the vehicles efficiency, fuel economy and the passengers’ comfort.
ShanmuganathanJ1 and Bennilo Fernandes J2(2014) [4] this project implements s a solution for
enhancing public transportation management services based on GSM. In this project design and
development of a low-cost transportation management system based on integration of GSM data
with transportation is described. The system comprises of various modules which are wireless
linked with GSM modems. Cost effective SMS service of GSM network is used for the transfer of
data between the modules and new service to facilitate the people who use public transport fir
traveling inside the city.

4
Passengers Overloading Control System in Public Transportation

The limitation of this project the system is not work all the country but, it is only focus inside city
transportation to reduce the overloading passengers controlling on transportation by using GSM
system also if there is no network system is not function work.
Chen [4] People enumeration system for obtaining in/out of a bus supported video process in
Intelligent Systems style and Applications. The author proposed an automatic people counting
system for getting in/out of a bus based on video processing. The basic theme is to line a celestial
point camera within the bus for capturing the rider flow bi-directionally. Experimental results
shows that the proposed bus passenger counting algorithm can provide a high-count accuracy of
92% on average.
The project listed above have some limitations and so, we have design passengers overloading
control system which is reduce the problem come with overloading by automatic system and is
very selective and works enter one country at any time and places.

5
Passengers Overloading Control System in Public Transportation

CHAPTER THREE
SYSTEM DESIGN AND METHODOLOGY
3.1 Methodology
A passenger overloading control system project is designed using microcontroller, two infrared
and one pressure sensors. When the infrared sensor is active then the LCD will display person is
enter into the bus up to set point and green led is activated. But when the persons available inside
the bus reaches the set point the system close door automatically and if by default extra person is
still available inside the bus the second IR sensor is activated and the LCD displays person is out.
The red led will be active in this case. If the action not the then the LCD will totally overload is
appeared and alarm will be activated then the door of the bus is automatically open to drop out
overloaded passengers. If both IR are not working properly then pressure sensor will be activated
and starts to read the tire pressure of all passengers in the bus also control the number of people
enters into the bus by close and open the door of the bus depending on the number of passengers
in bus to make comfort for person left inside the bus. All this process is controlled by
microcontroller program written on Keil uVision5 and uploaded to microcontroller.

6
Passengers Overloading Control System in Public Transportation

Power
source

IR1
SENSOR LCD

IR2
SENSOR AT89C51

MICROCONTROLLE
PRESSURE R BUZZER
SENSOR

ADC 0804

OPEN MOTOR CLOSE


DOOR DOOR

Figure 3. 1 Block diagram


3.2 Component Description
❖ Microcontroller
❖ Infrared sensor
❖ Pressure sensor
❖ LCD displayer
❖ Buzzer
❖ Data converter
3.2.1 Microcontroller
Microcontroller is a small, low cost and self-contained computer on a chip that can be used as an
embedded system. Today various types of microcontroller are available in market with different

7
Passengers Overloading Control System in Public Transportation

word lengths such as 4bit,8bit ,16bit,64bit and 128bit microcontrollers. Microcontroller is


compressed microcomputer manufactured to control the function of embedded systems in office
machines, home appliances, motor vehicles robots, and other appliances. Microcontrollers are
divided into many categories according to their memory, architecture, and instruction sets. From
these categories we use AT89C51 type.
3.2.2 At89c51
AT89C51 is 8-bit microcontroller and belongs to Atmels 8051 family. Here we use AT89C51, in
which AT mean ATMEL, C mean CMOS technology and the rest numbers indicates their family
identification. AT89C51 has 40KB of flash programmable and erasable memory (PEROM) and
128bytes of RAM. It can erase and program to a maximum of 1000 times. AT89C51 is a low power
consumption, high performance CMOS 8bit controller with 8K of in system programmable flash
memory and it can execute million instruction cycle per second. It is a 40-pin microcontroller with
Vcc of 5V connected to pin 40 and Vss at pin 20 which is kept 0V.

Figure 3. 2 AT89C51 microcontroller

8
Passengers Overloading Control System in Public Transportation

Pin Description of AT89C51 Microcontroller

Pin numbers Its functions


Pin-40 Vcc power source(5V)
Pin-20 Vss ground(0V)
Pin 32-39 Services as input /output
Pin-31 Address latch enable
Pin-30 Enable or disable external memory
Pin-29 Read signal from external
Pin 21-28 Multiplexed with quasi bidirectional port
Pin 18 and 19 Interface crystal to provide system clock
Pin 10 and 17 External memory interfacing read/write
Pin-9 Reset microcontroller to initial values
Pin 1-8 Quasi bidirectional input and output port
Table 3. 1 Pin description of AT89C51 microcontroller
3.2.3 Crystal
Most microcontroller can use a crystal oscillator as their clock source. Other options include
external canned oscillator, resistors RC oscillators and internal clocks. The main advantages of a
crystal oscillator are frequency accuracy, stability and low power consumption. The crystal is
connected to XTAL1 and XTAL2 which will provide the system clock to the microcontroller. An
electronic device that is used to generate periodically oscillating signal is called as an electronic
oscillator. In generally crystal oscillator are used in microcontroller for providing the clocking
signal. The below crystal oscillator is used to generate clock pulses required for the synchronization
of all the internal operations.

9
Passengers Overloading Control System in Public Transportation

Figure 3. 3 Crystal
3.2.4 Buzzer
A buzzer or sounder is an audio signaling device which may be mechanical, electromechanical or
piezoelectric. Typical uses of buzzers and sounders including alarm devices, times and
conformation of user input such as a mouse click or keystroke. Piezo buzzer is an electronic device
commonly used to produce sound. Light in weight and simple construction
3.2.5 Liquid Crystal Display (LCD)
Liquid crystal display is a flat-panel display or other electronically modulated optical device that
uses the light-modulating properties of liquid crystals combined with polarizers. A 16x2 LCD is
very basic module and is commonly used in various devices and circuit. These modules preferred
over seven segments and multi segments lEDs. The reason is: -

LCD is economical
Ease of programming for characters and graphics
The ability to display unlimited numbers, special even custom characters unlike in seven
segments and graphics.

Figure 3. 4 Liquid crystal display

10
Passengers Overloading Control System in Public Transportation

A 16x2 LCD means it can display 16 characters per lines and there are 2 such lines. In this LCD
each character is displayed in 5x7 pilex matrix. This LCD has two categories command and data.
The command register is storing the command instructions given to the LCD. Command gives the
LCD predefined task like initializing, clearing its screen, controlling display and etc.
The data registers store the data to be displayed on LCD. The data is ASCII value of the character
to be displayed on the LCD. It has 16 pin and the pin function is described as the following.
Pin description of LCD
Pin No Name Function
1 Vss This pin must be connected to the ground
2 Vcc Positive supply voltage pin (5V DC)
3 Vee Contrast adjustment
4 RS Register selection
5 R/W Read /write
6 E Enable
7 DB0 Data
8 DB1 Data
9 DB2 Data
10 DB3 Data
11 DB4 Data
12 DB5 Data
13 DB6 Data
14 DB7 Data
Table 3. 2 Pin description of LCD
3.2.6 Light Emitting Diode (LED)
It is a PN junction diode which emits light when activated. A light emitting diodes (LED)is a
semiconductor device that emits visible light when an electric current pass through it. The light is
not particularly bright but, in most LEDs, it is monochromatic occurring at a single wavelength.
Benefits of LED compared incandescent light and fluorescent illuminating devices, include: high
efficiency, low power consumption, compact size and ability to retain the quality for a longer
period of time. LED contains two terminals known as anode and cathode.

11
Passengers Overloading Control System in Public Transportation

Figure 3. 5 Anode and cathode Of LED


LED will be working under one condition: the anode terminal should be put at a higher potential
than cathode terminal as current flows from anode to cathode (positive to negative). LED won’t
conduct if the respective terminals are connected in the reverse order.

Figure 3. 6 Working of LED


3.2.7 Infrared Sensor (IR)
An infrared sensor is an electronic instrument that is used to sense certain characteristics of its
surroundings. It does by using either emitting or detecting infrared sensors are also capable of
measuring the heat of being emitted by an object and detecting motion. The IR sensor module
basically consists of three components:
➢ IR LED (Transmitter)
➢ Photodiode (Receiver)
➢ Op-Amp
❖ IR LED (Transmitter): _An IR LED is a light-emitting diode that emits light in the range
of Infrared frequency. IR light is invisible to us as its wavelength is much higher than the
visible light range. The basic function of this emitter LED is to convert electricity into light.
The light-emitting angle of an IR LED is approximately 20-60 degree and the range is
around a few centimeters to several feet. The color of the IR LED is white or transparent,
so it can give out the maximum amount of light.

12
Passengers Overloading Control System in Public Transportation

❖ Photodiode (Receiver): _The photodiode acts as an IR receiver, it converts the light which
falls on it into electricity. A photodiode is a p-n junction diode that is operated in reverse
bias direction. Which means it will start conducting the current in reverse direction when
light falls on it. When there is no light falling on the photodiode, it has infinite resistance
and acts as an open switch but as the light starts falling on the photodiode, the resistance
becomes low and it starts acting like a closed switch.
❖ Op-Amp: _The Op-Amp used in most of the IR sensor, which acts as a voltage comparator.
It will compare the threshold voltage set at pin 2 to the photodiode’s series resistor voltage
at pin 3. When the photodiode’s series resistor voltage drop is greater than threshold voltage
the output of the Op-Amp will be High and this will turn on the LED, connected at the
output which indicates the detection of an object.

13
Passengers Overloading Control System in Public Transportation

CHAPTER FOUR
DESIGN AND SIMULATION OF THE PROJECT
4.1 System Design
The primary objective of this project was to design and simulate the overload control system in
public transportation and manage the system by automatic close and open the door of bus
depending on the number of passengers in the bus. The design contain: _
4.2 Power Supply
The voltage input to the circuit is applied from the regulated power supply. We need a constant
low voltage regulated power supply +5V, providing input voltage to microcontroller, sensor and
LCD which requires 5volts power supply.
4.2.1 Transformer
Transformer is electromagnetic device that transforms electrical energy from one place to another
place the inductive coupled conductors. A varying current in the primary side creates varying
magnetic flux in the transformer core and thus a varying magnetic field through the secondary
winding. There are two types of transformer those are step down and step-up transformer. Step
down transformer accepts a given voltage on the primary side and outputs a lower voltage on
secondary side. Most electronic equipment required 5V to operate but from we have 220V so that
we have convert the source power into 5V by using: _
➢ Step Down Transformer
➢ Different Amplifier
4.2.2 Difference of Amplifier
A differential amplifier also known as difference amplifier is very useful op-amp configuration that
amplifier the difference between the input voltage applied. A difference voltage is a combination
of both inverting and non-inverting amplifiers. It uses a negative feedback connection to control
the differential voltage gain. The differential gain of the amplifier is dependent on the ratio of the
resistances. Therefore, by choosing the input resistances carefully, it is possible to accurately
control the gain of the difference amplifier.

14
Passengers Overloading Control System in Public Transportation

A
B
A

Figure 4. 1 Difference amplifier


From the figure above we can find voltage output by using amplifier rule.
Gain voltage is calculated as follow: _
R
G1 = Where, R =R1+R2+R3=1.2M+1.2M+2.2K =2.4022M ohm
R1
R1 = 22K
22k
G1 = = 0.0091
2.4022M
from input source we have 220V but to get peak voltage: _

Vpeak=√2 ∗ 𝑉𝑖𝑛=√2*220V=311V
Gain voltage = Vout/Vin
Vout =G1*Vin = 311V*0.0091 = 2.83V
2.83V is less than 5V so we need amplifier but at point B 5V is exist then
Peak voltage is 2.83V +5V = 7.83V and -2.83V +5V=2.17V
At the last voltage output which is voltage required for microcontroller and LCD is calculated as
follow: _
7.83 2.17
5V = + =5V
2 2
5V =5V which is voltage required for microcontroller, sensor and LCD

15
Passengers Overloading Control System in Public Transportation

4.3 Crystal Oscillator


A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a constant frequency.

Figure 4. 2 Crystal quartz equivalent circuit


Some of the factors that affect the frequency stability of an oscillator generally include: variations
in temperature, variations in the load, as well as changes to its DC power supply voltage to name
a few. But there is a limit to the stability that can be obtained from normal LC and RC circuits.
1
Parallel resonance frequency: _ fp =
𝐶𝑠𝐶𝑝
2𝜋√𝐿𝑠𝐶𝑝+𝐶𝑠

1
Parallel resonance frequency fs =
2𝜋√𝐿𝑠𝐶𝑠
Microcontroller can use a crystal oscillator as their clock source. The crystal is connected to
XTAL1 and XTAL2 which will provide the system clock to the microcontroller at frequency
11.0592MHZ. Then clock frequency is calculated from frequency but, one machine cycle has
12clock pulses.
11.0592𝑀𝐻𝑍
Clock frequency = =921.6KHZ after that clock time become
12
1
Clock cycle =
𝐹𝑐
1
Clock cycle = =1.085 microseconds
921.6𝐾𝐻𝑍

16
Passengers Overloading Control System in Public Transportation

CHAPTER FIVE
RESULT AND DISCUSSION
5.1 Test Result and Discussion
The microcontroller is the heart of this project work. The LCD is interfaced to the microcontroller
in order to display the status of the system as it operates. The simulated software use C code
program to machine code for controlling of the device. During simulation, first of all the required
components are imported to the design window by clicking a (P) button on the window which
means pick a component from a library. When this button is clicked, another window will be
opened to select the desired component. By writing the name of the component and selecting it or
double clicking on it, the component is imported to the design window. In this way all components
can be imported. By selecting from the imported list of components, each component is placed on
the appropriate position on the design space. After putting the components, the necessary
connection is done exactly the same as the overall integration circuit diagram. The program is
written, compiled and hex file is generated using Keil software. The hex file is loaded to the
microcontroller on the proteus simply by right clicking on the microcontroller; clicking edit
properties and giving the directory of the hex file on the program file space.
Simulation software helps to predict the behavior of a system.
Steps for program development are:
• IR sensor sends the data to the microcontrollers.
• The given program loaded to the microcontroller counts the number of passengers inside the
bus.
• Then Microcontroller studies the given data and stores it to memory.
• Then the data is processed and number of passengers are tracked and displayed on the screen.
Reason of using simulation for project is:
• Creating and simulating models is less expensive than building and testing hardware
prototypes.
• We can use simulation software to test different designs before building one in Hardware.
• We can connect simulation software to hardware to test the integration of the full
design.

17
Passengers Overloading Control System in Public Transportation

When person enter to the bus IR1 sensor is activated and detect the person who entered to the bus.
The number of passengers is incremented by one and this information is transmitted to the
microcontroller again the microcontroller transmits the received information to the LCD. Then
LCD receive information from microcontroller and display the number of passengers on screen.
As soon as yellow led is blink.

Figure 5. 1 When person entered to the bus

18
Passengers Overloading Control System in Public Transportation

When the person exits from the bus IR2 sensor detect person and the number of passengers in the
bus is decremented by one. Then LCD displays person is out and green led and yellow led are blink
at the same time.

Figure 5. 2 When person exit from the bus

19
Passengers Overloading Control System in Public Transportation

When there are no passengers in the bus the LCD display the word empty and the two-yellow led
are blink at the same time.

Figure 5. 3 When the bus is empty

20
Passengers Overloading Control System in Public Transportation

CHAPTER 6
CONCLUSION AND RECOMMENDATION
6.1 Conclusion
This project concentrates on the design and simulations of passengers overloading control system
in public transportation. Overload controlling system is designed in order to address one of the
major reasons of bus accidents which we have seen and listen daily. Based on simulated testing
after applying certain testing conditions, results shows that the system is responding good to the
situations that are been considered while designing this system. In this project we can conclude
that by using simple counter and automatic lock door we can control the passengers overloading in
public transportation system. Advantage of this system is able to help in improving overload
controlling which can cause many accidents due to passenger overloaded in public transport. Once
it is implemented in all vehicles, then it is possible to reduce transportation accidents at anytime
from anywhere. Now a days people counting system have huge application in different business
areas like in historical place in market, in large building, in college, university and museum. As
described in previous chapter if the number of people inside the bus is above the required, the
buzzer alarm start sounding and notifies driver. Currently, buzzer alarm has wide application such
as faults happen in the industries, power station and others.

6.2 Recommendation
Along the course of project completion, we encountered various problems and obstacles. We had
to start from the research phase at the beginning and needed to gain knowledge on all the devices
and components that we had intended to use for project. To develop the whole project, it consists
of three methods which are the used for passenger counting system by IR sensor and pressure
sensor by using software programming.
It is better to add these features, when someone do project regarding with overload controlling
system in public transport.
❖ We use IR and pressure sensors to count the number of passengers who enters to the bus
and exit the bus but, for future development it is better to add camera to differentiate the
person who hide itself in the bus. As part of our recommendation, we would like to
recommend to the future researcher that if the number of passengers in the bus is overloaded
by using new technology to control passengers overloading in public transportation by
automatic lock the motor of bus.
21
Passengers Overloading Control System in Public Transportation

Reference
[1]H.Kilavo,S.Anael and D. Machuve,”control in public bases case study ” international journal of
engineering and computer science.
[2] M.Rossi and A. Bozzolli,”tracking and counting moving people ,”IEEE international
conference on image processing.
[3] D.Beymer,”person counting using stereo,”in workshop on humanmotion,Washington,DC ,2000
[4] D.t.sp.sadiku ,microprocessor,ff.th.printed, Norway,1999
[5] Bolysted, Electronic Devices and Circuit Theory, Seven Edition.
[6] http://www.nkcelectronics.com/rs232-to-ttl-converter-board-33v232335.html accessed on date
10/5/2021
[7] http:/adafru.it/clR accessed on date 9/5/2021
[8] http:/www.theEngineering.com accessed on date 12/52021

22
Passengers Overloading Control System in Public Transportation

Appendix
#include <REGX51.H>
#define LCD P2 //.............LCD data port.............
sbit rs = P3^4; //..............pin to select register........
sbit rw = P3^3; //.............pin to read and write on lcd..........
sbit e = P3^2; //.............pin to enable the LCD..........
sbit alarm = P3^0;
sbit ir1 = P1^0;
sbit ir2 = P1^4;
sbit rled = P3^5;
sbit yled = P3^6;
sbit gled = P3^7;
unsigned int cnt;
void delay(unsigned int value) //.............delay...........//
{
unsigned int i,j;
for(i=0;i<value;i++)
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char item)
{
LCD=item;
rs=0;
rw=0;
e=1;
delay(100);
e=0;
}
void lcd_data(unsigned char item)
//.............send data to LCD..............//
{

23
Passengers Overloading Control System in Public Transportation

LCD = item;
rs= 1;
rw=0;
e=1;
delay(1);
e=0;
}
void display_data(unsigned char*item)//..................... display data on LCD............//
{
int x;
for(x=0;item[x]!=0;x++)
{
lcd_data(item[x]);
}} //..............main function..............
void main(void)
{
P1=0xff;
cnt=0;
alarm=0;
rled=0;
yled=0;
gled=0;
lcd_command(0x38); // for using 8-bit 2 row mode of LCD
delay(1);
lcd_command(0x0E); // turn display ON for cursor blinking
delay(1);
lcd_command(0x01); //clear screen
delay(1);
lcd_command(0x06); //display ON
delay(1);
lcd_command(0x81); // bring cursor to position 6 of line 1

24
Passengers Overloading Control System in Public Transportation

delay(1);
top:
if (ir1==1)
goto in;
else if(ir2==1)
goto out;
else
{
goto top;
}
in:
if(ir2==1)
{gled=1;
delay(100);
cnt=cnt+1;
display_data("Person entered");
delay(100);
lcd_command(0x01);
display_data("2Persons entered");
delay(100);
lcd_command(0x01);
display_data("3Persons entered");
delay(100)
lcd_command(0x01);
display_data("Bus overloaded");
delay(100);
lcd_command(0x01);

if(cnt==3)

{gled=0;

delay(100);

25
Passengers Overloading Control System in Public Transportation

rled=1;

delay(100);

alarm=1;
delay(1000);
}
else
gled=1;
delay(100);
}
else
goto top;
out:
if(ir1==1)
{rled=1;
delay(100);
cnt=cnt-1;
display_data("Person out");
delay(100);
lcd_command(0x01);
if(cnt<1)
{rled=0;
delay(100);
yled=1;
delay(100);}
else
gled=1;
display_data("Empity bus");
delay(100);
lcd_command (0x01);}
else
goto top;}
26
Passengers Overloading Control System in Public Transportation

27

You might also like