IoT Based Monitoring System for White Button Mushroom Farming

: In Nepal, most of the farmers depend upon traditional agricultural practices. Adapting modern agricultural technology plays an important role in improving overall efficiency as well as the productivity of their yields. In modern agriculture, the Internet of Things (IoT) connects farmers to their farm via sensors so that they can easily monitor the real-time conditions of their farm from anywhere. The White Button Mushroom is a widely cultivated crop among Nepalese farmers. Although being the most consumed and cultivated crop, it is still overshadowed by the traditional cultivation approach, which is resulting in low productivity, high manpower efficiency, and more effort and cost. This work aims to develop a monitoring system to monitor the environmental conditions of a mushroom farm. It enables a user to monitor crucial factors such as temperature, humidity, moisture, and light intensity on a mushroom farm through the end devices. White Button Mushroom requires an optimum temperature ranging from 22 to 25 °C and humidity from 70% to 90%. Sensors are placed at fixed locations and spots of the farm. Then, the sensors measure the status of parameters, which are transmitted to the remote monitoring station via a low power Node MCU (micro-controller unit). Thus, obtained data are stored in a cloud platform. The codes for the controller are written in the Arduino programming language, debugged, compiled, and burnt into the microcontroller using the Arduino integrated development environment. The result shows successful monitoring of environmental conditions accessing the Internet from anywhere. It minimizes human efforts and automates production, which could be beneficial to Nepalese farmers.


Introduction
The increased population demands a large amount of crop production. We can cultivate the crops, which need specific environmental conditions on the farm. This project is an implementation of smart farming for mushroom cultivation. Smart farming is about real-time data collection, processing, and analysis, as well as automation technologies on the farming procedures to achieve improvement in farming activities. Internet of Things (IoT) sensing and mobile technologies have now become daily assistants to numerous activities. Smart farming has also improved to a new level. An IoT technology has been widely implemented in measuring smart home systems and agricultural monitoring systems, which will enhance the efficiency of current equipment for remote monitoring purposes [1,2]. The IoT is an important tool for people interacting within an agro-industrial system [3] and is gaining high popularity in the agricultural field [4]. Among the different species of mushroom cultivated in Nepal, White Button Mushroom is the most cultivated with a large demand on the market.
On average, the mushroom is cultivated using manual methods from spawn production to packaging, which requires cultivators to spend more time. In such a case, it is difficult to maintain hygienic conditions in the cultivation area, which may cause pests and diseases and result in complete damages of the crop [5,6]. Additionally, in Nepal, mushroom cultivation lacks scientific research, hesitation in the adaptation of technology, and insufficient investment in technology [7]. Mushroom growers are growing mushroom in thatched mud houses, in which maintaining the required temperature and humidity for mushroom cultivation is very difficult. For the large cultivation of the White Button Mushroom, we consider temperature, humidity, ventilation, and light. Thus, by the use of the IoT, which is the network of physical devices embedded with physics, software, sensors, actuators, and properties that allow these objects to attach and exchange knowledge, these processes could be made easier. As these kinds of structures need refinement, a scientifically designed mushroom farm needs heavy investment and hence is out of reach of small and marginal mushroom farmers. Monitoring the farm remotely through a mobile application is crucial for the efficiency of cost [8][9][10]. Hence, here we aim to develop a monitoring system to monitor the real-time environmental conditions of a mushroom farm, which is thought to be both cost and yield efficient, through a mobile application.

Hardware and Software
Hardware and software used in this project are open-sourced and readily available. The main types of hardware being used are sensors and microcontrollers, which will be placed at the farm. The software is being used to program the microcontroller to store data in the cloud and access those data from the end devices.

Temperature Sensor
A temperature sensor is a thermocouple that gathers the temperature from a specific source and alters that information into an understandable type for an observer. The LM35 is one kind of commonly used temperature sensor that measures temperature in degrees Celsius. It can measure temperature more correctly compared with a thermistor. It possesses low self-heating and does not cause more than a 0.1 °C temperature rise. It can measure temperature from −55 to +150 °C. LM35 can be operated from a 5 V supply and the standby current is less than 60 uA.

Humidity Sensor
A humidity sensor or hygrometer senses, measures, and reports both moisture and air temperature. The ratio of moisture in the air to the highest amount of moisture at a particular air temperature is called relative humidity. The DHT-11 is used to sense the humidity of the air. The operating temperature ranges between 0 and 50 °C. Its storable humidity range is within 95% RH (Relative Humidity). The rated voltage is DC 5 V.

Soil Moisture Sensor
A soil moisture sensor is used to measure the volumetric water content of the soil. Our Vegetronix series VH400 soil moisture sensor probes precisely measure soil water content. The sensor allows low-cost monitoring with high resolution. The power consumption of this sensor is less than 7 mA. The operating temperature ranges between −40 and 85 °C.

