IoT - Article - Pawar2019-Design of An IoT Enabled Automated Hydroponics System Using NodeMCU and Blynk
IoT - Article - Pawar2019-Design of An IoT Enabled Automated Hydroponics System Using NodeMCU and Blynk
Abstract— India’s economic development is primarily the subsidies range from 20% to 33%, with project costs
dependent on Agriculture. If India wants to become powerful ranging from Rs. 20 lakh to 30 lakh[8]. The rising
economically in the world, then there is a need for advanced technology shall exhibit a direct effect on the export quality
methods to be used for cultivating good quality crops. One of of vegetables and fruits, resulting in better returns. This
the most convenient methods amongst all is hydroponics.
technology manages space efficiently and provides higher
Hydroponics is a method of planting or cultivating plants
without the use of soil. The technique graces us with superior- yields in comparison to traditional agricultural techniques,
grade crops by replicating their environmental requirements. along with increased profits from improved yields
It is also referred to as vertical farming, because this type of
farming allows plants to be grown in layers, on shelves or
trays, one layer over another. Sand, gravel, rock wool and coco
peat are some mediums used to replace soil used in
conventional farming. According to a recent study, the plants
do not really require soil, but just the nutrients to grow; soil
introduces 90% of the pests.
Conventional farming has evolved after the growing use of
commercial hydroponics in developing countries like India,
Israel, Brazil, Southeast Asia, Italy and many more.
I. INTRODUCTION .
Fig.1 Hydroponics Market Report [5]
Conforming to the Global Hydroponics Market Report,
10-16% of global failure in crops are a result of pests. As To fulfil our objective of devising an effective and
the medium used in hydroponics eliminates soil, these economical system, a NodeMCU ESP8266 Wi-Fi Module is
statistics change drastically; crop failure is reduced by used to integrate the sensors and other hardware required to
setting the correct parameters required by the crops. build the framework of "Internet of Things" based
Chemical elements such as carbon, hydrogen, oxygen, hydroponics system. Hydroponics system is a water-based
nitrogen, phosphorus, potassium, sulfur, calcium, re-circulatory system that consists of a solution for better
magnesium, manganese, iron, zinc, boron, copper, growth of plants. It requires pesticides, water and space than
molybdenum, and chlorine help nurture crops better.[1] traditional agricultural systems.
The most recent research states that a CAGR of 10.53%
has been attained by the hydroponics market. Europe and II. SYSTEM DESIGN AND IMPLEMENTATION
the Asia Pacific are the current hydroponics market In consonance with the reviewed statistics, it is evident
leaders.[6] that an economical yet adept vertical hydroponics system is
Implementation of vertical hydroponics in India has required to replace conventional farming. Our target
become the need of the hour due to a population of 1.6 consumers are small-scale farmers, hence they should be
billion, growing climatic crisis and lack of agricultural land. capable to afford and understand the hardware and software
The World Bank has declared by 2050 half of the population easily. Considering these criteria, we divide the system into
will be urbanized. To avoid a food crisis, it is necessary to 3 stages- monitoring, automation and implementation of the
implement Internet of Things (IoT) and Artificial Internet of Things (IoT). In this paper, we shall provide two
Intelligence (AI) in the Indian farms. This advance will models to implement the same system.The heart of the first
permit us to get to a level of self-sufficiency. A press release system is a NodeMCU ESP8266 Wi-Fi module equipped
from October 2017 revealed that a 50% subsidy has been with 16 GPIO pins, perfectly suitable to interface the
made available for farmers implementing hydroponics to necessary sensors and other hardware. The second model
grow fodder for animals in areas. The National Horticulture implements Raspberry Pi for higher processing capability.
Board provides several subsidies to support and encourage NodeMCU is used to implement a single level model, while
the hydroponics momentum in India. Based on the regions, RPi 3 is applicable for multi-layered model.
2
vegetative growth. As depicted in the Fig.7 Spectrum
Absorbed by Plants, the most absorbed spectral ranges are
red and blue; however, green and yellow spectrums
contribute in the process too. These two spectrums play a
role in the photosynthesis process. [5] LED Grow Lights are
simply red and blue LED strips to produce a hyper-violet
spectrum. These LED strips are interfaced to a driver IC
L293D, as Node MCU alone cannot fulfill its current
requirements. They operate on 12V, 2A. PWM control
enables us to adjust the intensity of light according to the
time. From the morning to evening, the LED grow lights
Fig.5 Voltage levels at the output of the pH module in proportion to pH remain ON in the automatic mode and OFF after this
values duration.
Interfacing of these high impedance pH probes can be (d) Recirculating Drip System Design
done using a pH module, but those are slightly expensive. The Fig.8 Recirculating Drip System Design indicates
These modules amplify the output of a probe to a level the framework of our system and how re-circulatory
acceptable by the ADC integrated on the Node MCU. We behavior is attained. It is possible to conserve 90% water by
decided to design our own module after some research. The using a recirculating watering system. The drawback of this
input impedance of the operational amplifier IC 741 is technique is its fluctuating pH levels; therefore, we monitor
limited to 106Ω. Hence, we chose IC TL072 (that has an and adjust the changing pH levels. [2] This has been the
input impedance of 1013Ω) for designing the pH module. It model for just a single level, however, more than one level
consists of a dual to single supply converter and two can be added to the system. For a single level model, a
cascaded inverting TL072 amplifiers operating at ±5V. The submersible pump constructed using a 6-12V DC motor is
Fig.5 Voltage levels at the output of the pH module in enough. For several such levels in vertical hydroponics, we
proportion to pH values show a pH value versus output require submersible pumps with a higher suction rate. It is
voltage acquired from testing solutions with pH 2,6, 7, and recommended that the pH probe to be mounted such that its
10. We noted that the relation between pH value and its tip is partially dipped in the water; this will ensure stable
corresponding voltage level is inversely proportional. Acidic readings. LED grow lights are mounted on the inner three
solutions result in a higher voltage level, while more faces of the structure.
alkaline solutions result in lower voltage value. The above Fig.9 Prototype Models indicate two different
ଵ
versions of the project. Previously, we used old plastic
ߙ݊݅ݐݑ݈ݏ݂ܽܪை௨௧௨௧௧ (1) bottles as pots, but for a larger container, we replaced them
with used food containers.
3
To create a hyper-violet spectrum of light, we have used The problem of overheating MOSFET was solved using
two different LED strips -- red and blue. this IC, which consists of 16 pins, 8 pins per driver.
Difficulties were faced creating a driver circuit for the DHT11 is interfaced with ESP8266 NodeMCU and the
3V DC motor based submersible pump and the LED strips data from DHT11 is channelized to the serial monitor as
using MOSFET IRF510 and BJT TIP31C, which were well as Blynk server. Similarly, pH probe output interfaces
overcome using the L239D Driver IC. Two tasks were to pH probe modules and connected to Analog Pin 0 of
accomplished with this IC, driving two DC pumps as well as ESP8266 NodeMCU modules. An important thing to note is
driving the LEDs. that, NodeMCU has a resolution of 1023. Hence, while
calculating the actual analog voltage from pH probe, it is
necessary to consider the resolution of the board.
As we are using sensors such as DHT11 and pH probe,
their data has been shown in real time in the form of graphs
using an IoT based online platform called Blynk.
In order to interface Blynk to the hardware, an
authentication token has to be generated. This token is
crucial, as it bridges, our NodeMCU module and Blynk
application. It makes the communication between these two
devices possible via the Blynk cloud server.
Fig.10 pH probe module
To write a Blynk compatible code, Blynk library has to
be downloaded. There are diverse widgets available to
create a tangible Graphic User Interface. (GUI). As we
wanted to display three monitored parameters, we used
three gauges for users to view temperature, humidity and pH
level with ease.
The excellent features of Blynk saved a lot of time, as it
was easier to display data on the phone than it was on the
Nokia 5110 LCD that we tested prior to working on this
application. Push buttons were used to turn ON and OFF the
two modes.
We have two operating modes - Manual and Auto.
4
connect the Wi-Fi module to a particular network ID, it is system that is equipped with three levels of hydroponics
necessary to input an SSID name and password. shelves, while the lowest level saved for the water
recirculation tank. Previously, water level detection was a
IV. PROPOSED IMPLEMENTATION lacking feature. For complete automation, it is necessary to
A Raspberry Pi minicomputer may be implemented to know the water level. If this feature is missing, the user may
create a better user experience. The RPi has its own OS not know that the system has run out of water in his/her
(Operating System) called Raspbian (based on Debian absence. This will make the set up less functional and can
Linux). It allows us flexible means of coding such as cause harm to the hardware too. As we were using Blynk
Python, Java, C/C++, .NET and many more. It has 8 I/O IoT based application for operating our prototype, there was
pins which are digital in nature, for analog pins, MCP3008 no requirement to create a database. But, now - creating a
IC can be used with the Pi. It has more than one USB port database has become a crucial part for the system to operate.
for connecting Wi-Fi dongles, keyboard or mouse. Using As we are employing the system with an Android
this device, it is possible to integrate a touchscreen beside Application, we need to bridge the gap between the sensors
our hydroponic set up. This touchscreen will allow the user and the mobile application. This gap is bridged by MySQL
to set time intervals, necessary temperature and humidity, database server. It allows us to log our sensor readings into
pH level. Another advantage is that it has a WiFi module one place and send it to the android application. The process
integrated on the board itself, as a result, no separate WiFi is very much like a postal service where the sender puts
module has to be purchased. As every plant requires a their letters in a post box and a postman then collects and
different spectrum of light, using a NeoPixel LED strip drops these letters to their respective addresses. However, as
instead of conventional LED strips can be a game changer. we are using python programming language as our base, we
NeoPixel LED strips are separately addressable RGB LED require a library that allows us to operate MySQL server as
strips integrated with a driver chip beside each LED. The well as read sensor data at once. Without this, a separate
most commonly used drivers are WS2812 and WS281, Raspberry Pi command prompt would have to be opened
which use a single-wire control protocol. By creating an everytime to operate the MySQL server. The library called -
RGB color picker, we may enable the correct light spectrum python mysqldb allows these functions. Also, as previously
to be selected for the LED strips. Other than the above mentioned - instead of using conventional LED strips for
mentioned, it is possible to create a standalone android every spectrum of light required in the system, it is possible
application instead of using Blynk. The shift from Blynk to to use NeoPixel LED strips that are bit addressable.
a separate android application will allow us to create a UI Raspberry Pi can be interfaced to NeoPixel LED strips via a
(User Interface) such that farmers who do not understand 1N4001 or 1N4148 diode or even an IC 74HC245D. These
English shall be able to select their preferred language. This act as our drivers which provide our NeoPixel LED strips
will make the application close to the user's heart and result the current they require to operate. It is advisable that an
in its optimum use. Information related to the crops, their external 5V supply is provided to NeoPixel LEDs as the RPi
optimum temperature, humidity, pH level and nutrient alone cannot draw enough current, even if it can provide the
requirements can be made available on the application. It is voltage. For our system, we are opting for the diodes
also possible to create a framework such that it can be used 1N4148 and 1N4001, which are power diodes. A special
for both outdoor and indoor purposes. library has been created for Raspberry Pi from an existing
Arduino library called Adafruit_NeoPixel library. The
python library allows us to create several animated effects
on the NeoPixel LEDs. Out of these effects, we require a
switch case that lets us select five spectrums - Red, Blue,
Green, Yellow and Hyperviolet. This is because every plant
requires a different spectrum of light, majorly - Red, Blue
and Hyperviolet. Now we will discuss about the submersible
pumps. The submersible pump used in the previousp
prototype was a simple DC motor that operated on 6V.
However, with increased level - the power requirement has
increased. We are employing a submersible pump operating
on 12V DC with an LPH of approximately 950. We intend
to deploy a solenoid valve for each level to control the
amount of water that flows through every stage. The pipe
has a radius of approximately 4mm and hence a solenoid
Fig. 13 Proposed IoT based Vertical Hydroponics System valve suiting these dimensions is required. That would mean
- a solenoid valve of 4mm orifice would be suitable for this
For the hydroponics system to be applicable in the system. Another option is to have manually controlled
market practically, it is necessary that we scale the system valves for saftey purposes, in case of system issues where
up and bring it closer to the practical implementation for the solenoid valves fail to operate.
precise results. Previously, we built a prototype that
employed a NodeCMU module and the set-up had only a V. CONCLUSION
single level. The actual large scale hydroponic farms have Several issues were encountered, along with the
multiple layers stacked on top of each other. To get closer to successful results. The major motive behind the project was
practical results, we are proposing a vertical hydroponics to create a cost-effective vertical hydroponic system for
5
small Indian farmers. This aim was achieved by fabricating [2] A. Theopoulos, A. Boursianis, A. Koukounaras and T. Samaras,
"Prototype wireless sensor network for real-time measurements in
our own pH module which was cheaper compared to the pH hydroponics cultivation," 2018 7th International Conference on
modules available in the market. Initially, after using an Modern Circuits and Systems Technologies (MOCAST), Thessaloniki,
Arduino 2560, we realized it would make the system too 2018, pp. 1-4.
bulky and would add on extra components. Thus, we [3] R. Nalwade and T. Mote, "Hydroponics farming," 2017 International
replaced it with a NodeMCU ESP8266 module, which Conference on Trends in Electronics and Informatics (ICEI),
Tirunelveli, 2017, pp. 645-650.
solved the issue and made the system compact. Our major
[4] M. I. Alipio, A. E. M. Dela Cruz, J. D. A. Doria and R. M. S. Fruto,
concern was to create a driver circuit that would be able to "A smart hydroponics farming system using exact inference in
drive the 2A LED strips and two submersible pumps. The Bayesian network," 2017 IEEE 6th Global Conference on Consumer
solution to this was using the conventional L293D motor Electronics (GCCE), Nagoya, 2017, pp. 1-5.
driver IC. Prior to using IC L923D, we tried using [5] Goto, Eiji. (2003), "Effects of Light Quality on Growth of Crop
MOSFETs to drive the LED strips, but failed. In the Plants under Artificial Lighting" Environment Control in Biology,
January 2003, 41. 121-132.
beginning, we made the wrong choice of crop due to lack in
[6] R. N. Bhaskar, "COMMENT- Why hydroponics could be the future of
the study of plants and extreme focus on hardware. We farming"July 2018. [Online]. Available:
realized that we planted three crops requiring three different https://www.moneycontrol.com
environments and thus reflected on the decision. [7] L. L. Lund, “Why not robots, AI in fields?” July 2018. [Online].
Available:https://www.deccanchronicle.com/nation/current-
ACKNOWLEDGMENT affairs/080718/why-not-robots-ai-in-fields.html.
[8] National Horticulture Board, "Development of Commercial
This work has been partially funded by the University of Horticulture through Production and Post-Harvest Management".
Mumbai (Research Project Number: 426). The authors of [Online]. Available: http://nhb.gov.in/schemes/subsidy-claim-
the paper are thankful for the immense support provided by guidelines.html
the university grants commission. [9] "Technology Quarterly - The Future of Agriculture", The Economist,
2018 [Online]. Available: https://www.economist.com/technology-
REFERENCES quarterly/2016-06-09/factory-fresh. [Accessed: 14- Jul- 2018]
[1] Mark Griffiths " The Design and Implementation Of a Hydroponics
Control System" M.S theses, Dept. of Information Technology, Oulu
University of Applied Sciences, Finland.,2014.