Microcontroller-based Vertical Farming Automation System

Received Jul 24, 2017 Revised Jan 24, 2018 Accepted Mar 7, 2018 Food is a basic necessity of life. It is the means by which man is nourished and strengthened to carry out his daily activities. The need for food for the upkeep of man has placed agriculture at the helm of man’s affairs on earth. With a rapidly increasing population on earth, man has invented newer and innovative ways to cultivate crops. This cultivation is mainly concentrated in rural areas of countries around the world; but with the massive urbanization happening in the world today; it is becoming increasingly difficult to have enough agricultural produce that will cater for the massive population. Taking Nigeria as a case study, the increased urbanization has placed a massive demand on land, energy and water resources within urban areas of the country. Majority of the food consumed in the urban areas is cultivated in the rural areas. This system however requires longer transportation times from rural areas to urban areas which lead to contamination and spoilage in many instances. This research paper provides a solution in which food crops can be cultivated easily in urban areas by planting in vertically stacked layers in order to save space and use minimal energy and water for irrigation. Keyword:


INTRODUCTION
Farming refers to growing of crops or keeping animals by people for food and raw materials. Farming is a part of agriculture. In relation to crop farming and livestock farming, the term "agriculture" may be defined as the art and science of growing plants and other crops and the raising of animals for food, other human needs, or economic gain. The farming industry is a very important sector in the economies of the world; it is an indispensable sector, because farming is the sole source of food which remains our only source of energy and vitality as humans.
It is estimated that by the year 2050, close to 80% of the world's population will live in urban areas which is highly significant, and the total population of the world will increase by 3 billion people [1], [2]. And that 70% increase in agricultural productivity will be required. As a result, a very large amount of land may be required depending on the change in yield per hectare. Scientists are concerned that this large amount of required farmland to mitigate this increase will not be available and that severe damage to the earth will be caused by the added farmland due to land degradation and loss of soil fertility [3]- [5]. With respect to the above, increment in crop production with modern day technology (such as automation) to maximise the use of available land is therefore of necessity [1], [6]. Engineers have advised that Vertical farming is the solution to increase productivity per area by extending plant cultivation into the vertical dimension, thus enhancing land use efficiency for crop production [7]. Construction of vertical farm in different layers and compartment is possible for large-scale production like the one of glasshouse and controlled environment agriculture [8]. Vertical farming is the practice of producing food in vertically stacked layers. It offers many advantages over conventional horizontal-based farming in terms of increased crop production, conservation of resources, impact on human health, urban growth, energy sustainability, etc. If designed properly, Vertical farming may eliminate the need to create additional farmland, help create a cleaner environment, and solve the food crisis in growing cities and suburbs.
The modern idea of vertical farming uses controlled-environment agriculture (CEA) technology [8], where all environmental factors can be controlled. These facilities utilize artificial control of light, environmental control (humidity, temperature, gases) and fertigation, but crops are only grown in an aqueous solution which nullifies its comparison with conventional horizontal soil planting system. However, a research on vertical soil planting was implemented in [1], where plants were grown in upright cylindrical columns and compared against a conventional horizontal hydroponic system (HHS). The vertical farming system (VFS) produced more crops per unit of growing floor area when compared with the HHS, but light distribution and shoot fresh weight decreased significantly in the VFS from top to base.
Recently, automation is considered to be an essential technology that is used in many fields and projects for control and monitoring of various phenomena such as the water supply, room temperature, voltage fluctuation, etc. [9]. Hence, this work aims to design a low-cost vertical farming automation system (VFAS) that allows for more efficient production of food by implementing low voltage sensor technology so as to minimize wastage of resources and maximize returns. By employing humidity sensors, light sensors, and temperature sensors, real time performance of the plant can be recorded thereby determining appropriate time to provide water and light to the plants.
According to [10], disease infection can be found crops which in turn disrupts their production in terms of quantity and quality. Hence, this work finds significance in the fact that it improves the quantity and quality of crops grown on a small area of land while minimizing resources used, as opposed to the traditional method of farming. This work is embarked upon because it is a direct means of impacting food production and consumption for those alive, at the same time, produce a viable product for the marketplace which would be made affordable to individuals. The scope of this work will cover the design and building of the vertical farm, programming micro controller for its automation, actual testing with live plants, and implementation of the completed work.

RESEARCH MATERIALS AND METHODS
Explaining research chronological, including research design, research procedure (in the form of algorithms, Pseudocode or other), how to test and data acquisition [1]- [3]. The description of the course of research should be supported references, so the explanation can be accepted scientifically [2], [4]. In this work, the vertical farm designed, comprises two distinct soil layers with individual lighting, water supply unit, moisture sensor and temperature sensor. The front end of the design features solenoid valves which would feed water through a low voltage water pump from an over-head water tank. The lighting fixtures for the farm would automatically brighten up or dim in intensity based on the level of lighting in its environs.
At the back end, the farmer has the ability to view live data of the plant's performance. The farmer can switch between automatic and manual modes which would allow him to perform routine maintenance on the farm during which he can manually control the irrigation. The materials used to realise this design include: a. Sensors Soil moisture sensor with analogue and digital outputs is to be placed in the soil, and calibrated to take readings. The output from these sensors is used to determine the switching on and off of the solenoid valves. The light sensor placed on the vertical farm structure monitors the light intensity of the environment, and adjusts the internal lighting to suit the plant needs. Atmospheric temperature sensor gives output data which is used to control the switching ON and OFF of the fans to control the temperature of the farm. 12-volt water pump is controlled by the micro-controller, based on analogue readings from the soil moisture sensor, and it is used to feed the solenoid valves which in turn activate water sprinklers. c. Power supply The phase voltage of the AC mains to the VAFS is stepped down from 239.6V to 15V and rectified to 12V DC (to power solenoid valves, water pump and fans) and 5V DC (to power micro-controller and liquid crystal display).

