Automated Fall Armyworm ( Spodoptera frugiperda , J

.


Introduction
The agriculture sector is a major contributor to job creation, health, family cohesion, wealth and political stability in most African economies (MoNDP, 2018). In the sub-Saharan Africa, maize is among the cash-crops and most grown crops in addition to being the staple food crop that meets the nutritional needs of both humans and livestock. It is grown in almost all parts of the country especially the rural areas (Smale et al., 2011). Therefore, the economical importance of maize and its role in securing Zambia's food and nutrition security including political stability cannot be over looked. Kwasek (2012) stated that food security is achieved when all people, at all times, have physical, social and economic access to sufficient, safe and nutritious food that meets their dietary needs and food preferences for an active and healthy life. Threats to food security include but not limited to climate change, droughts, emerging diseases, salty soils, fertilizer dependence and pests (Thompson, 2016). According to MoA (2019a), the greatest threats to national food and nutrition security in Zambia include illegal export of maize, also known as smuggling and fall armyworm infestation, among others. In this paper, we focus on the trapping of adult fall armyworm moths.
The main objective of this paper is to bring automation to the FAW trap and reduce on the labourintensive tasks which include field visits, manual counting and recording of the moths by field inspectors. We modify the trap and integrate Internet of Things (IoT). The IoT technologies include a Raspberry Pi 3 Model B+ micro-computer, Atmel 8-bit AVR microcontroller, 3G cellular modem and various sensors which include the pi camera, DHT11 temperature/humidity, Davis anemometer, powered with an off-grid solar photovoltaic system for capturing FAW images and environmental conditions in the field. This work is a build-up on the preliminary works that were published by Chiwamba et al. (2019; and Chulu et al. (2019a;2019b).
The system captures an image of the funnel path every second alongside environmental conditions and saves the image on local folder. The captured images together with environmental conditions are uploaded to the cloud server where the image is classified instantly using Google's pre-trained InceptionV3 machine learning model. The object is uploaded using the 3G cellular modem. Once the sending is successful, the image is deleted from the local drive on the Raspberry Pi as a way of managing the storage space dynamically and avoid over filling the SD card.

Fall Armyworm
The Fall Armyworm (FAW) (Spodoptera frugiperda) is a lepidopteran pest and it is native to the Americas (Day et al., 2017). The FAW is named after the Autumn (Fall) due to its presence during the said season in North America where it lays eggs and the larvae develops (Nagoshi et al., 2009;Plessis et al., 2018). According to Plessis et al. (2018), the FAW gained prominence when it was found to be attacking crops during the mid-19th Century in the Southern United States. Prasanna et al. (2018) further reports that the FAW has been found to be a more devastating pest than many others pest in Africa due to its ability to feed on over 80 different crop species; spread quickly across large geographic areas; and being persistent throughout the year. The FAW feeds on leaves and stems of a variety of plants including economically important maize, forage grass, rice, sorghum, sugarcane, cotton and vegetable crops, among others (Banson et al., 2019).
According to IAPRI (2019), the FAW mating occurs at high temperature and low humidity hence the high prevalence of the infestation in long periods of drought. The tropical habitat is ideal for the FAW to quickly reproduce and spread without pause. The FAW life cycle is a four staged one as shown in Fig. 1 and it takes about 30 days during the warm summer months and may extend to 60-90 days in cooler temperatures (IAPRI, 2019;Capinera, 2007).
It is believed that the FAW was introduced to Africa through transportation and subsequent widespread dispersal by the wind (Cock et al., 2017). In 2017/2018 season, the Zambia FAW infestation affected approximately 130,000 hectares of crops which resulted in over USD $3 million for control costs during the early stages of its introduction (Otim et al., 2018). Day et al. (2017) reported that the impact of FAW ranges between 22% and 67% of yield in Ghana and Zambia, respectively. Similarly, Kenya and Ethiopia reported estimated yield losses of 32% and 47%, respectively (Kumela et al., 2018). The above-mentioned losses will continue with the establishment of the FAW in Zambia.
Addressing the food security threat posed by FAW requires surveillance, monitoring and scouting of the spread of FAW to ensure adequate crop protection. Knowing the time, location and extent of infestation is vital to pest control. The current African response to FAW has faced several challenges arising from weak monitoring, surveillance and scouting systems. Other challenges include delayed recognition of the pest's widespread presence across the continent and lack of information about the dynamics of FAW migration that would allow effective prediction of where infestation might occur next. The spread of FAW has resulted in indiscriminate spraying of pesticides, often without knowing whether chemical control is necessary or effective within the local context (Prasanna et al., 2018). Meagher (2001) stated that the monitoring of FAW male moths should be done with a multicomponent sex pheromone as a lure in traps. This is a type of insect trap that uses pheromones to lure insects to the trap. The trap can be used to detect early pest infestations such as the first occurrence of migratory pests; define areas of pest infestations; track the build-up of a pest population and help in decision making for pest management (Ahmad and Kamarudin, 2011;Baker et al., 2011;Anderson et al., 2012;Guerrero et al., 2014). Furthermore, Cluz et al. (2012) reported that the use of pheromone traps data in insecticide application was found to be more effective with a larval mortality rate above 90% in maize fields. Some notable pheromone traps are the sticky and Funnel (green lid/yellow funnel/transparent bucket) as shown in Fig. 2 and 3 respectively. Figure 4 shows the Funnel (green lid/yellow funnel/transparent bucket) components.
Historically, the sticky trap has been found to be more effective in capturing FAW male moths when positioned approximately one meter above the ground in and around the preferred hosts such a maize (Mitchell, 1979). The Funnel (green lid/yellow funnel/transparent bucket) pheromone trap has been found to outperform other pheromone traps including the sticky trap when trapping FAW moth in maize fields. Given its efficacy, it is no surprise that the Government of the Republic Zambia with the help of the FAO has secured over 2200 pheromone traps to be used in the monitoring and surveillance of the FAW moths (MoA, 2019b).

Internet of Things
In the recent years, the use of Information and Communication Technologies (ICT) and transducers to ensure optimum application of resources to achieve high crop yields and reduce operational costs in the agriculture sector has been observed. This concept of adding sensors and intelligence to basic objects is referred to as the Internet of Things (IoT). IoT refers to the billions of physical devices around the world that are now connected to the internet, collecting and sharing data using different types of protocols. IoT can be looked at as a network of objects which are embedded with technologies Cap that helps to communicate and engage inside themselves and exterior environment (Chihana et al., 2018). The IoT concept was first developed in 1999 by a Radio Frequency Identification (RFID) development community (Shi et al., 2019;Bilal, 2017) and it has recently become more relevant to the practical world largely because of the growth of mobile devices, embedded and ubiquitous communication, cloud computing and data analytics.

Application of IoT
IoT has many applications including smart home, smart city, smart grids, smart retail, smart supply chain, industrial internet, connected car, connected health (digital health/telehealth/telemedicine) among others (Gour, 2018;Chihana et al., 2018). According to Muangprathub et al. (2019), the applications of IoT in the agriculture sector can be used to improve crop yields or quality and reduce costs. The seamless integration of transducers and the IoT in agriculture can raise the sector to levels which were previously unimaginable. IoT has the potential of streamlining procedures, reduce wastage and enhance productivity in the agriculture sector. According to Ayaz et al. (2019), IoT can help to improve the solutions of many traditional farming issues, like drought response, yield optimization, land suitability, irrigation and pest control by following the practices of smart agriculture. Further benefits can come from the quantity of fertilizer that has been utilized to the number of journeys the farm vehicles have made or the spray of pesticides (Ayaz et al., 2019). The major applications, services and transducers being used for smart agriculture applications are shown in Fig. 5.

IoT Architecture
IoT architecture consists of different layers of technologies supporting the scalability, modularity and configuration of IoT deployments in different scenarios. The IoT architecture has been presented using different layer numbers and names by many researchers (Yelizavet and Florentino, 2019;Chihana et al., 2018;Bilal, 2017;Sethi and Sarangi, 2017;Vermesan et al., 2013). In this paper, we discuss the ITU Y.2060 IoT architecture (Yelizavet and Florentino, 2019;Vermesan et al., 2013) shown in Fig. 6.

IoT Application Layer
The IoT application layer is the top most layer which covers "smart" environments/spaces in domains such as agriculture, homes, smart cities, grids, building, transport, retail, supply chain, healthcare environment and energy. It interacts directly with the end user by providing services and determining a set of protocols for message passing at the application level (Yassein et al., 2016). According to Haikun et al. (2018), connection to IoT management system platform by users is achieved using browser or client software through Ethernet/3G network.

IoT Service and Application Support Layer
In literature, some scholars refer to this layer as the Management Service Layer (Gour, 2018;Chihana et al., 2018). It is the layer that is responsible for processing the information through analytics, information extraction, security controls, process modeling and management of devices and gadgets. Business and process rule engines are among the most important features of the layer. IoT brings connection and interaction of objects and systems together providing information in the form of events or contextual data such as temperature of goods, current location and traffic data. Some of these events require filtering or routing to postprocessing systems such as capturing of periodic sensory data, while others require response to the immediate situations such as reacting to emergencies on patient's health conditions. The rule engines support the formulation of decision logics and trigger interactive and automated processes to enable a more responsive IOT system (Yelizavet and Florentino, 2019).

IoT network Layer
As the devices and gadgets produce enormous volumes of data, a robust and high performance wired or wireless network infrastructure is required to transmit this data. Due to the diversity of the IoT, it is often tied with heterogeneous protocols to support Machine-to-Machine (M2M) networks and their applications. These networks can be in the form of a private, public or hybrid models and are built to support the communication requirements for latency, bandwidth or security (Haikun et al., 2018). According to Chihana et al. (2018), the network layer is responsible for ensuring that the transmission of transducer data to the next layer is achieved in a scalable and flexible manner.

IoT Device Layer
This is the layer that is made up of smart objects integrated with transducers that enable the interconnection of the physical and digital worlds allowing real-time information to be collected and processed (Bilal, 2017). According to Chihana et al. (2018), the layer consists of sensor networks, embedded systems, RFID tags and readers or other smooth sensors. The sensors have identification and capacity to take measurements such as temperature, air quality, wind speed, wind direction, humidity and pressure among others. The sensor may also have a degree of memory, enabling them to record a certain number of measurements. Most of these sensors require connectivity to the sensor gateways which can be through a Local Area Network (LAN) such as Ethernet and Wi-Fi connections or Personal Area Network (PAN) such as ZigBee, Bluetooth and Ultra Wideband (UWB) (Bilal, 2017). Some sensors do not require connectivity to sensor aggregators therefore their connectivity to backend servers/applications can be provided using Wide Area Network (WAN) such as GSM, GPRS and LTE. For those sensors that use low power and low data rate connectivity, they typically form networks commonly known as Wireless Sensor Networks (WSNs) (Shi et al., 2019).

Machine Learning
Machine Learning (ML) is a subfield of soft computing within computer science that studies the design of algorithms that can learn. Similarly, Patel (2019) define ML as the science of getting computers to learn and act like humans do and improve their learning over time in autonomous fashion by feeding them data and information in the form of observations and realworld interactions. ML includes adaptive mechanisms that empower computers to learn by example, learn by analogy and learn from experience (Negnevitsky, 2005).
ML algorithms include Convolutional Neural Network (CNN), Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), Stacked Auto-Encoders, Deep Boltzmann Machine (DBM) and Deep Belief Networks (DBN). According to Ding and Taylor (2016), the use of CNN for identifying and counting pest in field traps has the potential to effectively remove the human from the loop and achieve a complete automated, real-time pest monitoring system. Similarly, Martineau et al. (2017) reported that many researchers had acknowledged that CNN had outstanding performance in terms of image classification accuracy.
ML model can be built using transfer learning. Transfer learning allows building of accurate machine learning models in a timesaving way by starting from patterns that have been learned when solving a different problem (Marcelino, 2018). Instead of starting from scratch, it leverages on previous learning's and this is usually expressed through the use of pre-trained models. A pre-trained model is a model that was trained on a large benchmark dataset to solve a problem similar to the one that is being solved. In the work of Marcelino (2018), it was reported that transfer learning had become the core of several state-of-the-art image classification solution. The pre-trained models include but not limited to Mask R-CNN, YOLOv2, MobileNet, VGG-Face Model, 3D Face Reconstruction from a Single Image, Google Inception, ImageNet, VGG-16, Xception, VGG19, ResNet50, InceptionV3 and InceptionResNetV2.

Related Works
In literature, some works use electronic devices to feed data into some control station. For example, the work of Marković et al. (2017) used a Raspberry Pi 3 microcomputer with four Cortex-A53 processing cores, 1.2 GHz and two level of cache memory to monitor the Western Corn Rootworm (WCR) trapped by the sticky WCR pheromone trap. The pi camera was attached to the Raspberry Pi 3 and used to capture images of the sticky surface of pheromone trap. The counting of insects was done using the python module installed on the Raspberry Pi 3 by defining the number of pixels with dark or near dark colour and removing the impurities. While the system had a 0.3% accuracy, the system behaviour was not tested on unclear images and other objects that could be caught in the trap. Eliopoulos et al. (2018) introduced a device for automatic detecting and reporting of crawling insects in urban environments which complied with the context of smart homes and smart cities. The device architecture embraced the IoT concepts by modifying the sticky pheromone trap and integrating it with a microcontroller, image sensor, infrared light sensor to detect targeted insect and capture they picture which were delivered to an authorized person/stakeholder using Wi-Fi. The results showed that the e-trap had potential application in tourism, hospitality, health, military and residential places. Furthermore, the trap achieved a detection accuracy ranging from 96 to 99%.
In the work of Potamitis et al. (2014), an Arduino Mega2560 microcontroller platform (Atmel ATmega2560 microcontroller, 16 MHz clock speed, 256 KB Flash, 8 KB SRAM, 4 KB EEPROM) powered by a 4.8 Volt battery NiMH power supply was used to perform the counting of insects entering the trap and recognize the species. In order to sense the insects, an optoelectronic (TCRT5000) sensor and phototransistors were placed at the entrance of the McPhail trap to detect light interruption due to the partial occlusion from insect's wings as they flew into the trap. The output of the optoelectronic sensor was analog and, it was sent to the Arduino Mega2560 microcontroller to perform the counting of insects passing the beam and recognize the class the insects belonged to. The events was stored in the device's memory and transmitted once per day as text message via the GSM expansion board SM5100B to a predefined recipient. With the real time count and classification of insects present per trap, stakeholder's efficiency was enhanced by knowing the time and location of insect infestations as early as possible.
Similarly, Facello and Cavallo, 2013), used an Arduino Uno microcontroller platform (Atmel ATmega328P microcontroller, 16 MHz clock speed, 2KB Flash, 2 KB SRAM, 1 KB EEPROM) powered by a 43W solar panel, 18Ah Pb battery to monitor pests in vineyards and orchards. The trap was equipped with a 2592×1944 pixels (5Mpixels) wide-angle lens 6mm focal length IP camera, temperature/humidity sensor and LED illuminator. The sensor, led and camera were connected to the Arduino Uno board running a custom firmware developed for the application. The led and IP camera were powered separately using a 12V and up to 0.3A power supply because the 5V and 0.04A from Arduino was not sufficient. The Arduino Uno communicated and was controlled through a standard USB connection on the embedded mini-ITX pc-board (Intel DN2700MT). The main software running on the mini-ITX pc-board governed all the necessary operations needed to acquire, store and transmit the images and environmental information. The images were stored on the a local disk and they were automatically uploaded and synchronized with a free file hosting service on the web using a standard Wi-Fi connection. Remote users were given access to the images by simply connecting to the webpage. Zhong et al. (2018) designed and implemented a visionbased counting and classification system for flying insects using a YOLO pre-trained model and Support Vector Machines learning algorithm. The system was based on a sticky pheromone trap that was installed in the field to trap flying insects and camera attached to a raspberry pi to capture real-time images. When compared with the conventional methods, the test results showed an average counting accuracy of 92.50% and average classifying accuracy of 90.18%. These results were breakthrough towards smart and intelligent agriculture applications which could forecast the occurrence probability of pests to enable agricultural workers provide suitable prevention and control measures.
We see more work in Muminov et al. (2017) when a solar powered audible intelligent bird repeller system is developed based on Arduino UNO microcontroller to deter domestic birds which are a major threat in the field of agriculture causing damage to economic field crops, storage houses and also dirtying human life area. The other system components included a solar panel (7W, 12V), an intelligent PWM solar charge controller, 12V battery, MP3 Player, amplifier (Stereo 20W Class D Audio Amplifier -MAX9744), two 20W speakers, three sonar sensor and PIR sensor. The SD Card was loaded with domestic bird's predators' calls and special sounds (such as gunshot sounds) stored using the MP3 file format. The signal level of predators' calls and special sounds were played out via the speakers and increased using the amplifier while the solar panel was used to charge the battery and power the amplifier, speaker and Arduino Uno. The other components were powered by the Arduino Uno. The system algorithm was designed in such a way that it was able to play special sounds which had not played for a long time. This technique was applied due to an acknowledgment that birds can learn sounds overtime and that would render the repeller ineffective.
Other works proposed a solar powered rice black bug light trap that would help reduce rice black bug infestation based on an Arduino Uno microcontroller platform and C++ programming language (Calderon, 2017). The notable components included a 12V 20W standard polycrystalline solar cells panel, 30×40×15 (width × length × thickness) clear acrylic square box,150 LED size 7×7 mm, 5A battery charger, 12V 14Ah Sealed Lead Acid battery, light sensor switch circuit, DS1307 Real-Time Clock (RTC) and high voltage circuit of mosquito trap all enclosed in steel box to prevent any damages. The proposed design was assessed in terms of efficiency, functionality, maintainability, reliability, usability and cost-effectiveness of the materials using questionnaires and a 3.7 overall weighted mean was observed where experts' response was highly acceptable.
A custom-made microprocessor hardware embedded with a SIM card and the Global System for Mobile Communications (GSM) antenna to transmit accumulated detection results of all insects entering the trap using Short Message Service (SMS) to the base station is seen in the work of Potamitis et al. (2015). The insects were lured and as they flew into the trap, an optoelectronic sensor composed of an array of photoreceptors that acted as a receiver and an array of infrared LEDs on the opposite side of the circular entrance guarded the entrance by forming a light gate. The insect wings interrupted the flow of infrared light from emitter to receiver. The optoelectronic sensors captured an analog signal of the wingbeat recording which was sent to the microprocessor embedded in the trap. The job of the microprocessor was to analyze the frequency content of the acquired recording and calculate the distance metric from the spectrum of the unknown incoming recording to the spectrum of pre-stored prototype spectra of the pest results in order to identify the insect. Other efforts are seen the in the work of Holguin et al. (2010), when two electronic trap prototypes based on a microcontroller from Microchip Technology Inc. Model PIC18F8722A to automate the labour-intensive operations of monitoring insect populations and reduced the cost of integrated pest management programmes are compared. The trap in question was the bucket pheromone. The first trap used Light Dependent Resistor (LDR) sensors and the second one used Infrared (IR) sensors. The LDR-based traps were tested in a laboratory environment while the IR-based traps were tested in apple fields.

