Enhancing Greenhouse Efficiency: A Low-Cost IoT Approach

Development and implementation of a wireless sensor network in greenhouse farming

  

ABSTRACT

As we have seen and listened more about climate change, the decrease in plowable land and population explosion are alarming for the future food supply and viable agriculture. Greenhouse farming is seen as a viable alternative and long-term solution to the food shortage, in which we can grow vegetables year-round even if the outer conditions are unfriendly. However, greenhouse agriculture has many challenges for efficient management and operation. Internet of Things (IoT) technologies introduce efficiency in greenhouse management by remote control, especially monitoring and controlling environmental conditions such as soil moisture, relative humidity, and temperature delivered to the farmer from a server that gathers data via a small wireless sensor network (WSN) linked to sensors in a greenhouse. In this thesis, I designed a low-cost WSN to  monitor and control soil moisture, relative humidity, and temperature in greenhouses based on the NodeMCU ESP8266. Although the NodeMCU ESP8266 has 80MHZ data upload compared too Raspberry pi systems, it is cheaper, making it affordable to many farmers. It also has a better range, and is more secure, i.e. it, is not prone to hacking than Raspberry pi systems

 

Chapter 1:Introduction

1.0 Background of study

Greenhouse farming is a method of growing crops and vegetables in controlled environments, including lighting, ventilation, humidity, and temperature. This allows for year-round supplies of crops such as tomatoes and kale, which are difficult to grow during some seasons, e.g., wet seasons, resulting in increased consumer prices. In addition, greenhouse farming generates large yields per unit area, has better disease and pest control, and enhanced product quality. Hence, greenhouse agriculture makes increases farmers’ production efficiency, yields, and product quality (e.g., flavorful, and delicious plants).

Well-designed greenhouses can be a low-cost alternative to increasing yields, incomes, and profit in areas with harsh climates such as very high/low temperatures. Globally, more and more areas are developing extremes of climates due to global warming, threatening global food security. Currently, there is a greater understanding of applying technology to agriculture, such as various technologies available for Precision Agriculture (PA) to regulate and manage the requisite environmental variables for growing specific crops. This is especially important for greenhouse farming where some plants are less resistant to rapid environmental changes, only succeeding in a narrow range of environmental conditions. An excellent example is tomatoes, an essential ingredient in almost all Western and some Eastern cuisines. Tomato plants are so delicate, necessitating a great deal of care, and attention to detail of soil type and soil conditions,  and average temperatures. There should be enough moisture in the soil to support root growth and fruit production, but not excessive lest the plants drown. In addition, tomatoes thrive in a narrow temperature window, between 25 and 27 degrees Celsius. Above this range, the plants will not adequately produce fruit. It is therefore essential to closely monitor the requisite greenhouse environmental conditions for successful crop production. And to closely monitor the requisite environmental conditions for greenhouses, data collection is the starting point.

Manual data collection, as a method, can be sporadic, time-consuming, and non-continuous, resulting in variations and inaccurate quantification of variables of interest needed to precisely control the greenhouse environmental conditions. Wireless distinguishable sensor nodes that continuously record (log) data can be a solution that prevents the problems of manual data collection mentioned in the preceding sentences. In addition, data logging reduces the likelihood of losing or misplacing data, increases accuracy in data collection, as well as ensures rapid addressing of adverse environmental conditions. Data logging also prevents exposing personnel to dangerous situations. The focus of this research is an automatic, remote monitoring system of greenhouse environmental variables, temperature, humidity, and moisture. The suggested system has fewer manual processes and collects environmental data continuously, with the aims of enhancing watering systems and keeping the greenhouse temperatures and humidity levels ideal. Large-area wireless sensor monitoring systems are becoming highly prevalent in greenhouse technology precision agriculture.

1.2 Motivation

The demand for greenhouse intelligent farming in both emerging, low-income, and established high-income countries, is increasing. However, the current technologies available are generally expensive. Hence, the inspiration for this study is to design a cheaper alternative to the current expensive technology of monitoring greenhouse environmental conditions. In this thesis, I develop a reliable system to monitor soil moisture, air temperature, and humidity in greenhouses.

