Next Article in Journal
Designs of Particle-Swarm-Optimization-Based Intelligent PID Controllers and DC/DC Buck Converters for PEM Fuel-Cell-Powered Four-Wheeled Automated Guided Vehicle
Next Article in Special Issue
Digital Mapping of Soil Organic Matter in Northern Iraq: Machine Learning Approach
Previous Article in Journal
DRRU-Net: DCT-Coefficient-Learning RRU-Net for Detecting an Image-Splicing Forgery
Previous Article in Special Issue
Distribution Quality of Agrochemicals for the Revamping of a Sprayer System Based on Lidar Technology and Grapevine Disease Management
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An IoT-Based System for Efficient Detection of Cotton Pest

1
Department of Computer Science, Federal Urdu University of Arts, Science and Technology, Karachi 75300, Pakistan
2
Faculty of Computer and Information Systems, Islamic University, Medina 42351, Saudi Arabia
3
Department of Computer Science and IT, Sir Syed University of Engineering and Technology, Karachi 75300, Pakistan
4
Department of Computer Science, University of Karachi, Karachi 75270, Pakistan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(5), 2921; https://doi.org/10.3390/app13052921
Submission received: 5 January 2023 / Revised: 19 February 2023 / Accepted: 20 February 2023 / Published: 24 February 2023

Abstract

:
Considering the importance of cotton products, timely identification of pests (flying moths—being a significant threat to cotton crops) helps to protect cotton crops and improve their production and quality. This study proposes real-time detection of Cotton Flying Moths (CFMs) with the assistance of an Internet of Things (IoT)-based system in the agricultural field. The proposed prototype contains a group of sharp infrared sensors, a Zigbee-based communication module, an Arduino 2560 Mega board, a lithium polymer battery (to power the mote), a gateway device, and an unmanned aerial vehicle (UAV) to respond as a pesticide-sprayer against the detected pest. The proposed pest detection algorithm detects the flying insects’ presence by monitoring variations in the reflected light. Based on this, it sends a detection alert to the gateway device. The gateway device sends detection coordinates to the drone/UAV to respond by spraying pesticide in the detection region. A real testbed and simulation scenarios were implemented to evaluate the effectiveness of the proposed detection system. The results of the testbed implementation suggest the effectiveness of the sensor design and CFM detection. Initial results from the simulation study indicate the suitability of the proposed prototype deployment in the agricultural field. The proposed prototype would not only help minimize the use of pesticides but also maintain the quality and quantity of cotton products. The originality of this study is the custom-made and cost-effective IoT prototype for CFM detection in the agricultural field.

1. Introduction

Pests and related diseases are difficult challenges faced by farmers in developing countries. They can damage crops, reduce potential revenue, and have a negative effect on the crops’ class. Farmers in developing countries, such as Pakistan, have been using legacy tricks to manage pests for various crops. The identification of the pest is crucial in order to approach pest control properly. The farmers use general pesticides; however, the use of pesticides without the identification of pests may lead to negative consequences, such as immunity development in pests. Furthermore, in some cases, pesticides kill numerous useful insects and natural opponents that are useful against the aggressive reproduction of harmful pests. Moreover, crops that heavily depend on insects for pollination, fail to bear fruits [1,2].
Cotton (also known as white gold) is a crop of green and juicy leaves with larger flowers. Over 1300 harmful insects have been recorded that infect cotton worldwide and around 125 species infect cotton in India according to a report [3]. According to a study [4], more than 125 dangerous insects affect cotton in the USA and Pakistan. Among them, more than 90 pests and stainers damage cotton crops every season [5]. According to an economic survey, cotton, wheat, rice, and sugarcane are major crops in Pakistan, which contribute to more than thirty percent of the overall agriculture sector, and seven percent of the country’s gross domestic products [6]. Unfortunately, there has been no significant effort or investment towards using technologies for precision agriculture despite the importance of agriculture and specifically the cotton crop in South Asia. Accurate information about disease vectors and related pests is required to design an appropriate pest management strategy. In developed countries, the use of the Internet of Things (IoT) for precision agriculture has increased in the last few years. Less local effort and investment in using technologies for precision agriculture motivate the researchers to focus on an automatic pest and disease detection system that may assess the situation with a minimum delay.

1.1. Related Work

Progression in the field of artificial intelligence (AI) has attracted numerous researchers to apply predictive models to address real-time problems in the agriculture field. During the literature survey, we found wireless sensor network-based pest/disease management applications and IoT scope in the agriculture domain.

1.1.1. Pest Monitoring Applications

Many agricultural pest detection applications using WSN have been proposed [3,5,6,7,8,9,10,11,12,13,14,15,16,17,18], some of the most effective applications are discussed here:
Red Palm Weevil Detector is a complete system to monitor and detect Red Palm Weevil (RPW) caterpillar [7]. It uses an acoustic sensor device to detect RPW based on the noise-generating habit of these caterpillars. Another team of researchers suggested a self-sufficient protection system [8] for palms from their RPW larvae. Some reviews [3,5,6,9] proposed acoustic devices as detection technology while the other research studies [13,16] are based on optical devices. Researchers in [16] designed a sensor and proposed a sensing mechanism with a detection algorithm to monitor Xylophagous insects in wood, especially termites. Authors in [14] proposed a photonic fence (PF) system, in which they suggested insect monitoring and control by implementing advanced mid-range insect tracking and identification technologies. Recently, some optoelectronics sensors were used to monitor underground soil micro-arthropods [16], but nowadays many types of sensors and many solutions have been proposed [17] that are based on a combination of these technologies. An IoT-based cotton whitefly prediction system was developed and proposed in [18] that worked on Radial Basis Function Network (RBFN) algorithms and used a deep learning technique to predict the existence of the cotton whiteflies timely.

1.1.2. IoT in Agriculture

IoT devices have been investigated for their use in agriculture in developed countries. In recent times, IoT solutions have made their mark in many areas of human life, the environment, and industries. These IoT devices are also capable of exchanging data with their gateway. Smart agriculture is a major IoT application area along with smart health care, smart cities, smart industries, autonomous vehicles, smart homes, and others.
Authors in [19] designed an IoT-based agriculture framework that explains the relationship between pests, diseases, and weather parameters. In a detailed IoT technology discussion related to agriculture [20], the researchers discussed several aspects of IoT technologies and their possible use in smart agriculture. The authors in [21] discussed the selected aspects of IoT in agriculture, sensors, and network technologies, while in [22], the authors discussed integrated pest management technologies and their standard communication protocols. A unique concept and use of IoT were discussed in [23,24] based on various surveys, where researchers discussed IoT as an ontological tool in integrated pest management. In another study [25], the authors presented an IoT-based smart farming framework with five major components including data acquisition, platforms, processing with visualization, and complete system management.
The rapid technological development in recent years in IoT technologies is going to play a vital role in many agriculture-related applications [26,27]. Most authors, as cited previously, argued that most IoT architectures consist of four layers, such as (a) the perception/sensors or device layer, (b) the transport/network layer that includes protocols, (c) the processing or services layer that offers processing and analysis of data, and (d) the application layer that includes monitoring and control applications. These layers include all the main components of any IoT solution. In another study [28], authors proposed an IoT-Enabled IEEE 802.15.4 WSN Monitoring Infrastructure-Driven Fuzzy-Logic-Based Crop Pest Prediction. In this proposed architecture, pests/diseases are identified with the help of various weather factors. In [29], authors suggested an IoT-based cotton pest prediction and response system.

