INTRODUCTION
Robotics in agriculture is a topic that has become relevant in the context of the digital revolution, whether it is called agriculture 4.0 (automation) or the new definition of agriculture named 5.0 (robotics and artificial intelligence), it is a dichotomy of merely theoretical discussion, but in practice, IoT technologies, BigData, augmented reality, machine learning, etc., are tools that are covering new terrains to transmute the forms of popular, mechanized or automated agriculture into the new formats of the robotization of the field.
Robotics contains a range of multiple formats from VANT’s or, better known as drones, to android-type robots that one day, not too far away, will be a tool of science fiction applied to our reality of technological evolution. Robots inspired by insect zoomorphology is one of the many strands of the types of application robots that are under development. Among them are robots of hexapod format, which are devices bio-inspired in insects, arachnids and others. Tripod, quadrupeds and hexapods robots are common, among whose advantages is the easy adaptation to complex terrains. Due to its anatomy, a hexapod robot can move in complex terrain thanks to the mechanical flexibility of its links that allow to maintain its center of mass at a stable equilibrium point. (Barrientos, 2002; Zabalza y Ros, 2007; Medina, 2016; Miret, 2016; Mercader, 2017; Rubio y Daniel, 2017; Alvarado et al., 2019; Pomba, 2019). On the other hand, the acquisition of data during the walk of these robots for the collection of information in a database is an essential task existing different ways to perform this activity, from the collection of records to be stored in memories in the creation of a history, to the sending in real time of the collection data with IoT tools (Thompson y Aguayo, 2009; Medina, 2016; Mickle, 2016; Miret, 2016; Cajal, 2018; Marlin P. Jones and Associates inc, 2018; Pomba, 2019).
Some systems inspired by the displacement of hexapod-type robots are found in works such as "Implementation of a mapping and localization system to a hexapod robot focused on the exploration of the environment and temperature monitoring" Alvarado et al. (2019), on the other hand, works such as: "Design and Implementation of a Simultaneous Location and Mapping System (SLAM)" Barrientos (2002); Narváez y Yandún (2013); Cajal (2018), allow the mapping of robots in complex walking processes, applying intelligent algorithms for the improvement of processes. Finally, in relation to data acquisition applied in agriculture, telemetry techniques are implemented for the creation of LAN networks in the punctual administration of greenhouses, as explained in: "Wireless monitoring system for greenhouse crops" (González et al., 2012).
MATERIALS AND METHODS
General Characteristics of the Project
The expected result is a prototype of a hexapod robot, explorer of complex terrains for application of artificial pollination on crops, while the goals of the project are divided into: short, medium and long term. For this purpose, various activities will be carried out in a virtual laboratory for simulation and testing, as well as the manufacture of devices ranging from the fuselage to the complementary modules, to finally carry out physical tests. The design of an RF module for the acquisition of temperature (°C) and humidity (%RH) samples with a geolocation matrix will be carried out for their storage in a Local-Host (Local Database Access Point). As an analysis product there are: 1) RF Receiver Module 2.4 Ghz with COM connection; 2) and RF Emitter Module 2.4 Ghz gadget type for surface mounting on the back of hexapod robot. These elements constitute only one phase of all those that make up the final objective. The diagram in Figure 1 shows the goals of the project.
Technical objective of the implement: Design of a system for acquisition of temperature-humidity data in remote form.
Technical specifications:
2.4 Ghz RF wireless transmitter and receiver module with 2 Mbps data sending range and low power consumption;
Design of PCBs in SMD format with component installation ergonomics;
Hardware firmware design and high-level interface for dynamic management and easy operation;
Mounting flexibility for robot fuselage emitter module;
Protective housings for receiver module.
Software requirements: Graphical User Interface (GUI) for control and administration of the remote system, in the management and administration of temperature and humidity sampling at the geolocation point obtained.
Software Use Case Specifications: These are specified in Table 1.
Use case | Specifications |
---|---|
Actor | User |
Description | Desktop application in form format, with options to make COM connection, wireless data acquisition viewer, connection with local database for the management of batches of records, query, modification and deletion of data. |
Preconditions | Compatible with Windows 10 operating system or higher, installer in ".exe" form compatible with JDK 17.0.1 and .Net Framework 3.5 or higher as minimum requirements. No internet connection required |
Activities |
COM port connection management Sending data by COM port Deployment of input data in real time Management of information protection in Local-Host database Query batches of records by date range or all records Deletion and editing of stored records |
Process for Selecting the Humidity-Temperature Sensor
The temperature and relative humidity data are captured by an HTU21D sensor; the decision point of the data acquisition device was not mere coincidence. To perform a deep search of the different sensors, the authors placed as a primary aspect the following criteria:
Most temperature and humidity sensors offer precision ranges ranging in relative humidity from ±2%RH to ±5%RH with an average humidity hysteresis: ± 1% RH, and in temperature ±2°C to ±1°C with approximate measurement times of 50ms-2s, for this the technical study of the datasheets of the sensors available from the discriminative search criteria described above, resulted in the report set out in Table 2.
Sensor Type | Temperature (°C) | Humidity (%RH) | Measurement Time | Interface | ||||
---|---|---|---|---|---|---|---|---|
Range | Precision | Resolution | Range | Precision | Resolution | |||
DHT11 | 0-50 | <±2 | 1 | 20-80 | ±5 | 1 | 1 - 6 s | Digital |
DHT22 | (-40) -80 | <±0.5 | 0.1 | 0-100 | ±5 | 0.1 | 2s | Digital |
HTU21D | -40-125 | ±0.3 | 0.01 | 0-100 | ±2 | 0.04 | >0.5 s | I2C |
SHT3x-DIS (SHT30) (SHT31) (SHT35) |
(-40) - 125 | ±0.2 ±0.3 ±0.3 |
0.015 | 0-100 | ±1.5 ±3 ±2 |
0.01 | 8s for RH >2s for temperature |
I2C |
SHT1x (SHT11) (SHT15) |
(-40)-123.8 | ±0.5@25 ±0.4@5-40 |
0.1 | 0-100 | ±3.5 ±2.0 |
0.03 | 4s for RH 5-30s for temperature |
I2C |
SHT7x (SHT71) (SHT75) |
(-40)-123.8 | ±0.5@25 ±0.4@ 5-40 |
0.1 | 0-100 | ±3.5 ±2.0 |
0.03 | 4s for RH 5-30s for temperature |
I2C |
AMT1001 | 0-50 | 0.5 | 1 | 20-90 | ±5 | 1 | 10s | Analogic |
HDC1080 | 5-60 | ±0.2 | 0.1 | 0-100 | ±2 | 0.1 | 15s | I2C |
BMP280 | (-40)-85 | ±1 | 0.01 | 0-100 | ±3 | 1 | 2ms | I2C |
From the technical, financial and logistical points of view, the most viable option to purchase the product was the HTU21D sensor, which offers a balance between performance and price, with which the incorporation of this device is the key to the first phase of the robot for the collection of temperature-humidity samples in complex terrains (TE. Connectivity, 2015).
General Application Architecture
The captured data of temperature (°C) and relative humidity (%RH) will be distributed remotely via wireless to a transceiver device with Half Duplex mode interconnection, having the data package the structure of "Address-Packet-Bit_paridad" by wireless communication of Radio Frequency (RF) at 2.4 GHz with a transmission rate of 2 Mbps. This is achieved with the implementation of a pair of transceiver modules from the Nordic nRF24L01 family (Nordic, Semiconductor, 2018; Wrapper , AutoCloseable, 2020). The location will be managed by a GPS module GY-GPSV3-NEO based on the IC NEO-6M-0-001 according to Ublox (2011), which returns geolocation of latitude and longitude. The flow of data transmission can be seen in the communication diagram shown in Figure 2.
The Operational Description of the Information Flow Matrix-UML Class Diagram can be seen in Table 3.
Section | Description |
---|---|
Hexapod Embedded System | The "Electronic Control" interconnects the components to distribute the flow of information data, for this the embedded system of the robot is based on 2 processing sections:
ATMEGA 2560 MCU Raspberry Pi 4 Model B |
Embedded Communication System | This unit contains a Main PCB that manages Half-Duplex communication with the "Hexapodo Embedded System", serving the module as an intermediary for data traffic management. The nRF24L01 transceiver interconnects wirelessly with the robot, when the information is mediated by the main card, in this way the management is carried out by RS-232 protocol intercommunicated by a UART / USB interconnection driver. The information is sent to the computer to be processed and deployed by a Graphical User Interface. |
PC | The intercommunication between the "Embedded Communication System" and PC, is carried out through USB interconnection, being the information received and sent under this protocol. The operational form is managed by a Graphical User Interface, designed in JAVA language, making use of the classes for the design of the GUI, management of DBMS and UART communication. This way, the graphic result allows operating the system remotely. Among the most important activities are the processing of the temperature and humidity variables provided by the robot, also the geolocation points of the sample points, the antecedent of the detection of computer vision, etc. |
RESULTS AND DISCUSSION
JAVA-Based Desktop Application
The database is implemented locally to store log information according to the sample collection periodicity of °C%RH.
The first storage and management section runs in the embedded control system under a storage structure in linked lists in queue format, so the dequeuing of information is done by wired connection or wireless request to the main system. The information that reaches the computer is stored in a Local DATABASE managed by XAMMP in MySQL with the generic Port "3306". The COM information received is mediated by JAVA through the ORACLE driver "mysql-connector-java", known as JDBC (Java Database Connectivity), which is the driver that contains the APIs to make a connection and intercommunication with the SQL language Pal (2020); Wrapper AutoCloseable, (2020); Oracle (2022) for the administration of commands, both DDL (Data Definition Language) and DML (Data Manipulation Language) (IBM, 2021). With the use of DML support, an algorithm is implemented to query, insert and update the information of the local database created.
The interaction with the user was achieved by designing a GUI in the "Apache NetBeans" IDE, which can be seen in Figure 3.
The graphical interface has five important blocks that can be seen in Table 4.
Section | Description |
---|---|
Conection COM | Contains a ComboBox component to select the COM ports available when the Connect() method of the JavaMySQL connection class is run. |
COM port input variables | Composed of 4 labels where the data of the String supplied by the COM connection are returned, the reception is a String with the format "temperature + humidity + longitude + latitude". With the help of the substring() method it is possible to separate the string and perform the possible "cast" if necessary and prepare it for sending to the Local DATABASE or table. |
Sending data | Composed of two Button's, the first allows the request activation and the second sends the deactivation command. |
Data Table | This instance is linked to the "Databases" GrupBox, through the |
Databases | This block is subdivided into three parts:
|
For the design of the Graphical User Interface (GUI) in its programming architecture, the object-oriented paradigm based on the JAVA language was used. With the help of the Swing components, the user dashboard was designed, thus structuring a program based on packages, interfaces and classes. A complete map can be seen in the UML class diagram (Figure 4).
Tables 5 and 6 explain the operability of the UML class diagram.
Packages | Clase | Description |
---|---|---|
MainProject | MainForm | It is a |
Serial Connection | This class is an aggregation of the "MainForm" class. Depending on whether the COM connection is successful or not, it is possible to continue operating the main Form (performing actions as a query of the information of the local database). It is composed of 10 public attributes and 10 methods, which together guarantee the COM connection between the receiving module and the form. | |
conexión | conexionJavaMySQL | They form a strong association with the "MainForm" class, since the operation of querying and safeguarding information in the Local DATABASE depends on the success of the connection. To do this, the package contains the "JavaMySQL connection" class that depends on the mysql-connector-java library, configuring its 5 attributes as follows: |
Component | Description |
---|---|
Interfaz <<Statement>> (ORACLE, 2022) | Allows using creation, to execute queries and updates of SQL commands for the administration of the Local DATABASE. |
BD Local MySQL | Local BD called " |
Embedded Receiver and Transmitter System
The electronic and mechanical manufacturing processes of the system of emission and reception of humidity-temperature data were carried out. In the case of the receiver module, it was designed under an ergonomics and adaptability approach. Applying CAD systems, the protective housing was designed in 3D printing with PLA+ material, and the PCB was manufactured in SMD format. The result can be seen in Figure 5.
In the case of the receiver module, the electronics were embedded to create a fixing device by means of 4 screws in the corners for fastening in the hexapod robot. The power and data connection between the module and the robot is made with a 5-pin male-male Jst-xh 2.0 mm type cable, the manufacturing result of the module can be seen in Figure 6.
Module Installation in Hexapod Robot
The general proposal of the hexapod robot for the exploration of complex agricultural land has as its long-term objective the process of artificial pollination, so that the attachments it has available are modules that intend to be installed according to the continuous progress of technical development. The general shape proposes a six-limbed robot with three degrees of freedom on each leg, in this way the emitting module (°C-%RM-Latitude/Longitude) is installed at the top of the central fuselage of the hexapod, with the purpose of dispersing the little weight in its center of gravity and also expose the antenna in good position to send the data in RF format during the exploration process (Figure 7).
Real-time testing
The data that enters in the form of String are separated by the algorithm and reported in the table. A "JPanel" is also sent to accuse the reception of the data and the writing in the MySQL database. Figure 8 shows the real-time results
of the information flow described in Diagram 1, where the issuing module sends the remote temperature and humidity information, and the emitting device receives it to be sent and processed by the JAVA application for management in the Local DATABASE. The "Clean Table" button removes the records from the table, so it is possible to perform two types of query, by start and end dates as shown in Figure 9.
It is also possible to select the records in the Record Editing container in which the updated fields with the selected information will be placed, if any of the four fields are modified and the "Edit Record" button is clicked. This record will be edited both in the table and in the local database. If a record is selected from the table and the "Delete Record" button is clicked, the record will be deleted from the table and the local database (Figure 10).
CONCLUSIONS
The instrumentation for the collection of data in agriculture is a tool with a high spectrum of application, later the administration of the data obtained must be assisted by computer systems that allow flexibility in the work of purification. The present project showed evidence of a computer system oriented to agricultural processes, in which the reporting of results is oriented to the technical processes of hardware design and especially software. By making these efforts available, it is possible to create complex systems that will help farmers in the future in the knowledge and use of precision agriculture techniques, through computer systems that accuse or have refined and flexible information that allows decision making. In this first phase, the sending of two variables was reported, but the software can be enhanced to be able to manage more data. It is obvious that the hexapod robot can expand its qualities and must be equipped with other actuators or instruments that allow the collection and processing of signals, which from the beginning was considered in its mechanical design to make it modular in the processes of agriculture in which it has to perform the task of pollination.
Different resources of the software engineering were used to represent the results such as the tables of each use case, the UML diagrams, the operating tables of the parts of the software, etc. Much of the time for system design was focused on software design at both the hardware, GUI and database levels.
The project as a whole is a sub-sphere of the totality that composes it, the acquisition of wireless samples, will allow in the future the remote operability of the hexapod robot in the exploration of complex terrains in agriculture. Duplex communication will allow the sending and receiving of data for exploration processes. In the future, when the computer vision module is incorporated, it is intended to perform exploration in crops to implement invasive pollination techniques in some crops such as flowers. The control points will take the geoposition and the taking of temperature and humidity for later study, therefore, this phase was indispensable to be designed and implemented to continue with the robotics designs in the future. Finally, the importance that this type of project brings in agriculture, places Mexico on the road to technological independence showing evidence of the engineering and research capacity the country, as well as in computer systems, electronics, instrumentation and robotics. Together they are factors for the development of precision agriculture tools.