Upload
esmeralda-simkins
View
227
Download
0
Tags:
Embed Size (px)
Citation preview
Overview
• Concept• Hardware Design
o 9S12 Microcontrollero Fonera Wireless Routero Motorcycle
• Software Designo 9S12 Microcontrollero Fonera Wireless Routero iPhone Interfaceo Web Display
Concept
• Hardware and Software to track motorcycle state over time o State
GPS Location RPM Velocity Acceleration Gear
Battery
Ignition Coil
Speed Sensor
Gear Position Sensor
Function SwitchMotologgerAccelerometer
GPS
System Diagram
Hardware Design
• Hardware Requiredo Motorcycleo GPS Recievero Accelerometero SD Cardo Freescale 9S12X @ 40MHzo Fonera Wireless Router o iPhone
Fonera RouterAtheros MIPS-based SOC@180MHzRedbootOpenWRTSD MMC DriverUser Application
Kernel Panics are freeTrashing JFFS2 Made Easy!
Accelerometer
Microcontroller
MC9S12XD512
Status LEDs
Power LED
Ignition Coil
Speed Sensor
Function Switch
Gear Position
Ignition Switch
Battery Power Analog
Conditioning
Analog ConditioningAnalog Conditioning
Analog Conditioning
External Inputs
Wifi SoC
Tach Output
External Outputs
Internal Outputs
GPIO
Input Capture
Input Capture
A/D Converter
SPI
GPIO
GPIO
PWM
Serial
Power Distributio
n
GPIO
Software Design
• Microcontroller - For things Linux won't do wello Real-time data capture peripheral for Linux
Input capture timersTimer interruptsPulse width modulationHigh precision, high accuracy timingGPIO Serial host communication
o Motorcycle management Output data to tachometer dial Spedometer output Indicator lights
(Cas)
Real Time Data Acquisition
• Freescale HS12XA256 as Real-Time subsystem• Real-time event scheduler
o Interrupt-driven Samplingo Arbitrary periodic eventso Timestamping to GPS UTC +- 1ms
• Foreground processo Binary serial communication with Fonerao Update outputs to motorcycle (tach, speedo, indicator
light)
(Cas)
Periodic Scheduling
• A parametric periodic scheduler was used for many of the repetitive tasks on the 6812.
(Nick)
Peripheral Acquisition Devices
• GPSo determines absolute position at 1hz
• Accelerometer (not implemented)o measures acceleration at higher frequencies
(Nick)
Communication and Control
• Sockets are file descriptors -> file descriptors for everything!
Network Connections (sockets) log files (.txt) serial port( /dev/ttyS0)
• Standard structs for data serialization:typedef struct _velData{char tag;char dummy;unsigned short time_stamp;unsigned short velocity;}velDataType;
case vel_tag:tag=((velDataType*)buf)->tag; time_stamp = ((velDataType*)buf)->time_stamp; data1= ((velDataType*)buf)->velocity;sprintf(output,"%c,%d,%d,\n",tag,time_stamp,data1);break;
(Glen)
Data Output
• Post Processing with Python• Presentation with Excel
• Presentation with Google Maps
(Joe)
Big Hurdles
• Bandwidth limitationso Atheros SoC(Fonera) couldn't process large
amounts of data.o 9S12 lost serial data when sending large number
of samples.
Future Work
• Log more types of datao We are only logging a subset of what we planned
• Increase sampling rateso Optimize communication protocol
o Decrease Bootup Timeo Add more bugs (features)o Integrate Data Post-Processing to iPhone
Work BreakdownLev – Hardware/Motorcycle interfacing,
DriversGlen – iPhone SW, CommsNick – Microcontroller SW (Task Scheduler,
GPS)Cas – Microcontroller SW (Comms, Drivers)Joe – Data Processing