1.2. Gap Analysis and Comparison

Implementing sensing technology in the agriculture domain is a revelation for everyone. This study chose six parameters (main contribution of work, level of cost, methodology communication technology used, type of sensors used, and targeted plant/species) to compare this work with related works. In this research, we are monitoring insects through optical technology along with wireless communication.
In a study [7], an old acoustic technique was used that was limited to specific sound-generating pests and thus the technique was not universally able to detect all pests. In another study [8], traditional voice recognition techniques and hearing devices were used; nevertheless, the study did not involve the networking aspects. In a comparison, three proposals [16,17,18] from recent years were found to be using optical technologies (quite similar to this study). Nevertheless, among them, two [16,17] proposed the design of a trap system while the third [18] proposed the use of sensors along with video cameras. Therefore, it would not be wrong to state that the detection mechanism proposed in this study, to monitor and detect cotton bugs using a custom-based cost-effective IoT prototype, is a unique one.
The referred research work suggested a standalone device, while this study proposed a network-based approach. Some of the specific features of the proposed mechanism are expected to be as follows:
  • Locally made low-cost IoT device;
  • Easy to use by farmers without any complicated training;
  • Data can be monitored remotely using an IoT;
  • The device can be used in any season with certain modifications;
  • With a change in sensors, we can detect other crop pests.
Our research and invention can be compared with any current research in terms of its price, working methodology, and effectiveness in the context of implementation. After discussing the shortcomings of the existing system and a comparative analysis of the proposed system with the related work, we present the details of the proposed system in the next section.

1.3. Research Contribution

This study proposes a Cotton Flying Moths (CFMs) detection mechanism using a custom-built IoT-based solution. The significant contribution of the proposed mechanism includes the low-cost solution to detect moths damaging the cotton crops along with wireless sensor network (WSN) and IoT efficiency in the cotton pest detection field. The proposed framework would provide easy and real-time pest detection and monitoring with very effective, light communication and automatic spraying capabilities.
The architecture of the proposed system, as shown in Figure 1, involves a sensor/IoT network capable of sensing the motion of cotton pests using infrared sensors and a Zigbee gateway to collect information and direct the collected information to a base station. These data can be analyzed and viewed remotely by IoT servers using the Internet. The proposed detection mechanism consists of five phases including (a) real-time sensing, (b) data aggregation, (c) remote monitoring, (d) pest detection, and (e) pest removal by pesticide spray using UAVs. The proposed mechanism is implemented through a testbed and a simulation scenario to provide proof of concept.
This study aims to detect cotton pests (that did not produce sound, such as cotton bollworms) using custom-made IoT devices. Various research studies have been conducted in recent years to classify IoT devices and applications. This study has taken a scientific look at how wireless networks/IoT have evolved into a one-of-a-kind Internet of Things and a network of sensors over the years.

2. Materials and Methods

The core architecture of the proposed system is illustrated in Figure 1. In this study, two types of IoT sensors were designed including type A and type B with different specifications. These sensors are easy to be configured, installed, and used to collect data at the time of deployment. Furthermore, all the received data are aggregated at the IoT gateway node. An IoT server then connects with gateways to monitor and analyze the data remotely. Finally, the farmers can view the results of insect detection including their frequency of occurrences and location in the field. These results along with the captured images could be used for the identification of the exact category and type of detected pests. UAVs/drones may be used to spray pesticides after knowing the exact location of the sensor and pest infestation. The upcoming section of this study presents the proposed detection mechanism for cotton pests including the key assumptions, sensors design and deployment, and detection algorithm with its technical details.

2.1. Key Assumptions

Although both the data link and physical layers are involved in operations, error-free physical layer functionalities are assumed. It is assumed that sensor nodes that are installed in the field are stationary and are placed at an equal distance from the base station. Sensing and transmission of data are achieved at a fixed rate because all sensing nodes have the same capabilities except base nodes, which are more resourceful in terms of processing, storage, and memory. In the proposed system, it is assumed that a single-hop communication (that is all nodes) only transmits data to the sink node or gateway; inter-node data transmission is not considered in this work. The experiments were conducted considering the real field as a controlled environment. First, we tested our devices in real cotton fields; second, we tested them in a lab; and third was a controlled environment where we tested the prototype. The results for these three different environments are shown in separate graphical forms in the results section.
The assumptions were made for ideal scenarios; nevertheless, the experiments were run in three different environments to test the effects of changing environments. The average network delay of our system is constant between 100 milliseconds to 1 s, where 1 nanosecond is the minimum time and 1 s is the maximum time. The performance of the proposed device was found consistent with a 50 to 100-millisecond delay in synchronizing with each other. Furthermore, the change of environment was observed to be ineffective to the core function of the device except for a 300 to 500-millisecond delay in sending data from the device to the base station. The experiments were also conducted without the ideal assumptions in the simulation.

2.2. Sensors Design and Deployment

As shown in Figure 1, the field is shaped like a square of x by y meters. A sensor device was placed in the form of a grid, at a distance of d meters. The farmer, after looking at the population and the growth of insects in the field, decided on the number of devices to be installed in the field. The sink node was placed in a way that all nodes n could easily transfer their data directly to the sink node and the gateway node.
Since the sensors were not communicating with each other, they conserved their energy by switching to idle mode when they did not have data to send to the sink node. We estimated the amount of energy required during the transmission with the base node. We also perform various calculations to find the required optimal battery configuration for our proposed sensors. For this task, we have kept a low-cost battery that can power a prototype for several days and we can also use solar energy for these prototypes to recharge the batteries.
Though this prototype is ideal for the targeted operation of a sensitive area that was decided by the farmers themselves, we know that the sensors have a certain range and if an insect comes in that sensing range of the sensor, it will sense it and if more sensors are installed, the sensing range will increase. Therefore, the location of this system can be easily changed in the fields to monitor a specific area.
The gateway node performed the following tasks:
  • It periodically collected information from the field sensors;
  • It could also seek information on demand by a special request;
  • Since it was a single-hop communication system, therefore, no routing was required;
  • It used XCTU (XBee Configuration and Testing Utility) which was Zigbee communication software;
  • It could transfer the aggregated data through a web service remotely;
  • It could also send spray messages to drones based on the location of the gateway node sensors.
