Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

NPK And Oxygen Regulation System for

Hydroponics
Vedant Shirsekar Jay Hegshetye Soham Urunkar
Dept. Of Biomedical Engineering Dept. Of Biomedical Engineering Dept. Of Biomedical Engineering
2021 International Conference on Advances in Computing, Communication, and Control (ICAC3) | 978-1-6654-2634-3/21/$31.00 ©2021 IEEE | DOI: 10.1109/ICAC353642.2021.9697276

Vidyalankar Institute of Technology Vidyalankar Institute of Technology Vidyalankar Institute of Technology


Mumbai, India Mumbai, India Mumbai, India
vedantshirsekar63@gmail.com jayhegshetye@gmail.com sohamurunkar@gmail.com

Akhil Masurkar
Dept. Of Electronics Engineering
Vidyalankar Institute of Technology
Mumbai, India
akhil.masurkar@vit.edu.in

Abstract—In this paper we propose a system to regulate and needed to grow a crop must be regulated during the entire
monitor the levels of Nitrogen, Phosphorous and Potassium for growth cycle.
crops which are grown hydroponically. NPK are the basic
nutrients to grow any crop. Correct proportions of NPK Rahul et al. have proposed a system to determine NPK
determine the quality and yield of a crop. Fertilizers are used to nutrients in the soil using cameras. However, the system may
provide these elements in the right proportion to enhance the not be effective under different lighting conditions [3]. Only
crop growth rate and increase the yield. However, the nutrients solenoid valves are used to regulate NPK values. This limits
levels may vary due to continuous consumption of nutrients by the dispensing mechanism by making it to rely on gravity.
the plants. Hence, there is a need to regulate the NPK levels in Rakshitha et al. has proposed an automatic system of growing
the water tank and monitor them continuously in real time. The plants hydroponically at home. Different factors like light
proposed system uses an Arduino Mega controller. It controls conditions, watering cycles and nutrients are regulated based
four pumps and sensors, each of which is used to regulate the on pH values [4]. The above data is made available on cloud.
values of nitrogen, phosphorus, potassium and oxygen. The The measurement of NPK is indirect. However, a direct
proposed system can be easily integrated to existing hydroponic measurement of NPK is desired to improve the accuracy.
equipment. This study also highlights the effect of solution Yakub et al. have suggested a system to monitor the nutrients
concentration on the accuracy. The system is designed in such a in the soil. A water pump is used to regulate the pH and
way that accurate values of NPK in µg/ml can be delivered to
humidity of soil. The forward chaining mechanism is used to
the crop in a stipulated amount of time. The system consumes
decrease the latency in decision-making [5]. Madhumathi et
less power, has good accuracy and low latency.
al. has proposed a system that has an ability to regulate soil
Keywords—nitrogen, phosphorus, potassium, hydroponics. parameters like soil fertility, moisture, pH and temperature.
However, system uses electrical conductivity sensor which
I. INTRODUCTION does not provide NPK values [6]. Theeramet et al. has
proposed a linear regression model to find relation between
According to a 2020 report of the Food and Agriculture electrical conductivity and pH of hydroponic nutrients. This
Organization (FAO) in India, more than 189 million people system uses a manual method of adding the calculated amount
get insufficient quality and quantity of nourishment to sustain of nutrient solution which is not desired [7]. Thazin et al. has
proper health and growth. As India’s population is rapidly proposed a hydroponics system that can control the
increasing, there is need for increasing the agricultural output. temperature using Fuzzy Logic [8]. However, accuracy seems
One of the major problems is lack of water resources. Indian to be low. Mitali et al. has proposed an effective hydroponics
farmers depend more on rainfall, which is very irregular. management system that keeps track of sensor data including
Many farmers have to face problems related to poor as pH, light radiation, and solution conductivity [9]. However,
infrastructure and average farm sizes. NPK monitoring is not considered.
Hydroponics is the most suitable solution to these In this paper, we propose a system to regulate the NPK and
problems. It is a method of growing crops in any medium oxygen concentration specially designed for hydroponics. The
except soil. The medium can be any solid material like complete methodology is described in section II. Section III
coconut husk, perlite gravel, sand, or it can be any nutrient gives a complete overview of circuit diagram highlighting the
solution. Plants are grown in rows or on trellises, but they have connections of all the components. Pumps are used to
their roots in the medium. The nutrients required by the plants eliminate the dependence on gravity. There is a dedicated tank
are fed through water. It allows multilayer farming, thus for concentrated solution of nitrogen, phosphorous and
increasing the yield per unit area. The water requirement in potassium. Oxygen concentration is regulated using an air
hydroponics is much lesser than conventional farming pump. There is only one sensor to measure NPK levels, thus
techniques. Levels of the most common nutrients like reducing the number of sensors. An independent sensor is
nitrogen, phosphorous, potassium, oxygen etc. can be used to measure oxygen level. The Arduino Mega board acts
provided in precise quantities. Levels of N, P and K are the like central processing unit [10]. Section IV highlights the
major factors which contribute to plant growth [1]. By results with a special emphasis on time calculations and the
regulating the above, hydroponics provides the most ideal effect of solution concentration on accuracy. Section V
conditions for plant development, which is difficult to achieve describes the conclusion highlighting the future scope. The
using conventional methods [2]. Hence there is a need to grow designed system can be assembled easily, consumes low
crops hydroponically, and at the same time, nutrient levels power, has good accuracy and low latency.

