Kshitij to an android device on request.


of Electronics and Communication Engineering

School of Engineering and Technology, Bijwasan

Delhi, India

[email protected]

Manan Kapoor

of Electronics and Communication Engineering

School of Engineering and Technology, Bijwasan

Delhi, India

[email protected]



Abstract— This project presents the design of ‘Health monitoring
system’ for vehicles having an OBD (On-Board Diagnostics) interface. The system
is built on a ‘Raspberry Pi’, which is connected to the OBD interface using a
wired medium. Software is designed to run on the system and collect the data
about coolant temperature, mass air flow rate, air intake temperature, fuel
pump, revolutions per minute (RPM) and catalyst operation, all of which affect
the health of the vehicle. The software calculates a health score and updates a
local database stored the memory of the system. This database is accessible to an
Android app, which is developed as a part of the project. The Android app
allows the user to connect with the system remotely using secured login
interface and monitor the health of the vehicle on their Android devices.

Keywords— On-Board Diagnostics, health
score, car health, monitoring system, android app, RESTful APIs, JSON

I.      Introduction

Today, where machines are taking over the world and
new applications of artificial intelligence are getting introduced in our
lives, such as driver-less cars, auto-pilot airplanes and even stock market
prediction using big data, health monitoring of machines is an important task
to be catered 123. Standardized vehicular
On-Board Diagnostics (OBD) systems offer access to information commonly used
for fault notification and reactive diagnostic services. Recently, there have
been efforts to use OBD data to diagnose and predict faults prior to
catastrophic failure events. 8

In this project we try to cater this problem by
implementing a health monitoring system for vehicles and ensure smooth,
malfunction-free and safe vehicle experience for users. We implement a system
that shares the data collected from OBD-II interface with a newly developed
android application 5.

It can perform real-time
vehicle status surveillance. The monitored features cover engine rpm, vehicle
speed, coolant temperature, fault codes, and other vehicle dynamics
information. 7

Car health monitoring system collects the data
required to anticipate health of a vehicle using On-board diagnostics interface
and sends them through a wireless network to an android device on request.
Though OBD-II interface is designed to provide much detailed and accurate
readings, in this project we focus on basic elements of a vehicle to determine
the health. This project consists of 3 main components:

Android Application

Backend server and OBD Reader running on a Raspberry Pi 3 (Model B).

OBD-II Interface in the vehicle.

II.    Android
Application – Baymax

Baymax is an interface between the Raspberry Pi,
which contains the data about health of the car, and the user. The app helps
the user to monitor the health of the vehicle remotely.

The application helps user to login into the system
remotely and access the database, stored in the memory of the system, through
RESTful APIs. The login credentials ensure discretion and security to user data
and vehicle.

Login and access parameters

Login page of this app provides discretion and
security to the user data and vehicle. The user can login into the app using a
preset username and password. This app works on a Local network, i.e. the app
and the system, installed on the ‘Raspberry Pi’, should be on the same network,
which is why the app requires the user to input the IP address assigned to the
Raspberry Pi. This system is highly secure and can only be accessed by the intended
user on the same network as the system.

Feature-wise monitoring

Once the user is allowed to access the vehicle database, they
are exposed to a choice of features which determine the health of their
vehicle. The values of these features are displayed as graphs in this part of
the app. The basic features used to calculate the health of the vehicle in this
project are chosen to be coolant temperature, mass air flow rate, air intake
temperature, fuel pump, revolutions per minute (RPM) and catalyst operation.

Health cards

Health cards are displayed in this part of the application.
This part is also known as the timeline as values are arranged in the timely
order of when they were fetched by the system. These cards show the values of
each of the six features taken simultaneously. For every value which is out of
a decided range, health score is reduced by 1.66. These health cards shows the
values of all the parameters mentioned above along with a calculated health

III.   Monitoring
Software Running on Raspberry Pi

Raspberry Pi 3 (Model B) is used in this project to run
the software, which is designed to update and calculate the “health score”
using the data fetched from the vehicle and handle the requests from the
Android Application.

There are 3 parts of the script running in the system:

Booting the health monitoring system

This part of the system is executed when the vehicle starts and thus the
connected Raspberry Pi is powered. This is a shell script that is integrated in
the flow of execution of the operating system. This script is used to ensure
the operating system is booted successfully and execute the main program as
well as Py-OBD 4.

The health monitoring system

The health
monitoring system is the main program, written in Java 8, which has the
following responsibilities.

Firstly, the
program displays the IP address assigned to the system which helps the user to
connect and login into the system.

Secondly, it
handles all the RESTful API requests, which includes login-request,
health-score-request and feature-data-request. It assigns a randomly generated
session ID to the user, as response to login-request, which is checked on every
other data request to ensure security of user data.

Thirdly, this program is also responsible for asynchronously computing
the health score from logged data add new entries to an SQL database maintained
in the memory of the system. The SQL database maintains new entries and
provides data organization 6.


Py-OBD 4 is
an open source script written in Python which is installed on the Raspberry Pi
and is executed at the beginning of the system. It is a data logging software
which allows the system to fetch data from the OBD interface and create a log
file. The data from this log file are validated by the main program and added
to the SQL database.

OBD-II is used
in project helps in debugging of faults in the vehicle. This device helps the user to understand the vehicle status and check
malfunctions by indicating the Diagnostic Trouble Codes (DTCs) 9. 

IV.   Architecture