For cotton moth monitoring and detection, it was proposed to use an infrared (IR) light wall around the cotton plant to protect it, as shown in Figure 2A. In addition, it was suggested to use a box or channel-based sensor array of IR-emitting diodes. Once a hovering insect or cotton moth tried to cross the light wall, its body and wings’ movement somewhat obstructed the light and produced a tiny light deviation that was monitored and caught by the position-sensitive detector (PSD). As shown in Figure 2B, this is the way our prototype works with a straight infrared light constructed vertically or horizontally. When any of the flying insects try to cross the light wall, variation is captured through PSD.
Later, the Zigbee communication module sends the detection signal to the gateway node. If constant messages were coming from the same sensor, the gateway could send a message to the drone for pesticide spray, and thus insect breeding could be destroyed in time. Figure 2B shows the logical design of the sensor.
Fundamentally, data obtained by the sensor during experiments consisted of background noise with brief instants during which moths attempted to cross the IR beam. To use this application additionally with houseflies and mosquitos, a controlled and favorable environment was created for hovering flies over the proposed model.

2.3. Detection Algorithm

The Zigbee/Lora Console utility continuously monitored the sensor and its transmitter output. It compared the signal received from the sensor with computed defined criteria. The default standard of such a signal meant that the signal received should have been neither low enough to make sense nor high enough to cross a default standard (stated in the pseudocode below). It was also noise-free. If the compared value was in the middle of the set touchstone or readings went above the minimum set detection level, it was considered that an insect had been detected.
The signal value was set heuristically to determine the peak signal of good quality. During the experiment, the amplitude of detecting signals is measured by summing the values as well as by individual values over the defined level. Detection was not considered if the measured signal remained under the predefined detection benchmarks. The following requirements were concentrated for the targeted algorithm:
  • The low-powered electronic circuitry in sensors was used for optimal energy conservation;
  • The smallest change for auto-tuning was made for dealing with inconsistency in sensor electronics; with the mentioned necessities, the algorithm had two segments:
  • Programmed tuning: during the initialization period, some samples must be obtained from the sensor to be aware of its status.
  • Motion Analysis: at the manufacturer-defined intervals, the LED emits light, and the PSD reads echelons. Any change occurring in the smooth pulse was noticed and considered the reflection of light, as shown in Figure 2B. If the PSD received any reflected signal within its range, it meant the presence of an object/insect.
