Bus Tracking System midterm presentation Presented by: Gal gavish and Yuval Peled Supervisor: Hen...
-
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...
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
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.
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.
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.
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
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
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
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:
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.
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.
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.
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.
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.
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
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.
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.
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
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
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.
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.
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.
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.
Expected Expected TimetableTimetable
Learning
SW design
Simulation
Debug
Wire-wrap
Nov Dec Jan Feb Mar Apr May Jun Jul
Learning
SW design
Next stagesNext stagesI2C and
EEPROM
Simulation
Debug
Wire-wrap
Dec Jan Feb Mar Apr May Jun Jul
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