Materials and Methods
The modification of the FAW pheromone trap to bring about automation started with the PV systems design followed by trap fabrication and ended with integration. The high-level systems design of the automated FAW pheromone trap is shown in Fig. 7 and the Modified FAW Trap Block Diagram is shown in Fig. 8.

Step I-Solar PV Systems Design
The researchers growing energy needs can be satisfied by the enormous energy from the sun which provides over 150,000 terawatts of power to the Earth (Crabtree and Lewis, 2007;Camacho et al., 2010). Crabtree and Lewis (2007) reported that the Earth surface only receives about half of that energy while the other half is reflected to the outer space. The main components of a solar PV system include solar panel, charge controller and battery. Figure 9 and this section highlights the procedures used to determine the ratings and quantities for each of these components.  Determine Battery Operated Hours Climatemps (2019) reported that Lusaka, the capital city of Zambia at latitude 15°25'S and longitude 28°27'E receives a minimum of 5 h, an average of 7:35 h and a maximum of 09:42 h sunshine per day. This is in agreement with the results obtained by (Mwanza et al., 2017). We determined the battery operated hours using Equation 1:

Determine Total Load
Many researchers modify the already existing traps by integrating single-board computers, microcontrollers and various sensors (Holguin et al., 2010;Facello and Cavallo, 2013). At this stage, we identified all the electronic components to be used to realize an automated energy independent pheromone trap and used Equation 2 to estimate the load for the Off-grid solar PV system: Where: P = The total load (Wh) ik = The current for a single component (A) vk = The voltage for a single component (V) tk = the running hours for single component (hrs) The subsections that follow gives detailed descriptions and specifications of the components used.