978-1-6654-2634-3/21/$31.00 ©2021 IEEE


Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. Block Diagram

II. METHODOLOGY
The main objective of this project is to regulate the A. Pseudo Code
nitrogen, phosphorous, potassium concentration in When circuit starts, the hydroponics tank gets filled with
Hydroponic tank. Above block diagram (Fig. 1) depicts the fresh water up to predefined level L2. Once the level L2 is
proposed system. The Arduino Mega 2560 microcontroller reached, water pump turns OFF. NPK sensor gives the live
board is the heart of the system. There are two important readings of NPK concentration (Ncal, Pcal, Kcal). The
sensors used in the proposed system namely NPK sensor and threshold values of N, P and K (Nth, Pth Kth) are set by the
oxygen sensor. The NPK sensor is submerged in the user. The algorithm calculates the difference between
hydroponic tank which provides the values of Nitrogen(N), threshold values and actual values. The time for which the
Phosphorous(P) and Potassium(K) concentration to the pump should be on is calculated by the formula {B}. During
microcontroller respectively. The oxygen sensor is this time, exact quantity of NPK is transferred to the
also submerged in the hydroponic tank and provides the hydroponic tank. Once the NPK concentrations are set, the
amount of dissolved oxygen concentration present in the NPK pumps automatically turns OFF. The minimum
water. The Nitrogen(N) reservoir, Phosphorous(P) reservoir concentration of oxygen required is 5 mg/litre. Hence, the
and Potassium(K) reservoir contains high concentrated threshold of oxygen concentration is set to 10 mg/litre. The
solutions of N, P and K respectively. Each N, P and K solution oxygen sensor checks the dissolved oxygen concentration in
reservoirs contains a submersible pump which is used to the main hydroponic tank. If the concentration is less than
transfer concentrated solutions into the hydroponic tank. All 10 mg/Liter then, the air pump will be powered ON. The
these pumps are controlled by Arduino Mega. The air pump pump will remain ON until the threshold value of oxygen
bubbles the atmospheric air into the hydroponic tank and concentration is reached.
maintains the dissolved oxygen concentration in tank. If the
amount of water is main tank is less than the predefined level, B. Timimg calculation for NPK pumps
the water pump starts working and fill the tank. The NPK STEP 1: Determine the flow rate (litre/hr) of pump used. In
sensor present in main hydroponics tank give live readings of
the system proposed, we have used Micro DC 3-6V Micro
N, P and K. These live readings are sent to microcontroller.
Submersible Pump. This pump is selected because it is low
Then by following the algorithm, the microcontroller
calculates the delay time {B} for each pump to work and thus cost, small and submersible in water. This pump runs on a 3 ~
regulates the nutrient concentration in the main hydroponic 6V power supply and can deliver an output of 120 liters per
tank. Later if the value of dissolved oxygen gets below 5 hour with very low current consumption of 220mA. Flow rate
mg/Litre, the air pump will start for predefined time. An which is in liters per hour can be converted into milliliters per
LCD shows the live readings of NPK values and dissolved second by multiplying liters per hour by a factor of 5/18.
oxygen values to user.

Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.
STEP 2: A homogeneous mixture of water and known By running the pumps for the time calculated from the above
quantities of N, P and K are stored in 3 different tanks. Hence, formula, exact concentration of nutrients can be maintained
the concentration (mg/l) of N, P and K are already known. in the main hydroponic tank.
STEP 3: The exact concentration of nutrients to be dispensed
C. Example for time calculations
(mg/hr or mg/sec) can be calculated by multiplying the flow
rate determined in step 1 and the concentrations determined in The tanks of nitrogen, phosphorous and potassium are
step 2. initially filled with 10 litres of water each. 100 mg of each
STEP 4: Threshold values of N, P and K are set by the user nutrient is added in respective tanks. Hence, the concentration
depending on the crop to be grown. The threshold values must of nutrient in each tank is 10 mg/litre. The average flow rate
of the pump used is 100 litre/hr. For calculation purpose, the
be multiplied with the number of plants in the system. Current
number of plants is assumed to be 10. Also let the threshold
values are determined from the NPK sensor.
value for a single plant be 5 mg/litre and the actual value be
STEP 5: The time for which a pump should be on to regulate 20 mg/litre. Hence, the time for which pump should be on is
the desired quantity of the nutrients is determined using the given by
formula as shown below.
(n × T − A) × V (n × T − A) × V
Time (sec) = Time =
F×C
F×C
Where,
(10 × 5 (mg⁄litre)− 20(mg⁄litre)) × 50 litre
T = Threshold value for per crop (mg/l) Time =
100(litre/hr) × 10(mg/litre)
n = Number of plants
A = Actual value (mg/l) 30(mg⁄litre) × 50 litre 1500
F = Flow rate (ml/sec) Time = = 1000 hr
1000(mg/hr)
C = nutrient concentration (mg/l)
V = Volume of water in tank (l) Time = 1.5 × 3600 = 5400 sec

