The development of a mobile monitoring system for agricultural object

The article studies the questions of system development for mobile control of data received through wireless networks. For practical implementation, the task has been chosen of control, visualization and saving measurable values received through Bluetooth connection in devices controlled by Android OS. The goal of using such a system may be remote control of temperature, pressure, and other measurable values.


Introduction
The task of remote control of temperature, pressure, and humidity is relevant for many industrial and laboratory applications, for example, in the field of thermal processing, in drying equipment, in the food industry, in tasks of maintenance of a micro-climate of premises for growing plants, etc. Conventional systems of remote monitoring are based on the use of wire systems and PC.Such systems have significant disadvantages: they are bulky, and inconvenient to service and reconfigure.Implementation of wireless technologies in this field enables one to refuse to be bound to a certain stationary work place, and to increase mobility thanks to the use of mobile and wearable devices in the control system as a human-computer interface tool, providing additional convenience for operating personnel and increasing its efficiency [1].

System architecture
To implement a designed system, it is necessary to select development tools.Based on the task and functions of the system being developed, the following tools can be identified, which are necessary for microclimate control system development:

Controller for data collection and processing
As the device for the primary collection of sensor readings, the most popular controller of the Arduino family is used -Arduino UNO, which continues the very first controller product line.The Arduino Uno controller can be used to create systems for receiving and processing signals from various digital and analogue sensors, and controlling various actuators.
The Arduino Uno controller can be used to create devices and systems for receiving and processing signals from various digital and analogue sensors that can be connected to it, and controlling various actuators [3] Fig. 2. System operation algorithm.

Wireless communication protocol and module
Bluetooth protocol is used as the technology for wireless communication between devices.This protocol uses a low power radio interface and was developed as a replacement for existing serial cable interfaces in consumer electronics and industrial applications [4].Bluetooth technology is a flexible and easy-to-use wireless solution.Operating in the same 2.4 GHz free ISM band (industrial, scientific and medical bands) as other wireless protocols, Bluetooth has optimal characteristics in terms of requirements for stability, reliability, and interaction with wireless LANs, specified by the industry [5].
Data transfer through Bluetooth between the controller and Android-based device is conducted with the help of a connectable external Bluetooth module HC-06 manufactured by Olimex.It is an open-frame monoboard module intended for surface mounting.The board provides support for the Bluetooth 2.0 EDR protocol stack at the hardware level.Built-in flash memory capacity for storing firmware and setup settings is 1 MB.Maximum signal range is 30 m [6]. Figure 1 shows the connection diagram of the Arduino controller with temperature sensor and Bluetooth module.

Mobile device
An Android-based smartphone is used as the mobile device for remote control of measurable parameters.This is a multi-level environment based on the Linux kernel with rich functionality.Android possesses a wide range of options for connectivity, covering Wi-Fi, Bluetooth and protocols of data transfer over a cellular network (GPRS, EDGE, 3G, 4G, etc.) [7].

Operation algorithm
The memory of the Bluetooth module includes a special program, which provides for the performance of all procedures for detection of Bluetooth devices and establishing a connection.This program starts immediately after the controller is turned on, and the module switches to connection standby mode.The Bluetooth connection is arranged according to the "client-server" principle [8].The Android application is a client that initiates a connection, requests data, and terminates a connection, and the application on the controller is the server that receives the client's commands and provides the data.Variation of values of measurable parameters is displayed on the smartphone in real time in the form of graphs.

Practical implementation
Practical implementation of the system consists of two programs: a program for the Arduino controller for data reading and processing and transfer of data received from temperature and pressure sensors, and a mobile application for processing, visualization in real time and storing of information received.The mobile application consists of two parts, of two classes.The first class implements a Bluetooth connection to the remote device, sending and receiving data.The second one implements the user interface and provides for building graphs of measurable values on the main screen of the application and their storage.Accumulated data can be saved in a file on the SD card of the mobile device in a text data format with the .txtextension.Figure 3 represents the application interface and received data recorded in a file.
For visualization of data received through Bluetooth, a GraphView external library is used.This is a library with open source code for building various graphs and diagrams in Android applications [9].A GraphView library enables visualization and updating of data, which change in real time, and the building of several graphs of various types simultaneously on one screen.

Conclusion
This article provides an example of creation of a mobile system for real time monitoring of environmental parameters, based on the use of an Android-based smartphone as a device for remote monitoring, a controller for collection and processing of data received from measuring devices, and Bluetooth wireless protocol for data transfer to the portable device.Practical implementation of a client-server application, operating

1 .
Sensor for temperature measurement 2. Controller for the collection and processing of measured data 3. Device for data transfer to the device for monitoring of readings 4. Client device for temperature monitoring, storage, and visualization of data 2.1 Temperature sensor DHT22 digital temperature and sensor manufactured by Adafruit Industries is used as a measuring device.The sensor consists of a capacitive humidity sensor, a thermistor and contains an ADC for converting analogue values of humidity and temperature.Determination of humidity -from 0 to 100% with 2% accuracy.Determination of temperature -from -40 to 120 °C with an accuracy of ±0.5°C.Sampling frequency -not exceeding 0.5 Hz (no more than 2 times per second) [2].

Fig. 1 .
Fig. 1.Connection diagram of the Arduino controller with DHT22 sensor and HC06 module.

Fig. 3 .
Fig. 3. Mobile application interface: a) visualization of data received through Bluetooth, buttons for control of the connection and recording of data in a file; b) the list of coupled devices ready for connection and data transfer; c) data received through Bluetooth and saved in a text file.