Single-Board Computer and Microcontroller
A Single-Board Computer (SBC) is a complete computer built on a single circuit board, with microprocessor(s), memory, Input/Output (I/O) and other features required of a functional computer. Some notable SBC's available on the market include Raspberry Pi, The Beagles PandaBoard, MK802, MK808, Cubieboard, MarsBoard, Hackberry Udoo and MinnowBoard among others (Maksimović et al., 2016). In the work of Maksimović et al. (2016), the Udoo is found to be the best in performance but expensive while Raspberry Pi remained an inexpensive computer and very successful in diverse range of research applications in Internet of Things (IoT). In addition, the Raspberry Pi offers support for a large number of input/output peripherals, network communication and can interface with many different devices and used in a wide range of applications. Table 1 gives the Raspberry Pi 3 Model B+ specifications.
A microcontroller is a small computer on a single integrated circuit and Arduino Uno is among the mostly used (Maksimović et al., 2016;Ferdoush and Li, 2014).
Arduino is an open-source single-board microcontroller development platform with flexible, easy-to-use hardware, software components and supports two working modes: stand-alone or slave connected to a computer via USB cable (Cvijikj and Michahelles, 2011). Table 2 gives the Arduino Uno Rev 3 specifications.

DHT11 Temperature/Humidity Sensor
The DHT11 is digital environment sensor used to measure the moisture and temperature of the surrounding air. It is low cost temperature and humidity sensor. Characteristics of this sensor are given in Table 3. The sampling rate for the DHT11 is 1Hz or one reading every second, the operating voltage for sensor ranges from 3 to 5 volts, while the max current used when measuring is 2.5 mA. In the work of Ferdoush and Li (2014), the DHT11 is used to measure the humidity and temperature in grape fields. Table 3 gives the DHT11 sensor specifications.

