Control Environment Gardening

This work is primarily about to automatically irrigate water, automatically on/oﬀ light when necessary, eventually consuming water, light and monitor climatic changes such as temperature/humidity. It also approaches to measure the consumed resources (water, light energy) consumed to track of business in general as well as equipment eﬃciency. The proposed system approaches to automatically irrigate water, automatically on/oﬀ light when necessary, eventually consuming water, light and monitor climatic changes such as temperature/humidity.


A. Automation:
Automation is famous to be the conversion of a work process to be automatically done by a machine instead of a human operation or its intervention.Early automation relied on mechanical and electromechanical control devices; during the last four decades, though, the computer gradually became the foremost vehicle for automation.Modern automation is usually associated with computerization, it is true that automation has extended its wings beyond manufacturing to include applications in other sectors such as Transportation, HealthCare, Agriculture, Security, Construction and many other areas.It is also identified that humans lack the concentration and focus to perform repetitive jobs with consistent results.Humans are prone to making errors.An automated system helps prevent all such errors that can lead to unrecoverable losses.

B. Internet of Things:
The idea of IoT is very simple, let's connect every computer (in truth, every device and equipment that has an electronic processing unit) in a network.When we look around, we see that almost everything has a processor or electronic chip in it, your microwave, your digital wall clock, your oven and even your home's heating, cooling and security systems.Today, we call as such things as smart device (if individual), or a smart system (if it comprises of several smart devices).
Nowadays, technology has become an integrated part of our lifestyle, as it started to influence many aspects of our daily life whether it is smart appliances, Smart security systems, smart locks, and smart doorbells, Smart assistants, fitness tracking applications and now even gardening areas can be automated for the ease of maintenance.Irrespective of which IoT application you are using, everyone will agree with the stance that there are many benefits of using such applications including time and money conservation.
The idea of IoT is not new to the world.A lot of fast progress achieved in the hardware and software industries has made IoT an everincreasing possibility.Better networks, smaller, portable devices that are very affordable and efficient in energy consumption has enabled researchers to focus on creating larger and more powerful systems.Scientists have discovered that instead of creating one expensive powerful computer, it is better to create several cheaper computers and join them together.The results obtained from later often exceed the capabilities of the former.

C. Gardening or Greenhouse Setup:
Controlled environment gardening can cover the home gardening setting or a small-scale greenhouse setup.Temperature, light intensity, soil moisture and also humidity are all important factors that greatly affect the quality of plant growth and productivity of entire gardens.Previous information can be collected about these critical environmental factors can result in better decision making about growth, furthermore energy consumption is also an essential part for the grower to know and keep a check on the electricity consumed by the automation system for their gardening.
The critical energy consumption parameter values will be collected real-time through the sensor and will be uploaded on AWS S3 for further analysis and visualizations.The soil moisture level and light intensity threshold can be set according to the need of the plant.The temperature and humidity parameters can be monitored using a mobile application for ease of use.

D. Issues in Gardening:
A self-reliant lifestyle cannot be complete without a fully functioning garden.Gardening is proven to be a very healthy and fulfilling activity.The produce grown in your own garden might not be a cheaper alternative to buying from a supermarket, but it is healthier.The problem is not everyone knows how to grow different plants and.The following are some of the major concerns in the gardening: The main goal is to measure the soil moisture in the plant which give you the information about the moister level whether it is under watered, over watered or ideally watered.The proposed mechanism focuses on the two parameters such as soil moisture and light intensity for the garden.After gathering the data from the sensors, the data will be continuously sent over the ThinkSpeak IoT cloud for the analysis because if accurate information about soil moisture is known the water requirement for the plant can be adjusted.The first sensor soil moisture sensor measures the percentage of moister present in the soil, the other sensor which is the light intensity sensor is used to measure the intensity of light reaching the plant, as in plant growth Lifecyle light is considered the essential resource.
The Arduino microcontroller with the help of sensors monitor and adjust the water and light intensity received by the plant.The microcontroller is connected via internet to ThinkSpeak IoT cloud which is capable of collecting, storing and analyzing the data sent by Arduino.Arduino receives alerts from cloud if the measured value of the moisture level, or light intensity reach the threshold and the water pump or light connect to Arduino need to be switched on of off.The following capabilities will be achieved by connecting the Arduino to cloud: first, the user can monitor the values of moisture level and light intensity online from anywhere at any moment of time as data is stored on cloud periodically.It also provides the capability to change the threshold value saved on cloud anytime which can automatically adjust the algorithm to cope up with the new threshold value saved.Last but not the least, the sensor readings transmitted to cloud can generate multiple graphs for analysis.

