15.the Design and Implementation of GPS Controlled Environment Monitoring
15.the Design and Implementation of GPS Controlled Environment Monitoring
Abstract—Environmental monitoring systems are often Recently, robotic systems are utilized as data-gathering
designed to measure and log the current status of an tools by scientists for a greater understanding of
environment or to establish trends in environmental environmental processes [1]. Robots are also being designed
parameters. In this paper, We proposed an autonomous to explore areas with harmful gases, monitor climatic
robotic system that is designed and implemented to monitor conditions, and to study about a remote place that is quite
environmental parameters such as temperature, humidity, air risky for the human [2]. Keeping the above statement in the
quality, and harmful gas concentration. The robot has GPS forefront, the new trending wireless sensor and ARM-based
coordinates, and it can store data on the ThingSpeak IoT embedded system technology are getting integrated on a
platform. The mobile robot is controlled by a smartphone
single board, intended towards the advancement of this
which runs an app built on the Android platform. The whole
system is realized using a cost-effective ARM-based embedded
system. The core part of our designed system is based on the
system called Arduino and Raspberry Pi which communicates ARM (Acorn RISC Machine) which presents a high-cost
through a wireless network to the IoT platform, where data performance, code density, excellent period interrupt
are stored, processed and can be accessed using a computer or response and low electricity consuming with a small piece of
any smart device from anywhere. The system can update a silicon chip. Specifically, the ARM is an ideal option for
sensor data to IoT server every 15 seconds. The stored data can the embedded system that might assume additional
be used for further analysis of the reduction of pollution, save significant functions while other simple SCM (Single Chip
energy and provide an overall living environment Micyoco) cannot, as an instance, The Raspberry Pi 3 model
enhancement. The robotic system has designed for cost- B includes Broadcom BCM2837 64-bit ARMv8 Quad-Core
effective remote monitoring environmental parameters without Processor powered Single Board and Arduino. It also has
any human intervention to avoid health risk efficiently. A enough pins for GPIO and serial communication pin that can
proof-of-concept prototype has been developed to illustrate the be connected to the number of sensors. All those benefits
effectiveness of the proposed system. make ARM the most effective selection for completing the
system [3].
Keywords— ARM and Embedded system, Raspberry pi, In order to deploy a scalable and remote monitoring
Arduino, ThingSpeak, IoT, Air quality, Gas Sensor, GPS, system, an efficient platform that enables users to monitor
Android App, Remote Monitoring..
their daily exposure to air pollutants by giving air quality
information provided by various sensing infrastructure is
I. INTRODUCTION proposed. The sensors periodically monitor air quality. The
Environment monitoring is the collection of data and data can be monitored and accessed from anywhere using
information on environmental parameters. Monitoring and mobile phones or PC with Internet access. The
evaluating the health of our natural resources is also essential implementation has sensors for air quality, CO, CO2, and
for effective environmental planning, policymaking and temperature and humidity to monitor the environment around.
solving environmental pollution. For the extremely polluted The Raspberry Pi has been used to interact with the IoT
region, it carries the health risk for monitoring manually. To platform and sensors. The Arduino Mega microcontroller is
avoid these risks, remote monitoring techniques along with a used for control and navigation of the robot. The system has
robotic system that has intelligent data acquisition, been developed by python and embedded C programming
communication and processing are crucial in revolutionizing language. The robotic system with GPS controlled feature
monitoring and protection. For remote monitoring, enables to move according to user’s instruction
developing a system will be an efficient solution so that the autonomously and collects sensor data from targeted
monitoring can be done without any human intervention. locations. An Android app has been developed for the user-
friendly interface. All collected data is sent to the
ThingSpeak [4] IoT platform in order to be accessed by the
user from a wireless connection. Real-time cloud graphical 2. Navigation and Control System: The primary function
visualization is performed to analyze the collected data. This of this system is to navigate and control the movement of the
multipurpose robotic system is capable of remote monitoring robotic system according to the instruction from the app.
without any human intervention and keeping away
environmental hazard risks.
II. RELATED WORK
Existing environmental monitoring systems discussed in
this section, with a focus on environmental sensors, robotic
systems, as well as IoT, are also reviewed to clarify the
essence of this work.
A. Cyber-physical system for environmental monitoring
With recent advances in wireless sensor technology, low
power single-board computers, and short-range
communication technologies, remote sensing applications
have improved towards solutions that encompass ubiquitous Figure 1. The block diagram of proposed system design.
computing. A Cyber-Physical device was once proposed for
environmental monitoring of ambient stipulations in indoor The environment monitoring system utilizes the
spaces [5]. Raspberry Pi to communicate with three sensors such as the
DHT11, the MQ135, and MQ7 Gas sensor. The Raspberry Pi
B. Climate monitoring using Raspberry Pi collects sensor data from targeted locations and uploads data
Shete., R. and Agrawal S. [6] presents the framework for into the IoT platform which can be accessed directly by the
monitoring the metropolis environment. Low-cost Raspberry user. The robot is part of the Internet of Things because it
Pi used for implanting the system. However, no emphasis requires network connectivity through a GPRS module
has given on particulate matter which left the environment connected with raspberry pi, it uses sensors to collect
monitoring system incomplete. environmental parameters data, so the system needs
minimum human intervention. The robot navigation and
C. Cloud-based smart device control system consists of an Arduino mega microcontroller,
Biao Jiang and Christian F. Huacón developed a Cloud- GPS and Compass module, DC motor and robot chassis.
based Environment Monitoring Smart Device (CEMSD) [7] Arduino motor shield with L293D motor driver has been
that monitors different environmental parameters such as air used with Arduino to control the DC motor. The navigation
quality, noise, temperature, and humidity. The device system utilizes the Arduino to communicate with the GPS
collects and sends data from targeted measurement locations module and the compass to navigate and move in a fixed
through a wireless network or cellular network to a cloud path from the initial location to the destination. For accurate
server. navigation, We added an ultrasonic distance sensor so that it
D. Motivations of this Paper can avoid obstacles. An App has been developed to give the
instruction which communicates through the Bluetooth
The discussion mentioned above merely lists a few of the connection.
numerous options that have been proposed for remote
monitoring of environmental conditions, mainly using IV. HARDWARE COMPONENTS
wireless sensing methods, GPS, robotics, IoT-based
technologies. However, most of these solutions only address A. Raspberry Pi 3B:
data collection and data observation. In order to tackle the A Raspberry Pi 3B (RP) is an ARM-based single board
problem of remote environment monitoring with avoiding computer. It has Broadcom BCM2837 64bit ARM Cortex-
health risks, it is imperative that the system should collect A53 Quad Core Processor SoC running at 1.2GHz and 1GB
data via a self-sufficient robotic system and applicable RAM. It has 40 GPIO pins used for the general purpose [8].
observations transfer to a cloud server remotely. Additionally, it adds wireless LAN and Bluetooth
connectivity making it the ideal solution for powerfully
III. SYSTEM ARCHITECTURE
connected designs.
The proposed robotic system has designed incorporating
the embedded hardware, software, and IoT components. The B. Arduino Mega:
system architecture is shown in fig. 1 which illustrates the The Arduino Mega is a microcontroller board based on
block diagram of the IoT and ARM-based embedded robotic the ATmega2560 containing 54 digital input/output pins, 16
System. The whole robotic system has two parts: analog inputs, 4 UARTs (hardware serial ports).
1. Environment Monitoring System: This system is ATmega2560 is our choice as it is an easy option for use in
responsible for collecting data from the sensor and uploading prototyping with ease in robotics. [9].
collected data to the IoT platform.
94
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change
prior to final publication. Citation information: DOI 10.1109/LPT.2019.3007591, IEEE Photonics Technology Letters
95
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change
prior to final publication. Citation information: DOI 10.1109/LPT.2019.3007591, IEEE Photonics Technology Letters
TABLE I. MODULE’S PIN CONNECTIONS WITH ARDUINO At first, the system initializes libraries and modules of that is
Module Connection needed to run some built-in function. At the same time, the
HC-06 Bluetooth Module Tx to pin 18 and Rx to pin 19 system starts serial communications and I2C bus with
HMC5883L Compass SDA to pin 20 and SCL to pin 21 Bluetooth, Compass and GPS module. At first, the GPS
Neo 6M GPS Module Tx to pin 15 and Rx to Tx pin 14 module starts looking for and acquire at least four satellite to
HC SR-04 Distance Sensor Trig to pin 31 and Echo to pin 33 get a GPS coordinate. After receiving the current GPS
Servo and DC Motor Data line to pin 49 & M1 , M2 location, the system gets compass heading of the robot. After
that, the user can set the GPS coordinate as a waypoint that
TABLE II. MODULE’S PIN CONNECTIONS WITH RASPBERRY PI the robot will follow to move. The waypoints are stored in an
Module Connection array so that the program can use them to provide the robot
MQ-7 Analog out to pin A1 on ADS1015 with five locations of which a waypoint array declares, and a
MQ-135 Analog out to pin A0 on ADS1015 path is planned according to a series of waypoints. The app
SIM800L GPRS TXD to pin 10 & RXD to pin 9 can perform all of these steps. After setting the waypoint, we
ADS1015 SCL to pin 5(SCL1, I2C) have to press “done” for confirmation in the app. Next, the
DHT11 SDA to pin 3(SDA1, I2C) system waits for Bluetooth signal for checking the latest GPS
information, going through the waypoints or resetting the
VI. SOFTWARE DESIGN & PROGRAMMING stored waypoint. After receiving “go to waypoint” command
from the app, the robot begins moving directly to the first
A. Android App Development Tools
waypoint. During the movement to the destination, if it
MIT AppInventor is a visual, block-based development receives a “stop driving” command, it will freeze the robot
environment which does not require any prior programming immediately. Unless the stop signal is received the robot
knowledge. We choose MIT AppInventor as the android continues to update compass heading and GPS information
application development tool. MIT and Google jointly as well as moving towards the destination.
develop AppInventor [13], and it has gained popularity as a
learning tool and a way by which students can practice
creative innovations.
B. Embedding Code in Raspberry Pi
For the realization of the environment monitoring system
in software, the python code is used according to the
program flow of fig. 3 to program raspberry pi. The primary
function of the code is to collect sensor data and upload the
data to the IoT platform using API keys. At first, the system
initializes libraries and modules of that is needed to run some
built-in function. At the same time, we stored the API key as
a variable. Then I2C communication has been enabled so
that it can communicate with ADC pins to get analog value
from the sensor. After that, we have defined one function to
read ADC value. The ADC pin will read sensor data and Figure 4. Program flow of the embedded C code .
store that value in a variable. Another function has been
defined to upload sensor data using the API key variable to The robot keeps going until the distance to destination
the IoT platform. Finally, both functions are called in a loop equals zero. Moreover, the behavior control algorithm is
which repeats calling the function if the internet is available. employed to keep the robot on the right path for less than 15-
degree deviation. For the deviation of fewer than 15 degrees,
it prompts to avoid obstacles in less than 30 cm. On the
contrary, the deviation of more than 15 degrees it adjusts its
course or accurate pathfinding the shortest turn radius and
turns left or right. When so with no obstacles detected within
30 cm the robot goes forward towards the destination. When
obstacles found, again it finds the shortest turn radius and
turns left or right to reach the destination. Finally, when it
reaches a waypoint, the user is notified about the present
location and checks if this is the final waypoint. If it is not
Figure 3. Program flow of the sensors data collection and storage to the the final waypoint, the robot stops and start to move toward
IoT platform. the next waypoint. During this, all these procedures repeat
C. For Embedding Code in Arduino Mega 2560: until the final waypoint obtains. Finally, after reaching the
final waypoint, the robot completes its ride. Along with all
The Arduino mega is programmed with embedded C these things, there is also an option to clear the previous set
language in an integrated development environment (IDE).
In fig. 4, the program flow of the embedded C code is given.
96
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change
prior to final publication. Citation information: DOI 10.1109/LPT.2019.3007591, IEEE Photonics Technology Letters
waypoints to reset the robot and start the whole operation allows the user to control and navigate the robot easily. The
once again. GPS controlled feature allows it to travel autonomously to
the remote places and submits the collected data to the IoT
VII. RESULT server as well as displays it on the web for a high-level data
Fig. 5 shows the complete prototyping of IoT and ARM- analysis and processing. Graphical visualization evidence
based GPS controlled environment monitoring robot and shows that the robotic system works efficiently.
Navigation and Control app. The prototype can work Moreover, the key advantages of the system are The
effectively in remote places to collect data, alone or in teams. intuitive user interfaces in the App and Autonomous
The proposed system is quite cost-effective when compared movement after getting instruction from the user. Also, the
with other existing methods [14-16] that require more system is cost-effective, and the costs are less than 80 USD.
number of hardware accessories. Fig. 6 shows the robot is It updates sensor data to IoT server in every 15 seconds.
capable of collecting and uploading environmental data to Secured data in IoT platform and can be accessed from
the ThingSpeak, IoT platform server efficiently. The field anywhere of the world. Future work includes several features
updating time at channel takes a minimum of 15 seconds. including solar power, advanced communication solutions
The sensor data stored in the platform can be used for for rural areas. The system can be modified to detect
visualization and analysis of the environmental parameters. radiation and even other kinds of harmful gas autonomously
Fig. 6 is also showing the carbon monoxide and carbon to avoid human health risks. Also, the design method can
dioxide gas sensor data in ppm, temperature sensor data in also be applied in drone technology to make it even more
degree centigrade and humidity sensor data in percent dynamic.
relative humidity (%RH), respectively. ACKNOWLEDGMENT
Special thanks for the guidance to our supervisor
Associate Professor Jun Wang.
REFERENCES
[1] M. Trincavelli, M. Reggente, S. Coradeschi, A. Loutfi, H. Ishida and
A. J. Lilienthal, "Towards environmental monitoring with mobile
robots," 2008 IEEE/RSJ International Conference on Intelligent
Robots and Systems, Nice, 2008, pp. 2210-2215.
[2] M. Dunbabin and L. Marques, "Robotics for Environmental
Monitoring [From the Guest Editors]," in IEEE Robotics &
Automation Magazine, vol. 19, no. 1, pp. 20-23, March 2012.
[3] Liu, F.H.: Research and Implementation of WiFi Wireless
Communication Terminal Based on ARM. Wuhan University of
Figure 5. The complete prototype of IoT and ARM-based robotic system Science and Technology, China (2010).
(right and front views) and Navigation and Control app for the robot [4] The MathWorks, Inc, “Understand Your Things”
(right side). Internet:https://thingspeak.com/
[5] G. Mois, T. Sanislav and S. C. Folea, "A Cyber-Physical System for
Environmental Monitoring," in IEEE Transactions on Instrumentation
and Measurement, vol. 65, no. 6, pp. 1463-1471, June 2016.
[6] R. Shete and S. Agrawal, "IoT based urban climate monitoring using
sSignal Processing (ICCSP), Melmaruvathur, 2016, pp. 2008-2012.
[7] B. Jiang and C. F. Huacón, "Cloud-based smart device for
environment monitoring," 2017 IEEE Conference on Technologies
for Sustainability (SusTech), Phoenix, AZ, 2017, pp. 1-6.
[8] Grimmett, Richard. Raspberry Pi Robotic Projects. Third Edition,
Packt Publishing, 2016.
[9] M. Schmidt, 2011, “Arduino: a quick start guide”, The
PragmaticBookshelf, Raleigh, NC
Figure 6. Real-time graphical visualization of the environmental [10] A. Industries, "DHT11 basic temperature-humidity sensor + extras ID:
parameters. 386 - $5.00: Adafruit Industries, Unique & fun DIY electronics and
kits." Internet: https://www.adafruit.com/product/386, 2017.
VIII. CONCLUSION [11] A. Tapashetti, D. Vegiraju and T. Ogunfunmi, "IoT-enabled air
quality monitoring device: A low cost smart health solution," 2016
In this present work, design, and implementation of a IEEE Global Humanitarian Technology Conference (GHTC), Seattle,
GPS controlled robot for environmental parameters WA, 2016, pp. 682-685.
monitoring based on IoT and ARM have been accomplished. [12] R. Shantha Selva Kumari; C. Gayathri “Interfacing of MEMS motion
The developed ARM-based embedded system with the IoT sensor with FPGA using I2C protocol” 2017 International Conference
platform can monitor the environmental parameters, and the on Innovations in Information, Embedded and Communication
Systems (ICIIECS), Coimbatore,2017,pp.1-5.
measurement of air quality is compact and cost-effective.
The results obtained are found to be useful for monitoring [13] http://appinventor.mit.edu/explore/sites/all/files/Resources/Thesis_FI
NAL_AnshulBhagi.pdf
real-time environmental conditions. The developed App
97
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change
prior to final publication. Citation information: DOI 10.1109/LPT.2019.3007591, IEEE Photonics Technology Letters
[14] S. Zhi, Y. Wei, Z. Cao and C. Hou, "Intelligent controlling of indoor Communications and Trusted Computing, Wuhan, Hubei, 2009, pp.
air quality based on remote monitoring platform by considering 176-180.
building environment," 2017 4th International Conference on Systems [16] L. R. Adrian and D. Repole, "Intelligent autonomous environmental
and Informatics (ICSAI), Hangzhou, 2017, pp. 627-631. monitoring based on the AMBOA robot sensory system," 2017 IEEE
[15] WenJieTian and Y. Geng, "Environment Monitoring System of 58th International Scientific Conference on Power and Electrical
Household Security Robot Based on Wireless Mesh Network," 2009 Engineering of Riga Technical University (RTUCON), Riga, 2017,
International Conference on Networks Security, Wireless pp. 1-6
98