IR Break Beam
The use of light sensors in detecting and counting of insects has been seen in the of works Potamitis et al. (2015;2014) and Holguin et al. (2010). One of the notable light sensor is the Infrared (IR) break-beam. According to Adfruit (2019), the Infrared (IR) breakbeam is a motion detector with an emitter side that sends out a beam of human invisible IR light and a receiver across the way which is sensitive to that same light. Adfruit (2019) goes on to state that the break beams are faster and allow better control of where you want to detect the motion as compared to Passive IR sensing. The IR break beam is offered as 3 mm or 5 mm. The 3 mm sensing distance is about 25 cm while the 5 mm is about 40 cm. Both can be powered from 3.3 V or 5 V. The 5 V power gives a better range and it is the recommend one. Table 4 gives the 3 mm sensor specifications.

Pi Camera Module
The raspberry pi camera module v2 is a high definition vision sensor that comes with a Sony IMX219 sensor (Raspberry, 2019). The IMX219 is a diagonal 4.60 mm (Type 1/4.0) Complementary Metal-Oxide-Semiconductor (CMOS) active pixel type image sensor with a square pixel array and 8.08M effective pixels. It operates with three power supplies, analogue 2.8 V, digital 1.2 V and IF 1.8 V and has low power consumption drawing between 200-250 mA. It achieves high sensitivity, low dark current and no smear through the adoption of R, G and B primary colour pigment mosaic filters. This chip features an electronic shutter with variable charge-storage time. The camera module can be used to take high-definition video at 1080p30, 720p60 and VGA90 video modes, as well as stills photographs. According to Raspberry (2019), it is attached to Raspberry Pi through the Camera Serial Interface (CSI) port and it works with Raspberry Pi 1, 2, 3 and 4 models. It can be accessed through the Multimedia Abstraction Layer (MMAL) and Video4Linux (V4L) Application Program Interfaces (APIs) in addition to numerous third-party libraries built for it such as Picamera Python. In the works of Marković et al. (2017), the pi camera is attached to the Raspberry Pi 3 and used to capture images of the sticky surface of WCR pheromone. Table 5 gives the pi camera module V2 specifications.

