Train Locatin
Train Locatin
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Declaration
Certainly, we want to inform that this paper belongs to us and all the data which
written in this report has been done from what we have performed through the
semester in the behalf of our thesis project. It is prepared according to the Hawassa
University Institute of technology of school of Electrical and Computer Engineering
report writing format for BSc thesis. We have done this project for the partial
fulfillment of BSc degree in Electrical and Computer Engineering under
communication engineering Stream. Finally, it is a must to tell you how much effort
we have made to do this project and come up with tangible outcomes. No one has
made similar projects and this will serve as a primary reference.
APROVED BY
Advisor: ……………………………..
Signature……………………………..
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Acknowledgement
First and for most we would like to give great praise to our almighty God for giving
us forgiveness, the potential to do this project and guidance in our life. Second we
would like to give our gratitude for our honor advisor Mr. Abrham advice’s, support
and continuous follow up was our effort to come up with these points. Thirdly we
would like to thank our vice head of School of Electrical and Computer Engineering
for his technical advice and support in every task what we have faced in.
I
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Abstract
This thesis project have been aimed to design keypad and GSM based the train location
display where the train is found and at what time it will reach to the next stations. In
addition to this it notify at what time it will be reached to the other stations based on
keypad and GSM. Using keypad with controller at train to give the location by pressing
the button which coded for each station according to the keys and GSM for transmitting
information. We tried to do this project because of the introduction of modern
transportation system in Ethiopia especial in capital of Addis Ababa light train
transport service is one of the basic issue here to be considered according to our country.
Regarding to this in the capital of Addis Ababa most of people have some
doubts/discomfort as they have been using the train transportation. The real location of
the train where is it now and at what time will it reach their over is not known to them.
This project comes with a solution to these and other problems. Our project has a
display to show the location of the train in every train station and rail junction to inform
users. The station display receives command from the microcontroller located at every
station. This microcontroller which is on train with keypad has a responsibility to
receive a command from keypad buttons, and then sends a notification including the
station code assigned to each station through GSM module connected to it. Each station
unit on the other hand contains microcontroller and GSM module and an LCD display
to display what is going on. It receives the current location of a train from its GSM
module, processes and display it. This is the overall step with very low cost and less
complexity but invaluable advent.
II
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
List of Acronyms
AC ……………….…………………………...alternative current
DC…………………………………………….direct current
IR………………………………………………...infrared sensor
RF ……………………………………….………..radio frequency
UART……………….……………………………Asynchronous Receiver/Transmitter
III
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Table of figures
Figure 1.1: Train in the railway system ..................................................................... 2
Figure 2.5 SIM900A GSM Module & its internal structure [6] ................................ 19
Figure 3.1 Flow chart of train system with keypad and GSM ................................... 25
IV
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
List of tables
Table 1:pin description ............................................................................................ 19
V
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Table of Contents
Acknowledgement ...................................................................................................... I
Abstract ..................................................................................................................... II
List Of Acronyms .................................................................................................... III
Table of figures ....................................................................................................... IV
List of tables ..............................................................................................................V
Chapter One .............................................................................................................. 1
1. Introduction ........................................................................................................... 1
1.1 Background ..................................................................................................... 2
1.3. Objective........................................................................................................ 5
3.2 Simulation..................................................................................................... 29
VI
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
4.2 Discussion..................................................................................................... 34
Reference ............................................................................................................ 37
Appendix ............................................................................................................ 38
VII
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Chapter One
1. Introduction
Rail transport is a means of conveyance of passengers and goods by way of wheeled
vehicles running on rail tracks. Similar to road transport, where vehicles merely run
on a prepared surface, rail vehicles are also directionally guided by the tracks they run
on. Depending on the fast developments in railway systems, high-speed trains are
used rather than vehicles, and rail transportation is increased day by day. Today’s
most of the people uses railway for transportation, it is essential for transferring the
goods and passengers from one place to another place. And also the railway system
are provide facility such as high speed, with economical, environment friendly, safety,
and better characteristics of railway systems. These characteristics can be performed
by time to time increases demand for qualified transportation. But depending on
different factors, lack of current location of train information for the passengers who
are waiting the train at stations and the time taken to reach the next station notification
may occur in the transportation of train. These factors and other problems of train
system like wastage of time for passengers. In our case to determine the time taken to
cover the distance between two stations, we have to consider the length of train. The
length of the train shown in the figure below, have been measured with our stride and
approximated as 30 meters (one stride for one meter). Its speed is 30km/hr on average
(although its speed decreases when it arrive the station). So, its duration to pass one
point is calculated as 30m divided by 30km/hr which gives 3.6 second, but due to its
speed decrement arriving for stop at stations there will be an additional time. This
time duration is very important delay the microcontroller uses to identify. To the
Ethiopian context, especially to the capital of Addis Ababa the line of convergence is
observed in Addis Ababa light rail transit service on stations from Stadium through St.
Lideta where the lines Ayat-to-Torhailoch and Kality-to-MinilikII Square share one
line. On practical implementation, it will be solved by controller based system without
delay just reaching to the station pressing key can be notify place and the time taken
to reach the next stations
1
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
1.1 Background
Our country used to use trains as a means of transportation but due to unknown
reasons the service was halt for a very long time, even though, trains facilitate the
transportation service. Considering this the current Ethiopian government has
deployed a light railway system in Addis Ababa to facilitate the transportation service.
This service does improve the transportation traffic and service, even though still with
the trains working, finding a transportation means in Addis Ababa is hard. The Addis
Ababa light railway system consists two lines one going from North to South and
from East to West and it gives a service for over hundreds of thousands of peoples per
day. Being such a backbone for the transport system, it has its own drawbacks. These
people are observed waiting for the coming train in every station although they don’t
know when it comes. They kill much time with hope, and sometimes they may take
about an hour or more. Generally, they don’t know the location, arrival or status of the
train. In some points, it is observed that the rail is crossed by roads. On these
crossings, not only cars pass but also passengers used to cross through it. These
passengers may be deaf who can’t hear the siren of the train and elderlies who are not
as strong enough to cross the rail even though they have heard the siren of speeding
2
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
train. In this case whenever there are no traffic police there may be a crash between
the train and the car, also accident may occur on passengers who cross the rail. This
project will solve this drawback and give an enhanced transportation service based on
integration of keypad and GSM. Keypad are used to identify the location of the train
while GSM is used as a communication link between every station. The keypad,
placed at train which controlled by driver or other to press the button at each station to
notify the location of train, will give signal to the train micro controller; this micro
controller will send a message to the each station unit through GSM module. Then
this each station microcontroller will receive the current train location and at what
time will the train reach their over by using the GSM module, and then the station
microcontroller will display the current location of the train using LCD display at
each station. Here the way the train is identified at every station is done in such a way
that by pressing the keypad buttons which is placed on the train.
3
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The motivation to do this thesis is Addis Ababa light railway train gives service for
more than hundreds of thousand people per day. Although the passengers may wait for
half an hour and above for the train simply with hope, unable to use alternative
transport means. So, these people have been waiting for a long time with hope for the
train to come faster, this process will waste time, but if there is a system by which they
could know the location of the nearest train, they will take their own decision either to
wait for a train or use other means of transportation which will save their expensive
time. Also, people who are to cross the rail may be vulnerable to accidents in case they
do not know the location of fast train (as hoped when deployed first) whether it is near
to the junction or not. But if they know the location of the train station wise, whether
traffic police are there or absent, they are able to decide by themselves. Generally, some
of the problems that faced in train transportation system are listed below:
Therefore, to overcome these problems we plan to design a Keypad and GSM based
train location display system that reduces waiting time, decrease accident, easily
constructive, cost effective and easy to install.
4
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
1.3. Objective
Design and implement of Keypad and GSM based train location display system
5
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
There are many projects made on Train Tracking system. These projects were mainly
used GPS+GSM to track the position of the train not controller based keypad, of course
using GPS is reliable than using keypad based on controller pressing key which is
numbered from 0 to 9 coded as station name for every station of train. Just as the train
reach there, somebody has to be press the key which represent that station to notify the
position but in our country context for us the cost of GPS Modem & keypad is
incomparable, and the availability of GPS is very unlikely. Some studies even include
an accident detection system since these projects are studied for nationwide railway
systems. The following are the literatures studied about Train tracking and display
system. GPS/GSM Based train tracking system–utilizing mobile networks to support
public transportation - This paper presents a solution implemented at Sri Lanka, to
provide an intelligent train tracking and management system to improve the existing
railway transport service. The solution is based on powerful combination of mobile
computing, Global System for Mobile Communication (GSM), Global Positioning
System (GPS), Geographical Information System (GIS) technologies and software.
The in-built GPS module identifies the train location with a highest accuracy and
transfers the information to the central system via GSM. The availability of this
information allows the Train Controller to take accurate decisions as for the train
location. Location data can be further processed to provide visual positioning using
maps granting a wholesome view on train location. Positioning data along with train
speed helps the administration to identify the possible safety issues and react to them
effectively using the communication methods provided by the system. Additionally,
the location information can be used to facilitate accurate scheduling with regard to
train arrival and departure on each station. [1] Intelligence Information System for
Train Location using GPS and GSM - In this paper, an advanced public transportation
systems (APTS) is developed for enhancing public transportation services Based on
integration of GPS and GSM. GPS is used as a positioning device while GSM is used as
communication link between different modules. These modules include Base Station
Module, Vehicle System Module, User mobile section Module. Base Station Module
contains a GSM engine interfaced to PC and transmits the train index and its number to
6
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Base Station. At the same time, it turns on GPS receiver installed in the train. The train
then starts transmitting its location to the Base Station. The Base Station comprises of a
GSM engine interfaced to a microcontroller for processing user request of train location
as well as a number of other GSM engines interfaced to various PCs each reserved for a
separate train to update the location information of that train. The train’s location data
from Base Station is sent to each train station. Train station Module after receiving
trains location data through GSM engine displays it on dot matrix display installed at
each train station. [2] Real Time Wireless Based Train Tracking, Track Identification
and Collision Avoidance System for Railway Sectors - This paper deals the solution for
hectic problem around the world about traffic densities which is also common to
railway sectors too, in recent years we often hear the word train collision and it bags
huge precious human life and time. In this paper a system is proposed which deals with
automation of trains, using the concept of Global Position system(GPS) for tracking
each train and a proposed system by which trains are individually monitored and
passing necessary messages to the individual trains during the emergency situation of
chance of collision occurrence. [3] Train Tracking and the Signaling System using
Infrared and Radio Frequency Technology - This paper considered the secured level
crossing signaling system and Train tracking system. This paper adopted a switching
logic methodology to meet the challenges of the tracking system. This work also
focused to map the train on the display screen. If the train moving close to the level
crossing system, the signaling system causes to release the green signal that causes to
close the rail gate to avoid the unauthorized entry on the rail track. The open state of the
gate is influenced by the signaling system by means of a ‘Red’ color signal. The train is
allowed to move on the track only by considering the green signal. The rail track is
organized with four stop positions. Stop 1, stop 2, stop 3 and stop 4. The locations of the
train at various stop positions are sensed by using IR sensors. The detected signal is
transmitted to the control room using RF transmitter operating at 433 MHz. An Atmel
micro controller is used to regulate the entire process to meet the desired state of the
work. This proposed methodology had been successfully implemented on the 30 feet
length of the scaled model of the rail track in the laboratory. The system results
progressive response while tracking the position of the train. The results are recorded
and analyzed. The proposed system may keep alert the monitoring mechanism. So, the
7
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
collision of the train and unexpected human errors can be minimized. [4] As we can see
from the above literatures most of the projects carried out use either GPS and GSM or
RF and IR, but our project consists of keypad and GSM on the train with controller
oriented to press the key at every station reaching to notify the position of the train and
GSM and microcontroller are installed at every train station found to receive the
information from train to display station location and reaching time.
8
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
1.5 Methodology
Literature review: Firstly a number of literatures related to this problem area were
investigated and then valuable data had been gathered from referring the books,
websites and other reference materials including datasheet of components to
understand how the system can work and know about each component.
Design specifications: listing the required performance of the system began by the
proper selection of the main components we use for this project like Arduino Uno,
SIM900A GSM Module, Keypad and LCD display selections.
System modeling: building a block diagram and formulating the relationship between
different parts and components of the system and developed flow charts
Designing: the circuit design of the whole system using computer aided tools like
proteus for the project will work
Simulation: the simulation will be done after the circuit design has been completed
9
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The scope of this project covered theoretical analyses of the principles, operating
mechanisms, and performance of the system and this project is applicable in Addis
Ababa light rail transit service and newly deployed cross country rail transit services
with little modification. We have also designed simulation using software and
simulation tools and the simulation of this project enabled us to show every condition
of different states .We showed communication between the two units and the display.
For the realization of our project simulation arduino, keypad, LCD and GSM module
are involved on the circuit diagram. The output of this thesis is one way of solving the
passengers’ problem by notify the exact location of a train and without waiting time
and hope.
10
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
This thesis document consists of five chapters followed by references and appendix
11
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Chapter Two
As shown in figure 2.1 above, there are two separate units. Station unit located in
every station and one on the train which communicates to every station unit wirelessly
using the GSM. Arrows shown with red indicate the forward transmission of
information from train system to the individual station unit.
12
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
13
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
microcontroller has a responsibility to read this message and forward it to the station
LCD.
To implement this project mainly we were constructed the components from different
devices like, Arduino Uno, SIM900 GSM module, and keypad and LCD display
16x2.
Arduino Uno
It is an easy to use microcontroller with low price but a very powerful single board
computer which is used in most projects of students. It has 14 digital input/output pins,
6 analog inputs, a 16MHz crystal oscillator, a reset button and USB connection. It can
be powered using PC through its USB, using AC to DC adapter or directly using
battery. Uno means nothing but one in Italian. It is named like this to mark the
upcoming release of Arduino 1.0. The Uno version is the latest version in the series of
USB Arduino boards, and reference model for the Arduino platform; for a compatible
previous version. The Uno differs from all other boards in that it does not use the
FTDI (Future Technology Devices International) USB-to-serial drive chip. When we
give power to the Arduino using battery, the lead connected to the Gnd and the Vin
pin to the header of the battery. Although Arduino can be powered from 6v to 20v,
power less than 7v leads the 5v pin to supply less than this and the board becomes
unstable and power greater than 12v the voltage regulator may overheat and damage
may happen. Thus, the optimum range is 7v-12v.
14
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Memory:
The Atmega328 has 32KB of flash memory for storing code, of which 0.5 KB is
used for the boot loader. It has also 2KB SRAM and 1 KB of EEPROM.
Each of the 14 digital pins can be used as input or output. This is done by using
pin Mode (), digital Write () and digital Read () functions. They operate at 5 volts
and provide or receive 40mA max. In addition, some pins have specialized
functions:
15
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Serial: 0(Rx) and 1(Tx). Use to receive and transmit TTL serial data. These pins
are connected to the corresponding pins of the Atmega8U2 USB to TTL Serial
chip.
The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provides UART TTL
(5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An
ATmega8U2 on the board channels this serial communication over USB and appears
as a virtual com port to software on the computer. The '8U2 firmware uses the
standard USB COM drivers, and no external driver is needed. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the
Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to-serial chip and USB connection to the computer (but not
for serial communication on pins 0 and 1). A Software Serial library allows for serial
communication on any of the Uno's digital pins. [5]
It is a module which is made to interface a GSM SIM card to the micro controller,
here with Arduino Uno. It is known as dual band GSM/GPRS module because it can
support 900MHz and 1800MHz frequency bands. We select this because Ethiopian
telecommunication service provider gives the GSM service with a frequency of
900MHz frequency band. It can communicate with controllers via AT (used to mean
16
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
attention) commands. This module supports software power on and reset. It has a very
low power consumption (1.5mA) with operating temperature of -400C to +800C.
UART means Universal Asynchronous Receiver/Transmitter which is a hardware
device for asynchronous serial communication in which the data format and
transmission speeds are configurable. They are commonly used in conjugation with
communication standards and usually appears as individual or part of the IC used for
serial communications over a computer or peripheral device serial port. [6]
17
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
18
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Figure 2.5 SIM900A GSM Module & its internal structure [6]
P 2 Power switch
Rx 4 UART data in
- 7 GND
+ 8 VCC
We can power this module by pulling down the PWR button or the P pin of the
control interface for at least 1 second and release. This pin is already pulled up to 3v
in the module internal, so external pull up is not necessary. After this, the module will
send URC to indicate that the module is ready to operate at fixed baud rate.
Pulse I - 2000 mA
Continuous I 5000 mA
LCD
It is a screen (Liquid Crystal Display) which we are going to use for the display of
our prototype. The 16x2 LCD display is very basic module and is very commonly
used in many circuits. It is preferred over seven segments and other multi LEDs
because LCD is economical, easily programmable, have no limitation of character
display, animation and other features.16x2 means it can display 16 characters per line
and there are two such lines. [7] It has two registers, namely the command and the
data registers. They store commands which instruct the LCD to do pre-defined tasks
like clearing the screen, and store the data to be displayed on the LCD respectively.
[7]
20
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
8 DB1
9 DB2
10 DB3
11 DB4
12 DB5
21
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
13 DB6
14 DB7
Keypad
A 4x4 matrix keypad requiring eight Input/output ports for interfacing is used. Rows
are connected to Peripheral Input/output (PIO) pins configured as output. Columns are
connected to PIO pins configured as input with interrupts.
Features of keypad
Contact denouncing.
Easy to interface.
Interfaces to any microcontroller or microprocessor.
. Data valid output signal for interrupt activation
Applications
Vending machines.
Public phones.
Ticketing
22
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Pin Details
23
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The overall system circuit diagram just as it in the above diagram it has been built up
from different component that meet the proposed implementation flow. As shown in
the above diagram the components have interfaced with Arduino to complete overall
systems in proteus software. These are keypad, GSM, and LCD.
24
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Chapter three
3. Simulation design
3.1 Flow chart of the system
Figure 3.1 Flow chart of train system with keypad and GSM
25
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The keypad will be interfaced at the Arduino board which is on the train to controller
the location display at every station to notify the place of train and at what time will it
reach to the next stations. The keypad will be on the train with the driver or other
candidate as a controller on the train to be pressed to give an information of train
place and time taken. The keypad keys will generate a code for the station name
during pressed. At this time, the keypad keys sends a signal to the train
microcontroller. The microcontroller (simply the Arduino) located in the train has an
interface with the keypad. When the keypad keys not pressed, it will read low voltage
26
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
the keys are pressed, the voltage will be gets high and this voltage reading will be
sensed by the Arduino pin to which the keypad is connected. The Arduino is
Capable of reading this signal and make changes that means it execute other programs.
In this case, it commands the GSM to send a message to the station unit. Station GSM
module contains a GSM SIM card. This SIM card is interfaced to the Arduino through
the GSM module. It receives a command from the Arduino and send text messages to
each individual station. The text message is the station ID. The GSM is nothing but a
sim card in our mobile which can’t support video streaming and other high data rate
apps. The GSM module communicate with the Arduino serially. The interfacing
although can be made between any digital pin of the Arduino and Tx and Rx of the
module. On the each stations part, the message sent from the train system will be
received through the GSM. As we have said above the message contains the sender
ID. Since this GSM is under a module interfaced with the Arduino, its message is read
and interpreted to other texts. This process is done by the each stations Arduino. After
it reads the message in the GSM, it will define the ID with station name and orders the
individual stations GSM to receive this message and display it. The individual station
Arduino has a command to interpret the station ID into its name and to display the
name of stations which are ahead of the current location of the train and behind the
previously passed train. Arduino which interfaced to the LCD is give command to
display the latest message being sent by the train GSM to the stations. The sent
message from the train will be received in the GSM of each station. The station
microcontroller has a responsibility to read this message and forward it to the station
LCD.
We have tried to do the hardware implementation from the beginning and we have put
a lot of effort to make it true and we have implemented the receiver and transmitter
part to communicate wirelessly by using GSM. The hardware has been constructed
from different components. These are Arduino Uno, GSM SIM900 module, keypad
and LCD 16x2. According to the design as we have proposed and supposed to build,
the transmitter part was designed from keypad to determine the location of train to
27
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
behalf of station which coded to each keys, Arduino Uno as a processor to access
interface devices to it and give command to GSM to send a text to each station from
train, and LCD 16x2 to display any information which needed to be displayed. On the
other hand the receiver part have been constructed from the same components, but
without keypad.
28
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The components for station unit are also shown in figure 24 above. It contains the
Arduino Uno, GSM and LCD. Although all components are not found as we have
thought before, we can see the systems functionality. When we have completed the
design of the station unit, we have made communication using our mobile phone as a
station unit and send the location of the train by pressing the keypad keys and see the
display at the serial terminal of our PC, and also as our phone was acting as a station
unit it has received the location of the train, according to the station code that is sent
to the station unit.
3.2 Simulation
The simulation has been done on the software of proteus professional 8.6 and this
software is excellent to use. But it alone can’t support wireless communication.
Consequently, it need other serial software like free virtual serial port and putty to
complete whole simulation design. On the other hand to do the full design we were
added different libraries as it needed for both Arduino code and proteus simulation.
29
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
These are GSM library, keypad library, Arduino library and other software drivers.
The GSM library was added in both Arduino codes developing software and proteus
to enable wireless communication in proteus. And also keypad library was added for
both proteus and Arduino to interface with Arduino. Arduino library for proteus to
simulate in proteus with Arduino Uno since proteus do not have Arduino
microcontroller. To communicate it needs drivers has to be installed in the computer
and the free virtual serial port will be installed this drivers temporarily. The two
terminals has been created at a time to support double communication and just as
COM1 and COM2, the former will be given as a port for one file and the later for the
other.
30
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Chapter Four
31
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
The below simulation result shows that after selection of the code of station to send
by pressing keypad key and processed and sent. This code was to each station units to
notify the location of train.
32
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
As we have discussed in the above diagram result, the sent information from the train
system was received by station unit and processed and identified the station as shown
in the diagram of simulation result below. The result tells that the location of train is
station one (1). Then, this information is distributed to all other station to notify the
location of the train at station one and the passengers know to take action whether it
appropriate or not to use it for the transportation. This information helps the passenger
to use their time wisely by deciding have to wait or use alternative transportation.
33
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
4.2 Discussion
As the output of the simulation result shown in the above diagrams that the system is
received an information which transmitted from station one by pressing key one(1)
that has a code assigned to station one and it shows that the train is found at the
station one(1). Likewise for all stations the information has been generated in the
same way by pressing the keypad key which located on train according to the their
code assigned to each. The controller press the key when the train reach the station
and then, the information will be sent every station which are supposed to receive
their information.
34
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Chapter five
35
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
5.2 Recommendation
This project can be further improved by working with the service provider. We know
that the train service controllers have full knowledge of the location of each train. If
they are willing, there is no need to deploy an IR sensor at every station, hence the IR
sensor limitation is overcome. The other point is that the displays are not 16x2 LCD.
When practically implemented it must be large enough to be seen from at least 10
meters. This is important for the crossing point and the people who want to use
alternative means of transportation. Although not written we are informed that the
train system uses its own frequency band for its internal communication. Again, if the
company is willing to allow us share some band with their, it is possible to use this
frequency band rather than the Ethio-telecom’s 900MHz of the GSM. This will
eliminate cost for interchanging information through texts and also it will extinguish
the delay of SMS, since they use their frequency for real time communication and the
antennae they use are smart.
36
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Reference
[1] “GPS/GSM based train tracking system” – utilizing mobile networks to support
public transportation - Dileepa Jayakody, Mananu Gunawardana, Nipuna Wicrama
Surendra, Dayan Gayasri Jayasekara, Chanaka Upendra
[2] “Intelligence Information System For Train Location Using GPS & GSM” - M.
Singaram, N. Arun kumar, M.Santhosh kumar , Sri Balaji Chockalingam Engineering
College 2014
[3] “Real Time Wireless based Train Tracking, Track Identification and Collision
avoidance System for Railway Sectors” - R. Immanuel Rajkumar, Dr.P. E.
Sankaranarayanan, and Dr.G.Sundari, Sathyabama University, Chennai, India 2014
[4] “Train Tracking and the Signaling System using Infrared and Radio Frequency
Technology” - K. Vidyasagar, P.Sekhar Babu, R.Ram Prasad, Sathupally T.S India
2015
Websites:
37
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
Appendix
//The code for arduino to send sms to station unit
#include <LiquidCrystal.h>
#include <Keypad.h>
String station;
char hexaKeys[ROWS][COLS] = {
{'7','8','9'},
{'4','5','6'},
{'1','2','3',},
{'*','0','#',}
};
byte rowPins[ROWS] = {13, 12, 11, A0}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6}; //connect to the column pinouts of the keypad
38
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
void setup(){
Serial.begin(9600);
LCD.begin(16, 2);
LCD.setCursor(0,0);
// .setDebounceTime(10);
pinMode(A0, INPUT);
pinMode(13, INPUT);
pinMode(12, INPUT);
pinMode(11, INPUT);
pinMode(8, INPUT);
pinMode(7, INPUT);
pinMode(6, INPUT);
LCD.begin(16, 2);
LCD.setCursor(0,0);
LCD.print("WELL COME");
LCD.setCursor(0,1);
39
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
delay(100);
void loop(){
switch(customKey)
case'1':
customKey = 1;
station = "1";
SendSMS(station);
break;
case '2' :
customKey = 2;
station = "2";
SendSMS(station);
break;
40
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
case '3' :
customKey = 3;
station = "3";
SendSMS(station);
break;
case '4' :
customKey=4;
station = "4";
SendSMS(station);
break;
case '5' :
customKey =5;
station = "5";
SendSMS(station);
delay(70);
break;
41
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
void SendSMS(String a)
LCD.clear();
LCD.setCursor(0,0);
delay(10);
LCD.setCursor(0,1);
LCD.print("IS");
LCD.print(" ");
LCD.print(a);
Serial.print(a);
delay(10000000);
LCD.clear();
delay(5000000);
LCD.setCursor(0,1);
LCD.print(" ");
LCD.print(a);
delay(50000000);
42
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Sent");
delay(500);
#include <LiquidCrystal.h>
String station;
int rx = 0;
void setup()
Serial.begin(9600);
LCD.begin(16, 2);
LCD.setCursor(0,0);
//LCD.print("station Units");
//delay(200);
43
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
LCD.setCursor(0,1);
delay(100);
void loop()
LCD.clear();
LCD.setCursor(0,0);
LCD.print("Waiting Info");
LCD.setCursor(0,1);
LCD.print("Please wait...");
delay(300);
if(Serial.available()>0)
switch(Serial.read())
case '1' :
44
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
rx = 1;
ReadSMS(station);
break;
case '2' :
rx = 2;
ReadSMS(station);
break;
case '3' :
rx = 3;
ReadSMS(station);
break;
case '4' :
rx = 4;
ReadSMS(station);
break;
45
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
case '5' :
rx = 5;
ReadSMS(station);
break;
default :
rx=0;
break;
void ReadSMS(String a)
LCD.clear();
LCD.setCursor(0,0);
delay(100);
LCD.setCursor(0,1);
46
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
LCD.print(rx);
Serial.print(a);
delay(100);
LCD.clear();
delay(100);
LCD.setCursor(0,1);
LCD.print(" ");
LCD.print(a);
delay (1500);
47
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
48
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
49
TITLE: DESIGN AND IMPLEMENTATION OF KEYPAD AND GSM
06/11/2018
BASED TRAIN LOCATION DISPLAY SYSTEM
50