Introduction: Driving Parameters Analysis System

About: Catch up with this tech geek on LinkedIn !
Excited to meet you tech-geeks of Instructables !

"IoT of the people, by the people, for the people"

Well, that's the paraphrased context of quote that I would like to begin with explaining the detailed procedure pertaining to the 'Driving Parameters Analysis System' using Mediatek LinkIt One and SeeedStudio platforms.

There is a famous proverbial saying that goes by,

"All is well that ends well"

To go by, from my perspective, before I begin sharing my project endeavor, I wish to give a pretty good introduction of the same so that the objective or outlook of the proposed project is put forth evidently. Here we begin ...

With the increasing number of smart cities and metropolitan cities, the world is flourishing in its task to meet the needs of its exploding population. Though solutions in traffic regulation and transit management are coming up in Arithmetic Progression, the problems keep on increasing in Geometric Progression which demands an attention to be focused and an action to be enhanced in mobility patterns.

In view of the increasing mishaps and accidents due to the negligence of the driver, a precautionary system for monitoring the skills of driver needs to be established. This gives rise to the development of 'Driving Parameters Analysis System'.

Step 1: DIY - Do It Yourself !

This Product-Service System (PSS) has a variety of applications which I have discussed in the final step. Just enjoy doing it yourself and I am sure that this process will be a fascinating one. Before we start with, just have an idea on what this 'Driving Parameters Analysis System' is based upon -

Theme and Conception

  • Internet of Things

  • Multiple Sensor Fusion

  • Cloud Computing
  • Eco-friendly patterns
  • Connected Cars

____________________________________________

In fact, I wish to paraphrase Neil Armstrong's quote of,

" A small step for Instructables

A giant leap for mankind "

____________________________________________

So let's begin developing ...! Here we go ...

Step 2: Catch Up With the Hardware Stuff

As per the requirements of this project, the following components are necessary -

  • MediaTek LinkIt One with Battery, GPS and WiFi Antenna (1)
  • Grove 3-Axis Digital Accelerometer (1)
  • Grove 3-Axis Digital Gyro (1)
  • Grove Encoder (1)
  • Grove CO2 Sensor (1)
  • Grove Dust Sensor (1)
  • Grove Ultrasonic Sensor (1)
  • LEDs (3)
  • Jumper wires (as required)
  • OBD Module (1)

If hardware requirements are on stack, what next ?

... Of course yes ! Software is essential for the proper working of any system !

Step 3: Software Overview

  • As simple as that, we will be using the common man's Arduino 1.6.6 software and MediaTek Cloud Sandbox.

Thumbs up ! We shall now begin with our project development.

Step 4: Block Diagram of the System

  • The block diagram of overall working of the system is illustrated in the attached picture.
  • The electronic circuit with the multiple sensor fusion is connected to the cloud platform through which the results are sent are sent to end-user application.
  • Note that in cars, the OBD (On Board Diagnostic) unit is used effectively for fetching the sensor data.

Step 5: Begin Your Joy With SeeedStudio Grove Sensors

The experimentation with driving pattern can be ascertained with the help of 'Multiple Sensor Fusion' with their values subjected to predictive analysis using machine learning algorithms. The various sensors that can be used are as follows -

  • Grove 3-Axis Digital Accelerometer - Co-ordinates and changes observed for analyzing driving pattern
  • Grove 3-Axis Digital Gyro - Orientation changes to be cohesively plotted
  • Grove Encoder - Assisting the data collected to determine pattern in steering the vehicle
  • Grove CO2 Sensor - Emission rates observed for better mobility and pattern of driving
  • Grove Dust Sensor - Providing suggestion for maintenance and service based on dust emanations in vehicle
  • Grove Ultrasonic Sensor - Determining distance between vehicles

Want to know more about SeeedStudio Grove Sensors ? Chase the link below ...

http://www.seeedstudio.com/wiki/Grove_System

Step 6: Fun With IoT and Cloud Computing

Of course, 'Mediatek LinkIt One' with its well-served features of being offered with GSM, GPRS, Bluetooth, SD Cards, MP3/AAC Audio, GNSS and WiFi, the wearable and transit system based devices is well within the making. Let's explore on how to deploy the Driving Parameters Analysis System.

On deploying this system globally using IoT(Internet of Things), 'MediaTek Cloud Sandbox' facilitates cloud computing ideally with its wide range of built-in widgets, options and features.

  1. Start by getting yourself registered on the portal : https://mcs.mediatek.com/oauth/en/login
  2. Now, create a prototype with the information showed in the picture. Any name can be used and I am using here in accordance with my project development.
  3. Click Save and you will observe the data as shown in the picture.

There you go IoT enthusiasts ... Good job !

Step 7: Create Data Channels for Sensors, GPS

  • Create data channel for GPS as illustrated in the picture.
  • Follow the same procedure in creating the other data channels.
  • In this demonstration, I have created data channels for GPS data, Sensor values and for controlling the engine of automobile through cloud.

Step 8: Create Test Devices

  • Finally, click 'Create Test Device' on the right top portion and enter the following information. Here, I have mentioned 'LinkIt One for Driver'.
  • Click Create.
  • Well, done ! Now under 'Data Channel', the view of all created channels is available for the test device. Make sure to note the Device ID and Device Key to use it in Arduino code.
  • With an unique ID and key corresponding to the GPS location, the conception of 'Connected Cars' comes into play. In fact, any person relating to erroneous driving skills can be communicated to the other person driving nearby the vehicle so that he/she can be alert and respond appropriately.

