MQTT Based Vehicle Accident Detection and Alert System: December 2017
MQTT Based Vehicle Accident Detection and Alert System: December 2017
MQTT Based Vehicle Accident Detection and Alert System: December 2017
net/publication/325943818
CITATIONS READS
0 797
1 author:
SEE PROFILE
All content following this page was uploaded by Ravi Kishore Kodali on 29 June 2018.
978-1-5386-1144-9$31.00 2017
c IEEE 186
The overview architecture of the proposed system is shown
Fig. 1. In this system nodemcu board which acts like a client
publishes the sensor data into the Losant Message Broker
using the MQTT protocol on to the topic Losant/DEVICE
ID/state. In order to understand the messages of losant, a
defined json-based payload must be followed. The published
data will automatically store in the losant and make it available Fig. 4. Ultrasonic Sensor
in visualization tool of losant platform. In order to subscribe
the stored data from the losant MQTT broker the client must
2) Ultrasonic Sensor: An ultrasonic sensor sends out an
subscribe to the commands that are initiated using losant
ultransonic pulse of a prefixed frequency. If there is an obstacle
workflow on to the topic Losant/DEVICE ID/commands.
in the path of the pulse, the waves gets reflected back and are
again imposed on the receiver of the sensor. Depending on the
A. NodeMCU time taken for the waves to reach back to the sensor, the range
of the obstacle is calculated.
C. Actuators
Fig. 2. NodeMCU
Fig. 5. Buzzer
NodeMCU is an open source IoT platform. Its firmware runs 1) Buzzer: The piezo-electronic buzzer here is an audio
on the Wi-Fi SoC of ESP8266 and the hardware is designed device of sorts, providing a sound of a particular tone when
based on the ESP12 module. It is quite compact and also electricity is passed through it. There are a variety of buzzers
affordable, making it one of the most popular choices for depending on factors such as frequency, decibel level and type
many people working on IoT applications. With a RAM of of buzzer.
128kB and a storage space of 4MB, it is quite light on memory
and power consumption. It has one analog and eight digital
GPIOs, thus making it quite convenient to run a variety of
different applications integrating sensors and actuators with it.
It is very comfortable to work with, as it is a quite versatile
device and also there is a lot of documentation available on it
on the Internet. Owing to its advantages with respect to size, Fig. 6. OLED Display
memory and power consumption, it has become one of the
most popular microcontrollers in the IoT scenario. 2) OLED Display: The SSD1306 OLED Display module
is a 128x64 single-chip CMOS OLED Driver with controller
for organic light emitting dot matrix graphic display system.
B. Sensors
It consists of 128 segments and 64 commons.it has a 256-step
brightness control and communication with any general MCU
can be done through Serial Peripheral Interface (SPI) or I2C
(Inter-Integrated Circuit). It operates at a voltage of 1.65-3.3V.
D. Message Queuing Telemetry Transport (MQTT)
Message Queuing Telemetry Transport (MQTT) is a light
Fig. 3. Accelerometer weight transport protocol that efficiently uses the network
bandwidth with a 2 byte fixed header . MQTT works on TCP
and assures the delivery of messages from node to the server.
1) ADXL335 Accelerometer: The ADXL335 is a small Being a message oriented information exchange protocol,
3-axis accelerometer with the ability to sense tilts in three MQTT is better suited at IoT applications than any RESTful
dimensions. Its sensitivity in acceleration extends upto 3 g. It services because MQTT has a very lightweight requirements
can sense the static acceleration if gravity is to be measured. on memory, consequently leading to lower transmit power.
It can also sense dynamic acceleration resulting from any kind This is a huge advantage as comared to REST as they
of movement. have large header sizes and demand more power, which is a
International Conference on Applied and Theoretical Computing and Communication Technology 187
problem where nodes in an IoT infrastructure need to conserve IV. H ARDWARE R EALIZATION
their energy to as much an extent as possible. MQTT is a
publish/subscribe based protocol involving clients and brokers.
Clients can be publishers or subscribers. When a publisher
publishes data, the broker receives the information. The broker
is in charge of receiving subscription requests from subscribers
and sending the published information from the publishers to
the subscribers.
Fig. 8. Circuit
188 International Conference on Applied and Theoretical Computing and Communication Technology
In Fig. 10, we see that the accelerometer is reporting a tilt
value which has been calibrated to be decided that it is not
safe. This indicates that an accident has occured that caused
the vehicle to tilt out of the safe zone.
Fig. 13.
International Conference on Applied and Theoretical Computing and Communication Technology 189