Quectel EC25 Mini PCIe 4G/LTE Module
This is an interface between the raspberry pi and internet. According to Sixfab (2019a), the Quectel EC25 Mini PCIe is a series of LTE category 4 module adopting standard PCI Express® MiniCard form factor (Mini PCIe). Sixfab (2019a) goes on to state that it is optimized specially for Machine-to-Machine (M2M) and IoT applications and delivers 150Mbps downlink and 50Mbps uplink data rates. The EC25 is integrated with Global Navigation Satellite System (GNSS) to provide quicker, accurate and dependable positioning. It is inserted in the Raspberry Pi 3G-4G/LTE base shield V2 which has both the UART and USB communication for the raspberry (Sixfab, 2019b). For detailed specifications Table 6.

Davis Anemometer
The anemometer and wind vane are the other devices used for sensing environmental conditions. The anemometer measures the wind speed while the wind vane measures wind direction. Davis (2019) has combined the two functions and called the devices Davis anemometer. Cactus (2014) has shown that the Davis anemometer can be interfaced with Arduino Uno to create a weather station, this is in agreement with the results obtained by Kong (2017). Table 7 lists some of the Davis anemometer specifications.

Determine Storage (battery) Capacity
As PV cells generate electricity during sunshine, a rechargeable battery system is required to store it for use in the absence of sunshine. Currently, the battery types include Lithium-ion, Nickel, Sodium sulfur, Flow redox and Lead acid among other. According to Daniel et al. (2014) lead acid batteries have been found to be reliable and cost-effective while Maya et al. (2018) reports that the lithium-ion is a high energy efficiency battery rated at 90% despite the high cost and safety concerns compared to the lead acid at 85%. To determine the battery size, we used Equation 3: Where: Ah = The battery Amp hour (Ah) E = The total load (Wh) Vdc = The system Voltage preferred (V) Fsafe = The Safe Factor

