presentation

Download Report

Transcript presentation

Vehicle Monitoring System
ECE 445: Senior Design Project
Ishan Ahuja
Caleb Perkinson
Samuel Utomi
May 2, 2016
Introduction
• Auto insurance providers have no
accurate way to gauge risky driving
behaviors.
• This leads to inflated insurance rates for
safe drivers.
• Goal: Create a vehicle monitoring system
to record live data about driver behavior
to accurately judge safe driving ability.
Objective
We intend to create a prototype driver
monitoring system which can show a data
based snapshot of a driver's abilities. Our
system will:
• Monitor and save driving records through
the OBDII port on the consumer vehicle.
• Allow for access to data through simple
online portal.
• Measure risky behaviors such as fast
acceleration and quick turns based on
adjustable thresholds.
Block Diagram
Hardware
Objectives
-
Detect poor driving behavior
Monitor car status through OBD port
Know car’s location in case of theft, etc.
Plug-and-Play
Microcontroller
UART
Accelerometer Interrupt 2
Gyro Interrupt 2
MUX Select Bits
Gyro/Accelerometer
Battery Voltage
Battery Temperature
Battery Charge On/Off
Gyro Interrupt 1
Accelerometer Interrupt 2
Debug
LEDs
UART
•
•
•
•
Atmega328 has only 1 UART port
Problem:
• Wi-Fi, OBD, and GPS use UART
Used ISL54216 UART Multiplexer
2 Control Pins
ISL54216
OBD
•
•
•
OBD-II protocols include CAN, J1850 and ISO
STN1110 by ScanTool converts these messages into UART
Works with simple AT commands to talk with car
CAN Transceiver
Layout
Filter
•
•
•
•
•
Simple Anti-aliasing filter
1
Cutoff Frequency: 2 RC
R = 10kΩ
C = 1uF
Yields 3dB cutoff of 16Hz
R
C
Power
Power System
Power Conversion schematic
Design Choices
•
•
•
•
•
Used a buck converter for 12V-5V conversion
Linear regulators for conversion to 3.3V and 1.8V
Used datasheet to determine inductance of buck converter
Total current consumption < 0.8A
Made 330uH inductor
12V to 5V Conversion
Output ripple voltage less than 500mV
Battery
Charging
Circuit
Design Considerations
•
•
•
Wanted constant voltage on the source side of the MOSFET
Using just NMOS to control meant unstable conditions
Decided on using combination of PMOS and NMOS
•
•
•
Resistor divider to lower voltage of MCU ADC input
Low pass filter to measure battery voltage
Low pass filter to measure battery temperature
Thermistor Circuit
•
•
•
•
Necessary as a safety precaution
Shut off current flow in the event of overheat
Used a 470kΩ negative coefficient thermal resistor
Resistance drops as temperature increases above room temp
•
𝑅𝑡
𝑅25
= 0.46351 @ 40°𝐶
• Where Rt is the current resistance of the thermistor
• And R25 = 470k
Battery Life
•
•
•
•
•
•
•
•
•
Using 3600mAh lithium ion battery
Max battery voltage = 4.2V
When car is off,
Atmega: 15.5mA (awake mode)
GPS: 31mA (tracking mode)
Wifi: 80mA (operating current)
Total consumption: 126.5mA
Discharges at 0.035C
Lasts for 28.4 hours
Software
Objectives
•
•
•
•
Read data from:
– Accelerometer
– Gyroscope
– OBD
Transmit data to online server over WiFi
Store data in online server
Retrieve data on demand
Architecture
UART Communication
• Used to communicate with OBD and WiFi
• Required a multiplexer
• Could only communicate with one device at a time
• Devices responds with data to input strings
• AT commands for WiFi module
• Parameter IDs for OBD
• Issues
• Asynchronous – long wait times
• Unique transmissions speeds
• Bus must be stopped and restarted
I2C Communication
• Microcontroller works as master to slave ICs
• Protocol
• Send start bit
• Set I2C slave address
• Send internal register to set
• Send register for relevant reading
• Read data from correct register
• Decipher data in code
• Very user-friendly
• Requires only two lines (Clock and Data)
Code Structure
RESTful Web Service
• Can receive and send data over HTTP requests
• APIs stored on Amazon Web Services
• Receive and store JSON formatted speed data
• Return all speed data as JSON
• Return last speed data as JSON
• Increment/reset/return gyroscope high counter
• Increment/reset/return accelerometer high
counter
• Data stored in static data structures
• Hash map for speed data
• Static integers for counters
Sample POST/GET Request
POST /vms/data HTTP/1.1
Host: 54.86.75.167
Content-Type: application/json
{"data": 123}
GET /vms/data HTTP/1.1
Host: 54.86.75.167
Access Webpage
Challenges/Improvements
• Challenges
• CC3200 microcontroller couldn’t be flashed
• GPS module wouldn’t communicate
• Multiplexer got shorted to 12V
• Improvements
• Low power mode
• UI improvements
• More OBD data points
• Support for multiple vehicles
Conclusion
• Can operate on car battery with
rechargeable Li-Ion cell
• Simple Web UI with dynamic
updating
• Functional OBD interface
• Able to send acceleration alerts
from using Gyroscope and
Accelerometer
Credits
Cara Yang
Prof. Tomas Galvin
Leung Student Venture Fund
Questions?