Fig. 2. Flow Chart

Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.
D. Working: nutrient’s concentration is regulated, NPK pumps are turned
The different stages of working of the system is as shown OFF and then the O2 sensor checks the dissolved oxygen
in above diagram (Fig.3). Initially when the system is turned concentration. If the concentration is less than the threshold
ON, the tank is empty (Fig.3.a), therefore the water pump is value, then the air pump starts and maintains the dissolved
switched ON and the tank is filled up to the predefined level oxygen level (fig 3.d). After some time, as some amount of
L2 (Fig 3.b) with fresh water. Then the water pump is turned water and nutrients may be used by the plants for their growth,
OFF and the NPK sensor takes the readings from the main the total water level will decrease. This process will be
tank. repeated in loops again and regulate the water level, Nutrient
concentration and dissolved oxygen concentration
According to the formula, nutrient solutions of N, P and K continuously.
are pumped into main tank respectively (fig 3.c). When the

(a) (b) (c)

(d) (e) (f)


Fig.3. Working

III. CIRCUIT DIAGRAM with microcontroller. The Arduino program calculates the
The control circuit is composed of Arduino Mega difference between actual NPK values required and
microcontroller, NPK sensor, dissolved oxygen sensor, current NPK values present in the tank solution. The
submersible pumps, transistors to drive the pumps, bridge difference is then taken as an input to the program to calculate
rectifier, voltage regulators and LCD. and find the accurate time for pump to work and maintain the
accurate concentration of NPK. Time calculated is given to
There are two power supply which provides power to the transistor circuit which are connected to pumps. Using
entire circuit. The first power supply of 9 volts is used to transistor each pump will get required current to transfer the
power the NPK sensor. The second power supply of 5 volts is nutrients from reservoir to tank in calculated time.
used to power Arduino Mega microcontroller, dissolved
oxygen sensor, submersible pumps, transistors to drive the When water pump is activated. The digital pin of Arduino
pumps and LCD. Two voltage regulator IC`s, 7805 and 7809 (40mA current source) provides the base current. The upper
are used to provide a constant voltage to the circuit. Voltage level (L2) marks the maximum level of water while the lower
to the pump can be changed by changing the voltage regulator, level (L1) marks base of the tank. The digital pin of Arduino
depending upon the voltage rating connected pump. Five is kept high for the time required to fill the tank up to upper
transistors are used to supply required current to pumps for level L2. Water acts as a conducting medium here. When
proper working. water level reaches to the max the 40mA is connected to the
ground and the base current become zero, turning off the water
Arduino Mega is connected to transistor circuit used for pump.
working of pump. The values of NPK are received from the
NPK sensor. The sensor cannot directly communicate with the Base terminal of transistors Q1, Q2 and Q3 is connected
microcontroller as it has a Modbus communication port. to Arduino. As the digital pin of Arduino is set to high, 40mA
Hence, MAX485 Modbus module is used for communication current is passed through the base. The time for which the

Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.
digital pin of Arduino is kept high is calculated using time If Oxygen level in the main tank gets lowered than 5 mg/L,
delay formula. Now this 40mA current is amplified by a the oxygen pump will be powered by Arduino and pump air
transistor and supplied to the pump, so it will transfer nutrient in to the tank. Once the oxygen level reaches to required level,
from reservoir to tank. When digital pin of Arduino is set to pump will stop working. A 20x4 LCD is used to display the
low, current supplied to base becomes 0 and pumps will be quantity of NPK and oxygen level in the main tank.
switched ‘off’.

Bridge Rectifier 5V

N P K Air Water
Pump Pump Pump Pump Pump

9V

L2

Tank
L1

Level Sensor

LCD

Signal Converter Board

MAX485 Modbus Module


Oxygen Sensor Probe

NPK Sensor

Fig. 4. Circuit Diagram

IV. RESULTS Time = 0.001 × 3600 = 3.6sec


The results are as shown in table I, table II, table III
respectively. Two set of concentrated solutions having Similarly, the time required to transfer 5mg of either N or
concentration of 10 µg/ml and 5 µg/ml for N, P and K, were P or K can be calculated as follows
made respectively. Different volumes in multiples of 100 ml
(n × T − A) × V
of N, P and K solutions were transferred to the hydroponic Time =
F×C
tank. To transfer 1 mg of either N or P or K, 100 ml of
respective solution must be transferred. The volume of (5 mg/litre) × 1 litre 5
hydroponic tank is 1liter. Time = = 1000 hr
100(litre/hr) × 10(mg/litre)
The time required to transfer 1mg of either N or P or K can
be calculated as follows Time = 0.005 × 3600 = 18 sec
(n × T − A) × V
Time =
F×C However, practically, slightly more volume of solution is
transferred due to the inertia of the motor during ON OFF
(1 mg/litre) × 1 litre 1
Time = = 1000 hr operation. This is as shown in tables I, II and III.
100(litre/hr) × 10(mg/litre)

Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.
Example: Let us consider a case where we need to regulate From the table above, we can make 2 observations
the difference of 1 mg of phosphorous considering volume of If volume of solution that needs to be transferred is more
tank (V) equals to 1litre. So, for 10 µg/ml solution according (≥500ml) the effective error (extra volume transferred) is less
to the formula ideally 100 ml of phosphorous solution must be and if volume of solution that needs to be transferred is less
transferred by activating phosphorous pump for 3.6 sec but in (≤ 500 ml) then the 5 µg/ml solution shows higher accuracy
practical case the volume of phosphorous solution transferred in calibrating the level of nutrients than 10 µg/ml solution.
is 110 ml. Therefore, extra 10 ml is transferred which
corresponds to extra 100 µg phosphorous is transferred. V. CONCLUSION
Similarly, for 5 µg/ml solution to maintain the difference of 1
The proposed system is cheap and very useful for growing
mg, 200 ml of P solution must be transferred but practically
crops hydroponically at home. This system demonstrates the
210 ml is transferred. Therefore, extra 10 ml will constitute to
effective use of the pumps, thus eliminating the dependence
extra 50 µg phosphorous. This shows that the error reduces by
on gravity for the flow of water carrying nutrients as in other
50 percent.
applications. The proposed system can be integrated very
easily to the components used in hydroponics. The system
TABLE I: THEORETICAL AND PRACTICAL VALUES OF NITROGEN SOLUTION consumes less power, has good accuracy and low latency. In
TRANSFERRED BY THE PUMP
the future the system data can be logged on to a cloud and can
C = 10 µg/ml C = 5 µg/ml be made available remotely. Also, the same system
Time
Sr.no Required
Theoretical Practical Theoretical Practical architecture can be used for other than home hydroponics.
transferred transferred transferred transferred
(sec)
water (ml) water (ml) water (ml) water (ml)
1 3.6 100 110 100 110 VI. REFERENCES
2 7.2 200 215 200 215 [1] Gashgari, Raneem & Alharbi, Khawlah & Mughrbil, Khadija & Jan,
3 10.8 300 315 300 310 Ajwan & Glolam, Abeer. (2018). Comparison between Growing Plants
4 14.4 400 410 400 410 in Hydroponic System and Soil Based System. 10.11159/icmie18.131.
5 18.0 500 505 500 505 [2] J. B. Jones, “Complete Guide for Growing Plants Hydroponically.”
6 21.6 600 600 600 600 2014
7 25.2 700 700 700 705 [3] R. Nalwade and T. Mote, "Hydroponics farming," 2017 International
8 28.8 800 805 800 800 Conference on Trends in Electronics and Informatics (ICEI), 2017, pp.
9 32.4 900 905 900 900 645-650, doi: 10.1109/ICOEI.2017.8300782.
10 36 1000 1000 1000 1000 [4] Rakshitha M., , Shwetha. H. L, Roopa, Tejashwini. R, Anitha S Prasad,
2018, Automation of Hydroponics System using Android Application
TABLE II: THEORETICAL AND PRACTICAL VALUES OF PHOSPHOROUS and Ubidots Platform, International Journal Of Engineering Research
SOLUTION TRANSFERRED BY THE PUMP & Technology (IJERT) NCESC – 2018 (Volume 6 – Issue 13),
C = 10 µg/ml C = 5 µg/ml [5] R. E. Saputra, B. Irawan and Y. E. Nugraha, "System design and
Time implementation automation system of expert system on hydroponics
Theoretical Practical Theoretical Practical
Sr.no Required nutrients control using forward chaining method," 2017 IEEE Asia
transferred transferred transferred transferred
(sec) Pacific Conference on Wireless and Mobile (APWiMob), 2017, pp. 41-
water (ml) water (ml) water (ml) water (ml)
46, doi: 10.1109/APWiMob.2017.8284002.
1 3.6 100 110 100 110
2 7.2 200 205 200 205 [6] R. Madhumathi, T. Arumuganathan and R. Shruthi, "Soil NPK and
Moisture analysis using Wireless Sensor Networks," 2020 11th
3 10.8 300 310 300 310
International Conference on Computing, Communication and
4 14.4 400 405 400 405
Networking Technologies (ICCCNT), 2020, pp. 1-6, doi:
5 18.0 500 500 500 500 10.1109/ICCCNT49239.2020.9225547.
6 21.6 600 600 600 605
[7] T. Kaewwiset and T. Yooyativong, "Estimation of electrical
7 25.2 700 700 700 700
conductivity and pH in hydroponic nutrient mixing system using Linear
8 28.8 800 805 800 800 Regression algorithm," 2017 International Conference on Digital Arts,
9 32.4 900 900 900 900 Media and Technology (ICDAMT), 2017, pp. 1-5, doi:
10 36 1000 1005 1000 1005 10.1109/ICDAMT.2017.7904922.
[8] Thazin, Theint & Aung, Zaw & Win, Tun Tun. (2019). IoT based
TABLE III: THEORETICAL AND PRACTICAL VALUES OF POTASSIUM Hydroponic Temperature and Humidity Control System using Fuzzy
SOLUTION TRANSFERRED BY THE PUMP Logic.
C = 10 µg/ml C = 5 µg/ml [9] M. v Shewale and D. S. Chaudhari, “Internet of Things Based Plant
Time Monitoring System for Hydroponics Agriculture,” JETIR, 2018.
Theoretical Practical Theoretical Practical [Online]. Available: www.jetir.org
Sr.no Required
transferred transferred transferred transferred
(sec) [10] Nayyar, A. (2016). An Encyclopedia Coverage of Compiler's,
water (ml) water (ml) water (ml) water (ml)
Programmer's & Simulator's for 8051, PIC, AVR, ARM, Arduino
1 3.6 100 120 100 120 Embedded Technologies. International Journal of Reconfigurable and
2 7.2 200 220 200 225 Embedded Systems, 5(1).
3 10.8 300 315 300 310
4 14.4 400 410 400 410
5 18.0 500 510 500 505
6 21.6 600 605 600 605
7 25.2 700 705 700 700
8 28.8 800 800 800 800
9 32.4 900 900 900 900
10 36 1000 1000 1000 1000

Authorized licensed use limited to: University of the Phillippines Diliman. Downloaded on October 25,2023 at 04:38:54 UTC from IEEE Xplore. Restrictions apply.

You might also like