Determine the Solar PV Panel
Conversion of the solar energy to electricity can either be direct or indirect. According to Taşçıoğlu et al. (2016), the indirect method is through collecting and Concentrating the Solar Power (CSP) to produce steam which is then used to drive a turbine to provide the electricity while Bayrak and Cebec (2011) states that the direct method uses the Photovoltaic (PV) cells. The most used PV cells are the polycrystalline and monocrystalline. Abdelkader et al. (2010) reported that the monocrystalline PV cells were more efficient compared to the polycrystalline and this is in agreement with results obtained by several authors (Taşçıoğlu et al., 2016;Husain et al., 2018)

Determine the Charge Controller Capacity
Storing power from solar PV cells into a battery requires a charge controller. According to Maya et al. (2018), charge controller controls the rate of flow of the charge carriers and protect the battery from overcharging in addition to preventing battery over discharge and electrical overload. We determined the charge controller capacity by applying Equation 5

Costing the PV System
We prepared the System Requirements Specification (SRS) based on the battery (Voltage/Amp hour), solar PV panel (Voltage/Wattage) and charge controller (Voltage/Amperage) determined in Equation 3 to 5 We then used the SRS to obtained quotations from various solar system suppliers.

Step II-Trap Housing Fabrication
We used 40×50 mm and 40×50 mm square tubes to fabricate the solar housing, 3mm metal sheet to house the battery, 1.2×22 mm outside diameter GI pipe to hold the Anemometer, 2 mm sheet metal to house the Charge Controller, Raspberry PI 3 Model B+, Arduino Uno Rev 3 and support the FAW Funnel (green lid/yellow funnel/transparent bucket) pheromone trap. We then attached everything to the 3×90 mm inside diameter black pole.
Step III-Integration The 12V 100Watt solar monocrystalline PV panel is used to generate the electricity and it is connected to a 12V 15A charge controller. In order to avoid overcharging, over discharge and electrical overload of the 55 Ah battery, we connect it on the battery side of the charge controller. We then power the raspberry pi using one of the USB port on the charge controller. The pi camera is connected to the CSI camera connector and mounted on the top cover (lip) next to the lure holder of the FAW pheromone trap. The Raspberry Pi 4G/LTE shield with Quectel EC25 Mini PCle 4G/LTE module is connected to one of the USB ports on raspberry pi using the 90-degree right angle micro USB cable in order to achieve maximum data rates as opposed to the UART which is limited to a data rate of about 900 Kbit/s downlink and uplink. The Arduino Uno is connected to the raspberry pi USB port in a slave mode. The Davis anemometer is connected to pin A4 for wind direction, digital pin 2 for wind speed, 5V power and ground on the Arduino Uno while the IR break beam motion sensor is connected to pin 6 on Arduino Uno. The DHT11 Temperature/Humidity sensor is connected to the Arduino Uno 5v pin, GND pin and pin 4. The 3W led is connected to 13 and 5 Vpin while the photocell is connected to 5v pin, GND pin and A0.
The raspberry pi is loaded with Raspbian GNU/Linux 9.9 stretch, python 2.7.13, SQLite database and Arduino IDE 2:1.0.5 dfsg2-4.1. We use python to develop two custom-made programs. The first program captures an image of the funnel path every second alongside environmental conditions and saves the image on the local folder of 16 Gb SD card while the temperature, humidity, GPS coordinates, image identifier, wind speed and direction are saved in the SQLite database. The second program sends a picture together with environment conditions to the cloud server together as a JSON object by establish an internet connection using Raspberry Pi 4G/LTE shield with Quectel EC25 Mini PCle 4G/LTE module and Application Programming Interface (API).