1.3 Contribution

By managing the factors like (temperature, humidity,  and soil moisture) the smart system created for these greenhouses seeks to boost greenhouse efficiency and save costs. The developed system may be employed in hobby greenhouses as well as commercial greenhouses with a large area. The climatic and irrigation factors that the system regulates are suited for all plants. All plant varieties can be grown in the greenhouse if the relevant threshold values are entered into the system during installation. The system has been intended to maximize the use of human power in greenhouse tasks including ventilation, and watering.

1.4 Problem Statement

Current greenhouse expenditure for technologies for efficiently monitoring soil moisture, air temperature, and humidity can be reduced. Reducing technology expenditure may lead to higher adoption rates, efficient use of water resources, and higher food production. This is particularly important given the predicted (1) reduced water availability due to increased urbanization which intensifies competition for water between domestic and agriculture usage, (2) increase in population which increases food demand, and  (3) changes in extreme weather such as temperature. By 2025 the world population is expected to grow between 8 and 10 billion. Climate change has affected food supplies, reduced access to food, and impacted food quality USDA (2015).

The research aims to develop and implement a low-cost wireless sensor network system for greenhouses that will enhance the efficiency of water usage and temperature and humidity regulation.

1.5 Research Objectives

The research aims to design a sensor network system that tracks greenhouse environmental conditions in real-time, which will boost irrigation efficiency and accuracy in monitoring and regulating temperature and humidity.

1.5.1 Specific objectives:

  1. To review and understand the designs and systems that are used to control environmental conditions in greenhouses.
  2. To configure the NodeMCU ESP8266 into the Cloud
  3. To design a solar powering system for the NodeMCU ESP8266 wireless system.

1.5.2 Research Questions:

  1. What are the designs, structures, and configurations that have been utilized to maintain greenhouse environmental conditions?
  2. What will be the design of the solar panel and supercapacitor?
  3. Is the NodeMCU ESP8266 technology feasible and scalable in solving the proposed solution?

Chapter 2: Literature Review

2. Introduction

This chapter provides a general overview of research implemented to automate greenhouse management processes such as monitoring and the control of environmental conditions e.g., soil moisture, air humidity, and temperature.

According to Aleotti et al. (2018), information and communication technology (ICT) in agriculture is becoming extremely relevant, and has fostered E-agriculture. For example, ICT in agriculture ensures efficiency through wireless and cloud-connected structures that simplify day-to-day farming activities, and provide real-time surveillance data that facilitate intelligent decision-making for yield maximization.

In general, agricultural technology has significantly advanced in developing small devices such as cellular devices and sensors, and facilities such as telecommunication networks and cloud computing facilities that improve farmers’ precision in obtaining weather patterns and accessing markets. Large-area wireless sensor monitoring systems are becoming highly prevalent in greenhouse technology precision agriculture.

Additionally, research has projected numerous “Internet of Things” (IoT) based technologies in agriculture that increase production with less labor. The term “Internet of Things” refers to creating networks of particles that interact with one another over the internet, utilizing integrated sensors, effectors, computers, RFID  (radio frequency identification), mobile phones, and other technologies. These particles have distinctive identifiers to authenticate their identities, transfer, and process data as per defined requirements, and submit updates to target consumers. The IoT evolved from machine-to-machine interaction, a system in which entities transfer information without interacting with the internet. Some examples of IoT-based agricultural practices available in the literature are summarized below.

2.1 Greenhouse projects

A programmable environmental controller for greenhouse environments using personal computers (PCs) was developed (Marhaenanto & Singh, 2002). The major components are sensors that measured water, temperature, and humidity levels. The output from the sensors is sent to irrigation drippers and fans for ventilation. Signal processing was aided by multiplexers, amplifiers, analog-to-digital converter (ADCs), and an interface board. The Greenhouse Environmental Controller (GEC) program was compiled with the disk operating system. The program operated manually or automatically, and the parameters could be adjusted to any desired level.

The Carnegie Melon University implemented a wireless sensor network for a greenhouse nursery project (Zubairi, 2009). The sensor network (WSN) measured humidity, temperature, light, and carbon dioxide levels (Song, Ma, Zhang, & Feng, 2012).