Prof. Mitual Sheth et. al.
[2] implement a system in which soil wetness detector, temperature detector and humidity detector that are used those are mounted at the root of the plant.The designed structure of this implementation consists of three separated sub-units.The first is for Blynk application which is comprised to get the status of the field and the user can control and monitor every sensor from their iOS mobile easily from any in the world.The second unit is about temperature and humidity sensor which is used to measure the temperature and dampness, whereas moisture sensor is to gauge the soil moistness level.The third subunit is comprising of a microcontroller which works as a central system which is responsible for communicating with different system through Wifi.The microcontroller is also interfaced with a relay module to control water pump which is dependent on NodeMCU that will give command for switching ON and OFF the pump automatically.
The proposed operates using two modes of threshold such as programmed mode or manual mode which can be set by user using the Blynk application.Once the mode is set to programmed mode the farms are automated to operate as detecting values by the sensors.Otherwise if the mode is set to manual the user can operate the garden by manually switching ON and OFF the water pump according to user ease.The NodeMCU switch the power ON or OFF the system, and upload the values fetch from the sensors (soil moisture, temperature, humidity) and analyze whether the fields need the water, if the soil moisture level or humidity level got decreased from the defined threshold the water pump will automatically start watering the grounds.When the grounds got sufficient water the motor pump will stop automatically which results in consuming less water and saving energy.

Pareena Jariyayothin et. al. [3] developed
an IOT based backyard system to monitor and control watering for the gardening and homegrown plants.The project is divided into three parts, first the microcontroller NodeMCU V3 for sending and receiving data to Arduino to control sensors, second a firebase which is a NoSQL database for retrieving and storing the sensor data and plant profiles as well, third a ionic framework based mobile application to maintain plant profile and switch on off the watering mechanism.
They deployed two microcontrollers NodeMCU V3 and Arduino UNO which is attached with NodeMCU V3 via RT/TX interface to send data and also equipped with soil moisture sensor, temperature sensor, real time clock and ultrasonic sensor.NodeMCU is also equipped with WIFI interface to send data to firebase and also retrieve watering threshold to send to Arduino.They use they two sensors for water controlling system, soil moisture sensor and ultrasonic HC-SR04 to measure the water level in the tank by calculating the distance between water and ultrasonic sensor.
The Firebase acts as a NoSQL database to collect data from the sensors and such as timestamp, soil moisture, and water tank level and send it to t he users via ionic mobile application.The mobile application also manages plant profiles to control watering of each different plant setup by different users.
The IOT backyard application is ionic framework mobile application has AngularFire2 library for firebase system communication, it also comes with a Cordova plugin for using the camera module to take plant pictures for different plant profiles and for user record and ng-2 charts for different visualizations.The mobile application enables users to set up the different plant profiles to control the soil moisture condition and to monitor the existing values of soil moisture and the water level present in the tank.

P V Vimal et. al. [4]
developed an Arduino based greenhouse environment system for monitoring and controlling the sensors.The used soil moisture sensor measures the content of water from the soil, the LDR sensor is used to measure the light intensity, the pH sensor is used to measure the pH of the soil.They have used the cooling fan, water pump, exhaust pump, motor pump, artificial light which are connected to the Arduino board, GSM modem and ethernet are used to send the environment values to the mobile application.
The SMS systems is used to turn on and off the cooling fan, whenever the temperature increases an SMS is sent on the user mobile and user turns on the cooling fan by simply sending and an SMS "FANON", same approach goes for turning off the fan but with the SMS "FANOFF".Humidity in environment is controlled by SMS as well but in this case exhaust fan is being switched on and off.Similarly for light intensity and soil moister used the SMS service for turning on the artificial lights and motor pump respectively, to eliminate these bulk of SMS charges all the parameters are sent to the server using the ethernet and also saved in the database for monitoring and analysis by the user on their mobile application.
An overheated greenhouse causes the soil to dry out rapidly and in need of more water.By using a monitoring system, farmers can be alerted to threatening conditions and with this controlling through SMS the farmer does not need to go into the large agricultural fields which is time consuming and will benefit in financial losses in agriculture by monitoring the values continuously and taking safety measures on time.
[5] worked on an improvement of current practices used for the agriculture by suing the modern technologies.Their work provides an automatic smart greenhouse system for farmers which includes less manual inspection.For water irrigation system they use automatic drip irrigation system, which is to safe the usage of water by only allowing to target the roots of plant for water supply.The water from different sources are not allowed to irrigate the fields directly, the water first stored into an underground tank from the tube well or canal, the tank has an ultrasonic sensor which alerts the farmer whenever the water is less in the tank through an SMS and the farmer sends an SMS to the GSM module, which triggers the relay to switch on water resource to fill the tank when the tank is full the microprocessor switch off the pump.All moisture sensors are deployed in the field for soil moister measuring, when ever the moister level is less than the threshold it opens the valve and closes its when the moister has reached the optimum level.
They have placed a DHT11/DHT22 sensor in the field to measure the temperature and humidity whenever temperature increases from a certain level, the microcontroller triggers the relay which will sprinkle the water droplets in the air which makes the temperature to cools down.Similar approach is also used for the moisture, whenever the moister level is low the small droplet of waters sprinkle through the relay that will increase the moisture level in the atmosphere.
They have also implemented the LED light for photosynthesis, whenever the light intensity is low the LED lights are switched on, in the morning the plants gets light from the sun but its not the case for every environment, furthermore the advancement in LED lights gives the ability to install plant re-growing lights which turns on whenever the reading from the LDR sensor goes below the threshold level which results in faster growth rate of the plant.The data collected form these sensors will be uploaded to cloud service (google drive) and will be forwarded to an e-commerce company.

