Bus Tracking System midterm presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen...

25
Bus Tracking Bus Tracking System System midterm presentation midterm presentation Presented by: Gal gavish and Yuval Presented by: Gal gavish and Yuval Peled Peled Supervisor: Hen Broodney Supervisor: Hen Broodney Winter 2003-2004 Winter 2003-2004 High Speed Digital Systems Lab High Speed Digital Systems Lab
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    219
  • download

    0

Transcript of Bus Tracking System midterm presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen...

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

Bus Tracking Bus Tracking SystemSystem

midterm presentationmidterm presentation

Presented by: Gal gavish and Yuval Presented by: Gal gavish and Yuval PeledPeled

Supervisor: Hen BroodneySupervisor: Hen BroodneyWinter 2003-Winter 2003-20042004

High Speed Digital Systems LabHigh Speed Digital Systems Lab

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

Project’s GoalsProject’s 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.

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

General System General System RequirementsRequirements

Independent of human intervention. Gathers the time of arrival only to stations that

belong to the bus’s route. Transfers all the data to the central-station’s

database for later analysis. Low power consumption.

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

Wireless Wireless communication communication

architecturearchitectureAll 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 and written in the bus’s memory along with the current time.

• The central-station sends a special message containing data request.

• The bus sends back all the information it gathered.

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

SpecificationsSpecificationsPhillips BluetoothPhillips Bluetooth

Operating Frequency2.4GHz to 2.4835GHz

Transmit Output PowerClass 2 (0 dBm nominal)

Operating rangeUp to 15m (with integral antenna)Receiver SensitivityLess than –80dBm ~ 0.001 BEREmbedded SoftwareEmbedded software stack supporting an HCI

interfaceNetwork TopologyPoint to Multipoint (up to 7 slaves) Master/Slave

switching supportedInterfaceUSB v1.1, UART at up to 921 kbps (low voltage

serial interface)Power Supply3 to 3.4V (or direct power from USB connection)Current consumptionIdle: < 2mA

File transfer: 70mAPeak: < 100mA

Operating Temperature-10 to + 55°CStorage Temperature-40 to + 85°CDimensions45 x 48 x 7mm

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

Specifications – ContSpecifications – Cont..Microchip PIC18F452Microchip PIC18F452Operating Frequency

DC – 10 MHz

Internal Program Memory

32KBytes

Data Memory1536 Bytes

Data EEPROM Memory

256 Bytes

Interrupt Sources18

I/O Ports5

Timers4

MSSP, Serial Communications

Addressable USART, MSSP

Parallel Communications (PSP)

Yes

10-bit Analog-to-Digital Converter

8 input channels

Programmable Low Voltage Detect

Yes

Programmable Brown-out Reset

Yes

Instruction Set75 Instructions

Package40-pin DIP

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

Specifications – ContSpecifications – Cont..Microchip 24LC256 EEPROMMicrochip 24LC256 EEPROM

Max. Operating Frequency

400 KHz

Data Memory256K x 8 bits.Vcc range2.5-5.5 VMax. write current3 mA at 5.5VMax. read current0.4 mA at 5.5VTypical standby current

100 nA at 5.5V

I/O2-wire serial interface bus, I2C™ compatible

Schmitt Trigger inputs for noise suppression

yes

Page write mode64 Byte

Max. write cycle time

5 ms

Endurance1 million write/read cycles

Electrostatic discharge protection

> 4000V

Data retention> 200 years

Temperature range

-40°C to +85°C

Package8-pin DIP

Hardware write-protect for entire array

yes

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

Block diagram for Block diagram for the bus and station the bus and station

modulesmodules

PIC18F452 microprocessor

Bluetooth

Phillips

Serial EEPROM

Entries exits

Battery

9V

Clock Generator

10MHz

Development board:

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

Block diagram for Block diagram for the central-station the central-station

modulemoduleBluetooth

Phillips

The info from each bus is transferred to the computer and stored in a data sheet.

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

HardwareHardware Microchip PIC18F452 – a 40-pin chip. Later we

hope to minimize it and use the smallest chip suitable (18-pin chip).

Bluetooth chip by Phillips. Serial EEPROM (24LC256) by Microchip -

256K x 8bit. Clock generator – 10MHz. Battery – 9V.

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

Memory size Memory size calculationcalculation

Assume 2 bytes for the time, 6 bytes for the station ID. Up to 50 stations in the route + 100 interfering stations. Bus can travel the route up to 10 times before returning to the central-station.

Bus writes all stations it passes.150x8x10=12000 bytes ~ 12Kb

Fits inside the 256K EEPROM.

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

EEPROM life EEPROM life expectancyexpectancy

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 yearsBefore BER increases dramatically.

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

Software Software designdesign

We’ll have 3 main modules:

1. The station module (master).

2. The bus module (slave).

3. The central-station module (master).

We’ll also be using modules from a previous project – UART module, LCD module and Bluetooth module.

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

Station module Station module requirementsrequirements

1. UART – connection to the BT2. Bluetooth – handle the connection and the

data transfer.3. Connection handling:

1. Search for oncoming buses using the BT inquiry function.

2. Connect to a bus that was found3. Transfer station ID

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

Bus module Bus module requirementsrequirements

1. UART module

2. BT module

3. Time counter

4. EEPROM

5. Connection handling:1. Ready bus for connection

2. Block all other connection requests upon connection.

3. Handle data from station.

4. Bus gets out of range of station – disconnect and ready bus for connection to master.

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

Handle data from Handle data from stationstation

1. Comparing station ID to the last station ID received.

2. Storing station ID in memory

3. Transmitting all the data in memory upon receiving a special data packet containing a request for data.

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

Central-station Central-station modulemodule

1. BT module on PC.2. Data sheet3. Connection handling:

1. Inquiry – search for buses in the vicinity.2. Connect to a bus that was found.3. Send data request to bus.4. Store received data in text file.5. Disconnect when bus gets out of range

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

Bus module

Bluetooth module

Station module

UART module controls the BT

unit

LCD module

Central-station module

Output, debug

Output, debug

Output, debug

Interrupt driven

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

Software toolsSoftware 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.

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

Debugging toolsDebugging 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.

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

Goals Goals accomplishedaccomplished

Learning about the Bluetooth protocol and the development invironment we’re using.

Reading and understanding the UART, LCD and BT modules code.

Writing our own programs for the bus (slave) and the station (master).

Transferring messages from the station to the bus using the BT units.

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

Next Stages in the Next Stages in the projectproject

Learning the Hardware I2C and Software I2C functions implementing I2C bus using I/O pins from the PIC.

Writing to and reading from the EEPROM on the development board.

Simulation of the entire system on the development boards.

Wire-wrap. Debug. Optional – printed circuits.

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

Expected Expected TimetableTimetable

Learning

SW design

Simulation

Debug

Wire-wrap

Nov Dec Jan Feb Mar Apr May Jun Jul

Learning

SW design

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

Next stagesNext stagesI2C and

EEPROM

Simulation

Debug

Wire-wrap

Dec Jan Feb Mar Apr May Jun Jul

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

Bus Tracking Bus Tracking SystemSystem

midtermmidterm presentationpresentation

Presented by: Gal Gavish and Yuval Presented by: Gal Gavish and Yuval PeledPeled

Supervisor: Hen BroodneySupervisor: Hen BroodneyWinter 2003-Winter 2003-20042004

High Speed Digital Systems LabHigh Speed Digital Systems Lab