A low-cost Bluetooth-based system that uses a microcontroller, which acts as a meteorological station to monitor various agricultural variables such as temperature was proposed (Shaobo, et al., 2010). This system is ideal for real-time monitoring of field data. However, it has a drawback in that the range and Bluetooth configuration required for smartphones to continuously monitor conditions is limited. With the help of the Zigbee protocol, a WSN was designed to measure different environmental conditions (Satyanarayana, 2013).

A global system for mobile communications GSM-based greenhouse system whose dominant unit is an enclosed ARM7LPC2148 microcontroller has been developed (Guraiah, 2014). The input units are various enclosed wireless sensors that measure light intensity levels, humidity, and temperature levels. The output units are comprised of an associate |LCD (Liquid crystal display), a computer, GSM, and actuators. The measured values are displayed on the LCD and as a GPRS webpage on a central notebook computer. The program for the system was developed in C language making use of Keil computer code.

A greenhouse tracking system that used an Arduino UNO board and a computer was designed (Jena & S.Aman, 2015). The hardware consists of a statistics acquisition card, Arduino board, and computer sensors. In the greenhouse, DHT11 sensors, soil hygrometer sensors, CO2 sensors 12, and light sensors monitor parameters, which are then sent to the computer. The system lacked actuation units.

A prototype to monitor and control the climate of the greenhouse using the Wireless Sensor Network (WSN) and the Internet of Things (IoT) was developed and implemented (Koshy, Yaseen, K, Nisil Shaj, & M, 2016). The prototype consisted of a detection unit, a control component, a monitoring component, and message sending and receiving components. The detection unit used LM35 sensors for temperature, the MQ5 toxic gas sensors, and fire detection sensors. The various parameters detected by the sensors are displayed on an LCD screen. The sensors are connected to a P89V51RD2 microcontroller, which is the control component. The microcontroller was connected to a pump, a buzzer, and a GSM module via MAX 232. When the humidity is lower than the required values, the microcontroller turned on the pump to spray water. If a fire is detected, the buzzer is activated to alert the user. One of the message sending components is a GSM module that sent greenhouse parameter values to a predefined number of a smartphone with an Android app that played a an audio sound.

Crop Monitoring System using raspberry pi was suggested by Dr. Dhiraj Sunehra. The prototype included soil moisture, relative humidity, and temperature monitoring for greenhouse agriculture. Arduino Uno and Raspberry Pi are used to create a prototype of a web-based Smart Irrigation system. A webpage was created using HTML and PHP to display the status of several field factors such as temperature, humidity, and soil moisture, as well as the necessary action performed, so that the farmer may browse the webpage and learn about the state of the field. This technique reduces water waste in the fields and eliminates the need for farmers to visit the fields many times each day. (Dr. Dhiraj Sunehra, 2019)

Hassan Jabbar, Dr. Zaidoon Ahmad, and Dr. Intisar Al-Mejibli Hassan created an automated drip irrigation system with the goal of making the hard watering procedure more flexible while also saving water, time, and energy. The farmer would commence watering based on sensor data without having to examine the plant or decide if it requires irrigation based on its appearance. The suggested system is physically divided into two parts: a controller server with sensor nodes and a client side connected to the main computer. The sensor node is made up of an ESP8266 that is linked to soil moisture, temperature, and humidity (DHT22). The suggested system’s major goal was to create an irrigation schedule table for a single plant with full control over the water pumps utilized in the drip technique. In addition, irrigation was monitored in real time 24 hours a day, seven days a week. MYSQL is used to construct the database and Microsoft VS vb.net is used to develop the system’s GUI (graphic user interface). (Ahmad, Al-Mejibli, & Hassan, 2018).

2.3 Arduino IoT Cloud

Arduino IoT Cloud is a platform for anyone to create IoT projects with a user-friendly interface and an all-in-one solution for configuration, code writing, uploading and visualization. Arduino IoT Cloud supports a wide range of third-party boards based on ESP32 and ESP8266 microcontrollers that support Wi-Fi. Setting up the third part microcontroller is very easy – it doesn’t require professional expertise (Söderby, Getting Started With the Arduino IoT Cloud, 2022).