B. Unique Parameter in Our
Implementation: Almost every other research and implementation done on greenhouse or agriculture using the IoT either with the cloud or mobile application, the main focus is on the soil moisture level, light intensity and temperature and humidity values.We are also looking into these parameters but with the addition of energy consumption calculation which is an integral part of any agriculture sector as energy is an important input for production.As all the sensor and this automated system will require electricity specially the light intensity that how much light or energy being consumed for the growth of the plant.Light is a big issue in winter season as the sun sets quickly and plants may not the desired light that is need for the proper growth.
A facility to grow off-season produce or to support crop growth in places where harsh environment doesn't allow regular agricultural activities is called a greenhouse.The entire system requires a lot of energy resources and in many cases, 50% of the product cost is just the energy bills.It is this reason; greenhouses have not become common even when there's a huge demand.A lot of research is still needed to optimize greenhouse processes and build efficient greenhouse sites.Some unforeseen climatic changes also affect the light in different seasons and at different places over all the globe.If we look into large scale gardening or a greenhouse the energy consumption parameters play a vital role for a home user for gardening and a businessman for greenhouse.By analyzing and visualizing the energy consumption values over the year, the user can have the idea of overall energy used by their plants, which will lead in better arrangement of facilities for electric arrangements in case of emergency situations.The yearly visualization of energy consumed will give the user a better idea about its usage so they can plan any kind of maintenance activity for their equipment's those are used for light intensity generation, for example if the month of June is mostly cloudy they will not plan any maintenance as the natural sunlight will be low and plants will be going to need artificial light intensity from the sensors.

A. Water
Irrigation with Soil Moisture Sensor: Soil moisture sensor is used to measure the moisture level of the given soil.When the moisture level goes beyond the threshold, motor pumps water to the plants.Amount of water consumed is measured using water flow sensor which outputs water flow rate and volume measurement.Water is being consumed less when using soil moisture sensor when compared to manual irrigation, and the use of water flow sensor is to know how much water is that specific plant taking/consuming for its growth.

B. Light Intensity with Photo Resistor sensor:
Light intensity sensor is used to measure light intensity value of that environment each second.Light intensity value helps in determining whether it is less light or more light for the plant depending on the threshold value.When the light intensity value goes below the threshold value set, LED glows as a replacement of sunlight in this project.Number of seconds the LED is in ON state is determined to know how much light is consumed by the plant for its growth disregarding the natural light resource.The use case for this is plant will depend on the natural light resource whenever it is available eventually consuming the artificial resources.

C. Temperature and Humidity:
DHT11/DHT22 temperature and humidity sensor is used to measure temperature and humidity value of that environment each second.Temperature and humidity value help in determining whether it is less or more for the plant depending on the threshold value set.When the value goes below the threshold value set, humidifier can be turned on.
Humidifier is built from scratch.The use case for this is plant will depend on the natural temperature and humidity resource whenever it is available eventually consuming the artificial resources.

D. Energy Consumption:
In order to determine the electric costs for a typical plant consuming light in low sunlight seasons specially from October to February, number of seconds the LED is in ON state is determined to know how much light is consumed by the plant for its growth.All the reading read from the Arduino will then be saved into AWS S3 bucket in a CSV file, which then automatically sent to the AWS QuickSight through a configuration setting to create dashboards with visualizations and perform ad hoc analysis to obtain insights from the data.
IV. Implementation