Systems design
This design requires that the automatic irrigation system is able to continuously sense the moisture level of the soil. The system will be able to respond appropriately by watering the soil and then shut down the water supply when the required level of moisture is achieved. The system design of this project has different sub-systems integrated together. There are three sub-systems. These are power supply sub-system, sensing sub-system, and control sub-system. Figure 1 show the schematic diagram of the project and Figure 2 System's block diagram.

Power supply sub-system
The lighting system (fluorescent lamp) is powered from AC mains. The microcontroller, i.e. the Arduino Uno is powered from a 12 V DC adapter, and the solenoid valves were powered from a 5V DC adapter.

Sensing sub-system
The concept of automation, as complex as it may seem, is simply a normal electronic system which integrates a feedback mechanism referred to as a sensor. The sensor acts as an indicator to the enactment of a desired result; with sensors, control of any system is realizable.
Generally, two types of sensors may be used for measurements of soil water status; those that measure soil water potential (also called tension or suction) and those that measure volumetric water content directly. Soil water tension (SWT) represents the magnitude of the suction (negative pressure) which the plant roots have to create to free soil water from the attraction of the soil, and move it into the root cells. The dryer the soil, the higher the suction needed, hence the higher the SWT. SWT is commonly expressed in centibars or kilopascals.

Soil moisture sensor
Soil moisture sensors measure the volumetric water content in soil. Since the direct gravimetric measurement of free soil moisture requires removing, drying, and weighting of a sample, soil moisture 2049 sensors measure the volumetric water content indirectly by using some other property of the soil, such as electrical resistance, dielectric constant, or interaction with neutrons, as a proxy for the moisture content. The relation between the measured property and soil moisture must be calibrated and may vary depending on environmental factors such as soil type, temperature, or electric conductivity. Reflected microwave radiation is affected by the soil moisture and is used for remote sensing in hydrology and agriculture. Portable probe instruments can therefore be used by farmers or gardeners. Figure 3 show the spark fun soil moisture sensor.

Sensing system flow-chart
The following flow chart shown in Figure 4 describes the basic operation of the moisture sensing system used in this work. First, the soil moisture sensor measures the soil resistance at intervals, sends the information as a digital signal to the sensor; the microcontroller then decides whether or not the soil resistance is high or not (depending on the pre-set thresholds and soil type). If the soil moisture level is lower than the pre-set threshold, the microcontroller actuates the submersible water pump and solenoid valves which provide water to the soil via drip irrigation method.

SYSTEM IMPLEMENTATION
The whole automated vertical farming irrigation system has both mechanical and electrical components. The implementation of the system design was done using readily and locally available materials. This required that some mechanical constructions must be carried out in addition to the development of the electronic circuitry. Figure 5 show the 2D Render of vertical farm structure.

Mechanical construction
The mechanical constructions carried out in this design were those of aluminium works and piping as shown in Figure 6.

Electrical circuitry
Implementation of the electronic circuitry involved physical simulation of the circuit using a breadboard to ensure proper operation and the final implementation of the circuit on a vero board. Figure 7 show the sensing and control circuit.

Microcontroller programming
The microcontroller used in this project is the Arduino Uno, which has an Arduino integrated development environment (IDE), and it is programmed using C programming language. The basic functions of the code are outlined below: a. Receive data from the analog sensors. b. Convert the analog signals to digital information using a digital/analog (D/A) converter. c. Interpret the digital information. d. Send control signals based on the received digital information.

RESULTS AND ANALYSIS
The complete system was tested for correct operation by applying the system to irrigate different soil samples. Below is the table of results. Table 1 shows the amount of time which the system took to irrigate different soil samples in different initial states. The data is represented in the following It can be seen from the results obtained in Table 1 that the system responded linearly with respect to the degree of wetness for the three soil types. Figure 8 shows this linearity in a clear form. There is a linear relationship between the degree of soil dryness and the time taken to irrigate the soil. At 50% dryness, irrigation duration was 2.0, 3.0, and 4.0 seconds for sandy, loamy and clayey soil respectively, while at 70% dryness, irrigation duration increased to 4.0, 7.0, and 9.0 seconds for sandy, loamy, and clayey soil respectively. It is seen that irrigation generally took longer in loamy soil than in sandy soil, and irrigation took the longest in clayey soil. Figure 8 show the scatter diagram of the variation of irrigation time with soil type.

CONCLUSION
This work is the design and implementation of a microcontroller-based vertical farming automation system. The main aim of the work is to minimize the power consumption and water consumption involved in the cultivation of plants. This is a major contribution when we consider the scarce availability of power and water in the area investigated. To achieve this, a DC water pump and solenoid valves were deployed. These were controlled using the Arduino Uno microcontroller. The microcontroller was programmed to activate the solenoid valves to water the plants when the moisture content of the soil drops below a certain threshold. The soil is irrigated until the soil moisture rises above a pre-set threshold, at which the solenoid valves are deactivated. By automating the drip irrigation process, water conservation is demonstrated because the soil is watered only when it needs to be.
Power is conserved in two ways: a. The sensing and control circuits are direct current (DC)-controlled, and the control system is activated only when data is received from the microcontroller. b. Energy saving fluorescents are used rather than incandescent lamps in order to reduce the amount of heat generated by the lighting system. The act of planting in vertically stacked layers also ensures that land space is conserved. Apart from the fact that this work conserve energy, water and land space usage, it brings about farming under control and monitor situations. Control over variety of pests and intruders of any kind. From the amount of literature reviewed, the present work is the first to delve into this power and water conservation idea in the vertical farming automation system in Nigeria.