Considerate Driver

I designed and developed a device that reminds the driver to be more considerate of the passenger. The device uses motion sensor to detect the acceleration of the car. If the acceleration exceeds a threshold, the led strip will change color to red. At the same time, data of acceleration is uploaded to the cloud and visualized using Javascript.

What I did

Problem

When we drive, we are not aware of our passengers' comfort levels. It is hard if not impossible for the driver to know how the passenger is feeling. When we hit the brake or the accelerator very hard or make sharp turns, we are not experiencing the same level of discomfort as the passengers. We need some kind of mechanism to remind us to be more considerate while there are other people in the car.

It is more important professional drivers as such Uber drivers, bus drivers and limo drivers. Professional drivers want their their passengers to feel safe and comfortable so that they can receive positive reviews.

Solution

Monitor and Display Acceleration

One factor that contributes to the comfort level of the passenger is acceleration. When the car accelerates or decelerates too fast, passengers will not feel comfortable due to inertia. The dashboard displays the speed but not acceleration.

I designed and developed a device that displays the acceleration to the driver and uploads the data of acceleration to the cloud.

How it works

Show accelerations with LED

When the car accelerates, decelerates too fast or make sharp turns, the light on the device will turn from green to red.

Preset thresholds on x, y, z axis are used to determine the color change and can be changed to give different levels of sensitivity.

Considerate Driving - Green

Aggressive Driving - Red

Collect and Visualize Data of Acceleration

Data of acceleration combined with geolocation info are uploaded to the cloud. The driving behavior of a driver can be visualized on a map.

Considerate Driving - Green; Aggressive Driving - Red; Bumpy Road - Blue

Record Road Conditions

As an extra feature, the device will also record locations of bumpy roads that can be sent to relevent government branch for road maintenence

How it is made

Parts

  • 1. Particle Photon
  • 2. Motion Sensor: FLORA 9-DOF Accelerometer/Gyroscope/Magnetometer - LSM9DS0 - v1.0
  • 3. GPS: Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3
  • 4. LED: Adafruit NeoPixel

Circuit

Case

The case is made by utilizing a 3d printer and a laser cutter. The main body is printed; the light stripe is made of acrylic cut by laser cutter.

The case is composed of 4 layers: From top to bottom:

  • 1. a 3d printed lid that can be opened to place the photon and sensors.
  • 2. 3d printed layer
  • 3. laser cut arylic layer that functions as the light indicator.
  • 4. 3d printed bottom layer Layers 2, 3, 4 are glued together.

Code

Coding is composed of two parts:

1. Hardware code installed in the Particle Photon written in C++.

This piece of code will read GPS location and motion data from the motion sensor and send them to the cloud. Data are sent to a server on thingspeak.com via Webhook. It also controls the LED strip to display and change colors.

2. Data visualization code run on the browser written in Javascript with Paper.js

This piece of code will read data sent from the Particle Photon and visualize it on a web page instantaneously. The code makes ajax calls to thingspeak.com at fixed intervals to retrieve updated data.

See code on GitHub

Use Cases