1 / 30

Bus Tracking System Final Part B presentation

High Speed Digital Systems Lab. Bus Tracking System Final Part B presentation. Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney. Spring 2004. Project’s Goals. Create a system that tracks a bus and gathers the arrival times to each station along its route.

ailis
Download Presentation

Bus Tracking System Final Part B presentation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. High Speed Digital Systems Lab Bus Tracking SystemFinal Part B presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney Spring 2004

  2. Project’s Goals • Create a system that tracks a bus and gathers the arrival times to each station along its route. • The system includes only one module: the bus. • The bus identifies a station’s position using GPS and prints it to LCD

  3. General System Requirements • Independent of human intervention. • Gathers the time of arrival only to stations that belong to the bus’s route. • Print station’s ID and allowed speed in the area. • Low power consumption.

  4. GPS – Global Positioning System • Position is determined by the distance from 3 or 4 satellites. • The position calculation is done insideThe receiver and is transmitted to themicro-processor. • A new position calculation is done every second. • The GPS accuracy is up to a few meters. (10 – 15)

  5. GPS – Time to first fix • Cold start: less than 2 minutes. Search satellites, collect ephemeris and almanac data, compute position fix. • Warm start: less than 45 secondsNo satellite connection for more than 1 hour, but • back up voltage keeps almanac and ephemerisHot start: less than 20 secondsNo satellite connection for less than 1 hour, but back up voltage keeps almanac and ephemeris

  6. GPS – Interface & HW Development board: +5 Volt To RS232 Port RS232 connector GPS Receiver Maxim 232A Antenna RS232 TTL/CMOS Level

  7. Development board: LCD Entries exits PIC18F452 microprocessor GPS - Trimble + peripherals Clock Generator 10MHz Serial EEPROM Battery 9V Block diagram for the bus module

  8. GPS – Message packets Packets structure: • <DLE> is the byte 0x10 • <ETX> is the byte 0x03<DLE> <ID> <data string bytes> <DLE> <ETX> • Every <DLE> byte in the data string is preceded by another <DLE> byte.

  9. GPS – Message parsing DLE Status DLE 1 DLE Status Empty ETX Status Full DLE DATA ETX DLE Status DATA Status DLE 2 DATA DLE <DLE> <ID> <data string bytes> <DLE> <ETX>

  10. GPS – Packets implemented • Time report:Get the time of week from the GPS • GPS status:Print to LCD the current satellite communication status. How many satellites are visible, when it does position fixes, are the DOP too high, etc • Single precision LLA: Get the current position fix. It contains 3 float numbers representing the latitude, longitude and altitude calculated in the GPS module. • Single precision Velocity: Get the current velocity and movement direction of the bus. It contains 3 float numbers representing the velocity north, east and up. • Double precision LLA: 3 double numbers representing the latitude, longitude and altitude.

  11. Software design We have 1 main module: • The bus module. And 4 utility modules: • UART module • GPS module • I2C module • LCD module

  12. Software Architecture Bus UART module Initialization Receive position Print result I2C module LCD module EEPROM Search and write GPS module

  13. Utility modules I2C module: • Write to and read from a shift register inside the PIC18F. • No interrupts needed. GPS module: • Implemented TSIP (Trimble Standard Interface Protocol). UART module: • Used to connect between the GPS and the microprocessor software.

  14. Initialize bus GPS High priority interrupt Parse message New GPS message Wait for a new GPS message General message Print message to LCD Position message NO Check if it’s My station Print speed To LCD Write time In memory YES Bus moduleprogram flow

  15. Bus module - interrupts GPS Initialize… Wait… Connected UART High priority interrupt EEPROM Phase

  16. Timing • EEPROM timing: • Write/read 8 bytes from serial 8 bit bus using the shift register. • 5 msec each read/write action. • Search a station in table: takes 50-100 msec. (before displaying the speed) • GPS timing: • Sends position message every one second. • Sends health message every 5 seconds

  17. Power consumption • PIC18F452:~1.6 mA • GPS receiver:~50 mA • GPS Antenna:~150 mA • EEPROM:~3.2 mA • Max 232A:~10 mA • TOTAL = 215 mA

  18. EEPROM - Memory List of all stations: • Up to 3000 stations, Average of 8 lines in each and 1 speed mark = 3000 x (4 + 4 + 6 + 8 x 3 + 1) = ~ 115KB List of stations in route: • Up to 400 stations and arrival times = 400 x (8 + 2) = ~ 4KB

  19. Goals accomplished • Learning TSIP and implementing it on the PIC18F452 • Find and purchase a GPS receiver and antenna. • Install new GPS hardware on the development board. • Integration of GPS, UART, LCD and I2C modules on the PIC.

  20. Conclusions • The GPS module of part B can be combined with the Bluetooth module of part A:- it will enable a much faster connection establishment between the bluetooth devices.- it will enable passing information between buses and stations such as time of next arrival, current position or even commercials. • The GPS module of part B can be combined with a cellular device:- it can enable all position calculations and memory accesses to be done in a remote server thus minimizing the embedded system’s complexity.- anyone with a cellular device can receive real time information about buses positions and expected time of arrival.

  21. High Speed Digital Systems Lab Bus Tracking SystemFinal part Bpresentation Presented by: Gal Gavish and Yuval Peled Supervisor: Hen Broodney Spring 2004

  22. Hardware • Microchip PIC18F452 – a 40-pin chip. • Trimble GPS Lassen SKII and antenna • Serial EEPROM (24LC256) by Microchip - 256K x 8bit. • Clock generator – 10MHz. • LCD • Battery – 9V.

  23. Specifications – Cont. Microchip PIC18F452

  24. Specifications – Cont. Trimble Lassen II K GPS

  25. Specifications – Cont. Microchip 24LC256 EEPROM

  26. EEPROM life expectancy • Serial EEPROMs are typically rated to endure 1 million write operations per byte. • Every time the bus enters the central-station it clears the entire EEPROM memory. • Assume the bus returns to the central-station 20 times a day, 5 days a week. Life_expectancy = 10^6 / (20x5x52) ~ 192 years Before BER increases dramatically.

  27. Software tools • We’ll be using the C18 C compiler from the MPLab IDE (Integrated Development Environment) to write our C code for the programs running on the PIC. • We’ll be using the MPLab ICD 2 (In Circuit Debugger) to program the PIC.

  28. Debugging tools • To debug the application programmed on the PIC we’ll use the in-circuit debugger (ICD) supplied with the PICDEM 2 Plus development board. • Since debugging with the ICD is slow, we’ll also be using the LCD and the LEDs on the development board for faster and easier debugging.

  29. High Speed Digital Systems Lab Bus Tracking SystemFinal Part Bpresentation Presented by: Gal Gavish and Yuval Peled Supervisor: Hen Broodney Spring 2004

More Related