IoT Based Displacement Detection Using Wireless Sensor System

. The main objective of this work is to monitor the base position of evenly or unevenly distributed containers by analyzing and establishing a reference point for the object. The displacement of the container is measured with the help of ultrasonic sensors each connected to nodemcu. Using nodemcu, sensor values are sent wirelessly to microcontroller that is specifically designed for IoT applications. Microcontroller will then compare the received sensor values with reference values. If there is any displacement of the container, warning is given to truck driver by buzzer and SMS, E-mail is sent to intended recipient .


Introduction
Trade is vital to the success of a civilization. The original form of trade was barter, but as the world progressed so did the form and ways of trading and shipping. In present day most of the bulk shipping happens via ships or trucks. Our aim is to monitor various containers that are shipped across the globe via road using trucks. This specific case is taken because the constructions of flat beds are low cost than other kinds of trailers. Strapping loads down is easy and oversize loads can be carried with ease. The trucks have certain disadvantages associated with it, a truck carrying a heavy container on it has a chance of meeting with accidents in case the driver is driving across sharp bends or curves where the weight of the container concentrates towards one side and brings down the entire truck. There are various situations wherein the container slips from the trailer and is damaged. So the objective is to design a set-up that will monitor the position of the container on the trailer through out its journey so as to ensure that the container reaches its destination safely. The work proposed in this paper is an extension of the work published by Bajarangbali et al. [1].

General Description
The objective of the work proposed in this paper is to monitor various containers that are shipped across the globe via road using trucks. There are various situations wherein the container slips from the trailer and is damaged. This set-up will monitor the position of the container on the trailer throughout its journey so as to ensure that the container reaches its destination safely. In-order to monitor the position of the container the displacement sensors have been placed at the appropriate locations. The displacement of the container is measured with the help of these sensors. The readings from these sensors are then given to a micro-controller that is specifically designed for IoT applications to send the data to intended recipient. •There are various situations wherein the container slips from the trailer and is damaged. •This prototype is used to monitor the position of the container on the trailer throughout its journey so as to ensure that the container reaches its destination safely.

IoT And It's Role In This work
The Internet of Things is nothing but a network of physical objects which are embedded along with electronic devices which are connected to internet for communication purpose such as data or information exchange. The objects can be controlled remotely with the help of IoT. IoT enables increased connectivity of objects and people.
The IoT vision is a massively instrumented world of intelligent sensors and actuators improving performance and efficiency. Streamlining, collapsing and creating system architectures which are more effective, affordable and responsive are done by IoT and also it eliminates the need for expensive and difficult to maintain middle-level automation software. The role of IoT in this project is to send the data to the client that is received on the server by the micro controller. There are various ways in which the data that is received by the server can be communicated to the client. Few such methods are, •Sending an email •Sending a text message •Sending a voice call But the method used to communicate the information to client in this work is using a text message. This text message is auto generated using IoT based applications which gets triggered when the cargo is displaced beyond tolerable limits.

Fig. 2.1. Block Diagram
•In this displacement sensors will be used to continuously monitor the position of the container under consideration. •Any movement or displacement of the object from its reference point has to be measured and analyzed. •For smart devices and sensors, each event is capable of creating data for further analysis. This information is sent over the network back to the intended recipient. This part is implemented using IoT.
A brief description of various devices used in this work is mentioned below:

A. HCSR-04 Ultrasonic Sensor
The Ultrasonic sensor used here is the HC-SR04 ultrasonic ranging sensor which provides 2cm to 400cm of non-contact measurement functionality. Also it has a ranging accuracy which can reach up to 3mm. This device consists of a receiver, an ultrasonic transmitter and a control circuit.

B. NodeMCU
NODEMCU is an open source platform used for IoT programming. This NODEMCU includes hardware based on the ESP -12 module and firmware operating on ESP8266 Wi -Fi system on chip (Soc). The NODEMCU term refers to the firmware more than the development kits.

C. LCD
LCD stands for Liquid Crystal Display. The LCD display used here is 16X2. Here information like cargo on the truck is safe or there is any displacement is displayed in a matrix of 5x7 or 5x8. With the help of this information appropriate action can be taken to avoid accidents.

D. Buzzer Interface
A buzzer or beeper is used to generate an audio signal. This device may be piezoelectric, mechanical or electromechanical. A Piezo buzzer has a Piezo disc and an oscillator inside. Any displacement of the cargo beyond the reference point is detected by the system which sends signal to this buzzer. This sound can be used as an alarm or warning which alerts the truck driver.

E. Energia
The software being used to code CC3200 is Energia, which is an open source community-driven integrated development environment (IDE) software framework. This software provides an intuitive coding environment as well as a robust framework of easy to use functional APIs and libraries for programming a particular microcontroller.

F. Blynk
It is a platform used for IoT devices with a drag-n-drop mobile application builder which helps to visualize sensor data used to control remotely placed electronics in short time. It is a used to control devices like Arduino, Raspberry Pi and Android apps over the Internet.
With the help of its digital dashboard a graphic interface can be built by simple drag and drop facility for different widgets. It can be noted that any specific shield or board is not tied to Blynk. Whether ESP8266 chip, Raspberry Pi or Arduino is linked to the Internet over Wi-Fi, Ethernet Blynk will be connected online and IoT will be ready.

G. IFTTT
It is short form of if this, then that, which is a free webbased service used to create chains of simple conditional statements, called applets. Whenever any changes occur within other web services like Telegram, Gmail, Instagram, or Pinterest an applet is triggered. This is used to receive short message service (SMS) and email messages on your device and send messages to other phone numbers.

H. Ultrasonic Sensor Interface
Here the sensor measures the difference time between sent and received waves to find the distance between the object and sensor. The ultrasonic sensor has 4pins which are Vcc, Ground, Trigger and Echo. Four ultrasonic sensors are used in this application.

I. LCD Interface
It uses liquid crystal to produce a visible image. The LCD display has eight digital pins out of which D4, D5, D6 and D7 pins are connected to the microcontroller digital pins with pin number p1.6, p1.7, p1.8 and p1.9. The logical low (0) on register select pin selects command register, and data register when it is logical high (1). This pin is interfaced with microcontroller at pin p1.4.

J. Buzzer Interface
The buzzer has two pins Vcc and Ground. Vcc is connected to pin number 19 of microcontroller. When the cargo/container is not in the safe zone the buzzer is made high and it beeps and when cargo/container is in safe zone the buzzer does not beep. The CC3200 Microcontroller is interfaced with Buzzer and LCD Display and it is connected to ultrasonic sensor and NODEMCU wirelessly. 3. Both displacement at the base and height are taken into consideration.

Fig. 3.2. Final Prototype Readings
From the results that were obtained on the hardware setup following details could be inferred, •Uses ultrasonic sensors for range measurements.
•Operates in soft real time (with few seconds delay). •This setup is valid for evenly and unevenly distributed loads (container). •Both horizontal and Vertical displacements are being measured to determine if the load (container) is safe of not.

Conclusion
This work is a set-up that is designed to measure any displacements that occurs during the safe shipping of load (container) on flatbed truck that could cause any casualties due to slipping of the container. The set-up was successfully designed and tested for evenly and unevenly distributed containers using a small prototype.
Even though this set-up was successfully tested using a small prototype, there are various aspects that could be considered for improving the work.
One can also experiment with various other displacement sensors for improved accuracy.
This concept can also be used to build a setup to monitor the alignment of railway tracks.