2.4 NodeMCU ESP8266

NodeMCU (Node Microcontroller Unit) is an open-source software and hardware development environment built around an low cost system-on-a-Chip (SoC) called ESP8266. Designed and manufactured by Espressif Systems, the ESP8266 includes the key elements of a computer: CPU, RAM, network (WiFi), as well as the latest operating system and SDK. Therefore, it is ideal for all kinds of Internet of Things (IoT) projects. The NodeMCU ESP8266 is very popular and is now mostly used in over 50% of IoT-based projects. (Fahad, 2010) The NodeMCU development board is easy to use and can be easily programmed using the Arduino IDE. Programming a Node MCU using the Arduino IDE rarely takes 10-20 minutes. All you need is the latest version of the Arduino IDE, USB cable, and Nodemcu.

The board itself  can be used on the following cases

  • Prototyping of IoT devices
  • Low power battery operated applications
  • Network projects
  • Projects requiring multiple I/O interfaces with Wi-Fi and Bluetooth functionalities.

 

2.5 WIFI

It is a system that depends on the IEEE 802.11 also known as the WIFI, which is mainly used in the Wireless local area network (WLAN). The WLAN uses ISM radio bands (2.4 GHz UHF and 5 GHz SHF), which can be used by electronic devices such as desktop computers, smartphones, smart TVs, printers, and digital cameras that are connected by wireless access points or connected Ethernet devices. The access points have a range of approximately 25 m, which can be increased. However, there are disadvantages to using WLAN. One is that the WLAN  is more vulnerable to attack/hacking than wired networks because anyone within the network range with access to the network interface can access it.

