Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Gsm based real_time_bus_arrival

57 views

Published on

Build a prototype offering real-time SMS updates about a passenger bus location and ETA.
The hardware prototype is based on 8051 micro-processor with an embedded GPS and GSM module integrated with SMS (short messaging service).

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Gsm based real_time_bus_arrival

  1. 1. GSM Based Real Time Bus Arrival Submitted in partial fulfilment of the requirements Of the degree of Bachelor of Engineering By Mr. SUBHANKAR KARMOKAR 410ET1520 Mr. HARSHAL PATIL 412ET1109 Mr. SHAJAL PANDEY 412ET1203 MS. PRIYANKA JADHAV 410ET1540 Under the Esteemed Guidance of Prof. Ashvini Shete Department Of Electronics & Telecommunication Mahatma Gandhi Mission’s College of Engineering & Technology, Kamothe, Navi Mumbai Academic year 2016-17
  2. 2. MGMCET 2016-17 Page II Certificate This is to certify that this dissertation work entitled “GSM Based Real Time Bus Arrival” is a bonafide work carried out by Subhankar Karmokar, Harshal Patil, Priyanka Jadhav and Shajal Pandey in partial fulfilment of the requirements for the award of the Degree of „ Bachelor of Technology in Electronics and Telecommunication Engineering’, from “Mahatma Gandhi Mission’s College of Engineering & Technology’. Prof. Ashvini Shete Dr. Indra Vijay Singh Guide Head of Department Dr. S. K. Narayankhedkar Principal MGM’s College of Engineering and Technology Kamothe, Navi Mumbai.
  3. 3. MGMCET 2016-17 Page III Project Report Approval This project report entitled “ GSM Based Real Time Bus Arrival ” by “Karmokar Subhankar Shankar Pandey Shajal Anand Patil Harshal Sunil Jadhav Priyanka Virendra” is approved for the Bachelor of Engineering in Electronics and Telecommunication Engineering. 1. --------------------------------------------- EXTERNAL EXAMINER 2. --------------------------------------------- INTERNAL EXAMINER Date: Place: Mahatma Gandhi Mission‟s College of Engineering & Technology, Kamothe.
  4. 4. MGMCET 2016-17 Page IV DECLARATION I declare that this written submission represents my ideas in my own words and where other‟s ideas or words have been included, I have adequately cited and referenced the original sources. I also declare that I have adhered to all principles of academic honesty and integrity and have not misrepresented or fabricated or falsified any idea/data/fact/source in my submission. I understand that any violation of the above will be cause for disciplinary action by the Institute and can also evoke penal action from the sources which have thus not been properly cited or from whom proper permission has not been taken when required. _____________________________ (Subhankar Karmokar) ______________________________ (Harshal Patil) ______________________________ (Shajal Pandey) ______________________________ (Priyanka Jadhav) Date: Place: Mahatma Gandhi Mission‟s College of Engineering & Technology, Kamothe.
  5. 5. MGMCET 2016-17 Page V ACKNOWLEDGEMENT With great pleasure we want to take this opportunity to express our heartfelt gratitude to all the people who helped in making this Major Project work. We are grateful to Dr.Indra Vijay Singh (Head of the department, Electronics and Telecommunication Engineering department), Prof. Ashvini Shete, (Professor, Electronics and Telecommunication Engineering department) for their valuable suggestions and guidance during the execution of this project.We are also highly indebted to our principal Dr. S.K. Narayankhedkar, for giving us the permission to carry out this Major Project. We would like to thank the teaching and non-teaching staff of EXTC Department for sharing their knowledge with us.
  6. 6. MGMCET 2016-17 Page VI ABSTRACT The primary information to most city transport travellers is bus arrival time. It often discourages the passengers for excessively waiting long time at bus stops and makes them reluctant to take the public transport, buses. To enable the passenger to track the vehicle or bus an electronic device is installed in a vehicle is known as Real Time Bus Arrival System. This proposes a bus arrival time prediction using GPS and GSM technology. It would also work as anti theft system and cheapest source of vehicle tracking. It is an embedded system using GPS (Global Positioning System), GSM (Global System for Mobile Communication) and Microcontroller for tracking the bus. The real time co-ordinates obtained from the GPS will continuously monitor a moving vehicle and report the status of the vehicle on request to passengers. The GPS/GSM unit is mounted on the bus sends the data to the central monitoring system microcontroller using the GSM module and displays bus location name on the LCD. The position i.e Latitude and Longitude of a vehicle from remote place is sent by the GSM module to the Server and then the server calculates the arrival time of the bus and sends to the requested user using GSM module.
  7. 7. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 1 List of Figures Sr.no Figures Page no. 1 Microcontroller 11 2 Block Diagram of 8051 13 3 Pin diagram of 8051 15 4 Block diagram of GSM module 16 5 GSM Module 17 6 Working of GSM 18 7 GPS module functions 22 8 GPS module 22 9 LCD display 25 10 PCB layout 28
  8. 8. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 2 CONTENTS SR.NO TOPICS PAGE NO. 1. INTRODUCTION 1.1 Motivation 3 1.2 Goals 4 1.3 Objective 4 2. LITERATURE SURVEY 2.1 Research methods 5 2.2 Practical use of project 5 3. DESIGNING 3.1 Working principle 8 3.2 Block diagram 9 3.3 Components 10 3.3.1 Microcontroller 8051 3.3.2 GSM Module 3.3.3 GPS Module 3.3.4 LCD 3.4 PCB 3.5 Program 4. RESULT AND DISCUSSION 48 5. CONCLUSION 50 6. REFERENCES 51
  9. 9. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 3 CHAPTER 1 INTRODUCTION 1.1- Motivation Possessing own transportation has become more common nowadays. The number of vehicles on the road keep on increasing and most of us are eager to own personal vehicle as we can go anywhere without limitation. In case we are unable to afford personal vehicle, public transportation such as bus, train and cab is the most convenience options for us to get ourselves to another destination from time to time. At this project, we will concentrate the discussion on bus only. Undoubtedly, the existence of bus has reduced road traffic and taking bus is a good starting to inculcate the car-pooling value. Besides, it provides a low-cost transportation which means to the low-income family for traveling to another destination. However, things always don‟t come perfect. The main drawback of travelling with bus is the inconsistent arrival time which may due to unforeseen circumstances. Even when we know the bus schedule well, there are number of reasons that bus as may not arrive as expected. Traffic congestions, heavy downpour, bus breakdowns, accident and day-today problems faced by the bus company can delay or completely interrupt bus service. It is particularly annoying when a person has urgent appointment, but we are late due to the time-consuming of bus trip. The shortcoming of unexpected bus arrival time has given us the intuition for developing a forecasting system that will inform the passengers earlier about the arrival time of particular bus. By using the forecasting system to determine when the next bus is going to arrive, the passengers don‟t need to wait an undetermined amount of time at a possibly unpleasant or unsafe bus stop. Passengers can easily obtain real time arrival information remotely by just sending a SMS (Short Messaging Service) to the forecasting system. Then, the system will send back the estimation of bus arrival time to passenger in SMS as well. Eventually, passengers can determine exactly when to leave home or the office in order to meet the bus. It is virtually eliminating their waiting time. If the bus will not be arriving for an extended period, the passengers can go into a store, read the newspaper, or even take another mode of transportation.
  10. 10. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 4 1.2- Goals- The main goal of this project is to reduce the required transport time by passenger and he can keep up with his schedule. By using the practical application of the project the passenger need not wait for the Bus. 1.3- Objective-  To offer a convenience mobile information service which ensures passengers are able to organize multiple personal daily planning efficiently.  To offer a mobile information service which can assist passengers to eliminate the waiting time for the arrival of bus at a possibly unpleasant or unsafe bus stop.  To make more accessible and constantly updated dynamic bus information to bus passengers.  To offer cost effective mobile information service to bus passengers via SMS (Short Message Service).
  11. 11. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 5 CHAPTER 2 LITERATURE SURVEY 2.1-Research methods- One of the most important components of Research is collection of data required to solve a defined research problem. The general tendency of the researcher is to organize a survey and collect the primary data from the field. However, it is also important to be considered to identify relevant secondary sources and gather data already available. 2.2-Practical use of the Project- The bus companies generally provide bus timetables on the web. Such bus timetables only provide limited information (e.g., operating hours, time intervals,) which are not timely updated according to instant traffic conditions. Although many commercial information providers offer the real time bus arrival prediction information, the service usually comes with prestigious cost. With a fleet of thousands of buses, the installment of in- vehicle GPS systems requires tens millions of dollars. The network infrastructure to deliver these services raises the deployment cost even higher, which would eventually translate to increase expenditure of passengers. Participatory Sensing, user activity recognition and passenger Sensing provides rich contextual information for applications of mobile such as location based services and social networking services. Mobile devices consumes large amount of energy by continuously capturing this context information. A new design framework for Gps Based bus arrival time predicting system is proposed . We present a new bus arrival time prediction system based on Gps based sensing. We interviewed bus passengers on acquiring the bus arrival time. Many passengers indicate that they want to instantly track the arrival time of the Buses and they are willing to contribute their location information on buses to help to establish a system to estimate the arrival time at various bus stops for the community. This motivates us to design a Gps based service to bridge those who want to know bus arrival time (querying users) by tracking the bus and able to share the instant bus route information . This type of vehicle tracking, which simply tracking the ports the locations of all active vehicles, is widely available today. While this is a useful service, its utility for transit applications is somewhat diminished by a lack of sufficient navigation metadata: what route
  12. 12. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 6 is each bus driving, and at what time will it arrive at my stop? State of the art systems provide this metadata by means of an in vehicle device which accepts driver input, such as the current route, as well as by estimating arrival times based on current vehicle location, past travel times, and the official route schedule. SEQUENCE OF ACTION OF TYPICAL BUS PASSENGERS In this section, we will illustrate the series of action taken by typical bus passengers before they start their journey. It is a simple and self-explanatory process. Plan a journey Confirm the departure time Bus Station Wait at bus stop 4 21 3
  13. 13. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 7 STEP 1: The first step before a passenger board a bus is to plan a journey. Among the concerns that is taken into account during the planning phase are consisting where he/she want to go, what time he/she plan to depart, when the bus will arrive and so on. STEP 2: After gone through the initial planning stage, the passenger should have decided the departure time based on the reference on bus schedule. STEP 3: Upon deciding the departure time, the passenger is ready to leave for his/her destination. She/he will wait at the bus stop without any prior notice of bus arrival time. The bus may arrive on schedule or it may arrive later than the expected time due to some external and stochastic factor such as traffic condition and accident. STEP 4: The last stage obviously is the arrival of the bus regardless the bus arrive on time or arrive late to that particular bus stop, The question marks besides the bus picture has implied that the arrival time of a bus is never predictable and the time is subject to changes.
  14. 14. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 8 CHAPTER 3 DESIGNING 3.1- Working principle- The working of the system is based on the GSM and GPS Module. When a passenger needs to know about how much time will the nearest bus require to reach the bus stop or how much time he has to wait he can use the Real time bus arrival system the working is user friendly and of minimal cost. It requires a simple text to a number e.g.: 987-xxx-xxx-x. The user will get bus coordinates via text by GSM module which will be set in bus. By the estimation he can wait for the bus ad would be assured of the present arrival time of the bus. A flowchart of how the Real time bus arrival works would make a better understanding. User sending text waiting at Bus stop 987-xxx-xxx-x. The message is received by GSM module and the process is undertaken by the Microcontroller. Microcontroller now requires a GPS module to carry on the further process. GPS module connected to a GPS antenna gather present locations latitude and longitude and forwards it to the Microcontroller. Microcontroller displays the latitude and longitude on lcd and provides the information to GSM module. User gets the Latitude and Longitude by a SMS send by the GSM module.
  15. 15. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 9 3.2- Block diagram- Fig. : Block diagram of GSM based Bus arrival system MOBILE (USER) GSM MODULE MICROCONTROLLER GPS MODULE GPS Antena POWER SUPPLY LCD
  16. 16. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 10 3.3- Components- 3.3.1 Microcontroller 8051- A microcontroller is an economical computer-on-a-chip built for dealing with specific tasks, such as displaying or receiving information through LEDs or remote controlled devices. The most commonly used set of microcontrollers belong to 8051 Family. 8051Microcontrollers continue to remain a preferred choice for a vast community of hobbyists and professionals. Through 8051, the world became witness to the most revolutionary set of microcontrollers. Intel fabricated the original 8051 which is known as MCS-51. The other two members of the 8051 family are: i. 8052 – This microcontroller has 256 bytes of RAM and 3 timers. In addition to the standard features of 8051, this microcontroller has an added 128 bytes of RAM and timer. It has 8K bytes of on chip program ROM. The programs written for projects using 8051 microcontroller can be used to run on the projects using 8052 microcontroller as 8051 is a subset of 8052. ii. 8031 – This microcontroller has all the features of 8051 except for it to be ROM-less. An external ROM that can be as large as 64 K bytes should be programmed and added to this chip for execution. The disadvantage of adding external ROM is that 2 ports (out of the 4 ports) are used. Hence, only 2 ports are left for I/O operations which can also be added externally if required for execution. Figure 1: Micorcontroller
  17. 17. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 11 Comparison of 8051 family members: Features 8051 8052 8031 RAM(bytes) 128 256 128 ROM 4K 8K 0K Timers 2 3 2 Serial port 1 1 1 I/O pins 32 32 32 Interrupt sources 6 8 6 Table – 1.1 Comparison of 8051 family members. Various 8051 microcontrollers 8051 microcontrollers use two different kinds of memory such as UV- EPROM, Flash and NV-RAM. Hence 8051 will not be seen in the part number even though it is the most popular member of the 8051 family. i. 8751 – This microcontroller is the UV-EPROM version of 8051. This chip has only 4K bytes of UV-EPROM. It is required to have access to the PROM burner and the UV-EPROM eraser to erase the contents inside the chip before it is programmed again. The disadvantage of using this memory is the waiting time of around 20 minutes to erase the contents in order to program it again. Due to this limitation, manufacturers fabricated flash and NV-RAM versions of 8051. ii. AT89C51 from Atmel Corporation – Atmel fabricated the flash ROM version of 8051 which is popularly known as AT89C51 („C‟ in the part number indicates CMOS). The flash memory can erase the contents within seconds which is best for fast growth. Therefore, 8751 is replaced by AT89C51 to eradicate the waiting time required to erase the contents and hence expedite the development time. To build up a microcontroller based system using AT89C51, it is essential to have ROM burner that supports flash memory. Note that in Flash memory, entire contents must be erased to program it again. The contents are erased by the ROM burner. Atmel is working on a newer version of AT89C51 that can be programmed using the serial COM port of IBM PC in order to get rid of the ROM burner
  18. 18. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 12 Part Number ROM RAM I/O pins Timer Interrupt Vcc Packaging AT89C51 4K 128 32 2 6 5V 40 AT89C52 8K 256 32 3 8 5V 40 AT89C1051 1K 64 15 1 3 3V 20 AT89C2051 2K 128 32 3 8 3V 20 AT89LV51 4K 128 32 2 6 3V 40 AT89LV52 8K 128 32 3 8 3V 40 Table 1.2 – Versions of 8951 from Atmel (All ROM Flash) Features of 8051 The main features of 8051 microcontroller are:  RAM – 128 Bytes (Data memory)  ROM – 4Kbytes (ROM signify the on – chip program space)  Serial Port – Using UART makes it simpler to interface for serial communication.  Two 16 bit Timer/ Counter  Input/output Pins – 4 Ports of 8 bits each on a single chip.  6 Interrupt Sources  8 – bit ALU (Arithmetic Logic Unit)  Harvard Memory Architecture – It has 16 bit Address bus (each of RAM and ROM) and 8 bit Data Bus.  8051 can execute 1 million one-cycle instructions per second with a clock frequency of 12MHz. This microcontroller is also called as “System on a chip” because it has all the features on a single chip.
  19. 19. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 13 Figure 2. Block Diagram of 8051 Microcontroller Memory Architecture The 4 discrete types of memory in 8051 are: i. Internal RAM –This memory is located from address 0 to 0xff. The memory locations from 0x00 to 0x7F are accessed directly. The bytes from 0x20 to 0x2F are bit-addressable. Loading R0 and R1 the memory location from 0x80 to 0xFF can easily accessed. ii. Special Function Registers (SFR) – Located from address 0x80 to 0xFF of the memory location. The same instructions used for lower half of Internal RAM can be used to access SFR‟s. The SFR‟s are bit addressable too. iii. Program Memory – This is read only memory which is located at address 0. With the help of 16 bit Special Function Register DPTR, this memory can also save the tables of constants. iv. External Data Memory – Located at address 0. The Instruction MOVX (Move External) should be used to access the external data memory.
  20. 20. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 14 History of 8051 and Key Developments: Intel Corporation fabricated the 8 – bit microcontroller which was referred as MCS-51 in 1981. This microcontroller was also referred as “system on a chip” because it has 128 bytes of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single chip. The CPU can work for only 8bits of data at a time because 8051 is an 8-bit processor. In case the data is larger than 8 bits then it has to be broken into parts so that the CPU can process conveniently. Most manufacturers have put 4Kbytes of ROM even though the quantity of ROM can be exceeded up to 64 K bytes. Intel permitted other manufacturers to fabricate different versions of 8051 but with the limitation that code compatibility should be maintained. This has added advantage that if the program is written then it can be used for any version of 8051 despite of manufacturer. As years passed by, the quality of technology surpassed the expectation of the greatest minds, with gadgets becoming smaller, sleeker and more efficient. Microcontrollers were seen as the answer to the requirements raised in advanced electronics. This is the reason why manufacturers have now focused their production around the following main developmental aspects: i. Ease-of-use ii. Market availability iii. Less power usage iv. Smaller processing power v. More integrated features like RF and USB vi. Smaller form factors
  21. 21. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 15 Figure 3: Pin Diagram of 8051
  22. 22. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 16 3.3.2 GSM Module- GSM/GPRS module is used to establish communication between a computer and a GSM- GPRS system. Global System for Mobile communication (GSM) is an architecture used for mobile communication in most of the countries. Global Packet Radio Service (GPRS) is an extension of GSM that enables higher data transmission rate. GSM/GPRS module consists of a GSM/GPRS modem assembled together with power supply circuit and communication interfaces (like RS-232, USB, etc) for computer. We are using GSM module : Figure 4: GSM module Block Diagram GSM/GPRS MODEM: GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for communication of a computer with the GSM and GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones to activate communication with the network. Also they have IMEI(International Mobile Equipment Identity) number similar to mobile phones for their identification. A GSM/GPRS MODEM can perform the following operations: 1. Receive, send or delete SMS messages in a SIM. 2. Read, add, search phonebook entries of the SIM. 3. Make, Receive, or reject a voice call. The MODEM needs AT commands, for interacting with processor or controller, which are communicated through serial communication. These commands are sent by the
  23. 23. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 17 controller/processor. The MODEM sends back a result after it receives a command. Different AT commands supported by the MODEM can be sent by the processor/controller/computer to interact with the GSM and GPRS cellular network. GSM/GPRS Module: A GSM/GPRS module assembles a GSM/GPRS modem with standard communication interfaces like RS-232 (Serial Port), USB etc., so that it can be easily interfaced with a computer or a microprocessor / microcontroller based system. The power supply circuit is also built in the module that can be activated by using a suitable adaptor. Figure 5: GSM module Mobile Station (Cell phones and SIM) A mobile phone and Subscriber Identity Module (SIM) together form a mobile station. It is the user equipment that communicates with the mobile network. A mobile phone comprises of Mobile Termination, Terminal Equipment and Terminal Adapter.
  24. 24. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 18 Figure 6: Working of GSM. Mobile Termination is interfaced with the GSM mobile network and is controlled by a baseband processor. It handles access to SIM, speech encoding and decoding, signalling and other network related tasks. The Terminal Equipment is an application processor that deals with handling operations related to keypad, screen, phone memory and other hardware and software services embedded into the handset. The Terminal Adapter establishes communication between the Terminal Equipment and the Mobile Termination using AT commands. The communication with the network in a GSM/GPRS mobile is carried out by the baseband processor. Difference between GSM mobile and GSM/GPRS module: A GSM mobile is a complete system in itself with embedded processors that are dedicated to provide an interface between the user and the mobile network. The AT commands are served between the processors of the mobile termination and the terminal equipment. The mobile handset can also be equipped with a USB interface to connect with a computer, but it may or may not support AT commands from the computer or an external processor/controller. The GSM/GPRS module, on the other hand, always needs a computer or external processor/controller to receive AT commands from. GSM/GPRS module itself does not provide any interface between the user and the network, but the computer to which module is connected is the interface between user and network. An advantage that GSM/GPRS modules offer is that they support concatenated SMS which may not be supported in some GSM mobile handsets. Also some mobile handsets can‟t receive MMS when connected to a computer.
  25. 25. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 19 Applications of GSM/GPRS module: The GSM/GPRS module demonstrates the use of AT commands. They can feature all the functionalities of a mobile phone through computer like making and receiving calls, SMS, MMS etc. These are mainly employed for computer based SMS and MMS services. AT commands are used to control MODEMs. AT is the abbreviation for Attention. These commands come from Hayes commands that were used by the Hayes smart modems. The Hayes commands started with AT to indicate the attention from the MODEM. The dial up and wireless MODEMs (devices that involve machine to machine communication) need AT commands to interact with a computer. These include the Hayes command set as a subset, along with other extended AT commands. AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following information and services: 1. Information and configuration pertaining to mobile device or MODEM and SIM card. 2. SMS services. 3. MMS services. 4. Fax services. 5. Data and Voice link over mobile network. The Hayes subset commands are called the basic commands and the commands specific to a GSM network are called extended AT commands. Command, Information response and Result Codes: The AT commands are sent by the computer to the MODEM/ mobile phone. The MODEM sends back an Information Response i.e. the information requested by or pertaining to the action initiated by the AT command. This is followed by a Result Code. The result code tells about the successful execution of that command.
  26. 26. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 20 Interfacing MODEM/Mobile phone with Windows platform: The Windows (XP and lower versions) comes with an application called HyperTerminal for data communication through serial port of the computer. The interfacing of the GSM/GPRS module with the serial port of the computer involves following steps: 1) Connect RS-232 port of GSM module with the serial port of the computer. Insert a SIM card in the module. 2) Open HyperTerminal from Start -> All Programs -> Accessories -> Communications - > HyperTerminal. 3) Enter a name for the connection and press OK. 4) Now select the communication port (COM) at which GSM module is connected. 5) Create a new connection set on HyperTerminal. Set parameters, like baud rate as 9600, handshaking mode as none, parity bit as none, stop bit as 1 and data bit as 8. AT Commands required for our application: SMS Text mode: Command Description AT+CSMS Select message service AT+CPMS Preferred message storage AT+CMGF Message format AT+CSCA Service centre address AT+CSMP Set text mode parameters AT+CSDH Show text mode parameters AT+CSCB Select cell broadcast message types AT+CSAS Save settings AT+CRES Restore settings AT+CNMI New message indications to TE AT+CMGL List messages AT+CMGR Read message AT+CMGS Send message AT+CMSS Send message from storage AT+CMGW Write message to memory AT+CMGD Delete message
  27. 27. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 21 3.3.3 GPS Module- A GPS module is a device that uses global positioning system to determine the location of a vehicle or person. GPS receivers are used to provide reliable navigation positioning and timing services to the user at anytime and anywhere on the earth.This Global Positioning System uses 24 to 32 satellites to provide the data to the receivers.When people talk about "a GPS," they usually mean a GPS receiver. The Global Positioning System (GPS) is actually a constellation of 27 Earth-orbiting satellites (24 in operation and three extras in case one fails). The U.S. military developed and implemented this satellite network as a military navigation system, but soon opened it up to everybody else. Each of these 3,000- to 4,000-pound solar-powered satellites circles the globe at about 12,000 miles (19,300 km), making two complete rotations every day. The orbits are arranged so that at anytime, anywhere on Earth, there are at least four satellites "visible" in the sky. A GPS receiver's job is to locate four or more of these satellites, figure out the distance to each, and use this information to deduce its own location. This operation is based on a simple mathematical principle called trilateration. GPS receiver calculates its position on earth based on the information it receives from four located satellites. This system works pretty well, but inaccuracies do pop up. For one thing, this method assumes the radio signals will make their way through the atmosphere at a consistent speed (the speed of light). In fact, the Earth's atmosphere slows the electromagnetic energy down somewhat, particularly as it goes through the ionosphere and troposphere. Differential GPS (DGPS) helps correct these errors. The basic idea is to gauge GPS inaccuracy at a stationary receiver station with a known location. Since the DGPS hardware at the station already knows its own position, it can easily calculate its receiver's inaccuracy. The station then broadcasts a radio signal to all DGPS-equipped receivers in the area, providing signal correction information for that area. In general, access to this correction information makes DGPS receivers much more accurate than ordinary receivers. GPS module calculates the position by reading the signal that is transmitted by the satellites. Each satellite transmits the messages continuously which contain time at which it was sent. GPS receiver measures the distance to each satellite, based on the arrival time of each message this information is used to calculate the Position of the GPS receiver. The received raw late is converted for the user as LATITUDE, LONGITUDE etc. There are several GPS module available in the market. we are going to use GPS module SIM28ML.
  28. 28. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 22 Working of GPS module: Figure 7. GPS module functions. The National Marine Electronics Association (NMEA) has developed standards that describe the interface between various marine electronic equipments. The standards allow marine electronics to send information to computers and to other marine equipments. GPS receivers also work on these NMEA Standards. Most of the computer programs and devices which provide position and other related information expect the data to be in NMEA format. Figure 8. GPS module
  29. 29. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 23 All the GPS sentences with a brief description are tabulated below : S.No. Sentence Description 1 $GPAAM Waypoint Arrival Alarm 2 $GPALM GPS Almanac Data 3 $GPAPA Autopilot Sentence "A" 4 $GPAPB Autopilot Sentence "B" 5 $GPASD Autopilot System Data 6 $GPBEC Bearing & Distance to Waypoint, Dead Reckoning 7 $GPBOD Bearing, Origin to Destination 8 $GPBWC Bearing & Distance to Waypoint, Great Circle 9 $GPBWR Bearing & Distance to Waypoint, Rhumb Line 10 $GPBWW Bearing, Waypoint to Waypoint 11 $GPDBT Depth Below Transducer 12 $GPDCN Decca Position 13 $GPDPT Depth 14 $GPFSI Frequency Set Information 15 $GPGGA Global Positioning System Fix Data 16 $GPGLC Geographic Position, Loran-C 17 $GPGLL Geographic Position, Latitude/Longitude 18 $GPGSA GPS DOP and Active Satellites 19 $GPGSV GPS Satellites in View 20 $GPGXA TRANSIT Position 21 $GPHDG Heading, Deviation & Variation 22 $GPHDT Heading, True 23 $GPHSC Heading Steering Command 24 $GPLCD Loran-C Signal Data 25 $GPMTA Air Temperature (to be phased out) 26 $GPMTW Water Temperature 27 $GPMWD Wind Direction 28 $GPMWV Wind Speed and Angle 29 $GPTTM Tracked Target Message
  30. 30. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 24 30 $GPVBW Dual Ground/Water Speed 31 $GPVDR Set and Drift 32 $GPROO Waypoint active route (not standard) 33 $GPOLN Omega Lane Numbers 34 $GPVHW Water Speed and Heading 35 $GPVLW Distance Travelled through the Water 36 $GPVPW Speed, Measured Parallel to Wind 37 $GPVTG Track Made Good and Ground Speed 38 $GPWCV Waypoint Closure Velocity 39 $GPWNC Distance, Waypoint to Waypoint 40 $GPTRF Transit Fix Data 41 $GPSTN Multiple Data ID 42 $GPRMA Recommended Minimum Specific Loran-C Data 43 $GPRMB Recommended Minimum Navigation Information 44 $GPRMC Recommended Minimum Specific GPS/TRANSIT Data 45 $GPROT Routes 46 $GPSFI Scanning Frequency Information 47 $GPOSD Own Ship Data 48 $GPROT Rate of Turn 49 $GPRPM Revolutions 50 $GPRSA Rudder Sensor Angle 51 $GPRSD RADAR System Data 52 $GPWPL Waypoint Location 53 $GPXDR Transducer Measurements 54 $GPXTE Cross-Track Error, Measured 55 $GPXTR Cross-Track Error, Dead Reckoning 56 $GPZDA Time & Date 57 $GPZFO UTC & Time from Origin Waypoint 58 $GPZTG UTC & Time to Destination Waypoint
  31. 31. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 25 3.3.4 LCD LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data. The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn more about internal structure of a LCD. Figure 9. LCD display
  32. 32. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 26 Pin Description: Pin No Function Name 1 Ground (0V) Ground 2 Supply voltage; 5V (4.7V – 5.3V) Vcc 3 Contrast adjustment; through a variable resistor VEE 4 Selects command register when low; and data register when high Register Select 5 Low to write to the register; High to read from the register Read/write 6 Sends data to data pins when a high to low pulse is given Enable 7 8-bit data pins DB0 8 DB1 9 DB2 10 DB3 11 DB4 12 DB5 13 DB6 14 DB7 15 Backlight VCC (5V) Led+ 16 Backlight Ground (0V) Led-
  33. 33. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 27 Other Component Specifications. 1. Bridge Rectifier: This operates on 12V .Used to provide 12 Volt DC Supply. 2. Regulator (7805) : 12 V DC output from bridge rectifier is connected to 7805 to get regulated 5V output. This regulated 5V output then given to Controller,LCD,GSM like components. 3. Cap 0.1 uf : This capacitor used to remove ripple from DC supply.It is connected to input and output pin of Regulator 7805. 4. Cap 22 pf : This capacitor used make crystal operation stable 5. Cap 100 uf : This capacitor used to make regulator output supper fine that removes extra ripples. It is again connected at regulator 7805 output pin 6. Cap 1000 uf : It is used to stabilized output of bridge rectifier 7.10 uf : This capacitor used in reset circuit of microcontroller 8. Reg 1K,10K,470 R : These all are quarter watt resistance used to limit the current across LED ,Reset circuitry & LCD respectively 9 .IC MAX 232 : This used to convert TT L logic level to RS logic Level & vice versa. This conversion is required to make communication between Microcontroller & PC/ other wireless system. 10. DC Socket : This is used to connect 12 V power adapter to controller board. 11. Sliding Switch : This is used to make circuit on /off. 12. Transistor BC 547 : This is used for switching purpose. Operating voltage is 5v. 13. Button Switch : It is a normal switch basically used connect ground pin to RST pin of microcontroller for resetting purpose 14. Resistor POT (10 K) : This is a potentiometer used to adjust the contrast of LCD 15. Crystal (11.0592 MHz) : This component used to provide clk to timing control unit of controller. This is required to stable operation of microcontroller 16.Pull Up Resistor : This is a resistor Bank which used to Pull up the voltage level at controller pins. The need of such pulling is to bring voltage level to range of TTL voltage level.
  34. 34. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 28 3.3.5-PCB - Figure 10. PCB layout. A printed circuit board has pre-designed copper tracks on a conducting sheet. The pre- defined tracks reduce the wiring thereby reducing the faults arising due to lose connections. One needs to simply place the components on the PCB and solder them. Materials required in PCB Designing:  Over Head Projector sheet (known as OHP sheets) or a wax paper.  Laser Printer.  Electric Iron.  Steel wool.  Two plastic trays.
  35. 35. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 29  Copper board/ PCB (eg: paper phenolic, glass epoxy, FR4, FR10, etc.)  Black permanent marker.  Etching solution (Ferric chloride).  Drill machine Step 1 : Prepare a layout of the circuit on any commonly used PCB designing software. A layout is a design which interconnects the components according to the schematic diagram (circuit diagram). Take a mirror image print of the layout on the OHP sheet using a laser printer. Make sure that the design is correct with proper placement of the components. The above PCB Layout is used for this project. Step 2 : Cut the copper board according to the size of layout. A copper board is the base of a PCB, it can be single layer, double layer or multi layer board. Single layer copper board has copper on one side of the PCB, they are used to make single layer PCBs, it is widely used by hobbyist or in the small circuits. A double layer copper board consists of copper on both the sides of the PCB. These boards are generally used by the industries. A multilayer board has multiple layers of copper; they are quite costly and mainly used for complex circuitries like mother board of PC. Step 3 : Rub the copper side of PCB using steel wool. This removes the top oxide layer of copper as well as the photo resists layer if any. Step 4 : Place the OHP sheet (wax paper) which has the printed layout on the PCB sheet. Make sure that the printed/mirror side should be placed on the copper side of PCB. Step 5 : Put a white paper on the OHP sheet and start ironing. The heat applied by the electric iron causes the ink of the traces on the OHP sheet to stick on the copper plate exactly in the same way it is printed on the OHP sheet. This means that the copper sheet will now have the layout of the PCB printed on it. Allow the PCB plate to cool down and slowly remove the OHP sheet. Since it is manual process it may happen that the layout doesn‟t comes properly on PCB or some of the tracks are broken in between. Use the permanent marker and complete the tracks properly.
  36. 36. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 30 Step 6 : Now the layout is printed on PCB. The area covered by ink is known as the masked area and the unwanted copper, not covered by the ink is known as unmasked area. Now make a solution of ferric chloride. Take a plastic box and fill it up with some water. Dissolve 2-3 tea spoon of ferric chloride power in the water. Dip the PCB into the Etching solution (Ferric chloride solution, Fecl3) for approximately 30 mins. The Fecl3 reacts with the unmasked copper and removes the unwanted copper from the PCB. This process is called as Etching. Use pliers to take out the PCB and check if the entire unmasked area has been etched or not. In case it is not etched leave it for some more time in the solution. Step 7 : Take out the PCB wash it in cold water and remove the ink by rubbing it with steel wool. The remaining area which has not been etched is the conductive copper tracks which connect the components as per the circuit diagram. Step 8 : Now carefully drill the PCB using a drilling machine on the pads. Step 9 : Put the components in the correct holes and solder them
  37. 37. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 31 3.4 Program on keil : Introduction to Micro vision Keil (IDE) Concept of compiler: - Compilers are programs used to convert a High Level Language to object code. Desktop compilers produce an output object code for the underlying microprocessor, but not for other microprocessors. I.E the programs written in one of the HLL like „C‟ will compile the code to run on the system for a particular processor like x86 (underlying microprocessor in the computer). For example compilers for Dos platform is different from the Compilers for Unix platform. So if one wants to define a compiler then compiler is a program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instruction. See there is a bit little difference between compiler and an interpreter. Interpreter just interprets whole program at a time while compiler analyzes and execute each line of source code in succession, without looking at the entire program. The advantage of interpreters is that they can execute a program immediately. Secondly programs produced by compilers run much faster than the same programs executed by an interpreter. However compilers require some time before an executable program emerges. Now as compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language.
  38. 38. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 32 Program: include <reg51.h> //#define LCD_DATA_PORT P0 //LCD data port sbit rs = P2^5; //enable signal sbit rw = P2^6; //read/write signal sbit en = P2^7 ; //resister select signal sbit buzzer= P2^0; sbit SW= P3^7; sbit alert_bit=P3^2; sbit Alcohol=P2^1; sbit bump_sensor=P2^4; sbit LPG=P2^3; sbit alcohol_sw=P3^6; unsigned char value,lati_value[10],lati_dir, longi_value[11], longi_dir,z,alcohol_count; unsigned int t,counter,i; unsigned char name1[]={"Lat :"}; unsigned char name2[]={"Lon :"}; unsigned char command1[]={"AT"}; unsigned char command2[]={"AT+CMGF=1"}; //AT Command to set GSM module in text mode unsigned char command3[]={"AT+CMGS="}; //using sms code unsigned char command4[]={"09773886558"}; //dial no for sms unsigned char command5[]={"need help"}; unsigned char code command6[]={"MH 04 EL2312"}; unsigned char code command7[]={"Navi Mumbai"}; unsigned char code command8[]={"0797746882"}; //dial no for sms unsigned char code command9[]={"09819533962"}; //dial no for sms
  39. 39. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 33 void sms(); void delay(unsigned int i) { unsigned int k,l; for(k=0;k<i;k++) { for(l=0;l<1000;l++); } } void lcd_busy() { int p; for(p=0;p<2000;p++); } void LCD_cmd(unsigned char cmd) { lcd_busy(); rw=0; rs=0; P0 = cmd; en=1; en=0; } void LCD_data(unsigned char dat) { lcd_busy();
  40. 40. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 34 rw=0; rs=1; P0 = dat; en=1; en=0; } void init_LCD() { LCD_cmd(0x38); //initialization of 16X2 LCD in 8bit mode LCD_cmd(0x0E); //cursor ON LCD_cmd(0x01); LCD_cmd(0x80); // ---8 go to first line and --0 is for 0th position } unsigned char usart_getch() { while(RI==0); RI=0; return(SBUF); } void LCD_write_string(char *str) //take address vaue of the string in pionter *str { int i=0; while(str[i]!='0') // loop will go on till the NULL charaters { LCD_data(str[i]); // sending data on CD byte by byte i++; }
  41. 41. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 35 return; } void display_lat() { LCD_cmd(0x80); LCD_write_string("lt:"); LCD_data(lati_dir); LCD_data(0x20); LCD_data(lati_value[0]); LCD_data(lati_value[1]); LCD_data(0xDF); LCD_data(lati_value[2]); LCD_data(lati_value[3]); LCD_data(0x27); LCD_data(lati_value[5]); LCD_data(lati_value[6]); LCD_data(lati_value[7]); LCD_data(lati_value[8]); LCD_data(0x22); } void display_logn() { LCD_cmd(0xC0); LCD_write_string("lg:"); LCD_data(longi_dir); LCD_data(longi_value[0]); LCD_data(longi_value[1]); LCD_data(longi_value[2]); LCD_data(0xDF); LCD_data(longi_value[3]);
  42. 42. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 36 LCD_data(longi_value[4]); LCD_data(0x27); LCD_data(longi_value[6]); LCD_data(longi_value[7]); LCD_data(longi_value[8]); LCD_data(longi_value[9]); LCD_data(0x22); } void delay_5sec() { int i,j; for(i=0;i<100;i++) for(j=0;j<10000;j++); } void get_city_name() { unsigned int value1,value2,value3; unsigned int lati_degree,lati_minute,longi_degree,longi_minute; value1 = lati_value[0]-0x30; value2 = lati_value[1]-0x30; lati_degree = value1*10+value2; value1 = lati_value[2]-0x30; value2 = lati_value[3]-0x30; lati_minute = value1*10+value2; value1 = longi_value[0]-0x30; value2 = longi_value[1]-0x30; value3 = longi_value[2]-0x30; longi_degree = value1*100+value2*10+value3; value1 = longi_value[3]-0x30;
  43. 43. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 37 value2 = longi_value[4]-0x30; longi_minute = value1*10+value2; if((lati_degree==28) && (lati_minute==61) && (longi_degree==77) && (longi_minute==23)) { LCD_cmd(0x01); LCD_write_string("It's a Delhi"); delay_5sec(); } else if((lati_degree==26) && (lati_minute==92) && (longi_degree==75) && (longi_minute==82)) { LCD_cmd(0x01); LCD_write_string("It's a Jaipur"); delay_5sec(); } else if((lati_degree==23) && (lati_minute==03) && (longi_degree==72) && (longi_minute==58)) { LCD_cmd(0x01); LCD_write_string("It's a Ahmedabad"); delay_5sec(); } else if((lati_degree==18) && (lati_minute==97) && (longi_degree==72) && (longi_minute==82)) { LCD_cmd(0x01); LCD_write_string("It's a Mumbai"); delay_5sec(); } else if((lati_degree==23) && (lati_minute==25) && (longi_degree==77) && (longi_minute==41))
  44. 44. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 38 { LCD_cmd(0x01); LCD_write_string("It's a Bhopal"); delay_5sec(); } else if((lati_degree==22) && (lati_minute==56) && (longi_degree==88) && (longi_minute==36)) { LCD_cmd(0x01); LCD_write_string("It's a Kolkata"); delay_5sec(); } else if((lati_degree==12) && (lati_minute==96) && (longi_degree==77) && (longi_minute==56)) { LCD_cmd(0x01); LCD_write_string("It's a Bengaluru"); delay_5sec(); } else if((lati_degree==13) && (lati_minute==8) && (longi_degree==80) && (longi_minute==27)) { LCD_cmd(0x01); LCD_write_string("It's a Channai"); delay_5sec(); } } void interrupt_process(void) interrupt 0 { sms(); } int main(void)
  45. 45. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 39 { buzzer=0; counter=9; alcohol_count=0; //IE=0x90; IE=0x81; //P2=0x00; //LCD_DATA port as output port //P3=0x0F; //ctrl as out put init_LCD(); //initialization of LCD LCD_write_string("GPS Bus "); LCD_cmd(0xC0); LCD_write_string("Arrival System "); init_USART(); // initialization of USART ////////////////////////////////////////////////////////////////////////////////////// for(z=0;z<2;z++) // send text mode commannd to gsm { SBUF=command1[z]; while(TI==0); TI=0; } ///////////////////////////////////////////////////////////////////////////////////// while(1) { value=usart_getch(); if(value=='$') { value=usart_getch(); if(value=='G')
  46. 46. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 40 { value=usart_getch(); if(value=='P') { value=usart_getch(); if(value=='R') { value=usart_getch(); if(value=='M') { value=usart_getch(); if(value=='C') { value=usart_getch(); while(value!=',') // wait upto next "," { value=usart_getch(); } value=usart_getch(); while(value!=',') // wait upto next "," { value=usart_getch(); } value=usart_getch(); while(value!=',') // wait upto next "," { value=usart_getch(); } lati_value[0] = usart_getch();
  47. 47. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 41 value = lati_value[0]; for(t=1;value!=',';t++) { lati_value[t] = usart_getch(); value = lati_value[t]; } lati_dir=usart_getch(); value = usart_getch(); longi_value[0] = usart_getch(); value = longi_value[0]; for(t=1;value!=',';t++) { longi_value[t] = usart_getch(); value = longi_value[t]; } longi_dir=usart_getch(); LCD_cmd(0x01); display_lat(); display_logn(); get_city_name(); /*s(); /*lay(1000); delay(1000); delay(1000); delay(1000); delay(1000); delay(1000);*/
  48. 48. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 42 } } } } } } } } void sms() { for(z=0;z<2;z++) // send text mode commannd to gsm { SBUF=command1[z]; while(TI==0); TI=0; } SBUF=13; // send enter key ascii value while(TI==0); TI=0; delay(100); for(z=0;z<9;z++) // send text mode commannd to gsm { SBUF=command2[z]; while(TI==0); TI=0; } SBUF=13; // send enter key ascii value while(TI==0); TI=0;
  49. 49. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 43 delay(100); for(z=0;z<8;z++) // sending sms code to gsm { SBUF=command3[z]; while(TI==0); TI=0; } SBUF=34; //sending ascii value for " while(TI==0); TI=0; for(z=0;z<11;z++) //sending mobile no. to gsm { SBUF=command4[z]; while(TI==0); TI=0; } SBUF=34; //sending ascii value for " while(TI==0); TI=0; SBUF=13; // send enter key ascii value while(TI==0); TI=0; delay(20); for(z=0;z<5;z++) //sending message Lat : { SBUF=name1[z]; while(TI==0); TI=0; } SBUF=lati_dir; // sending Latitude Direction while(TI==0);
  50. 50. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 44 TI=0; SBUF=0x20; // sending Latitude Direction while(TI==0); TI=0; for(z=0;z<2;z++) //sending message Lat= { SBUF=lati_value[z]; while(TI==0); TI=0; } SBUF=0xDF; // sending Latitude Direction while(TI==0); TI=0; for(z=2;z<4;z++) //sending message Lat= { SBUF=lati_value[z]; while(TI==0); TI=0; } SBUF=0x27; // sending Latitude Direction while(TI==0); TI=0; for(z=5;z<9;z++) //sending message Lat= { SBUF=lati_value[z]; while(TI==0);
  51. 51. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 45 TI=0; } SBUF=0x22; // sending Latitude Direction while(TI==0); TI=0; for(z=0;z<5;z++) //sending message Lon : { SBUF=name2[z]; while(TI==0); TI=0; } SBUF=longi_dir; // sending Longitude Direction while(TI==0); TI=0; for(z=0;z<3;z++) //sending message Lon : { SBUF=longi_value[z]; while(TI==0); TI=0; } SBUF=0xDF; // sending Longitude Direction while(TI==0); TI=0; for(z=3;z<5;z++) //sending message Lon : { SBUF=longi_value[z]; while(TI==0);
  52. 52. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 46 TI=0; } SBUF=0x27; // sending Longitude Direction while(TI==0); TI=0; for(z=6;z<10;z++) //sending message Lon : { SBUF=longi_value[z]; while(TI==0); TI=0; } SBUF=0x22; // sending Longitude Direction while(TI==0); TI=0; SBUF=13; // sending Longitude Direction while(TI==0); TI=0; for(z=0;z<9;z++) //sending message Lon : { SBUF=command5[z]; while(TI==0); TI=0; } SBUF=13; // sending Longitude Direction while(TI==0); TI=0; for(z=0;z<12;z++) //sending message Lon :
  53. 53. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 47 { SBUF=command6[z]; while(TI==0); TI=0; } SBUF=13; // sending Longitude Direction while(TI==0); TI=0; for(z=0;z<11;z++) //sending message Lon : { SBUF=command7[z]; while(TI==0); TI=0; } SBUF=26; // sending ascii value of ctrl+z while(TI==0); TI=0; }
  54. 54. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 48 Chapter 4 Results and Discussion 1. The circuit is working and showing LCD display as topic name ” Bus arrival system”. 2. It shows the current Latitude and Longitude of current location.
  55. 55. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 49 3. Its sends the location displayed on LCD to the number requesting for the location. Above are working project results which can be improved by pointing different and fixed coordinates as places and would provide the passenger with a place name e.g. for latitude:N1901‟9225” Longitude:E07301‟0141 the place would be located as MGMCET bus stand and the passenger would estimate the place where he is the time of Bus arrival.
  56. 56. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 50 Chapter 5 Conclusions  This paper proposes the bus tracking and predicts the bus arrival time with a proposed system in it. This system is turn on and uses i.e. self calibrating and works anywhere on earth and does not require a laboratory or artificial environment. Having a GPS is truly an advantage you can determine your location, whether you are travelling locally or in a foreign land and if you think you are lost, you can use your GPS receiver to know your exact location.  Monitoring driving behaviour, such as an employer of an employee, or a parent with a teen driver are the other applications. It can also be used as an anti theft system, asset tracking, in stolen vehicle recovery and wildlife tracking. GPS signal works efficiently when it is in line of sight and it is unable to pass through solid structures such as work indoors, underground, under the water, or under a dense canopy of trees and it is difficult to determine the GPS signal when it‟s raining. Other related devices in a vehicle such as sensors can be integrated in a vehicle.  An intelligent tracking system can be formed by sensors installed in our vehicle can report the vehicle information to our server. ADVANTAGE: A Distributed Security Scheme for Ad Hoc Networks can be used and to prevent this kind of attack by DOS. Such methodology will be studied to make this Real Time Passenger Information System more robust. A novel data hiding technique, based on Steganographic mechanism can also be used for security purposes. Here, the advantage lies in the fact that computationally costly encryption-decryption mechanism is avoided, thus making it suitable for a heterogeneous combination of processing elements, which are being used in present system. Here, many processing elements e.g. Mobile phone etc. lacks the processing power and battery power, which is required for traditional encryption-decryption system. DISADVANTAGE: As this system uses a combination of processing elements: PCs, Mobile Phones etc., there is a possibility of the overall system malfunction due to a particular type of attack, it is termed as Denial of Service (DoS) attack by malicious agents who might try to disrupt the function of the system.
  57. 57. GSM BASED REAL TIME BUS ARRIVAL MGMCET 2016-17 Page 51 Chapter 6 References 1. The 8051 Microcontroller and Embedded Systems: Using Assembly and C Book by Janice Gillispie Mazidi, Muhammad Ali Mazidi, and Rolin D. McKinlay 2. Real Time Bus Monitoring System Using GPS Dr. (Mrs.) Saylee Gharge, Manal Chhaya, Gaurav Chheda , Jitesh Deshpande , Niket Gajra, RACST – Engineering Science and Technology: An International Journal (ESTIJ), ISSN: 2250-3498, Vol.2, No. 3, June 2012. 3. Mohamed Ibrahim and Moustafa Youssef,” CellSense: An Accurate Energy-Efficient GSM Positioning System“, Ons On Vehicular Technology, Vol. 61, NO. 1, © 2011 IEEE. 4. Iman M. Almomani, Nour Y. Alkhalil, Enas M. Ahmad, Rania M. Jodeh,” Ubiquitous GPS Vehicle Tracking and Management System”, 2011 IEEE Jordan Conference on 5. (2016)The Wikipedia website.[Online]. Available: http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

×