A Vehicle Monitoring and Safety Platform
- Jan 1, 2017
- 5 min read
University of Michigan
Time: Sept.2016 - Dec.2016
Team members: Ping Yu, Leif Millar, Nathaniel Prior, Die Hu, Yihao Ye
Responsible for the “Emergency Notification” function
Designed FreeRTOS system for four sub-systems and PCB board for the whole system, tested it in the real car
Aggressive Driving Detection: detect the acceleration and speed, store videos into SD card
Dashcam Recording: display the system on the screen using raspberry pi
Passenger Detection: using weight sensors to detect the number of people in the car
Emergency Notification:
Detected CAN signal from airbag, transmitted data to STM32
Designed an application based on Android, connected with STM32 using Bluetooth. When the airbag pups up, the phone will call 911 directly

High-Level Description:
Our product allows vehicle owners to monitor how and where their cars are being driven. This information is useful to fleet owners, parents of new drivers, and anyone else who often loans out their vehicle. With features such as aggressive driving detection and a dash cam, a business owner can see exactly how their vehicle has been treated. And both parents and fleet owners will enjoy features such as location monitoring, passenger detection, and emergency notifications to see that the driver is using the vehicle within the guidelines that have been set.
A GPS module is used to provide location and speed. With this function, vehicle owners are able to see the path that the driver took. A dashcam is used so that the vehicle owner can see exactly how the driver is using the vehicle and provides evidence in case of an accident. A combination of a bluetooth connection to the driver’s phone and accelerometers provide emergency notifications to alert the owner as soon as an accident occurs. An LCD module is included for live feed of the dash cam and reviewing footage from aggressive or crash events from the SD card. Finally, a combination of a weight sensor and camera are used to detect and confirm if there are passengers in the vehicle.
Our project has potential to be very feasible as a marketable product. If passenger detection and crash detection were instead done through CAN, it would decrease the wiring and allow for additional checks on change in RPM for aggressive driving events. Given enough time to reverse-engineer the CAN bus traffic, speed could also be taken from the CAN bus to reduce reliability on GPS reception.
System Architecture
Emergency Notification System
The emergency notification system consists of our bluetooth chip and the driver’s phone connected to each other through bluetooth. The bluetooth chip sends and receives these signals from our processor through UART. The phone is running an app that waits for a signal from the board. If this signal is received, the app tells the phone to make a call to whatever number was set up as the emergency contact through the app before-hand. The processor decides to send this signal based on information received from the aggressive driving detection system. The bluetooth chip is just used as a means of communicating between the processor and phone. In addition to calling in emergencies, the app also has the ability to easily send response messages to people who attempt to call the driver during driving that will tell them something like “I am driving now, and I will call you back later.”
Aggressive Driving Detection System
The aggressive driving detection system consists of our IMU connected to our processor through two separate ADCs. The IMU is used for its accelerometer capabilities in two dimensions. We positioned these dimensions as pointing straight toward the vehicle’s direction of motion and straight to the left or right of its motion. We ignore the up-down direction. The IMU outputs a separate analog value corresponding to the current amount of acceleration being felt in each direction. These values are routed to two of the analog-to-digital converters on our board. These values are used to detect aggressive driving or crashes for use with the dashcam recording system.
Passenger Detection System
The passenger detection system consists of an interior-facing camera, an SD card, and two weight sensors. The camera communicates through I2C for initialization and SPI for data transfer in either direction. This means that after initialization, the camera only uses SPI during that power cycle. The camera takes a picture of the interior of the car if either weight sensor deems that there is a possible passenger. This image is logged into the SD card that is attached to the board through our SD interface which communicates through SPI. The weight sensors are intended to be placed on different sides of the passenger seat -- preferably underneath a seat cover. The weight sensors are both attached to the processor on the same ADC but different channels. Each ADC on our processor has multiple channels that can be used as inputs. Switching between channels can be done freely so long as there is not a conversion currently running. This means that conversion of the two weight sensors cannot happen simultaneously in this setup. We did not put the weight sensors on separate ADCs because our processor had only three ADCs to use, so either the two weight sensors or the two accelerometers had to share at least one.
Route Recording
The route recording system consists of only the GPS and SD card connected to our processor. This is the same SD card as is used by the passenger detection system. Every ten seconds, our GPS chip collects data from the GPS satellites and estimates its position, time, and average speed since the last data collection. It transmits all of this information to our processor through UART. The processor then transfers this information to the SD card through SPI as described in the passenger detection system section. These coordinates can be viewed later by the owner after the drive.
Dashcam Recording
The dashcam recording system consists of our video camera, a raspberry pi 3, a separate SD card attached to the pi, and a screen for the pi. The pi communicates with our board through UART to receive the time from the route recording system and the status the aggressive driving system. This information is overlaid on the video during recording and used to save the video into a circular buffer on the SD card. The SD card is attached to the pi in a built-in SD card slot. The raspberry pi is running linux, so this SD card is accessed like any memory storage device connected to a computer. At any time that the aggressive driving system indicates that there is either a crash or aggressive driving, the preceding and proceeding few minutes of video footage are flagged for more permanent storage outside of the circular buffer. This footage can be viewed after the driving session using the screen attached to the pi through HDMI. The video camera communicates to the pi through a CSI-2 standard interface which uses a bidirectional serial interface based on I2C. It connects to the pi through a 15-connector flexible flat cable.
Comments