In general, the hardware components currently used are costly. For example, the garden smart set of routers plus the irrigation controller and humidity sensors cost up to 1.049 Polish Zloty (zakupy.pl, 2022). The Davis Soil Moisture Sensors costs up to 106.99 Euros ( (Stock4less.edu, 2022). Some of the methods used  to save date and monitor database requires are user who have experience in using some of the database management sytems like MYSQL.These high costs  and expert knowledge in some of the database management system may prevent farmers from adopting precision monitoring and controlling of greenhouse environmental conditions. This led me to design a smart greeanhouse based on the NodeMCU ESP8266 and use Arduio IoT Cloud as the server. It wil be a remote wireless automatic monitoring system for soil moisture, humidity, and temperature, which is a little cheaper. The management and monitoring are instant, and the system is easy to use and understand for the user who has little knowdge. It also provides mobility during the monitoring process which means the farmer does not have to wait in the green house to see the system working

 

CHAPTER 3: METHODOLOGY

3 Network system

The network system is a communication channel that delivers data from the greenhouses to the farmer. The  system uses the NodeMCU ESP8266  as the microcontroller and Arduino Iot Cloud as the server. The reason we are using the Node MCU ESP8266 is because they are cheaper, consume less power, and can be connected to many sensors and actuators. The project will have one NodeMCU ESP8266 module. This module will be connected to the Ardunio IOT cloud via wifi connection via the user wifi to the cloud server. The distance with this module does not matter, what is more important is that they user has to make sure that it is always connected the the wifi. As soon as the module is add to the cloud server the user is presented with the Device ID and the secrect key. The secrect key is used to make the connection between the cloud server and the NodeMCU ESP8266 module more secure.

 3.1 Price comparison

Approximately, one acre has up to 20 sensors for soil moisture, temperature, and humidity, with the temperature and humidity sensors combined. The price comparison between existing systems and my prototype for the thesis is based on the number of sensors needed per 1 acre greenhouse, the cost of powering the greenhouse (solar vs electricity), and the cost of  the cloud servers (Table 1).

Systems Items Euro (€)
Sensors Soil Moisture

Relative Humidity

5 290

3 170

Existing Research Electricity

Wi-Fi

Raspberry Pi

Cloud servers

200 /per month

60

203.49

20 per month

My research Sensors Soil Moisture

Relative humidity

64

90.16

Node MCU ESP8266

Solar Panel

142

360 ( once of payment)

Wi-Fi

Arduino IoT Cloud

60

6.33

 

Table 1:Price comparison

Sensors for the existing systems are more expensive because they come as a kit which includes the software program from a single company. Hence, one is purchasing the senor plus the program combined. With my design, the sensors are outsourced from different companies, as well as the software.Sensors for existing systems cost about 13 times (9428) more than my proposed system (€716).

Power supply for the existing systems is electricity, which requires payment of monthly bills of about €200. My system, which uses solar energy, only requires installation costs of €360 with It no monthly bills.

Cloud server that are being used in the current research  such as Thinkspeak cost (€20) per month. The user has to purchase a license  based on the number of channel and sensor that are in the system. Arduino Iot Cloud is free for up to 5 sensors  which is very convievient for a new user and when the user wants to increase the sensor up to 10 or more it cost (€6.33) per month. The Arduino IoT cloud will be very easy to use  and accessing.

Raspberry pi this is one of the microcontroller that is being used in the existing research. The raspberry pi is very costly (€50) for one module.The raspberry pi is not user friendly. It is not comptable of the Windows. As compared to the Node MCU ESP 8266 its is very cheap (€30) for each module. The module is user friendly it can be used on all types of operating systems.

3.1.2 System overview

The system has 5 sections: (a) sensor section for measuring soil moisture, and air temperature humidity, (b) Node MCU ESP 8266 microcontroller, (c) the cloud server which is the Arduino IoT cloud (d) the actuator for the ventilation fans and drip irrigation in the greenhouse, and (e)  solar system for powering the whole system. The whole system works on the Arduino software. The system sends hourly data from the greenhouse to the user.

Figure 1: sytem overview

 

 

3.2 System components : Software

3.2.1.1 Arduino IDE

Arduino IDE (Integrated Development Environment) is an open-source software, which is a simple content manager, such as a notebook with various elements. The software is utilized for writing code, incorporating the code to check on the off chance that there are any mistakes, and transferring the code to the Arduino board. To use the Arduino software, one must download and manually install the virtual serial Arduino drivers via device manager to the computer first. The system is ready to use when the port number the Arduino is connected to appears after installation.

When a client composes and aggregates code, the IDE creates a Hex record for the code which is shipped off to the Arduino board utilizing a USB link. The Hex documents are Hexa Decimal records that are perceived by Arduino.

3.2.1.2Arduino IoT Cloud server

The Arduino IoT Cloud is a web-based platform that allows you to easily design, launch, and monitor IoT projects. It allows users to develop IoT projects by providing a user-friendly interface as well as an all-in-one solution for configuration, writing code, uploading, and visualization. It is also an all-in-one IoT development solution that allows one to create visual dashboards to monitor and control your device, interface with other services, and much more and variable synchronization enables communication across devices with minimum code by allowing you to sync variables between devices. Wi-Fi, LoRaWAN (through The Things Network), and mobile networks are presently supported by the Arduino IoT Cloud (Söderby, Getting Started With the Arduino IoT Cloud, 2022).

In this project, I will utilize the Arduino Iot due to its amazing capabilities like data monitoring and Over-The-Air (OTA) Uploads, which allow you to upload code to devices that are not connected to your computer. Dashboard Sharing enables you to share your data with individuals all around the world.

 

 

The Arduino IoT Cloud supports a large selection of third-party boards based on the ESP32 and ESP8266 Wi-Fi microcontrollers. To configure them, simply select the third-party option in the device configuration. The user can choose a bundle based on the services he requires. We utilized a free account for the purposes of his project.

 

3.2.1.3 Create Agent

The Arduino Create Agent is a single binary that appears in the menu bar and runs in the background. It enables you to upload code to any board straight from the web using the Arduino IoT Cloud and the Arduino Web Editor. And work in the background. It allows you to use the Arduino IoT Cloud and the Arduino Web Editor to seamlessly upload code to any board directly from the browser.( (Söderby, Getting Started With the Arduino IoT Cloud, 2022)

The user will download the software. The software will be running in the background whilst the Arduino IoT cloud is ruining. The main purpose of the agent is to help the user identify the microcontroller board that they are using so that it is easy to configure the board. This software is important because the objective of the project is to assist the new farmer with little knowledge of Arduino to be able to use the Arduino .

 

3.3 Drip irrigation

System of Irrigation We employ drip irrigation to make the most efficient use of water. It is a water-saving irrigation system that directs water to the roots of plants. Water from all sources, such as canals, rainwater collecting, tube wells, and so on, is not allowed to be used to irrigate the fields directly, but must first be kept in an underground tank. When the soil moisture threshold falls below the specified threshold, drip irrigation will begin. On his Arduino IoT cloud dashboard, the user will be able to view the status of the drip irrigation.

 

3.4 Hardware Components

3.4.1 Microcontroller (NodeMCU ESP8266)

For the microcontroller we have decide to use the NodeMCU ESP 8266. NodeMCU is an open-source platform based on the ESP8266 that can connect objects and transfer data over the Wi-Fi protocol. The NodeMCU ESP8266 development board includes the ESP-12E module, which contains the ESP8266 chip, which is powered by a Tensilica Xtensa 32-bit LX106 RISC CPU. This microprocessor supports RTOS and works at a configurable clock frequency of 80MHz to 160MHz. To store data and applications, NodeMCU contains 128 KB of RAM and 4MB of Flash memory. Its high processing power, along with built-in Wi-Fi/Bluetooth and Deep Sleep Operating capabilities, makes it suitable for IoT projects. The NodeMCU is fueled through a Micro USB connector and a VIN pin (External Supply Pin). It has interfaces for UART, SPI, and I2C (Components, 2020)

Because it is simple to use, the NodeMCU Development Board can be easily programmed with the Arduino IDE.Furthermore, by supplying some of the most significant functionalities of microcontrollers such as GPIO, PWM, ADC, and so on, it may handle many of the project’s demands on its own. NodeMCU programming using the Arduino IDE will take no more than 5-10 minutes. The Arduino IDE, a USB cable, and the NodeMCU board are all that are required.

The following are the general characteristics of this board:

  • Simple to use
  • Programmable using the Arduino IDE or IUA languages
  • Can be used as an access point or station
  • Has an integrated antenna
  • Has 13 GPIO pins, 10 PWM channels, I2C, SPI, ADC, UART, and 1-Wire

3.4.1.2 Microcontroller Specifications

The NodeMCU ESP8266 was selected as it satisfies the specific requirements of the microcontroller I selected.

Operating Voltage 3.3v
Input Voltage: 7-12 v
Flash Memory: 4MB
SRAM 64 kb
CPU ESP 8266

 

Table 2:Techincal system overview

Figure 2:NodeMCU ESP 8266

 

3.4.2 Soil moisture sensors

The soil moisture sensors, which are important to the system, have two probes through which electricity flows. The presence of moisture in the soil causes less resistance to the flow of electricity, leading to high sensor readings. On the other hand, dry soil behaves in the opposite. It conducts less electricity, leading to low sensor readings. The sensors are set at threshold values of soil moisture to automatically turn on irrigation valves below the threshold values. The technical specifications of the sensors are below (Table 3).

Technical Specifications
Voltage Input 3.3 – 50V
Output 0 – 4.2V
Current Input 35 Ma
Output Analog/Digital

Table 3 Technical specification of soil moisture sensors

Figure 3 Resistive soil moisture sensor

 

 3.4.3 Humidity and temperature sensors

The DHT22 sensor measures both air temperature and humidity. It is a low-cost, entry-level digital sensor that produces calibrated digital signals. Digital signal-collection technologies are used to ensure reliability and long-term stability. An 8-bit single-chip microprocessor is connected to the sensor components (Codebender, 2021).

The DHT22 humidity and temperature sensor is extremely accurate, and tough. It can be used in harsh environments, and is available as both a sensor and a module (DHT22 – Pin Diagram, Circuit, and Its Applications, 2013).  The sensor detects relative humidity levels using capacitive sensor elements. For measuring temperature, the sensor uses an NTC thermistor. The technical specifications for the sensor are below (Table 4).

Technical specification of DHT 22
Power supply 3.3-6V DC
Sensing element Polymer capacitor
Operating range Humidity (RH) 0 -100%
Temperature (°C) 40~80
Accuracy Humidity (RH) ± 2% (Min), ± 5% (Max)
Temperature (°C) < ± 0.5
Sensing period Average 2s
Resolution or sensitivity Humidity (RH) 0.10%
Temperature (°C) 0.1

 

Table 4 Techinal specification of the DHT22 sensors

Figure 4: DTH 22sensors

 

3.5 Relay

This is a configurable electronic device that can be managed by Arduino or any other micro – controller. The relay, which has two pin groups (low and high voltage), receives an input of low voltage signal from the microcontroller e.g., signal to irrigate or ran fans, operations that require high voltage. The relay, algorithmically switches on and off devices that require high voltage such as drip irrigation and fans from the low voltage signal from the microcontroller. Once the devices are switched on (irrigation or fans), the relay sends the information that devices are switched on back to the microcontroller in low voltage form.

Figure 5: Relay

 

3.6 Solar panels

The system is powered by a 120mm X 130mm solar panel of 6 V (open-circuit voltage Voc), with an output  6 V and 300 mA (short circuit current I sc). Its small size (120mm X 130mm) and output reduce the need for maximum power point tracking (MPPT). In addition, the system has a supercapacitor( 25farad) as backup power. Solar energy is used to reduce overall system power usage and supercapacitors are used because they last long, extending the life of the solar panel. Su percapacitors have the added advantage of charging faster.

 

3.7 Super-capacitor

The super-capacitor used is an LSUC 25F, 2.6V capacitor. The reasons for selecting a capacitor of this capacity are 1) the available charging current, 2) the required charging time, and 3) the available usable energy.