A. Automatic Water Irrigation:
In automatic water irrigation system a moisture sensor is used to read the moisture content of the soil, the soil moisture sensor that provide a digital value pf zero or one as an input to pin number 5, soil moister sensor detects whether the soil is less moist or not, as it send the input as zero or one which is also called as dry or wet which is being inputted into the pin number 5.After that the loop runs in the Arduino code and checks if soil moisture is one, therefore we will write HIGH to pin number 8 and afterwards it will turn on the actuator which is actually a relay shown in the output diagram, it will then turn on the motor pump.As pin number 8 is output pin in Arduino but it goes as an input for the motor pump which turns it on and the water is being produced, otherwise if the soil moister is zero it will write LOW to pin number 8 and not action will be taken in this event.The water flow sensor measure the amount of water which is being flowing through the sensor, it measure following three things, first is the speed of water by which its flowing, second is the milliliter rate of water at a particular time, and lastly it measure the total amount of water passed which is a cumulative water passes from the beginning from where the Arduino program starts.
Area a soil moisture sensor cover?
Capacitance moisture sensors will normally read diameter of 10-15 cm around the probe.
Depending on the length of the sensor rod and number of sensors on the rod, the volumetric water content measurements are normally taken from 30 cm to 150 cm deep.

B. Light Intensity:
In light intensity the photo resistor reads the light intensity of the live environment, and it send an analogue input with a certain value which would not be a Boolean meaning zero or one to A0 pin of the sensor.The ideal light intensity is set to five which is also our threshold light intensity in the code, if the light intensity goes below 5 the LED light will turned on and if we have light intensity of more than 5 then it considered to be a good amount of light present in the environment so the LED light remains turned off.The input here goes to A0 pin and then in the loop it runs then the output will be written on pin number 13 as a high value if and only if the light intensity is available in the environment is less than the threshold which is 5 in our case and will also change the LED state to one, and the code keep increasing the count the number if time LED state is set to 1. Therefore, we can get the total number of seconds through the count variable which determines the time the LED is being turned ON since the start of the program.If the light intensity is less than 5, we will set the LED state to 0 and will pause the counter in this event as shown in Fig 2.

Heat Index:
The heat index is a parameter that takes into account temperature and relative humidity, to compute heat index, need to know current temperature and relative humidity.An easy way to find both is by using an Arduino development board with a DHT sensor (DHT11, DHT22).
When we run the Arduino code it gets temperature, humidity and heat index in Celsius degrees.The code also calculates the heat index an indication of what the temperature "feels-like" due to humidity.

E. Blynk Application:
First download the Blynk application, now create a new Blynk account, when a new project is created, an authentication token is sent to your specified email, authentication token is a unique identifier which will be needed to connect your smartphone and hardware.Include the authentication token in the program and run it (Blynk.ino)in the Arduino IDE.Open command prompt and direct to scripts folder in the libraries folder C:\Users\Rakshandha Kannappan\Documents\Arduino\libraries\Bl ynk\scripts.Run blynk-ser.batand select COM5 port.
After successfully creating your account, create a new project and select the hardware model as Arduino UNO, open widget box to add Value display for Soil Moisture sensor, double tap on it to edit its settings, configure the type of input.click on the D5 button and select Virtual as pin type and V5 as pin number.For Light Intensity sensor, add a simple button and then configure its settings as Digital GP13 pin.Add one more Value display in the dashboard and configure it as pin V5 for Temperature, similarly, add again one Value display and configure it as pin V6 for Humidity.

Import
Blynk libraries, include authentication token in the program and run Blynk.run(); in a loop for the Blynk app to read the hardware inputs and also to control hardware components.
V. Future Scope

VI. Conclusion
An Arduino based garden monitoring and controlling system is implemented and tested, Soil moisture sensor, water flow sensor, light intensity sensor and DHT22 sensors are the main sensors used in this project which give the exact value of moisture content, light intensity, temperature and humidity.The proposed system uses Arduino Uno microcontroller which collect sensor data needed to monitor and maintains the desired garden soil moisture content and light intensity and saved them in a csv file in order save it in the Amazon S3 bucket which will eventually sent the data automatically to Amazon QuickSight for the visualization of the generated graph for energy consumed by the garden.The Blynk application enables user to manually operate all the sensors and monitor their values easily on their mobile phones.

•
It is interesting to note what created the necessity or drive to develop automation technology?There are many factors including: Increased output precision • Decrease of investment and efficient usage of finances • Optimization of labor resources • Lesser requirement for training and calibration over time