Arduino
Arduino is an open-source platform used for building electronics projects. Arduino consists of both the physical programmable circuit board and a piece of software that runs on a computer used to write and upload computer code to the physical board. The ATmega 328 is a single-chip microcontroller created by Atmel in the megaAVR family. The operating voltage of ATMEGA 328 is 5 V. The digital and analogue input/output pins are 14 and 6, respectively. DC per I/O pin is 40 Ma. The flash memory is 32 KB, of which 0.5 KB is used by the boot loader. The clock speed is 16 MHz. The Atmega 328 on the Arduino Uno comes pre-burned with a Boot loader that allows uploading new code to it without the use of an external hardware programmer.

Light Sensor
The light sensor is a passive device that converts light energy, whether visible or in the infrared parts of the spectrum, into an electrical signal output. It is a sensor that changes the resistance when light falls on it. It generally operates in the range of −20 to 75 °C. Light sensors are more commonly known as photoelectric devices or photo sensors because they convert light energy (photons) into electricity (electrons).

Node Micro-Controller Unit
Node MCU (micro-controller unit) is an open-source IoT platform and is a low-cost Wi-Fi module with a full TCP/IP (Transfer Control Protocol/ Internet Protocol) stack and a microcontroller. This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections. It can be used for IoT projects. ESP8266 is a Wi-Fi enabled system on a chip module developed by Espressif system. ESP8266 is a 3 V Wi-Fi module very popular for its IoT applications. The ESP8266 module is an extremely cost-effective board with a huge, and ever-growing, community.

Thing Speak
Thing Speak is a popular IoT protocol. It visualizes sensor data in real-time. It uses the power of MATLAB to make sense of IoT data and run IoT analytics automatically, based on schedules or events. It is a prototype that builds IoT systems without setting up servers or developing web software.

Blynk
Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi, and the likes over the Internet. It is a digital dashboard where one can build a graphic interface for a project by simply dragging and dropping a widget.

Methodology
The methodology is divided into two block diagrams. The block diagrams provide the conceptual idea of how individual elements interrelated to the whole systems. It also helps in defining how the system flows for better visualization.
The block diagrams shown in Figure 1 present the basic idea of how the project proceeds. It consists of the sensor nodes distributed on the various areas of the farm, each covering certain areas on the farm. The node consists of several sensors-a temperature sensor, LDR (Light Dependent Resistor), a humidity sensor, and a soil sensor-with a power-managed system that runs from a renewable power source available in the field, e.g., solar. Each node consists of the same design and is illustrated in the block diagram below. The microcontroller in the node takes all the sensor readings data and sends them over to the gateway. The overall circuit diagram of the system is shown in Figure 2. It is a simple lightweight protocol for machine-to-machine communication designed for the IoT. It works on a publish-subscribe basis. It publishes sensor data and sends them to the devices that are subscribed to it. It transports data from the sensor to the gateway from each node. It is two-way communication. We can control and read nodes remotely using this protocol. Further from a gateway, we send data over to the Internet. The different IoT service providers provide us with the platform to give data to users and the public.

Results
The result was obtained after implementing the proposed hardware. The tested hardware was LM 35 (temperature sensor), DHT11 (humidity sensor), a soil moisture sensor, and LDR. This system provides an ATMEG328 microcontroller unit Node MCU that provides a base for live monitoring of the temperature, humidity, soil moisture, and light intensity of the farm and sends the data to the end devices via the cloud through Node MCU. The data thus obtained are almost equal and calibrated according to standard measurements of the weather station. The MATLAB data were recorded through the temperature (LM35) and humidity (DHT11) sensors taking them at different time instances as shown in Figure 3. The obtained data are sent to the cloud. The interfacing of the whole system was done by the Blynk app. The measurements given by the sensors were directly sent to the cloud via the low powered Node MCU. Then, the measurements were accessed via an end-user application, i.e., Blynk. The sensor's measurements can be seen in Figure 4, which shows the measurements of temperature, humidity, soil moisture, and lighting conditions of the farm.

Conclusions
The project redefines the concept among farms and agronomists. Therefore, we can say that IoT has brought a revolutionary change in monitoring, management, and the data analysis sector. Major sensors, such as temperature and humidity sensors, have been tested, and their data were sent to IoT platforms for accessing and monitoring. Mushroom farming requires continuous monitoring of environmental parameters. Our system plays an important role in stepping in the field of automation of mushroom farming. This project will be beneficial in the automation and monitoring of mushroom plants and will assist farmers in increasing the agriculture yield and taking efficient care of mushroom production, as the system will always provide a helping hand to farmers for getting an accurate live feed of environmental temperature and soil moisture with more accurate results reducing the manpower. Furthermore, we are planning to add other parameters like light and to develop a separate android application that provides easy access to the field parameters for the farmers.

Conflicts of Interest:
The authors declare no conflict of interest.