Although the available maximum charging current from the solar panels is 300mA, it is not always possible to get the continuous output of 300mA due to variations in weather, in particular, cloud cover. Hence, the super-capacitors are charged by a varying current between 0-300mA depending on sky conditions related to cloud cover. As a result, the charging time might increase, depending on the time constant and the maximum current available from the power source. Charging time is one of the important factors to consider in the application of wireless sensor nodes. And using solar energy limits the time window during which the super-capacitor is charged. Hence, larger capacitors were eliminated in designing the system.

The  25F capacitor has a charging time of about 600-700 seconds when the charging current is 100 mA. This proves to be optimum as per the requirement of the node. Since the capacitor is being charged by solar power it is important to make sure that we connected them in series and also we do charge them up to 75-80%  to balance up the supercapacitor bank. This supercapacitor will be able to provide backup power for over 13 hours in case of a power shortage.

 

3.8 Organization of the report

Chapter 4 describes, with some details, the project work. The problem statement and the solution were both presented. A detailed overview of greenhouse farming and wireless sensors networks is discussed in Chapter 2 which is essentially our project literature review. In Chapert 3 the project approach is explored with its block diagram and the materials used. The results and their discussions are briefly explored in chapter 5. All matters are concluded in Chapter 6. References and appendices are given.

Chapter 4: System Design

 4.1 System flow chart