The following algorithm [29] shows the pseudocode for our sensing detector.
  • Pseudocode of the detection algorithm.
  • Main parameters.
  • Serial Zigbee = Receiver, Transmitter
  • Sensor Pin (1–6) = A 0, 1, 2, 3, 4, 5 (every pin represents a separate sensor)
  • Sensor Value = 1 (Threshold Value in between 1 to 4 as per manufacturer specs, ‘1’ means high sensitivity, (low values signal can be sensed) and ‘4’ means low sensitivity only high value can be detected by the sensor.
  • Distance > 1 && < 4 (it is defined as an object distance with sensors)
  • Sensor Coordinates for Localization
  • Drone GPS paths/route
Here, the distance means the closer a worm is to our sensor, the better the received signal will be. For example, it will have a maximum value of four (4), while further away from the worm, the signal would be weaker. It can be reduced to one or even zero but we are not counting the values which are less than one and this is the standard we have stated in the code.
In the detection algorithm, important parameters such as sensitivity and delay could be fixed according to precise body dimensions and the movement of target species. It will make our sensor (prototype) suitable for more crops and flying species. From the experiment point of view, the detection threshold (sensor value; SV, and delay) is the most crucial parameter. Our algorithm does not require much energy or resources to run, it can run on a simple computer and provide reasonable results in less time. We ran the algorithm and observed that it functions correctly. As per the time complexity, the device synchronization required n seconds and it is assumed that any sensor takes data from a field in time t. Therefore, it takes (n*t) seconds. The total time of data collection will be t2 and it would take m seconds to send all data to the sink node. Therefore, if ignoring the non-iterative task, then Algorithm 1 may take O(n*t2*m) seconds. As the value of n is very low, we can ignore it and one may write this as O(m*t2).
Algorithm 1. Pest Detecting Algorithm [29]
1   Initialize serial and Wireless communication
2   Sensor Value = Analog Read (Sensor Pin) (Get value from all sensors separately,
3   every sensor is represented by a separate pin)
4   Distance = Sensor Value
5   For (sensor i = 1 to n; do)
6    If (distance > 1 && distance < 4) received at any of the analog Pin
7   Mark Detection = true
8   Then print on Serial “BEE DETECTED” or “Bee Detected on Sensor # 1”
9   Send a message to the gateway node.
10 Delay (from 10 ms to 1000 ms) (It is denoted by the sensing frequency, how much
11 time the sensor will take for new sample/data)
12 The gateway sends a message to a drone as per the received coordinate.
13  End
The AT Mega 2560 processor keeps running a looping program. This program works on the data taken by the optical sensor to process it. In the “C” language, the board is programmed with the help of the sketch application. A sketch is a name that Arduino uses for a program. We use the sketch to program our Arduino boards. It is the unit of code that is uploaded to and runs on an Arduino board. The Arduino processor performs two fundamental procedures (as mentioned earlier). The first one is interrupt driven, which stores the analog data in the Arduino buffer and then compares it with the defined threshold and sends it to the gateway node.

2.4. Implementation Scenarios

2.4.1. Scenario 1 Experimental Lab

Several experiments were carried out with Guava fruit flies, grain moths, and a few cotton moths inside an acrylic box with the prototype at the Agriculture Research Institute’s labs, University of Agriculture, Pakistan. Figure 3 shows the experimental setup. Fruit flies and grain moths were monitored by confining the insects in a transparent box that is large enough to allow the moths to fly and be captured by PSD.
The system’s sensing, computing, and wireless communication capabilities were tested and obtained satisfactory results for further analysis and modifications. The prototype was assembled using a squared plastic box with a Sharp sensor associated with the Arduino AT Mega 2560 board and the Zigbee communication shield. Table 1 shows the technical details of the AT Mega 2560 board. Before using these prototype boxes, a stripe-based sensor array was used on which the sensor was placed at some distance.
It was proved by the initial analysis and experimental results that the design and size of the prototype were important features. The duct was replaced with a box and a sensor was mounted on top of the box at a relatively small distance, which made the box more sensitive than duct-based sensor assembly. Two boxes with sensors installed on their horizontal and vertical sides were used. Nevertheless, the result of the vertically installed sensors was much better than the horizontally installed sensors.
The sensors used in this study had a range of 4 to 150 cm. This sensor consisted of a signal processing circuit, position-sensitive detector (PSD), and infrared light-emitting diodes. It had a maximum of 7 volts of input and 0.3 volts of analog output.
The sensor physical sizes (Type A = 29.5 × 13 × 13.5 mm and Type B = 29.5 × 13 × 21.6 mm) were suitable for this application. Figure 4 displays the used sensors. A lithium polymer (LiPo) battery was used to power up the prototype. To increase node lifespan and provide a consistent power source, an ample size battery with the ability to re-charge is sufficient. A lithium polymer (LiPo) rechargeable battery with 22,000 mAh was used in this prototype. It is also possible to use solar energy in the field for this prototype to provide recharging.
To analyze, first, measurements from the result of a signal that occurred on the sensor due to any flying insects were obtained. A sketch was used for coding the complete circuit. It was defined in the code that when any of the prototype sensors caught the presence of insects flying in front of it, it must transfer its sensed data (3 volts) to the Arduino board with the help of an analog pin. It was also determined in the code that if any flying insect came across the sensor 1 beam, the remote machine would receive a message “Bee detected in sensor 1” with some predefined hexadecimal code.
The Arduino AT Mega with Zigbee controller converted analog data to digital data packets and the prototype sent 16-bit data packets for each reading to the remote computer. Figure 5A shows a fully assembled prototype with Zigbee Dongle and a lithium polymer battery. For these data-collecting sessions, the least sensitivity level of sensors was used because of the rapid movement of insects, and multiple outputs were received every 10 ms.
Several tests were performed in a controlled environment as well as in the lab using two flying insect species. Among them, one was the Angoumois grain moth (Sitotroga Cerealella) and the other was the Guava fruit fly (Bactrocera Correcta (Bezzi)). For instance, shown in Figure 3B, some flying grain moths and fruit flies were tested within a transparent acrylic box with this prototype at Sind Agriculture Research Lab.
Sharp distance measuring sensor units (two different models GP2Y0A-41SK0F/02YK0F) were used. Each sensor had a distance-measuring sensor unit, composed of a signal processing circuit, an infrared emitting diode (IR-LED), and an integrated combination of a position-sensitive detector (PSD). The reflectivity variety of the object, the operating duration, and the environmental temperature did not easily influence distance detection due to the adaptation of the triangulation method. Voltage was the output of this device that corresponded to distance detection. Therefore, this sensor could be used as a proximity sensor. The key feature included the distance-measuring sensor united with infrared LED, signal processing circuit, and PSD; a short measuring cycle (16.5 ms); the distance measuring range was up to 4 to 30 cm; and the output type was analog. The measuring range of these sensors was up to 150 cm; they were used with the combination of the AT Mega 2560 Arduino board and Zigbee module for transmitting data from the field to a remote location.
Figure 5A shows a prototype made for initial tests while Figure 5B shows a conceptual diagram of the sensing node. Primarily, two different sizes of experimental prototype boxes were used with different ranges of sensors, Type A and Type B; see Figure 4 and Table 2 for further technical details. The first setup was made with acrylic boxes, where sensors were mounted at the top of the box and the remaining circuit was placed inside the box with a lithium polymer battery. Some experiments were performed in a controlled environment with houseflies and mosquitos as discussed earlier.

2.4.2. Scenario 2 Control Environment

The proposed prototype operation was set up in an empty room where two hundred bees were arranged. A favorite food of bees was placed around the devices to make sure that the bees would hover close to the devices. As soon as the bees passed across the sensors, the sensors could sense them and generate a signal of their presence with the assistance of the Zigbee wireless device. The generated signals could be received at the monitoring device. A similar scenario was created for mosquitoes where a mosquito-friendly light was set up around the prototypes so that the mosquitoes would fly over the devices and their presence could be sensed as soon as they flew over a sensor. An array of sensors was developed that could detect and send a signal to the monitoring device to indicate that an insect was detected flying over a sensor.
Based on the light received after reflection by the sensor, the number of insects that crossed the light was calculated. There was little variation in the number of the reflected light signals received by the sensor, as it was heavily dependent on the presence of the flies and/or mosquitoes in the sensors’ sensing ranges. For the detection of insects, reflected light signals must be examined thoroughly together with other aspects, such as air, dust, noise, and the device in use.
In Figure 3B, showing the acrylic box, and Figure 3A, the Zigbee console demonstrates the test session. Some unwanted values can be observed in the figure, but all of the unwanted signals were filtered out with the help of a low pass and a high pass filter using the threshold values of the received power. Due to the importance of data accuracy in such experiments, the filters were implemented in the code. The values that might be the signal of a flying mosquito or a fly were investigated, while the higher values were removed using a low-pass filter and lower values were removed using a high-pass filter.
The interference by a moving or stationary Angoumois grain moth distracted the light received by PSD, which was received after a reflection by the sensor as a signal. The sensation of an insect or a moth’s exposure to the light of a sensor would be considered a good signal, as its values would be much better than any other signal (in which case, the insect passed at a long distance from the sensor or half of the pest’s body was exposed to a sensor or its light). It was also observed that the tools or nearby light did not affect the results. Detection electronics and communication were designed as the outer parts of the prototype, while processing was the inner part of the device. This system could be easily used to detect all types of flying insects, some of which were detected through this device in this study.

2.4.3. Scenario 3 Real-Field Environment

In addition to these experiments, more complex scenarios in the field are considered concerning two aspects. The first was that if this sensor device was out in the field, insects other than cotton could affect it or its values and it could be difficult to understand whether these signals were cotton insects or some other similar bugs affecting the device. In this case, technologies such as machine learning or artificial intelligence can be used as a solution; however, identifying specific insects is outside of the scope of this study. Secondly, along with the cotton pests, signals from other pests could also be received that were not harmful to the crop or were responsible for controlling the growth of cotton pests or were used to destroy them. In such a case, artificial intelligence and signal processing can be used to filter the signals.
Another difficult scenario might be the responding pattern of the sensor to rain or high humidity. However, this sensor might not work in case of high humidity or rain, but it met all the standards of the outdoor environment and would resume its work after the environmental parameters are back to normal. It may not need to work during the rains because there were no flying insects during the rains. The experiments were conducted in three different environments to observe and test the real-time performance of this prototype and the observation and various results of these experiments showed that the required performance of the device was very reasonable concerning the detection of insects (sensing), communication overhead, and base station communication with field sensors.
The prototype required very low computational resources compared with other similar-capacity devices. The device consisted of sensors that had a lithium battery which was able to provide power to sensors and a Zigbee device for several days while the base, located in the control station, required minimal resources.

2.4.4. Simulation-Based Study

The simulation-based study was performed to complement the proposed IoT devices’ capability for pest detection and management and implemented in the entire agricultural field. One of the latest IoT simulators called Cup-Carbon [32] was used for this purpose which was specially designed to test IoT products and their performance in various scenarios. Table 3 shows general simulation parameters while simulation results are presented in Section 3.
The field of 200 × 100 m, as seen in Figure 6, was modeled, in which 6 IoT sensors at equal distances were deployed. The sensors could communicate with their neighbor sensors and sensors number one and two could also communicate with the gateway sensor module through the LORA communication module. As soon as the sensors detected a flying bug, they would immediately send a message to the gateway sensor.
The gateway node performed three operations. First, it collected the information from IoT sensor nodes, second, it performed a localization process, and finally, it sent a detection alert to the drone. The drone would respond by spraying in the detected region and returning to its hanger. As Figure 6 shows, the drone would select the best paths to reach the target region.

3. Results and Discussion

3.1. Testbed Results

Due to the unavailability of a large number of cotton ball worms, an experiment with other insects having similar behaviors and features was conducted. Grain moths and Guava bees were chosen because their flight temperament was similar to that of cotton insects, but they were smaller in size.

3.1.1. Scenario 1 Results

An extensive chain of experiments was performed, keeping in mind the objective to validate the concrete procedure of the presented algorithm, in an experimental lab environment with real and non-real situations. The invasive moths were monitored and detected through the prototype successfully and no major error occurred during the experiments in the lab and the control environment. The devices for experiments were used in the Agriculture Research Institute lab at Sind Agriculture University. The sensor node was placed in an acrylic box as mentioned in Figure 7A with many grain moths and a few cotton moths and other flies. The box had enough space for the prototype to easily monitor flying insects and flies. The detection test was conducted at different timings with a minimum of 2 h to a maximum of 12 h for one week. The Zigbee console monitor in Figure 3A shows that the detection signal received by the remote machine from the prototype of flies in the box was relatively very low compared with the real environment or control environment movement. Both prototypes were used; one consisted of type A while the other consisted of type B sensors. The technical properties and differences between the two types of sensors are shown in Table 2.
The graphs in Figure 7B and Figure 8B show the detection of flies and moths through both type A and type B sensor prototypes. Almost 200 flying insects were left in the aquarium shown in Figure 3B to test the device. The insects were small in size and not significantly active. It was observed that the insects living in the box became a bit sluggish and did not take much interest in flying. Therefore, despite being in large numbers, their presence in the sensors was not very visible. Because of the controlled environment, it was very difficult to obtain incorrect signals.
The assembly consisted of the installation of six sensors on each prototype. The hard-plastic boxes had been drilled to mount the sensors on them vertically. The remaining circuit was placed in the box with a battery. Figure 7B and Figure 8B are comparable to both sensors. With the help of the two sensors, types A and B, it tried to sense three types of flying insects including domestic fruit flies, mosquitoes, and grain moths. Results graphs were developed in the light of experiments in two different scenarios.

3.1.2. Scenario 2 Results

As a proof of concept, experiments were carried out on houseflies and then mosquitos in the control environment. Experiments in the second scenario involved two prototype boxes consisting of type A and type B sensors separately. As mentioned earlier, two types of sensors for this experiment were chosen. The type “A” sensor with a light-emitting range of about thirty centimeters, which could detect nearby insects and reduce input power; however, its sensitivity was better than a relatively large sensor. It could also sense relatively small insects. On the other hand, the type B model was capable of detecting insects a larger distance and with high energy. Its range was about 150 cm along with better sensitivity than others in terms of range. The reason to use the two types (A and B) of sensors was to observe both near and far distances and to determine which sensor could be more useful for this purpose. Nevertheless, it was realized that both types had their benefits and both at the same time should be used.
The experiments were conducted in a controlled indoor environment, which lasted for several days, and every trial lasted about 6 to 8 h. The experiments were performed on house moths/flies during the day and on mosquitoes at night so that it could be determined if the sensor was also useful for other insects, and the results were very satisfactory.
Figure 8A and Figure 9 show the results of experiments on mosquitos and flies, respectively. The figures show time on the X-axis, while on the Y-axis, the number of times flies or mosquitoes are detected by the sensors is shown. A sensor could detect any mosquito or bee multiple times. After many experiments, it was concluded that an accurate and efficient sensor could be created that would be able to detect even the smallest and fastest insects. The data received from this system could be observed from anywhere through web technologies.
The results of the experiments showed that small infrared sensors were more effective than larger ones, and this performance could be optimized in the future. It was also observed that the behavior of sensors and insects in the actual field is different than in the controlled environment; for example, when the prototype was tested in the aquarium, the flying insects did not fly normally. So far, no other technologies have been utilized but other techniques such as digital image processing and artificial intelligence (AI) could be very helpful in this work. These technologies could be used to identify insect species. Because large insects have a good and large reflective index, they are easily detected by sensors. With the sensitivity of the best sensor, accurate results would inevitably be obtained.
The proposed sensor’s energy consumption was very low and it could be used for several days without charging the battery. In our case, six sensors on one battery were run. If one battery per sensor were used, the battery would have to be re-charged. Nevertheless, a worst-case scenario was considered in this prototype to accumulate energy first.
In the field, the data were sensed, recorded, and moved immediately to the user and remote machine. The distinctive potential of the flying insect monitoring and detecting sensor prototype was its real-time behavior. This technical innovation gave the freedom to make pest monitoring much more controlled and effective. It also allowed for minimizing pesticides, and if required, it could be carried out in a more targeted way. Harmful environmental impacts would be reduced, and it would provide environmentally friendly, accurate, and cost-effective pest monitoring and control.
Considering the performance of the device and its evaluation, it was observed that the device did not generate false signals and identified the correct number of insects in the aquarium test. This means the prototype provides accurate results, and the type A sensors are more sensitive and provide better results.

3.2. Simulation Results

As a proof of concept, a simulation-based case study was also carried out. For this, an IoT-based multi-agent discrete event simulator called CupCarbon [32] was used. It is a smart city and IoT wireless sensor network (SCI-WSN)-based simulator. One of the key features of this simulator is its integration capability with real-time maps and real devices. Therefore, a real agricultural field using a Google map (satellite) was used.
Figure 10 shows three types of nodes: (A) sensing node, (B) base station, and (C) mobile node, which were used in the simulation scenario. Here, the mobile node mimics cotton pests, who are randomly moved into an agriculture field using a random mobility model.
The sensing node was simulated with the same sensing capabilities as the proposed nodes in Section 2.3 and Table 3 shows the general simulation parameters.

3.2.1. One-Hop Scenario

In Figure 11, the arrangement of four sensing nodes, a base station (sink) node, and a mobile node with a random route is presented. The base station was placed in the center of the agricultural field and one-hop away from each sensing node and resided inside of each node’s transmission range for receiving messages. The mobile node moved according to its assigned route, and if the mobile node was outside the sensing range of a sensing node, it would not be detected, and then the sensing node would send “0” (no pest detected) to the base station.
The pest detection algorithm (Section 2.3) was implemented in the Cup-Carbon simulator and the test detection process included the following steps:
  • Whenever a pest entered the sensing range of a sensing node, the simulator highlighted it with yellow color as detected and sent a detection message “1” (pest detection) to the base station with coordinates of the highlighted region as depicted in Figure 11.
  • Whenever the flying insect moved out of the sensor’s reach and sensing range, it returned to the same position as it was before, as seen in Figure 12.

3.2.2. Two-Hop Scenario

As single-hop scenes were applied to the simulations, the creation of a multi-hop environment was also attempted. The single-hop field was small and thus it took less time to reach the mobile node bug-infested area and less time to take action. Nevertheless, because the field of the multi-hop environment covered a relatively large area and one hop had been added to the communication design, the response time inevitably increased.
These two parameters were directly proportional to the fact that when the size of the field was increased, the hop was also increased. With the increase in the hop, the response time would also increase. In the single-hop, the field was to be kept small while the size of the field in the multi-hop was increased, but the response time of the drones was also increased by a few milliseconds. The snapshots in Figure 13A,B show scenes in which the cluster had increased and the coverage area of the drones from a multi-hop environment also increased.
The results show that every time a pest entered a sensing range of a sensor node, it was detected, and a detected message was sent to the sink node as shown in Figure 14. Initial results from the simulation study indicated the suitability of the proposed pest detection system to be deployed in the agriculture field.

3.3. SWOT Analysis

The way a theory is presented has its merits and demerits. Therefore, to identify the shortcomings, a small competitive table was made to explain what is lacking in the proposed scheme. Table 4 describes the strengths, weaknesses, opportunities, and threats (SWOT) analysis. In addition, it is suggested that investors should fund this endeavor, as it would give them a head start over others. This SWOT matrix provides the performance and capabilities of the system and helps to evaluate the results of the proposed mechanism.
Certainly, there are some risks associated with this device and its use, which we call non-ideal environments. These include damage to a sensor, bad weather, rain, strong and dusty wind, or movement of a large animal or human causing a sensor to be affected. We have various contingency plans for such situations; for example, if a sensor is not working for any reason, it will be identified in our system and repaired or reset immediately. In the case of rain or dusty wind, the entire system is affected, and the system cannot detect the presence of insects during such events. However, if any one sensor is affected in the whole field, it does not make a significant difference to our system because the rest of the sensors will continue to operate and only one part of the field will be temporarily affected, as it would be repaired or reset in time; furthermore, the affected area becomes minimal if the number of sensors is increased.

3.4. Cost Analysis

In the initial stage, the proposed system would have a higher cost; nevertheless, it must be compared with the existing solutions [33,34] used by farmers to fulfill the same purpose. In this case, its cost is very low and if we develop the sensors from a local manufacturer, the cost can be even less. In the comparison, it is expected that this system would work 24 h a day while farmers could perform the same task for a limited amount of time. The automated system can also be utilized for a quick spray to save time. This low-cost system is proposed for developing countries where farmers cannot afford high-priced solutions. However, our solution would be very inexpensive compared with existing [33,34] solutions.

4. Conclusions and Future Work

In this paper, a custom-made IoT sensor system was proposed for pest detection and control that was tested in both controlled and uncontrolled environments for testing its accuracy and efficiency. Furthermore, a simulation-based study was performed using a Cup-Carbon IoT simulator to demonstrate that an agriculture field for pest detection could be monitored with a certain number of IoT sensors. The suggested wireless sensor was found to be the ultimate relief for farmers in developing countries. Currently, the prototype is designed for cotton crops but in the future it can be used for several other crop types. To generalize the proposed device, some sensors are required to be changed which can be easily achieved.
The proposed outline of the detecting algorithm was sufficient to sense the flying insects’ movements and presence successfully. The proposed system could also be used to monitor other flying insects and efficiently deliver pesticides using UAVs. It was found to be a smart and cost-effective method developed for detecting flying pests in the agriculture field in real time. The proposed system was also tested on a variety of insects in three different scenarios with good results. A similar scenario was executed on a simulator for a proof of concept.

Challenges and Future Work

The scope of the IoT/sensor network is very high in the agriculture field but to deal with existing challenges, the following recommendations need to be implemented:
  • Farmers must have adequate knowledge about the prospective solution for their crops, associated cost, implementation, and all aspects of technical support.
  • Entomologists must also provide information about insects that could be used to identify insects in the sensor field.
  • Researchers should provide simple and complete solutions that are easy to adopt and implement because it can be difficult to obtain approval for incomplete solutions.
  • Local industry must provide low-cost sensor-based, generalized, and specific crop-oriented solutions, which may or may not include single or multiple sensing technologies.
  • Albeit expensive, IoT/drone-based agricultural solutions would be very useful and have many applications in the future.
  • Drones should be designed for applications, such as fertilizer supply, seed scattering, pesticide spraying, etc.
In the future, it is intended to associate this work with other IoT web servers, AI, cloud, or digital image processing-based solutions. The inclusion of intelligent technologies, such as machine learning and image processing techniques, which might enhance insect detection in real time with the coordination of signal-generating sensors or flying insects, is also planned. Furthermore, we intend to refine the proposed solution to make it highly accurate and enable the detection of various other flying insects. Some future guidelines are to modify the system’s capabilities in order to contribute to bridging gaps between academia, industry, and environmental domains.

Author Contributions

Conceptualization, S.A. and A.N.; methodology, S.A., A.N. and A.M.; software, A.M. and S.A.; validation, K.A. and M.S.; formal analysis, A.N. and M.S.; investigation, S.A. and A.M.; writing—original draft preparation, S.A., A.N. and A.M.; writing—review and editing, K.A., M.S.S. and M.S.; visualization, A.M. and M.A.; supervision, A.N. and K.A.; project administration, A.N.; funding acquisition, A.N., M.S. and M.S.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by the Deanship of Scientific Research, Islamic University of Madinah, Madinah, Kingdom of Saudi Arabia.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare that they have no conflicts of interest to report regarding the present study.

References

  1. Bakhsh, K.; Akram, W.; Jahanzeb, A.; Khan, M. Estimating productivity of BT cotton and its impact on pesticide use in Punjab (Pakistan). Pak. Econ. Soc. Rev. 2016, 54, 15–24. [Google Scholar]
  2. Gill, H.K.; Garg, H. Pesticide: Enver. impacts and management strategies. IntechOpen 2014, 22, 13–22. [Google Scholar]
  3. Latha, Y.L.M.; Manoranjini, J. Automatic pest detector in agricultural farms using acoustic and image wireless sensor network technology. Int. J. Innov. Technol. Explor. Eng. 2020, 9, 5–18. [Google Scholar]
  4. Srinivas, S.; Harsha, K.S.; Sujatha, A.; Kumar, N.G. Efficient Protection of Palms from RPW Larvae using Wireless Sensor Networks. Int. J. Comput. Sci. Issues IJCSI 2013, 10, 192. [Google Scholar]
  5. Al-Manie, M.A.; Al-Kanhal, M.I. Acoustic detection of the red date palm weevil. Int. J. Signal Process. 2004, 1, 1–12. [Google Scholar]
  6. Eliopoulos, P.A.; Potamitis, I.; Kontodimas, D.; Givropoulou, E.G. Detection of adult beetles inside the stored wheat mass based on their acoustic emissions. J. Econ. Entomol. 2015, 108, 2808–2814. [Google Scholar] [CrossRef]
  7. Mankin, R. Recent developments in the use of acoustic sensors and signal processing tools to target early infestations of red palm weevil in agricultural environments. Fla. Entomol. 2011, 94, 761. [Google Scholar] [CrossRef]
  8. Soroker, V.; Suma, P.; Pergola, A.L.; Cohen, Y.; Alchanatis, V.; Golomb, O.; Goldshtein, E.; Hetzroni, A.; Galazan, L.; Kontodimas, D.; et al. Early detection and monitoring of red palm weevil: Approaches and challenges. In Proceedings of the Colloque Méditerranéenthe sur les Ravageurs des Palmiers, Nice, France, 16–18 January 2013. [Google Scholar]
  9. Potamitis, I.; Rigakis, I.; Fysarakis, K. The Electronic McPhail Trap. Sensors 2014, 14, 22285–22299. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  10. Matijevic, M.; Cvjetkovic, V. Overview of architectures with Arduino boards as building blocks for data acquisition and control systems. In Proceedings of the 2016 13th International Conference on Remote Engineering and Virtual Instrumentation (ICREV), Madrid, Spain, 24–26 February 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 56–63. [Google Scholar]
  11. Shi, Y.; Wang, Z.; Wang, X.; Zhang, S. Internet of things application to monitoring plant disease and insect pests. In Proceedings of the 2015 International conference on Applied Science and Engineering Innovation, Jinan, China, 30–31 August 2015; Atlantis Press: Paris, France, 2015; pp. 31–34. [Google Scholar]
  12. Silva, D.F.; Souza, V.M.A.; Ellis, D.P.W.; Keogh, E.J.; Batista, G.E.A.P.A. Exploring Low Cost Laser Sensors to Identify Flying Insect Species. J. Intell. Robot. Syst. 2015, 80, 313–330. [Google Scholar] [CrossRef]
  13. Balla, E.; Flórián, N.; Gergócs, V.; Gránicz, L.; Tóth, F.; Németh, T.; Dombos, M. An optoelectronic sensor-ring to detect arthropods of significantly different body sizes. Sensors 2020, 20, 982. [Google Scholar] [CrossRef] [Green Version]
  14. Kocakulak, M.; Butun, I. An overview of Wireless Sensor Networks towards internet of things. In Proceedings of the IEEE 7th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 9–11 January 2017; pp. 1–6. [Google Scholar]
  15. Lima, M.C.F.; de Almeida Leandro, M.E.D.; Valero, C.; Coronel, L.C.P.; Bazzo, C.O.G. Automatic Detection and monitoring of Insect Pests. Agriculture 2020, 10, 221–234. [Google Scholar]
  16. Gedeon, C.I.; Flórián, N.; Liszli, P.; Hambek-Oláh, B.; Bánszegi, O.; Schellenberger, J.; Dombos, M. An Opto-electronic sensor for detecting soil microarthropods and estimating their size in field conditions. Sensors 2017, 17, 1757. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  17. Liu, Y.; Zhang, J.; Richards, M.; Pham, B.; Roe, P.; Clarke, A. Towards continuous surveillance of fruit flies using sensor networks and machine vision. In Proceedings of the 2009 5th International Conference on Wireless Communications, Networking and Mobile Computing, Beijing, China, 24–26 September 2009; pp. 1–5. [Google Scholar]
  18. Saleem, R.M.; Kazmi, R.; Bajwa, I.S.; Ashraf, A.; Ramzan, S.; Anwar, W. IOT-Based Cotton Whitefly Prediction Using Deep Learning. Sci. Program. 2021, 2021, 8824601. [Google Scholar] [CrossRef]
  19. Gao, D.; Sun, Q.; Hu, B.; Zhang, S. A framework for agricultural pest and disease monitoring based on internet-of-things and unmanned aerial vehicles. Sensors 2020, 20, 1487. [Google Scholar] [CrossRef] [Green Version]
  20. Farooq, M.S.; Riaz, S.; Abid, A.; Umer, T.; Zikria, Y.B. Role of IoT technology in agriculture: A systematic literature review. Electronics 2020, 9, 319. [Google Scholar] [CrossRef] [Green Version]
  21. Azfar, S.; Nadeem, A.; Alkhodre, A.B.; Ahsan, K.; Mehmood, N.; Alghmdi, T.; Alsaawy, Y. Monitoring, detection and control techniques of agricultural pests and diseases using WSN: A Review. Int. J. Adv. Comput. Sci. Appl. 2018, 9, 424–433. [Google Scholar]
  22. Chougule, A.; Jha, V.; Mukhopadhyay, D. Using IoT for integrated pest management. In Proceedings of the International Conference on Internet of Things and Applications (IOTA), Maharashtra Institute of Technology, Pune, India, 22–24 January 2016; pp. 17–22. [Google Scholar]
  23. Azfar, S.; Nadeem, A.; Basit, A. Pest detection and control techniques using wireless sensor network: A review. J. Entomol. Zool. Stud. 2015, 3, 92–99. [Google Scholar]
  24. Farooq, W.A.; Rasool, K.G.; Tawfiki, W. Application of Laser-Induced Breakdown Spec trophy in Early infestation of RP Weevil: Infestation in Date Palm. Plasma Sci. Technol. 2015, 17, 947. [Google Scholar] [CrossRef]
  25. Ayaz, M.; Ammad-Uddin, M.; Sharif, Z.; Mansour, A.; Aggoune, E.H. Internet-of-Things (IoT)-based smart agriculture: Toward making the fields talk. IEEE Access 2019, 7, 129551–129583. [Google Scholar] [CrossRef]
  26. Stočes, M.; Vaněk, J.; Masner, J.; Pavlík, J. Internet of things (IoT) in agriculture-selected aspects. Agris On-Line Pap. Econ. Inform. 2016, 8, 83–88. [Google Scholar] [CrossRef] [Green Version]
  27. Navarro, E.; Costa, N.; Pereira, A. A systematic review of IoT solutions for smart farming. Sensors 2020, 20, 4231. [Google Scholar] [CrossRef] [PubMed]
  28. Sharma, R.P.; Ramesh, D.; Pal, P.; Tripathi, S.; Kumar, C. IoT-enabled IEEE 802.15.4 WSN monitoring infrastructure-driven fuzzy-logic-based crop pest prediction. IEEE Internet Things J. 2021, 9, 3037–3045. [Google Scholar] [CrossRef]
  29. Azfar, S.; Nadeem, A.; Ahsan, K.; Mehmood, A.; Almoamari, H.; Alqahtany, S.S. IoT-Based Cotton Plant Pest Detection and Smart-Response System. Appl. Sci. 2023, 13, 1851. [Google Scholar] [CrossRef]
  30. Arduino Mega Boards. Arduino Mega Boards Guide; Updated 18 March 2018; Arduino Inc.: Turin, Italy, 2018; Available online: https://www.arduino.cc/en/Guide/ArduinoMega2560 (accessed on 17 August 2020).
  31. Levkoff, L.; Dokter, P. SparkFun Electronics ProtoSnap and repurposed electronics. In Proceedings of the Sixth International Conference on Tangible, Embedded and Embodied Interaction (ICTEEI), Warsaw, Poland, 26 February 2012; pp. 381–382. [Google Scholar]
  32. Mehdi, K.; Lounis, M.; Bounceur, A.; Kechadi, T. Cupcarbon: A multi-agent and discrete event wireless sensor network design and simulation tool. In Proceedings of the 7th International ICST Conference on Simulation Tools and Techniques, Lisbon, Portugal, 17–19 March 2014; pp. 126–131. [Google Scholar]
  33. AGRINT Solutions Inc. IoTree®—Agrint. Available online: https://www.agrint.net (accessed on 12 October 2022).
  34. Libelium—IoT Solutions. Available online: https://www.libelium.com/iot-solutions/smart-agriculture (accessed on 14 October 2022).
Figure 1. The core architecture of the proposed detection mechanism.
Figure 1. The core architecture of the proposed detection mechanism.
Applsci 13 02921 g001
Figure 2. (A) Operational schematic of implementation. (B) Operating principle of the sensor.
Figure 2. (A) Operational schematic of implementation. (B) Operating principle of the sensor.
Applsci 13 02921 g002
Figure 3. (A). Results received on Zigbee console monitor with some unwanted values. (B) Acrylic box for an experiment.
Figure 3. (A). Results received on Zigbee console monitor with some unwanted values. (B) Acrylic box for an experiment.
Applsci 13 02921 g003
Figure 4. Lightweight, low-cost range sensors suitable for small movement detection. Photos courtesy of Sparkfun Electronics [31].
Figure 4. Lightweight, low-cost range sensors suitable for small movement detection. Photos courtesy of Sparkfun Electronics [31].
Applsci 13 02921 g004
Figure 5. (A) A fully assembled wireless node consists of Arduino Uno, Zigbee, sensors, and battery. (B) Conceptual diagram of a node.
Figure 5. (A) A fully assembled wireless node consists of Arduino Uno, Zigbee, sensors, and battery. (B) Conceptual diagram of a node.
Applsci 13 02921 g005
Figure 6. Proposed IoT network with IoT sensors with gateway and drone deployment.
Figure 6. Proposed IoT network with IoT sensors with gateway and drone deployment.
Applsci 13 02921 g006
Figure 7. (A) Grain moths detected in the transparent box every 10 min. (B) Three types of insect detection through an A-type sensor.
Figure 7. (A) Grain moths detected in the transparent box every 10 min. (B) Three types of insect detection through an A-type sensor.
Applsci 13 02921 g007
Figure 8. (A) Mosquito detection in a controlled environment. (B) Three types of insect detection through B sensor prototypes. (Numbers are every 10 min).
Figure 8. (A) Mosquito detection in a controlled environment. (B) Three types of insect detection through B sensor prototypes. (Numbers are every 10 min).
Applsci 13 02921 g008
Figure 9. Housefly detection in a controlled environment (numbers are every 10 min).
Figure 9. Housefly detection in a controlled environment (numbers are every 10 min).
Applsci 13 02921 g009
Figure 10. CupCarbon nodes (A); sensing node (B); base station (sink) node (C); mobile node.
Figure 10. CupCarbon nodes (A); sensing node (B); base station (sink) node (C); mobile node.
Applsci 13 02921 g010
Figure 11. Whenever a pest entered the sensing range of a sensing node, the simulator highlighted it with yellow color.
Figure 11. Whenever a pest entered the sensing range of a sensing node, the simulator highlighted it with yellow color.
Applsci 13 02921 g011
Figure 12. Cup-Carbon configuration of an agriculture field presenting 4 sensing nodes and random route of the mobile node with a centralized sink node.
Figure 12. Cup-Carbon configuration of an agriculture field presenting 4 sensing nodes and random route of the mobile node with a centralized sink node.
Applsci 13 02921 g012
Figure 13. (A,B) The drone movement is visible in different clusters as the multi-hop environment increased the sensing range.
Figure 13. (A,B) The drone movement is visible in different clusters as the multi-hop environment increased the sensing range.
Applsci 13 02921 g013
Figure 14. Console of Cup-Carbon simulator presents the results of the simulation.
Figure 14. Console of Cup-Carbon simulator presents the results of the simulation.
Applsci 13 02921 g014
Table 1. Arduino Mega board technical specifications [30].
Table 1. Arduino Mega board technical specifications [30].
ComponentValue
MicrocontrollerAT Mega2560
Operating voltages5 V
Input voltages7–12 V
Digital I/O pins54 (of which 14 provide PWM output
Analog input pins16
DC per I/O pin20 mA
Flash memory256 KB (8 KB used by the boot loader)
SRAM/EEPROM8 KB/4 KB
Clock speed16 MHz
Length x width101.52 mm × 53.3 mm
Weight37 g
Table 2. Sensor manufacturer specifications [31].
Table 2. Sensor manufacturer specifications [31].
SensorType AType B
Range04–30 cm0.2–1.5 m
Resolution1 cm1 cm
Weight4 g4.8 g
Package size29.5 × 13 × 13.5 mm29.5 × 13 × 21.6 mm
Supply Voltage4.5–5.5 V4.5–5.5 V
Table 3. General simulation parameters.
Table 3. General simulation parameters.
ParametersValues
No. of nodes4 + 1 + 1
Simulation time30 s
Routing protocolDirect routing
Radius (sensing) 80 m
Radius (radio)150 m
Data rate250 Kbps
Table 4. SWOT analysis of the proposed scheme.
Table 4. SWOT analysis of the proposed scheme.
StrengthWeakness
  • An IoT/WSN-based monitoring system for flying pest monitoring and detection
  • Single hop, many to one-sensor devices but can be configured for multi-hop and many to multi-sensor devices in future
  • Green environment, crop quality, quantity
  • Reduced human time, enhanced technological advancement
  • The requirement of smart and educated farmers and expert entomologists
  • Required technological experts from the industry
  • Needs approval of authorities
  • Needs to produce low-budget devices locally
  • Extra expense and effort
OpportunitiesThreats
  • Initially, the cost may be higher, but manufacturing costs will reduce in future
  • High deployment of solar energy panels in the field
  • Initially designed for specific pests but would be beneficial for more pests and crops
  • Relations among academia–industry–agriculture–entomology fields
  • Unawareness of weather, region, and crop seasons
  • May cause environmental pollution
  • Heavy deployment of power and communication equipment
  • Uneducated farmers
  • Technical skills are required
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Azfar, S.; Nadeem, A.; Ahsan, K.; Mehmood, A.; Siddiqui, M.S.; Saeed, M.; Ashraf, M. An IoT-Based System for Efficient Detection of Cotton Pest. Appl. Sci. 2023, 13, 2921. https://doi.org/10.3390/app13052921

AMA Style

Azfar S, Nadeem A, Ahsan K, Mehmood A, Siddiqui MS, Saeed M, Ashraf M. An IoT-Based System for Efficient Detection of Cotton Pest. Applied Sciences. 2023; 13(5):2921. https://doi.org/10.3390/app13052921

Chicago/Turabian Style

Azfar, Saeed, Adnan Nadeem, Kamran Ahsan, Amir Mehmood, Muhammad Shoaib Siddiqui, Muhammad Saeed, and Mohammad Ashraf. 2023. "An IoT-Based System for Efficient Detection of Cotton Pest" Applied Sciences 13, no. 5: 2921. https://doi.org/10.3390/app13052921

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop