Vehicle Monitoring ECE 445 Senior Design Project System

  • Slides: 33
Download presentation
Vehicle Monitoring ECE 445: Senior Design Project System Ishan Ahuja Caleb Perkinson Samuel Utomi

Vehicle Monitoring ECE 445: Senior Design Project System Ishan Ahuja Caleb Perkinson Samuel Utomi May 2, 2016

Introduction • Auto insurance providers have no accurate way to gauge risky driving behaviors.

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

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

Block Diagram

Hardware

Hardware

Objectives - Detect poor driving behavior Monitor car status through OBD port Know car’s

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

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 Atmega 328 has only 1 UART port Problem: • Wi-Fi, OBD, and GPS

UART Atmega 328 has only 1 UART port Problem: • Wi-Fi, OBD, and GPS use UART • Used ISL 54216 UART Multiplexer • 2 Control Pins • • ISL 54216

OBD • • • OBD-II protocols include CAN, J 1850 and ISO STN 1110

OBD • • • OBD-II protocols include CAN, J 1850 and ISO STN 1110 by Scan. Tool converts these messages into UART Works with simple AT commands to talk with car CAN Transceiver

Layout

Layout

Filter • • • Simple Anti-aliasing filter Cutoff Frequency: R = 10 kΩ C

Filter • • • Simple Anti-aliasing filter Cutoff Frequency: R = 10 kΩ C = 1 u. F Yields 3 d. B cutoff of 16 Hz R C

Power

Power

Power System

Power System

Power Conversion schematic

Power Conversion schematic

Design Choices • • • Used a buck converter for 12 V-5 V conversion

Design Choices • • • Used a buck converter for 12 V-5 V conversion Linear regulators for conversion to 3. 3 V and 1. 8 V Used datasheet to determine inductance of buck converter Total current consumption < 0. 8 A Made 330 u. H inductor

12 V to 5 V Conversion Output ripple voltage less than 500 m. V

12 V to 5 V Conversion Output ripple voltage less than 500 m. V

Battery Chargi ng Circuit

Battery Chargi ng Circuit

Design Considerations • Wanted constant voltage on the source side of the • MOSFET

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

Thermistor Circuit

Battery Life • • • Using 3600 m. Ah lithium ion battery Max battery

Battery Life • • • Using 3600 m. Ah lithium ion battery Max battery voltage = 4. 2 V When car is off, Atmega: 15. 5 m. A (awake mode) GPS: 31 m. A (tracking mode) Wifi: 80 m. A (operating current) Total consumption: 126. 5 m. A Discharges at 0. 035 C Lasts for 28. 4 hours

Software

Software

Objectives • • Read data from: – Accelerometer – Gyroscope – OBD Transmit data

Objectives • • Read data from: – Accelerometer – Gyroscope – OBD Transmit data to online server over Wi. Fi Store data in online server Retrieve data on demand

Architecture

Architecture

UART Communication • Used to communicate with OBD and Wi. Fi • • •

UART Communication • Used to communicate with OBD and Wi. Fi • • • Required a multiplexer Could only communicate with one device at a time • Devices responds with data to input strings AT commands for Wi. Fi module Parameter IDs for OBD Issues • Asynchronous – long wait times • Unique transmissions speeds • Bus must be stopped and restarted

I 2 C Communication • Microcontroller works as master to slave ICs • Protocol

I 2 C Communication • Microcontroller works as master to slave ICs • Protocol • Send start bit • Set I 2 C 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

Code Structure

RESTful Web Service • Can receive and send data over HTTP requests • APIs

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

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

Access Webpage

Challenges/Improve ments • Challenges • CC 3200 microcontroller couldn’t be flashed • GPS module

Challenges/Improve ments • Challenges • CC 3200 microcontroller couldn’t be flashed • GPS module wouldn’t communicate • Multiplexer got shorted to 12 V • 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

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

Credits Cara Yang Prof. Tomas Galvin Leung Student Venture Fund

Questions?

Questions?