Figure 6 : System overview

In the developed intelligent system, the components (sensors, relays) are connected to the microcontroller. The microcontroller receives and evaluates all measurements from sensors, and operates the entire system (irrigate, control temperature and humidity) based on the evaluations. The evaluations are based on the thresholds for soil moisture, temperature, and humidity, which are pre-entered into the microcontroller. The thesholds depend on the crop species, and growth stages of the crops.

 

Figure 7:Microcontroller functions

4.2 Drip irrigation

The system flow for soil moisture control in the designed smart system begins with soil moisture measurement in the root zone for accurate readings. The measurent is evaluated against the current threshold for soil moisture. The drip system is switched on via a signal from the microcontroller to the relay when the soil moisture falls below the set moisture threshold. The drip system is switched off when the microcontroller receives measurements from soil moisture sensors when the soil moisture has reached the set threshold. The signal to switch off irrigation is also sent to the relay, which paases it on to actuators. Soil moisture measurements are collected hourly to prevent over-irrigation.

 

Drip irrigation algorithm:

Process Drip irrigation (  , , )

Read soil moisture sensor

If soil moisture <

Start drip irrigation

Else

If  soil moisture >=

Turn off the drip irrigation

Else

Break

4.2Ventilation

Ventilation helps balance greenhouse temperature and humidity. Temperature and humidity are simultaneously evaluated 24 hours per day, and entilation is opened and closed when temperatures and humidity exceed the set threshold values. The thresholds for the humidity and temperature are set based on the crop requirement. When the readings fall below or above the thresholds the ventilation command is sent. Humidity and temperatures are collected hourly to prevent sudden temperature fluctuations.

 

