Bridge Health Monitoring System using IoT
Tags: octograd2020, iot, python, pwa
Published: 2020-05-22 13:31:26

In this post, I'll be describing about the **Undergraduate Capstone Project** that I created along with my teammates Viraj @virajvshetty and Parth @parthketandoshi.

Infrastructures are subjected to constant corrosion making them vulnerable to degradation. 
Of all different types of structures, bridges are the most vulnerable as they are exposed to various natural factors and if the corrosion is not checked, it can lead to loss of Human Life and property.
An IoT based Structural Health Monitoring System can allow us to collect real-time information about different parameters from the bridge and prevent a disaster from happening.

# Hardware Module using Arduino
### Description
Bridges undergo numerous levels of vibrations as cars and pedestrians travel over the bridge. These vibrations over time deteriorate the integrity of a bridge. The number of vibrations and their intensity should be kept within limits and monitored to prevent the degradation of the bridge. Bridges and its girders also bend overtime. This also needs to be monitored. Thus we have developed a hardware module which uses sensors to gather this data from the bridge and relays it to the Arduino Uno.
The hardware module consists of various components. These include Arduino Uno which is a micro controller, Node MCU which is used as a WiFi module, an accelerometer sensor, a flex sensor and a camera module. The purpose of the sensors is to gather real time data and deliver it to the microcontroller where it can be processed and then sent to the Wi-Fi module. This data can then be uploaded to the firebase.
![Hardware Module](https://dev-to-uploads.s3.amazonaws.com/i/nb4jhjf74zj8h0hafad9.jpg)
### Description of the Application
The accelerometer sensor is connected to the analog pins of the Arduino Uno. Whenever there is a movement in any direction of the accelerometer, the sensor values change. The accelerometer requires five analog pins in which three pins are used for sending the data of the X, Y and Z axis and among the remaining two, one is connected to VCC and the other is connected to GND.  The Arduino is programmed to take readings from the accelerometer at specific intervals of time. The change in the values show the intensity of vibrations incident on the bridge. The values of the X, Y and the Z axis transferred to the Arduino. The values are then transferred from the Arduino to the NodeMCU.
The flex sensor measures the bend of a surface. This sensor can be attached to the bottom surface of the bridge. The flex sensor works on the principle of resistance. When the sensor is bent, the resistance of the sensor element changes. Taking into account the resistance at 0-degree bend and 90 degrees bend, the angle of deflection is calculated. 
Both the Arduino and Node MCU have to be explicitly programmed. We have performed serial communication between the Arduino Uno and the Node MCU.
Whenever the values from the accelerometer and flex sensor cross a threshold, the Arduino sends those data values to the Node MCU. The Node MCU is capable of wireless connection to the network so it is connected to the firebase. The node MCU will take the data received from the Arduino and send it to the firebase.

### End Result
The accelerometer data of the X, Y and Z axis, the resistance of the flex sensor and the bend angle is displayed as the output. This data is sent to the Node MCU which pushes the data to the firebase over WiFi. A particular threshold can be set and the data can be pushed as output when it crosses the threshold.
![Result](https://dev-to-uploads.s3.amazonaws.com/i/s4k8jp29kg85sjzbe7fl.png)

### Future Scope
-Incorporating robotics to make the module movable.
-Using more powerful hardware such as Raspberry Pi instead of having to use Arduino and NodeMCU both.

###Audio Analysis using Python
{%link https://dev.to/virajvshetty/bridge-health-monitoring-system-using-iot-2cfc %}
###Image Analysis using Python
{%link https://dev.to/parthketandoshi/bridge-health-monitoring-system-using-iot-3ppc %}