Step I-PV Systems Design
The automated FAW Pheromone Trap was designed to run for 24 h per day taking into account the five minimum sunshine hours for Lusaka. When we applied Equation 1, we got a total of 19 battery operated hours. The main components of the automated FAW pheromone trap that required to be powered by Off-grid solar PV system are listed in Table 8. When Equation 2 was applied, we got a total of 412.72 Wh as the system load. Table 8 shows the total system load (power) for each individual system component.
We then applied Equation 3 to determine the battery size in terms of Amp hours. We used a 1.25 safe factor and 12 Vdc due to the max power requirement for Arduino Uno to obtained a 42.99 Ah battery size which was then rounded off to 55 Ah industry offering. We then chose to use a 12V 55 Ah system voltage lead acid battery because it was readily available on the Zambian market as opposed to a Lithium ion battery of the same size. The detailed specifications for the battery are shown in Table 9. We obtained the solar PV panel wattage by applying Equation 4. We applied a safe factor of 1.25 and the result was 103.18 W. We then rounded off the wattage and settled for an 100watt monocrystalline panel due to its efficiency and availability on the Zambian market. The detailed specifications of the solar panel are shown in Table 10. Thereafter, we used the solar panel wattage (100W) as the PVW, battery voltage (12V) as the Vdc and a safe factor of 1.25 to determine the charge controller and the result was an 8.33A which we rounded off to 15A charge controller due availability. The detailed specifications for the charge controller are shown in Table 11. The total cost of the Off-grid solar PV system came to USS$ 190.00 as shown in Table 12.
Step II-Trap Housing Fabrication Our fabricated trap housing is shown in Fig. 10 and 11 shows the inside of the case housing the Charge Controller, Raspberry PI 3 Model B+ and Arduino Uno Rev 3. The housing case is also used as the holder for the FAW Funnel (green lid/yellow funnel/transparent bucket) pheromone trap.      Step III-Integration Figure12 shows an image of a moth in flight in the funnel path while Fig.13 shows the local folder with captured images on the Raspberry Pi. Figure 14 shows records corresponding to the captured images alongside temperature, humidity, GPS coordinates, wind speed and direction saved in SQLite database table on the Raspberry Pi. The image identifiers is the primary key and corresponds to the filenames shown in Fig. 13. The image and environmental conditions are combined in a JSON object and uploaded to the cloud server using an API. Figure 15 shows the daily trap capture summaries on the Web Application Dashboard while Fig. 15 shows the details of a single record on a webpage uploaded to the cloud server. The ML attribute (prediction accuracy) is based on the Googles pre-trained InceptionV3 Machine Learning model adopted by Chiwamba et al. (2019) and Chulu et al. (2019b). The model achieved a 90% plus prediction accuracy for all images that contained a FAW moth as shown in Fig. 16 while a percentage less than 60% was observed for images that did not contain a FAW moth as shown in Fig. 17.