4.2.1Ventilation algorithm:

Process Ventilation ( , ,

Read the DHT 22 sensor

If sensor reading > =    

Then

Turn on the ventilation

if  sensor reading <

then

            close ventilation

else

                        break

 

 

4.3 Implementing the System Design

First the user has to create an account with the Arduino IoT cloud server. The user will select the package that he would like to use based on the variable that they would like to add inside the greenhouse.In the case of this project I have add 5 variable that the soil moisture, temperature , humidity, irrigation and ventilation. The image below show how a typical greenhouse dashboard in the Arduino IoT Cloud it will look like. The user is asked to set up the the greenhouse threshold of the temperature, humidity and soil moisture.

Figure 8: Arduino Iot Cloud dashboard

Soon after adding the variable the user can lay out his dashboard based on how he would like to present the information. The user now has to add the module that they have. The Arduino cloud allows users to add an Arduino device or the 3rd  part devices. The user has to select the type of module that they have.

Figure 9: Setup devices

 

Figure 10: Device section

The user now has to add the module the next step is to set up the wifi connection to the cloud server. In the case of the project I will be adding Node MCU ESP8266 to the cloud server.After configuring the node MCU ESP8266 the user is presented with pdf that has the secrect ID and device id. The NodeMCU ESP8266 will be listed under devices in my cloud.The user now has to add the Wifi connection to the NodeMCU ESP8266 and the cloud.Soon after adding the wifi connection the status of the NodeMCU ESP8266 changes to available, The user now knows that is is on line.

Figure 11: Network configuration

 

The user  now can connect the Node MCU ESP 8266 and  the the set up variable. This will makes the syem know to which connection they need to send the reading. The image below shows how the NodeMCU ESP 8266 is now linked to the variables . The image below  show the device name in this  case I named it Cristy  and on the network section its shows the name of the Wifi is is now connected to and the password. The variable section these are the variable that  are being used in the green house.

Figure 12: Variable overview

Now all the connection with  our Arduino Cloud is done. The user now has to check the Arduino code. This Arduino code n the Arduino IDE is done by cloud server based on the varivable that the user has entered. The code is then save in to the NodeMCU ESP 8266 so that it will able to excute the function  of  getting the reading and sending them to the cloud.

 

Chapter 5: Conclusion

 

Due to the low cost-to-quality ratio of the thesis system, its adoption by farmers should be easy. Costs are directly related to adoption of new technologies, especially in farming where profits have gradually decreased over the years. The adoption of the system will allow farmers to cultivate plants more efficiently by saving water due to timely irrigation, save human resources by automation of the system, and save on electricity bills by use solar power. All this will help increase crop yields and profits.

Chapter 6: Future recommendation

 

Although the use of Node MCU ESP8266 technology lowers the cost as compared to Raspberry pi. The Node MCU ESP8266 is a 3.3V device which means that it will not be able to support some of the peripheral devices.  There is, therefore, a need to focus future research on improving adding the other peripheral devices

NodeMCU ESP8266 Wi-Fi code takes a lot of CPU (central process unit ) power as compared to the Zigbee and Raspberry pi. Hence future research should focus on how they can make sure it does not consume a lot of power.

In comparison to Zigbee, Raspberry pi they have a lot of source documentation. This makes it a bit difficult for people who would like to know more about the module. Future research should make sure that more source documents are not available.

Finally, NodeMCU ESP 8266 devices have a lower life span, which increases replacement costs. Future research should focus on developing durable devices.