A PROJECT REPORT ON
“IOT FRAMEWORK FOR MONITORING
THE CONDITION OF THE ROADS”
A Project report submitted in partial fulfilment of the
requirement for the award of the degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
NAME REGISTER NUMBER
R.Pavithra 18091A04D5
T.Sai Charishma 18091A04G2
L.Sridhar Yadav 18091A04K3
S.Akbar Basha 18091A0406
Under the Esteemed Guidance of
DR. P. V. GOPI KRISHNA RAO Ph.D, MISOI, MIAENG
Professor, ECE Department
(ESTD -1995)
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
RAJEEV GANDHI MEMORIAL COLLEGE OF ENGINEERING
& TECHNOLOGY
(AUTONOMOUS)
Affiliated to J.N.T.U.A – Anantapuramu, Approved by A.I.C.T.E., New Delhi,
Accredited By N.B.A & NAAC with ‘A+’ Grade – New Delhi
NANDYAL – 518501, Kurnool Dist. A.P.
Year:2021-22
RAJEEV GANDHI MEMORIAL COLLEGE OF
ENGINEERING &TECHNOLOGY
(AUTONOMOUS)
Affiliated to J.N.T.U.A – Anantapuramu, Approved by A.I.C.T.E.,
New Delhi, Accredited By N.B.A & NAAC with ‘A+’ Grade – New
Delhi NANDYAL – 518501, Kurnool Dist. A.P.
(E STD–1995)
CERTIFICATE
This is to certify that the dissertation entitled “ IOT FRAMEWORK FOR
MONITERING THE CONDITION OF THE ROADS ” that is being
submitted by R. PAVITHRA (18091A04D5), T. SAI CHARISHMA
(18091A04G2), L. SRIDHAR YADAV (18091A04K3), S. AKBAR BASHA
(18091A0406) is under the guidance of DR. P. V. GOPI KRISHNA RAO,
Professor ECE department, for Mini Project of the award of B. Tech Degree in
ELECTRONICS AND COMMUNICATION ENGINEERING in the RAJEEV
GANDHI MEMORIAL COLLEGE OF ENGINEERING & TECHNOLOGY
(Autonomous), Nandyal (Affiliated to J.N.T.U.A, Anantapuramu) is a record
of Bonafide work carried out by them under our guidance and supervision
HEAD OF THE DEPARTMENT: PROJECT GUIDE:
Dr. K.MALLIKARJUNA Dr. P.V.GOPI KRISHNA RAO
M.Tech, Ph.D, MISTE, FIETE, MIE Ph.D, MISOI, MIAENG
Professor and H.O.D Professor
Signature of the External
Examiner Date:
CANDIDATE’S DECLARATION
We hereby declare that the work done in this project titled “ IoT Framework
for Monitoring the Condition of the Roads ” submitted towards completion
of mini project in IV Year I Semester of B. Tech (ECE) at the Rajeev Gandhi
Memorial College of Engineering & Technology (Autonomous), Nandyal. It is
an authentic record our original work done under the guidance of Dr. P.V.
GOPI KRISHNA RAO Ph.D, MISOI, MIAENG, Professor, Dept. of ECE,
RGMCET, Nandyal. We have not submitted the matter embodied in this
project for the award of any other Degree in any other degree in any other
institutions.
By:
R.Pavithra (18091a04d5)
T.Sai Charishma (18091a04g2)
L.Sridhar Yadav (18091a04k3)
S.Akbar Basha (18091a0406)
Place: Nandyal
Date:
ACKNOWLEDGMENT
We manifest our heartier thankfulness pertaining to your contentment over our
project guide Dr. P.V.GOPI KRISHNA RAO Ph.D, MISOI, MIAENG, Professor of
Electronics and Communication Engineering department, with whose adroit
concomitance the excellence has been exemplified in bringing out this project to
work with artistry.
We express our gratitude to Dr. k. Mallikarjuna, Head of the Department of
Electronic and communication Engineering department, all teaching and non-teaching
staff of the Electronics and Communication Engineering department of Rajeev
Gandhi Memorial College of Engineering and Technology for providing continuous
encouragement and cooperation at various steps of our project.
At the outset we thank our honourable Chairman Dr. M. Santhiramudu, for
providing us with exceptional faculty and moral support throughout the course.
Involuntarily, we are perspicuous to divulge our sincere gratefulness to our
principal, Dr. T. Jayachandra Prasad who has been observed posing valiance in
abundance towards our individuality to a acknowledge our project work tangentially.
Finally, we extend our sincere thanks to all the Staff Members of ECE
Department who have co-operated and encouraged us in making our project
successful.
Whatever one does, whatever one achieves, the first credit goes to the Parents
be it not for their love and affection, nothing would have been responsible. We see in
every good happens to us their love and blessings.
SUBMITTED BY
R.Pavithra (18091a04d5)
T.Sai Charishma (18091a04g2)
L.Sridhar Yadav (18091a04k3)
S.Akbar Basha (18091a0406)
ABSTRACT
The fatal accidents on the roads remain a global concern. The
development of the effective strategies to reduce such fatal accidents requires
the identification of various risk factors including the road condition. Road
surface monitoring is a key factor to provide smooth and safe road
infrastructure to road users. The key to road surface condition monitoring is to
detect road surface irregularities, cracks, and bumps, which affect driving
comfort and on-road safety.
With this regard, the project is aimed to construct a system that detects
uneven roads and alert the respective government authorities. Here, we can use
IoT model to detect the road surface irregularities, which could change the way
government agencies monitor and plan for road maintenance. A vehicle gets
affected by more vibrations when passing over any irregular road surface rather
than over a smooth one. With this vibration-based approach, road surface
irregularities can be detected and informed to the respective authorities.
By this way we can detect irregularities on road surfaces and can reduce
them by informing to the respective authorities to reduce the fatal accidents and
increase the smooth and safe road infrastructure to road users.
IoT framework for monitoring the condition of the Roads
CONTENTS
TOPICS Page No
CHAPTER -1
1. INTRODUCTION 5-6
1.1 Introduction 5
1.2 Block Diagram 6
CHAPTER -2
2. DESCRIPTION OF HARDWARE COMPONENTS 7-22
2.1 Arduino Uno 7-11
2.2 MPU 6050 Sensor 11-15
2.3 GPS Module 15-17
2.4 GSM Module 17-19
2.5 Battery 20
2.6 Bread Board 21
2.7 Jumper wire 21-22
CHAPTER -3
3. DESCRIPTION OF SOFTWARE 23-30
DEPT OF ECE,RGMCET Page 1 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER -4
4. PROJECT METHODOLOGY 31-36
4.1 Hardware Connection Diagram 31
4.2 Operation of Circuit Diagram 32
4.3 Coding 33-35
4.4 Advantages 36
4.5 Applications 36
CHAPTER -5
5. CONCLUSION AND FUTURE SCOPE 37
5.1 Conclusion 37
5.2 Future Scope 37
REFERENCES 38
DEPT OF ECE,RGMCET Page 2 of 38
IoT framework for monitoring the condition of the Roads
LIST OF FIGURES
Figure Name Page No
1.2.1 Block Diagram 6
2.1.1 Pin Diagram of Arduino R3 9
2.2.1 Piezoelectric Accelerometer 12
2.2.2 Piezoelectric Gyroscope 13
2.2 .3 Pinout of MPU6050 13
2.3.1 GPS 16
2.4.1 GSM SIM800L 19
2.5.1 Battery 20
2.6.1 Bread Board 21
2.7.1 Connecting Wires 22
3.1.1 Launching Arduino 26
3.1.2 Create New Project 27
3.1.3 Selection of Arduino Uno 27
3.1.4 Selection of ATmega328p 28
3.1.5 Selection of Serial Port 29
3.1.6 Uploading the Program 29
DEPT OF ECE,RGMCET Page 3 of 38
IoT framework for monitoring the condition of the Roads
4.1.1 Hardware Circuit Connection 31
LIST OF TABLES
Table Name Page No
2.1.2 Specifications of Arduino Uno R3 10
2.2.4 Pin Description of MPU6050 14
2.4.1 Pin Description of GSM Modem 18
DEPT OF ECE,RGMCET Page 4 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER -1
INTRODUCTION
1.1 Introduction
India is a fastest developing country after China. Although India is
doing exceptionally well in certain field, they majorly lack in road ways.
Roads are the dominant means of transportation in India today. However
roads here are narrow and congested with poor quality and is not maintained
properly. This road condition is a boosting factor for traffic congestion and
number of road accidents. To overcome this pathetic condition many
technologies have been implemented and integrated with road safety.
IoT is an ever-growing network of physical objects that feature an IP
address for internet connectivity. Main enabling factor of this promising
paradigm is the communications solutions. The concept is basically
connecting any device with an on and off switch. Accordingly to the analyst
firm at Gartner there will be over 26 billion connected devices by 2020. The
IoT is considered as a gaint network of connected “things” (which also include
people).
Information gathering is the first step in IoT. Then the information sensed
are transferred to the next level of processing. For this they either require Wi-
Fi or WAN for communication.
Sensor is a device used for detecting and measuring of physical property
DEPT OF ECE,RGMCET Page 5 of 38
IoT framework for monitoring the condition of the Roads
and records, indicates or otherwise response to it. In simple words they are
used to detect events or changes in environment and send it to a controller.
GSM module sends the location of the uneven road detected by the sensors
using GPS module to the respective authorities.
DEPT OF ECE,RGMCET Page 6 of 38
IoT framework for monitoring the condition of the Roads
1.1 Block Diagram
Vibrations
MPU 6050 Arduino
Sensor GSM
Uno
Mobile
GPS
Fig 1.2.1 Block Diagram
DEPT OF ECE,RGMCET Page 7 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER-2
DESCRIPTION OF HARDWARE COMPONENTS
2.1 Arduini UNO R3
Arduino Uno is a microcontroller board based on the
ATmega328P. It has 14 digital input/output pins (of which 6 can be
used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator(CSTCE16M0V53-R0), a USB connection, a power jack, an
ICSP header and a reset button. It contains everything needed to
support the microcontroller; simply connect it to a computer with a
USB cable or power it with a AC-to-DC adapter or battery to get
started.
"Uno" means one in Italian and was chosen to mark the release
of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of
Arduino Software (IDE) were the reference versions of Arduino, now
evolved to newer releases. The Uno board is the first in a series of USB
Arduino boards, and the reference model for the Arduino platform; for
an extensive list of current, past or outdated boards see the Arduino
index of boards.
Pin Specifications of Arduino Uno
The pin configuration of the Arduino Uno is shown below. It
comprises of eight pins where the function of each pin is discussed
DEPT OF ECE,RGMCET Page 7 of 38
IoT framework for monitoring the condition of the Roads
below.
Vin: This is the input voltage pin of the Arduino board used to provide
input supply from an external power source.
5V: This pin of the Arduino board is used as a regulated power supply
voltage and it is used to give supply to the board as well as on board
components.
3.3V: This pin of the board is used to provide a supply of 3.3V which is
generated from a voltage regulator on the board.
GND: This pin of the board is used to ground the Arduino board.
Reset: This pin of the board is used to reset the microcontroller. It is
used to Resets the microcontroller.
Analog Pins: The pins A0 to A5 are used as an analog input and it is
in the range of 0-5V.
Digital Pins: The pins 0 to 13 are used as a digital input or output for
the Arduino board.
Serial Pins: These pins are also known as a UART pin. It is used
for communication between the Arduino board and a computer or
other devices. The transmitter pin number 1 and receiver pin
number 0 is used to transmit and receive the data resp.
DEPT OF ECE,RGMCET Page 8 of 38
IoT framework for monitoring the condition of the Roads
External Interrupt Pins: This pin of the Arduino board is used to
produce the External interrupt and it is done by pin numbers 2 and 3.
PWM Pins: This pins of the board is used to convert the digital
signal into an analog by varying the width of the Pulse. The pin
numbers 3,
5, 6, 9, 10 and 11 are used as a PWM pin.
LED Pin: The board has an inbuilt LED using digital pin-13. The
LED glows only when the digital pin becomes high.
AREF Pin: This is an analog reference pin of the Arduino board. It
is used to provide a reference voltage from an external power
supply.
DEPT OF ECE,RGMCET Page 9 of 38
IoT framework for monitoring the condition of the Roads
Fig 2.1.1 Pin Diagram of Arduino Uno R3
DEPT OF ECE,RGMCET Page 10 of
38
IoT framework for monitoring the condition of the Roads
Specifications of Arduino UNO R3
Table 2.1.2 : Specifications of Arduino UNO R3
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide
PWM output)
PWM Pins 6( Pin 3, 5, 6, 9, 10, and 11)
Analog Input Pins 6
Communication protocol UART x 1, SPI x 1, I2C x 1
DC Current per I/O Pin 20 mA
ICSP Header 2
32 KB (ATmega328P) of which
Flash Memory
0.5 KB used by the bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
LED_BUILTIN 13
Power Sources Power Jack, USB port, Vin pin
Length 68.6 mm
DEPT OF ECE,RGMCET Page 10 of 38
IoT framework for monitoring the condition of the Roads
Width 53.4 mm
Weight 25 g
DC Current for 3.3V Pin 50 mA
DEPT OF ECE,RGMCET Page 11 of 38
IoT framework for monitoring the condition of the Roads
Arduino Uno R3 Applications
1) Arduino Uno is used in Do-it-Yourself projects prototyping.
2) In developing projects based on code-based control
3) Development of Automation System
4) Designing of basic circuit designs.
5) Weighing Machines.
6) Traffic Light Count Down Timer.
7) Parking Lot Counter.
8) Embedded systems.
9) Home Automation.
10) Industrial Automation.
11) Medical Instrument.
12) Emergency Light for Railways.
2.2 MPU 6050
MPU 6050 is a 6 DOF (Degrees of Freedom) or a six axis
IMU sensor, which means that it gives six values as output. Three
values from the accelerometer and three from the gyroscope. The
MPU 6050 is a sensor based on MEMS (Micro Electro Mechanical
Systems) technology. Both the accelerometer and the gyroscope is
embedded inside a single chip. This chip uses I2C (Inter Integrated
Circuit) protocol for communication.
DEPT OF ECE,RGMCET Page 12 of 38
IoT framework for monitoring the condition of the Roads
Working Principle of MPU6050
Working Principle of Accelerometer
2.2.1 Piezo Electric Accelerometer
An accelerometer works on the principle of piezo electric effect.
Here, imagine a cuboidal box, having a small ball inside it, like in the
picture above. The walls of this box are made with piezo electric
crystals. Whenever you tilt the box, the ball is forced to move in the
direction of the inclination, due to gravity. The wall with which the
ball collides, creates tiny piezo electric currents. There are totally,
three pairs of opposite walls in a cuboid. Each pair corresponds to an
axis in 3D space: X, Y and Z axes. Depending on the current produced
DEPT OF ECE,RGMCET Page 12 of 38
IoT framework for monitoring the condition of the Roads
from the piezo electric walls, we can determine the direction of
inclination and its magnitude.
DEPT OF ECE,RGMCET Page 13 of 38
IoT framework for monitoring the condition of the Roads
Working Principle of Gyroscope
2.2.2 Piezo Electric Gyroscope
Gyroscopes work on the principle of Coriolis acceleration.
Imagine that there is a fork like structure, that is in constant back
and forth motion. It is held in place using piezo electric crystals.
Whenever, you try to tilt this arrangement, the crystals experience
a force in the direction of inclination. This is caused as a result of
the inertia of the moving fork. The crystals thus produce a current
in consensus with the piezo electric effect, and this current is
amplified. The values are then refined by the host microcontroller.
Pin Specifications of MPU 6050
DEPT OF ECE,RGMCET Page 13 of 38
IoT framework for monitoring the condition of the Roads
Fig 2.2.3 Pinout of MPU6050
DEPT OF ECE,RGMCET Page 14 of 38
IoT framework for monitoring the condition of the Roads
Table 2.2.4: Pinout of MPU6050
Pin Pin name Descriprtion
01 Vcc This pin is used for Supply
Voltage. Its input Voltage is +3 to
+5V
02 GND This pin is used for Ground
03 SCL This pin is used for clock pulse
for I2C communication
04 SDA This pin is used for transferring
data through I2C
communication
05 Auxiliar It can be used for other interfaced
y Serial other I2C modules with MPU6050
Data(XDA)
06 Auxiliar It can also be used for other
y Serial interfaced other I2C modules
Clock(XCL) with
MPU6050
07 AD0 If more than one MPU6050 is
used in a single MCU, then this
pin can be used to vary address
08 Interrupt(int) This pin is used to indicate
that data is available for
MCU to read
DEPT OF ECE,RGMCET Page 15 of 38
IoT framework for monitoring the condition of the Roads
MPU6050 Features
MEMS 3-aixs accelerometer and 3-axis gyroscope values
combined
Power Supply: 3-5V
Communication : I2C protocol
Built-in 16-bit ADC provides high accuracy
Built-in DMP provides high computational power
Can be used to interface with other IIC devices like
magnetometer
Configurable IIC Address
In-built Temperature sensor
2.3 GPS
The Global Positioning System (GPS) is the most widely used
satellite navigation system around the world. It is one of the Global
Navigation Satellite Systems (GNSS) that provides geolocation, time,
and velocity information. GPS is operational since 1978 and globally
available since 1994. The latest GPS receivers provide geolocation
with an accuracy of 30 centimeters. The GPS system is owned by the
United States government and is maintained by the United States
DEPT OF ECE,RGMCET Page 16 of 38
IoT framework for monitoring the condition of the Roads
Space Force.
DEPT OF ECE,RGMCET Page 17 of 38
IoT framework for monitoring the condition of the Roads
Fig 2.3.1 GPS
Uses Of GPS
GPS is a powerful and dependable tool for businesses and
organizations in many different industries. Surveyors,
scientists, pilots, boat captains, first responders, and
workers in mining and agriculture, are just some of the
people who use GPS on a daily basis for work. They use GPS
information for preparing accurate surveys and maps, taking
precise time measurements, tracking position or location,
and for navigation. GPS works at all times and in almost all
weather conditions.
There are five main uses of GPS :
1. Location — Determining a position.
DEPT OF ECE,RGMCET Page 16 of 38
IoT framework for monitoring the condition of the Roads
2. Navigation — Getting from one location to another.
3. Tracking — Monitoring object or personal movement.
4. Mapping — Creating maps of the world.
5. Timing — Making it possible to take precise time
measurements.
2.4 GSM MODEM
The Global System for Mobile Communications
(GSM) is a standard developed by the European
Telecommunications Standards Institute (ETSI) to describe
the protocols for second-generation (2G) digital cellular
networks used by mobile devices such as mobile phones
and tablets.
A GSM/GPRS modem is a class of wireless modem,
designed for communication over the GSM and GPRS
network. It requires a SIM (Subscriber Identity Module) card
just like mobile phones to activate communication with the
network. Also, they have IMEI (International Mobile
Equipment Identity) number similar to mobile phones for
their identification.
1. The MODEM needed AT Commands, for interacting with processor
or controller, which are communicated through serial communication.
2. These commands are sent by the controller/processor.
3. The MODEM sends back a result after it receives a command.
DEPT OF ECE,RGMCET Page 17 of 38
IoT framework for monitoring the condition of the Roads
4. Different AT commands supported by the MODEM can be sent by
the processor/controller/computer to interact with the GSM and
GPRS cellular network.
Table 2.4.1 Pin specification Of GSM Modem
Pin Name Pin Description
NET Helical Antenna interface
VCC Power supply(3.4v - 4.4v)
Hard RESET pin, pull this pin low for 100ms to perform
RST a hard reset.
Serial Communication – Data Receiving pin
Serial Communication – Data Transmitting pin
GND GND connection
SPK- Differential Speaker Positive Terminal
SPK+ Differential Speaker Negative Terminal
MIC- Differential microphone Negative pin
MIC+ Differential microphone Positive pin
Pin activates/deactivates sleep mode. Pulling it
HIGH will put the module in sleep mode, disabling
DTR serial communication. Pulling it LOW will wake the
module up
DEPT OF ECE,RGMCET Page 18 of 38
IoT framework for monitoring the condition of the Roads
RING The pin acts as a Ring Indicator.
Fig 2.4.1 GSM SIM800L
Applications of GSM Modem
1. Communicate with long distance
2. IOT Embedded firmware design
3. Load control using GSM
4. GSM-based mobile phone design
Advantages Of GSM Modem
DEPT OF ECE,RGMCET Page 19 of 38
IoT framework for monitoring the condition of the Roads
1. SIM800L is small in size and it supports Micro SIM card
2. Sim800L module supports quad-band GSM/GPRS network
DEPT OF ECE,RGMCET Page 20 of 38
IoT framework for monitoring the condition of the Roads
2.5 BATTERY
The nine-volt battery, or 9-volt battery, is a common
size of battery that was introduced for the early transistor
radios. It has a rectangular prism shape with rounded edges
and a polarized snap connector at the top. This type is
commonly used in walkie talkies, clocks and smoke
detectors. Most nine- volt alkaline batteries are constructed
of six individual 1.5 V LR61 cells enclosed in wrapper. These
cells are slightly smaller than LR8D425 AAAA cells and can
be used in their place for some devices, even though they are
3.5mm shorter. Carbon-zinc types are made with six flat
cells in a stack, enclosed in a moisture-resistant wrapper to
prevent drying. Primary lithium types are made with three
cells in series. 9-volt battery accounted for 4% of alkaline
primary battery sales in the United States in 2007, and 2% of
primary battery sales and 2% of secondary battery sales in
Switzerland in 2008.
2.5.1 Battery
DEPT OF ECE,RGMCET Page 21 of 38
IoT framework for monitoring the condition of the Roads
2.6 BREAD BOARD
A breadboard is a solderless device for temporary
prototype with electronics and test circuit designs. A printed
circuit board (PCB) mechanically supports and electrically
connects electrical or electronic components using
conductive tracks, pads and other features etched from one
or more sheet layers of copper laminated onto and/ or
between sheet layers of a non- conductive substrate.
Components are generally soldered on to the PCB tooth
electrically connect and mechanically fasten them to it.
Fig 2.6.1 Bread Board
2.7 Connecting Wires
Jumper wires are simply wires that have connector
pins at each end, allowing them to be used to connect two
points to each other without soldering. Jumper wires are
typically used with breadboards and other prototyping tools
in order to make it easy to change a circuit as needed. In
DEPT OF ECE,RGMCET Page 22 of 38
IoT framework for monitoring the condition of the Roads
fact, it doesn’t get much more basic than jumper wires.
Connecting wires allows an electrical current to travel from
one point on a circuit to another, because electricity needs a
medium through which to move. In the case of computers,
wires are
DEPT OF ECE,RGMCET Page 23 of 38
IoT framework for monitoring the condition of the Roads
embedded into circuit boards, carrying pulses of
electricity that are interpreted as binary signals of zeros and
ones. Most wires in computers and electronic components
are made of copper or aluminum. Copper is cheap and
electrically conductive. Silver has higher conductivity but is
far more expensive.
Fig 2.7.1 Connecting Wires
DEPT OF ECE,RGMCET Page 24 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER-3
SOFTWARE DECSRIPTION
3.1 ARDUINO SOFTWARE(IDE)
The Arduino Integrated Development Environment – or
Arduino Software (IDE) - contains a text editor for writing code,
a message area, a text console, a toolbar with buttons for
common functions and a series of menus. It connects to the
Arduino and Genuino hardware to upload programs and
communicate with them.
Programs written using Arduino Software (IDE) are called
sketches. These sketches are written in the text editor and are
saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message
area gives feedback while saving and exporting and also
displays errors. The console displays text output by the Arduino
Software (IDE), including complete error messages and other
information. The bottom righthand corner of the window
displays the configured board and serial port. The toolbar
buttons allow you to verify and upload programs, create, open,
and save sketches, and open the serial monitor.
DEPT OF ECE,RGMCET Page 25 of 38
IoT framework for monitoring the condition of the Roads
FILE IN ARDUINO SOFTWARE:
New
Creates a new instance of the editor, with the bare minimum structure of a
sketch already in place.
Open
Allows to load a sketch file browsing through the computer
drives and folders.
Open Recent
Provides a short list of the most recent sketches, ready to be
opened.
Sketchbook
Shows the current sketches within the sketchbook folder
structure; clicking on any name opens the corresponding
sketch in a new editor instance.
Examples
Any example provided by the Arduino Software (IDE) or library
shows up in this menu item. All the examples are structured
in a tree that allows easy access by topic or library.
Close
Closes the instance of the Arduino Software from which it is
clicked.
Save
Saves the sketch with the current name. If the file hasn't been
named before, a name will be provided in a "Save as.." window. Save
As...
Allows to save the current sketch with a different name.
DEPT OF ECE,RGMCET Page 24 of 38
IoT framework for monitoring the condition of the Roads
Page Setup
It shows the Page Setup window for printing.
Print
Sends the current sketch to the printer according to the
settings defined in Page Setup.
Preferences
Opens the Preferences window where some settings of the IDE
may be customized, as the language of the IDE interface.
Quit
Closes all IDE windows. The same sketches open when Quit
was chosen will be automatically reopened the next time you
start the IDE.
Open source and extensible hardware:
The plans of Arduino boards published under a creative common
license, so experienced circuit designers can make their own version
of the module, extending it and improving it.
Open source and extensible software:
The Arduino software is published as open source tool and the
language can be expanded through C++ libraries
Steps for using Arduino IDE:
Step 1: Get an Arduino board and a USB cable Step
Download Arduino IDE software
Get the latest version from the download page. When the
DEPT OF ECE,RGMCET Page 25 of 38
IoT framework for monitoring the condition of the Roads
download page finishes, unzip the downloaded file. Make sure
to preserve the folder structure. Double-click the folder to open
it. There should be a few files and sub- folders inside.
Step 3: Power up the board
The Arduino Uno, Mega, Duemilanove and Arduino Nano
automatically draw power from either, the USB connection to
the computer or an external power supply. If you are using an
Arduino Diecimila, you have to make sure that the board is
configured to draw power from the USB connection. The power
source is selected with a jumper, a small piece of plastic that
fits onto two of the three pins between the USB and power jacks.
Check that it is on the two pins closest to the USB port.
Connect the Arduino board to your computer using the USB cable.
The green power LED (labelled PWR) should glow.download page
finishes, unzip the downloaded file. Make sure to preserve the
folder structure. Double-click the folder to open it.
Step 4: Launch Arduino IDE
Fig 3.1.1: Launching Arduino
DEPT OF ECE,RGMCET Page 26 of 38
IoT framework for monitoring the condition of the Roads
After your Arduino IDE software is downloaded, you need
to unzip the folder. Inside the folder, you can find the application
icon with an infinity label (application.exe). Double-click the icon
to start the IDE.
Step 5: Create a new project to write the code
DEPT OF ECE,RGMCET Page 27 of 38
IoT framework for monitoring the condition of the Roads
Fig 3.1.2: Create New project
Step 6: Select of Arduino board
Fig 3.1.3: a) Selection of Arduino UNO
DEPT OF ECE,RGMCET Page 28 of 38
IoT framework for monitoring the condition of the Roads
Fig 3.1.4: b) Selection of ATmega328p(Old bootloader)
Step 7: Selection of Serial port
Select the serial device of the Arduino board. Go to Tools →
Serial Port menu. This is likely to be COM5 or higher. To find out, you
can disconnect your Arduino board and re-open the menu, the entry
that disappears should be of the Arduino board. Reconnect the board
and select that serial port.
DEPT OF ECE,RGMCET Page 29 of 38
IoT framework for monitoring the condition of the Roads
Fig 3.1.5: Selection of Serial port
Step 8: Upload the program to board
Before explaining how we can upload our program to the board,
we must demonstrate the function of each symbol appearing in
the Arduino IDE toolbar.
DEPT OF ECE,RGMCET Page 30 of 38
IoT framework for monitoring the condition of the Roads
Fig 3.1.6: Uploading the program
DEPT OF ECE,RGMCET Page 31 of 38
IoT framework for monitoring the condition of the Roads
A − Used to check if there is any compilation
error. B − Used to upload a program to the
Arduino board. C − Shortcut used to create a
new sketch.
D − Used to directly open one of the example sketch.
E − Used to save your sketch.
F − Serial monitor used to receive serial data from the board
and send the serial data to the board.
To upload the code into Arduino compile the code first, if there is
no errors click the upload button. Wait a few seconds; if the
upload is successful, the message “Done uploading” will appear
in the status bar and the LED on the board will blink for the
second.
DEPT OF ECE,RGMCET Page 32 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER -4
PROJECT METHODOLOGY
4.1 Hardware Connection Diagram
Fig 4.1.1 Hardware circuit connections
DEPT OF ECE,RGMCET Page 33 of 38
IoT framework for monitoring the condition of the Roads
4.2 Operation of Circuit Diagram
DEPT OF ECE,RGMCET Page 34 of 38
IoT framework for monitoring the condition of the Roads
4.3 Coding
#include<TinyGPS.h>
#include<SoftwareSerial.h>
#include<MPU6050_tockn.>
#include <Wire.h>
MPU6050 mpu6050(Wire);
SoftwareSerial Gsm(7, 8);
Char phone_no[]=”6303776381”;
TinyGPS gps;
void setup()
{
Float c;
Serial.begi(9600);
Gsm.begin(9600);
delay(100);
Wire.begin();
mpu6050.begin();
}
void loop()
{
bool newData=false;
unsigned long chars;
unsigned short sentences, failed;
mpu6050.update();
Serial.print("accAngleX:");
Serial.print(mpu6050.getAccAngleX());
DEPT OF ECE,RGMCET Page 33 of 38
IoT framework for monitoring the condition of the Roads
c=mpu6050.getAccAngleX();
for (unsigned long start = millis(); millis()-start<1000;)
{
while(Serial.available())
{
char c=Serial.read();
Serial.print(c);
if(gps.encode(c)){
if(c>15 || c<-6)
{
newData=true;
}
if(newData)
{
float flat, flon;
unsigned long age;
gps.f_get_position(&flat, &flon, &age);
Gsm.print("AT+CMGF=1\r");
delay(400);
Gsm.print("AT+CMGS=\"");
Gsm.print(phone_no);
Gsm.println("\""); delay(300);
Gsm.print("http://maps.google.com/maps?q=loc:");
Gsm.print(flat==TinyGPS::GPS_INVALID_F_ANGLE?0.0:flat,6);
DEPT OF ECE,RGMCET Page 34 of 38
IoT framework for monitoring the condition of the Roads
Serial.print(","); Gsm.print(flon==TinyGPS::GPS_INVALID_F_ANGLE?
0.0:flon,6); Gsm.print("longitude is");
Gsm.print(flon); Gsm.print("latitude is");
Gsm.print(flat);
Serial.println("latitude and longitudeare:");
Serial.print(flon);
Serial.println(flat);
delay(200);
Gsm.println((char)26);
delay(200);
Gsm.println();
delay(5000);
Serial.println(failed);
DEPT OF ECE,RGMCET Page 35 of 38
IoT framework for monitoring the condition of the Roads
4.4 Advantages
1. It is helpful in finding the abnormalities on the road surface.
2. It is cost efficient system and easy to implement.
3. Because of usage of MPU 6050 sensor the accuracy of the system
will increase when compared to other vibration sensor systems.
4. It is portable.
5. No violation charges will be applied.
4.5 Applications
1. Can be mass implemented on the government vehicles or at an
attractive subsidized scheme on private vehicles.
2. Can also be used as accident detection system system with small
modifications.
DEPT OF ECE,RGMCET Page 36 of 38
IoT framework for monitoring the condition of the Roads
CHAPTER -5
CONCLUSION AND FUTURESCOPE
5.1 Conclusion
In fast developing countries like India roads are the major source of
Transport. The key to road surface condition monitoring is to
detect road surface irregularities, cracks, and bumps, which
affect driving comfort and on-road safety. In this regard we build
a system which detects any abnormality on the road surface due
to hump or potholes and it immediately sends that information
to the authorized department so that it may take required
measures to solve the probl2m and reduce the risk of accidents.
DEPT OF ECE,RGMCET Page 37 of 38
IoT framework for monitoring the condition of the Roads
5.2 Future Scope
Implementation of cameras or Laser technology can boost the
accuracy of the data collection with their own drawback of complexity and
more costly. By looking at the data on road accidents, technological
developments should be promoted for effective and innovative solutions.
DEPT OF ECE,RGMCET Page 38 of 38
IoT framework for monitoring the condition of the Roads
REFERENCES
[1] Pothole Detection System Based On Iot (researchgate.net)
[2] “Pothole Detection System for Monitoring Road Using IoT” (ijaerd.com)
[3] MPU6050 Module Pinout, Configuration, Features, Arduino Interfacing &
Datasheet (components101.com)
[4] Interface GSM Module to Arduino - Send and Receive SMS
(circuitstoday.com)
[5] How to Interface GPS Module (NEO-7m) with Arduino - Arduino Project
Hub
[6] Video Youtube URL:
1.https://www.youtube.com/watch?v=nUcrrCJd1sY
2.https://www.youtube.com/watch?v=XwCtzGK9bmE
DEPT OF ECE,RGMCET Page 39 of 38