Discussion
We modified the FAW trap and integrated it with various sensors which included the camera, temperature, humidity, motion, photocell powered by an off-grid solar PV system for capturing FAW images and environmental conditions in the field. The greatest challenges included but not limited to, off-grid solar PV system configuration, FAW motion sensing and Raspberry PI camera capture timing. We had to upsize or down size the off-grid solar PV system components in order to align them to what was readily available on the Zambian market. On the FAW motion sensing, the IR Break Beam could not detect the FAW moth motion accurately leaving as with the Raspberry PI camera as the only way to remotely monitor the presence of the FAW moth on the trap. After setting the PI camera to capture FAW moth images every second, we observed that the PI camera captures ranged between 1s to 5s when we cross-checked the image id (record) in the database and image names in the folder. We then adjusted the timing to 5s and we instantly observed a 5s consistency in the capture interval. Furthermore, we observed that API took more than 5s to return prediction accuracy hence adjusting the image data upload to 10s.
Our modified trap can be improved in a number of areas including but not limited to reduced solar panel and battery size; reduced trap size and weight; integration of optoelectronic sensors similar to the ones used in the work of Potamitis et al. (2015); reduce on the data transfer rate and avoid stressing the cloud server by performing primary image classification on the Raspberry Pi.

Conclusion
Our automated FAW trap embraces the IoT concepts by integrating a Raspberry Pi 3 Model B+ microcomputer, Atmel 8-bit AVR microcontroller, 3G cellular modem and various sensors powered with an off-grid solar photovoltaic system to capture real time FAW moth images and environmental conditions including GPS coordinates, temperature, humidity, wind speed and direction in the field. The captured images together with environmental conditions are uploaded to the cloud server where the images are classified instantly using machine learning to determine whether the image contains a FAW moth or any other insect. The users are provided with an easy to use web application platform that shows near real-time indication of the FAW pest occurrence. Furthermore, users can view the population dynamics of the FAW together with environmental conditions and use the information to design suitable pest control strategies. The designed system has the potential to increase accuracy of monitoring, shorten data collection intervals, reduce field visits and minimize human intervention for a more efficient and effortless early warning and monitoring system that provides a near realtime insight into the FAW situation in the field.