Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bus Tracking System Fianl Part A presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems.

Similar presentations


Presentation on theme: "Bus Tracking System Fianl Part A presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems."— Presentation transcript:

1 Bus Tracking System Fianl Part A presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems Lab

2 Projects Goals Create a system that tracks a bus and gathers the arrival times to each station along its route. The system includes 3 modules: bus, station and central-station. Communication between bus and stations is done using the Bluetooth protocol.

3 General System Requirements Independent of human intervention. Gathers the time of arrival only to stations that belong to the buss route. Transfers all the data to the central-stations database for later analysis. Low power consumption.

4 Wireless communication architecture - reminder All stations and the central-station are Masters and buses are Slaves. A station searches constantly for oncoming buses. When a bus is recognized, the station ID is transferred to it. If the station is in the route, it is written in the buss memory along with the current time. The bus recognizes central stations and sends all the information it gathered.

5 Block diagram for the bus and station modules PIC18F452 microprocessor Bluetooth Phillips Serial EEPROM Entriesexits Battery 9V Clock Generator 10MHz Development board: LCD

6 Block diagram for the central-station module Bluetooth Phillips The info from each bus is transferred to the computer and stored in a data sheet.

7 Software design We have 3 main modules: 1.The station module (master). 2.The bus module (slave). 3.The central-station module (master). And 5 utility modules: 1.UART module 2.BT module 3.I 2 C module 4.LCD module 5.Timer module

8 Software Architecture Station Bus Inquire Connect Disconnect Initialization Inquire Connect Disconnect Initialization EEPROM Search and write Timer module LCD module I 2 C module BT module UART module

9 Bus module Bluetooth module Station module UART module controls the BT unit LCD module Central-station module Output, debug Interrupt driven Timer module I 2 C module

10 Utility modules I 2 C module: Write to and read from a shift register inside the PIC18F. No interrupts needed. BT module: Treated as software I/O buffers that transfer the information (events and data). Implemented by a previous project Use high priority interrupts Timer module: Use a counter inside the PIC18F. Use low priority interrupts

11 Multi-connections Two possible implementations: 1.Because the data transfer between the bus and the station is minimal, the station disconnects after sending its ID and searches for other busses. 2.If more than one bus was found, save the BD address of all the buses and connect to them by order. The first way is implemented in our code. The second way needs a change to the software buffers written by the previous project

12 Station module program flow Set station ID Found A Bus? NO YES Send station ID Search oncoming Buses

13 Bus module program flow Timer Low priority interrupt Connection request Bluetooth High priority interrupt Enable new connections Disable new Connections, Connect, Get ID and Search it Regular Station Check if its My station YES Print speed To LCD Write time In memory NO Central station Send route Table to computer Back To start

14 Bus module - interrupts Timer Low priority interrupt Bluetooth High priority interrupt Initialize… Search… Connect… Connected EEPROM Phase

15 Connection flow Search Enable connection Connected!! Send ID Search in memory Search other buses Display speed Write time and station ID in memory

16 PC – Bluetooth The PC-BT represents the Central Station. Designed for independent use. Implemented as a separate thread from the current PC-BT implementation. Used as much of the existing functionality as possible.

17 PC – Bluetooth cont. How it all works: To start the system, press the Initialize Device button. –The system starts looking for BT devices. When a BT device is found (a bus), the system connects to it. –If more than one device is found, its BD address and additional information is stored in an array. –At most 7 devices can be stored.

18 PC – Bluetooth cont. Send to the bus a message containing the Central Station name. Receive from bus its line number. Receive from bus its route. Store all information in a text file. Disconnect from the bus. Prepare to find new buses.

19 Central Station module program flow Initialize BT Found A Bus? NO YES Connect, Send station ID Search oncoming Buses Press Initialize Device button Receive line number and route table. Write to file Disconnect

20 Central Station module connection flow Search Enable connection Connected!! Send ID Search in memory Search other buses Send route table in 8- bit blocks Write info to file

21 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 up to a minute. (before displaying the speed) Send route table to central station: takes up to 10 seconds BT timing: takes about 5-15 seconds to create a connection.

22 Goals accomplished Implementing Hardware and software interfaces: EEPROM interface using I²C protocol and 24 hours Timer. Learning MFC and implement the connection between a bus and central station Order all wire wrap components and design the final boards

23 Future goals Do the wire-wrap and deal with wire-wrap bugs Set up a simulation using constructed boards Check stability and robustness of the system

24 Bus Tracking System midtermpresentation Bus Tracking System midterm presentation Presented by: Gal Gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems Lab

25 Bus module Bluetooth module Station module UART module controls the BT unit LCD module Central-station module Output, debug Interrupt driven Timer module

26 Hardware Microchip PIC18F452 – a 40-pin chip. Bluetooth chip by Phillips. Serial EEPROM (24LC256) by Microchip - 256K x 8bit. Clock generator – 10MHz. LCD Battery – 9V.

27 Specifications Phillips Bluetooth 2.4GHz to 2.4835GHz Operating Frequency Class 2 (0 dBm nominal) Transmit Output Power Up to 15m (with integral antenna)Operating range Less than –80dBm ~ 0.001 BERReceiver Sensitivity Embedded software stack supporting an HCI interface Embedded Software Point to Multipoint (up to 7 slaves) Master/Slave switching supported Network Topology USB v1.1, UART at up to 921 kbps (low voltage serial interface) Interface 3 to 3.4V (or direct power from USB connection)Power Supply Idle: < 2mA File transfer: 70mA Peak: < 100mA Current consumption -10 to + 55°COperating Temperature -40 to + 85°C Storage Temperature 45 x 48 x 7mmDimensions

28 Specifications – Cont. Microchip PIC18F452 DC – 10 MHz Operating Frequency 32KBytesInternal Program Memory 1536 BytesData Memory 256 BytesData EEPROM Memory 18Interrupt Sources 5I/O Ports 4Timers Addressable USART, MSSP MSSP, Serial Communications YesParallel Communications (PSP) 8 input channels10-bit Analog-to- Digital Converter Yes Programmable Low Voltage Detect YesProgrammable Brown-out Reset 75 InstructionsInstruction Set 40-pin DIPPackage

29 Specifications – Cont. Microchip 24LC256 EEPROM 400 KHzMax. Operating Frequency 256K x 8 bits.Data Memory 2.5-5.5 VVcc range 3 mA at 5.5VMax. write current 0.4 mA at 5.5VMax. read current 100 nA at 5.5VTypical standby current 2-wire serial interface bus, I2C compatible I/O yesSchmitt Trigger inputs for noise suppression 64 BytePage write mode 5 msMax. write cycle time 1 million write/read cycles Endurance > 4000VElectrostatic discharge protection > 200 yearsData retention -40°C to +85°CTemperature range 8-pin DIPPackage yesHardware write- protect for entire array

30 EEPROM - Memory List of all stations: Up to 2000 stations, Average of 8 lines in each and 1 speed mark = 2000 x (6 + 8 x 3 + 1) = ~ 60KB List of stations in route: Up to 400 stations and arrival times = 400 x (6 + 2) = ~ 2.5KB 2 bytesTime counter6 bytesStations IDs 1 byteSpeed3 bytesLine number

31 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.

32 Software tools Software tools Well 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. Well be using the MPLab ICD 2 (In Circuit Debugger) to program the PIC.

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

34 Bus Tracking System midtermpresentation Bus Tracking System midterm presentation Presented by: Gal Gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems Lab


Download ppt "Bus Tracking System Fianl Part A presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen Broodney Winter 2003-2004 High Speed Digital Systems."

Similar presentations


Ads by Google