Step 9: Connection Trivia

  • In the implementation testing, three LEDs are used as the reference for evaluating the mode of driving.
  • Three cases of ascertaining the skills of the driver have been introduced as follows : Good (Green), Warning (Amber) and Bad (Red) indications are provided through the LEDs
  • Connect the required sensors to the Analog ports of LinkIt one and make the necessary changes in the code as per your wish.
  • The rotary angle sensor provides a steering type environment in an automobile.
  • Based on the steering control and speed, the driving pattern analysis is carried out as per the code.
  • Connect the WiFi antenna and GPS antenna to the LinkIt One board.
  • As a stand alone system, connect the Li - battery for power supply.
  • To affirm the results on a accurate basis, I have developed a robotic car, wherein I have used ultrasonic sensors ( to determine the distance maintained between moving objects ), accelerometer and GPS ( to calculate the speed ) respectively.
  • I have precisely highlighted all the required ports using red boxes in the diagram for connecting the required parts to their respective ports.
  • Thus, from any location around the globe, you can do this stuff by establishing the circuit in the automobile that you prefer for traveling and observe the output.

Precaution :
Strictly connect the Vcc pin of Grove Rotary Encoder to 3.3 Vout pin of LinkItOne. Pity that I got one of my Grove Rotary Angle sensors damaged after having connected it to 5v port of Arduino breakout in LinkIt One.

"Experience is the mother of wisdom" - Well said !

Step 10: Arduino Code

  • Please find the attachment and download the code for your reference.
  • The Arduino code explained in terms of comment lines in each and every part of code can be ascertained.
  • The code is a result of my sleepless nights and its well optimized. Do share with the Instructables community if you have optimized it further.

Step 11: Compile - Upload - Success

  • Upload the Arduino code into LinkIt one and you will observe the status to be 'On line'.
  • As the implementation testing shown in the picture, the rotary encoder is connected to the servo motor of the robotic car developed, whose DC Motor compared to the real vehicle's engine can be controlled accordingly based on the pattern of driving.
  • The data channels will be found to be updating automatically.

Step 12: Make That More User-friendly

  • The world is set on the 'Smart Phone' revolution marching ahead on the road to development.
  • Now, you will be able to observe the same updated data in the mobile platform.

Step 13: Observe the Output

Thanks to Mediatek Cloud Sandbox application, Mediatek LinkIt One and SeeedStudio Grove Sensors, your pattern of driving skills is well within your pocket.

Step 14: Establish the Alert System

"Prevention is better than cure" goes the saying.

  • To go by, let's create an alert based system to prevent the accidents if the driving skills of a person is reportedly known to be poor, subjected to rash driving or high speed cases.
  • Under Trigger & Action, the user can create the various alerts as required.
  • In the example presented, an email alert is created.

Step 15: Email Alert

  • On the values being reported above threshold levels, a warning mail is being pushed into the driver's inbox.
  • In the case of mine, I have created alerts using the combined outputs of Grove 3-Axis Digital Accelerometer, Grove 3-Axis Digital Gyro, Grove Encoder, Grove CO2 Sensor, Grove Dust Sensor, GPS and Grove Ultrasonic Sensor.
  • The email alerts can further be reported to the regional transport corporations or can be used effectively in school/college transportation system for reporting the driver's bad driving skills to the management.
  • Right now, I am working on Facebook developer version by means of Selenium so that the personal profile and driving status are linked to social networking platforms and a good driving skill can at once be posted in domains like Facebook timeline which can encourage and motivate the mindset of driver to maintain the proper driving skills

Step 16: The Overall Making Video

Thanks to Internet of Things(IoT), Cloud Computing and Multiple Sensor Fusion, a precautionary system for monitoring the driving skills of a person is established.

The video link is as follows :

https://vimeo.com/169506208

Step 17: Connected Cars - Here We Come !

Get ready ----- 3... 2... 1... ----- Here we come !

Now, I take you guys to a cool procedure for implementing the 'Driving Parameters Analysis System' in cars.

  • Buy an OBD module available in market (preferably online shopping) that supports OBD II protocols.
  • Connect the OBD module to the OBD port of the car.
  • This OBD connector, in most of the cases is within 3 feet of the steering wheel. Certainly, this port is located just under the dashboard above the brake pedal.
  • Download the OBD App for your device, preferablyTorque application :

Step 18: Deriving Sensor Data From Cars

  • On plugging the OBD module onto the port, the device name appears on the list of devices displayed either under Bluetooth pairing or WiFi connectivity based on the module that you had bought.
  • Connect the module based upon its specifications corresponding to Bluetooth or WiFi.

Awesome ! There you see the values of various sensors in car being transmitted to your smart phone and you are now a part of the revolution called 'Connected Cars' .


Step 19: Hurray ! Good Job !!

Hurray ! Hope you had a great time with the making tutorial.

Indeed, it was a blessing in disguise to share my insights with you guys.

Courtesy : Instructables, MediaTek Labs, SeeedStudio

Special thanks for your patience. Stay around for more projects. Keep developing ...

Internet of Things Contest 2016

Second Prize in the
Internet of Things Contest 2016

Sensors Contest 2016

Participated in the
Sensors Contest 2016