architecture of the Android application is as follows in Figure (1). Login
protocol, feature monitoring and health cards are the parts of the android
application. The app communicates wirelessly over a local network with login
port and health update port of the Raspberry Pi, i.e. the health monitoring

Figure (2) is
the architecture of the Health monitoring system running on the Raspberry Pi.
The OBD Reader (Py-OBD) and the main program run asynchronously to update and
query the database.

A private cloud server can be set up in a Raspberry Pi
which could be used as a storage device for applications involving real time
signals. Raspberry Pi is a cheaper microprocessor in which cloud computing
infrastructure can be obtained using cloud platforms provided by specific cloud
vendors. Real time signals acquired by any sensor that measures environmental
factors are analog in nature 10.






























V.    Observations
and Units

Car health monitoring system was
integrated into 3 different cars manufactured in 2015, 2016 and 2017. Continuous
monitoring of vital health parameters has become essential with the increase in
the number of people who require those.11 The log file was generated for
the following features:

A)      Mass
Air Flow Rate (grams/sec): Mass (air) flow rate is the amount of air entering a
fuel-injecting internal combustion engine.

B)      Revolutions
per minute (RPM): RPM is the number of revolutions taken by the axel of the car
in 1 minute. This parameter is dimensionless.

C)      Coolant
temperature (°C): Coolant temperature is the temperature of engine coolant. It
is measured in degree Celsius (°C).

Air Intake temperature (°C): The temperature of the air entering the engine is known as air
intake temperature.

Readings of
these parameters are used to compute the health of the vehicle. Each of the
above parameter has a scaled score of 1.66.

VI.   Calculation
of Health Score

The health
score of the vehicle ranges between 0 and 10, where 0 is the health score of a
vehicle which doesn’t start and 10 is the health score of a vehicle in which
all the parameters are in a pre-defined limit.

For any of the
parameters defined in the last section is above or below the limit the health
score is reduced by 1.66. These health scores are computed for every valid log.
The final health score is the average rounded off value of all the readings.

VII.  Conclusion

In this paper design
of ‘Car health monitoring system’ is implemented on a Raspberry Pi 3 (Model B).
The OBD-II interface is connected using a wired medium to the system and data
about the health of the vehicle are logged, validated and updated in an SQL

The newly
developed android application (Baymax) is a part of the project. It
communicates with the system over a local network using RESTful APIs. The app
prepares a secure and convenient interface for car users with a lot of new
features such as interactive graphs and health cards.

In the future,
we will use all the useful data and share it with a secure and remote server to
monitor the health of the system automatically to alert user for servicing of
vehicle or any other malfunction. We will also implement navigation using GPS
in this system that can help the user to find nearby service centers.

VIII. Future Scope

Safer Driver-less cars

In the coming future, major applications of machine
learning, such as driver-less cars and autopilot airplanes, are going to change
many lives. But there is a limitation to it, in a world driven by machines
‘health monitoring of machines’ will be a very important task.

Cost efficeincy in car-servicing

This system as of now can calculate health of your devices
and give you better insights about use and servicing of vehicles.

Safe and Secure transporation Industry

With the help of this system
transport vendors or cab owners can access the health of their vehicles and
avoid accidents.

IX.   References

1. Khanh Duy Tung Nguyen, Long Duy
Nguyen, Son Hai Le, “Vision-based driverless car in the condition of limited
computing resources: Perspective from a student completion”, 2017.

2. Mihai Lungu, Romulus Lungu,
“Complete landing autopilot having control laws based on neural networks and
dynamic inversion”, 2017.

3. Weiling Chen, Yan Zhang, Chai Kiat
Yeo, Chiew Tong Lau, Bu Sung Lee, “Stock market prediction using neural
networks through news on online social networks”, Smart Cities Conference
(ISC2), 2017.

4. Py-OBD is an open source python
script used for data logging from OBD-II on Raspberry Pi. It can be found
online at https://github.com/Pbartek/pyobd-pi.

5. S. Baek, J. Jang, “Implementation of
Integrated OBD-II Connector with External Network”, Science Direct Journal,

6. Shihab A. Hameed, Othman Khalifa,
Mohd Ershad, Fauzan Zahudi, Bassam Sheyaa, Waleed Asender, “Car monitoring,
alerting and tracking model: Enhancement with mobility and database
facilities”, International conference on Computer and Communication Engineering
(ICCCE), 2010.

7. Jheng-Syu, Shi-Huang Chen, Wu-Der
Tsay, “The Implemention of OBD-II Vehical Diagnostic system Intgrated with
Cloud computation Technology”, 2014.

8. J. Siegel, R. Bhattacharyya, A.
Deshpande, S. Sarma,”Vehicular engine oil service life characterization using
On-Board Diagnostic (OBD) sensor data.”, 2014.

9. M. Awaiz Khan Niazi, Ali Raza,
Anique Nayyar, Mohd Hamid Ali, Nasir Rashid, Javaid Iqbal, “Development of OBD
kit for troubleshooting of complaint vehicles”, 2013.

10. S. Emima Princy, K. Gerard Jeo
Nigel, “Implementation of cloud server for real time data storage using
Raspberry Pi”, 2015.

11. Rajesh Kannan Megalingam, Goutham
Pocklassery, P Surya Teja, S Venkatraj Reddy, K Sai Kumar, “HDL based
controller for continuous multiple vital health parameters monitoring system
for record keeping”, 2016.