Solar Powered Automated Hydroponic Farming System with IoT Feedback

Document Type : Research Paper


1 Electrical, Electronic Engineering Department, University of Port Harcourt, P.M.B. 5323, Port Harcourt, Rivers State, Nigeria

2 Biomedical Engineering Department, Al-Mustaqbal University College, 51001 Hillah, Babil, Iraq.

3 Electrical, Electronic Engineering Department, University of Port Harcourt, P.M.B. 5323, Port Harcourt, Rivers State, Nigeria.


This paper presents implementation of cost-effective solar powered hydroponic system with Internet of Things (IoT) for online and remote checking and controlling the system operation. The objective was to take advantage of the abundant solar energy while incorporating IoT platform into the system. The system is made up of power supply unit, control unit, Wi-Fi unit, input unit and output unit. The system monitored temperature, humidity and volume of the nutrient solution and at the same time sent online messages to the farmer. The test carried out showed that the system is working and the readings obtained online showed a ± 1% variation from the physical measurement done remotely with meters. This implies that the online control of the system operation was effective



Hydroponics is a method of rising or cultivating plants without the use of soil, in which water and nutrients are delivered to the plants via a full Nutritious Solution (NS), which provides the required circumstances for healthy growth (Peuchpanngarm, C., et al., 2016). Hence, a solar powered Internet of Things (IoT) based hydroponics system with Global System for Mobile Communications (GSM) feedback is hydroponics system with IoT platforms and GSM feedback that is powered using solar energy. The nutritional solution for the crop, the type of module, and the arrangement of the elements, as well as the size, space, and ambient conditions, are all characteristics of hydroponic systems (Tembe, S., Khan, S., & Acharekar, R., 2018). Soilless culture is a method of rising plants in nutrient solutions that offer all of the nutrients required for maximum plant growth, with or without the addition of an inert medium such as rock wool, peat moss, sawdust, coir dust, coconut fiber, or other inert media for mechanical support. When opposed to open field or soil-based agriculture, hydroponics allows for the provision of ideal plant growth conditions, resulting in higher yields. Controlling soil-borne illnesses and pests is possible with hydroponics or soilless culture (Shewale M. V., & Chaudhari, D. S., 2018).

Pitakphongmetha, J., et al., (2016) focused on collecting agricultural data using IoT devices such as wireless sensor network that connects weather stations, cameras, and smart phones. In addition, the study recommended a smart farm network, an IoT-based platform capable of automating data collecting from numerous agricultural parameters such as the environment, soil, fertilizer, irrigation, and so on. In the context of evaluating crop performance and further computing crop projections, the proposed system was also capable of correlating data and filtering out incorrect data.

Mahesh, P. J., et al., (2016) emphasized the significance of many precision agriculture approaches. On the basis of numerous features and farmer demographics, the study also aims to acquire insight into the relevant factors of precision farming adoption among various farmers in Germany. The results of regression analysis show that hydroponic farming adoption has a good impact on farmers.

The findings of (Arenella, V., et al., 2016) work gave a variety of beginning points for the expansion of hydroponic agriculture in many areas. Using a genetic algorithm and improving the system parameters, (Umamaheswari, S., et al., 2016) proposed an effective system for regulating the hydroponic nutrient solution.

In this work, attention will be giving to Hydroponic planting systems which can be solar powered such that the system draws its electrical power requirements from a solar panel. This is to take advantage of the abundant solar energy that is available per day in a tropical country like Nigeria for the powering of smart IoT based farms. The proposed design will properly monitor the necessary plant conditions and regularly send feedback updates through a GSM and IoT module to the farm owner.

Design Analysis

The block diagram of the solar powered hydroponic farm system with IoT feedback is presented in Figure 1.  It is made up of power supply unit, control unit, input unit, solar charge controller, IoT module and output unit.


Figure 1. The Block Diagram of Solar Powered Hydroponics System with IoT Feedback.

The Power Unit

The function of the power unit is to convert ac mains voltage supply to dc voltage suitable for powering other units of the system. It consists of two low-power transformers TR1 and TR2 that step down the 220V AC mains to about 24V, bridge rectifiers BR1 and BR2 for rectification, filter capacitors C1 and C2, and voltage regulators U7 (7812) and U8 (7805).

Transformer TR1 is used to provide low power DC for the WI-FI module, while transformer TR2 is used to provide low voltage and high current requirement of the DC motor. The use of two transformers is to isolate the WI-FI module power supply from that of the DC motor which is usually noisy due to the feedback emf from the DC motor during operation. The 24V output from the secondary of both transformers is rectified using four IN4007 diodes (BR1 and BR2) before being passed to filter capacitors C1 and C2, which filter out AC ripples from the rectified DC. The 7812 and 7805 voltage regulators are utilized to stabilize the output voltages to the other units at +12V and +5V respectively. The Wi Fi module requires a very stable high current about 2A and 3.3V which is provided by DC regulator U9. Variable resistor RV1 is used to adjust the output voltage of this regulator to about 3.3V. Relay RL1 is used to connect the charging power from solar charge controller to mains power supply.


The Solar Charge Controller Unit

The Solar Charge Controller unit is used to provide an alternative source of electrical power using solar energy. It consists of control transistor Q1 and voltage comparator (Op Amp) U10 as shown in Figure 2. The OP Amp has two inputs labeled inverting input (pin 2) and non-inverting input (pin 3). The output of the OP Amp in the comparator mode is governed by



Where is the output voltage,  are the input voltages.


When V2 (voltage at pin 3) is greater than V1 (voltage at pin 2), the output of the OP Amp will be high, near VCC or 4.5V for a 5V DC power supply. The opposite becomes the case when V1 is greater than V2, i.e., the output will be close to zero volts. Diode D3 (a 5.1V Zener diode) was chosen to fix the input voltage to the inverting input of the Op Amp at 5.1V. The value of the series resistor required is:



Where  = Voltage from solar panel at maximum brightness (28V)

 = Zener voltage (5.1v)

 = Zener Current (10mA)


The solar panel when exposed to light generates an output voltage that varies from 0V (in dull weather conditions) to about 28V (in bright sunlight). This large variation in the output voltage of the solar panel will not be suitable for powering the entire system when there is sunlight. Hence, the voltage (and current) from the solar panel needs to exceed a certain minimum level before its switched to power the entire system. This is achieved with the level sensing Op Amp circuit and transistor Q1 which is capable of passing regulated currents in excess of 5A. The Op Amp U10 is used to detect and turn on transistor Q1 when the output voltage from the solar panel exceeds a value of about 18V. It does this by comparing the voltage from the solar panel to that of its reference points which constitute its reference voltage. When the magnitude of voltage from the solar panel exceeds that of the reference voltage (18V) which is set about 5.1V by Zener diode ZD1 and resistor R4, the output of the Op Amp goes high and this in turn switches on transistor Q1 to pass electrical power to the main power supply unit. 



Figure 2. Circuit Diagram of Solar Charge Controller Unit.


The Input Unit

The input unit consists of temperature and humidity and water level sensors, Op Amp and light dependent resistor LDR1 as shown in Figure 3. These sensors will measure major environmental parameters including temperature, humidity, and nutrition solution level to produce an analog voltage that represents one specific weather factor. The microcontroller will then transform these analog voltages to digital voltages, which will be sent to the cloud via the ESP8266 Wi-Fi module.


Figure 3. Circuit Diagram of Input Unit.

The Relative Humidity (RH) and temperature are measured by the DHT11 humidity and temperature sensor. The ratio of water vapor in air to the saturation point of water vapor in air is known as relative humidity. For every 1°C change in temperature, the temperature sensor LM35 produces a 10 mV output voltage. This sensor's output is attached to the Arduino Uno's analog pin. The Arduino Uno uses an on-chip ADC and program lines to convert analog voltage to digital value:

ADC reading = analogRead(A1);

Voltage = ADC reading*5/(1023);

Temperature = Voltage*100;

Relative Humidity = (density of water vapor/density of water vapor at saturation) x 100%

The DHT11 sensor, which detects relative humidity, monitors the electrical resistance between two electrodes. A moisture-holding substrate (usually salt or conductive polymeric polymer) with electrodes put on the surface is used in the DHT11 humidity sensor. When the substrate absorbs water vapor, it releases ions, enhancing the conductivity between the electrodes. The variation in resistance between the two electrodes is influenced by relative humidity. As the relative humidity increases, the resistance between the electrodes decreases, while it increases as the relative humidity decreases.

Nutrient Solution Level

In order to incessantly check the level of nutrient solution left in the container, a variable resistor or potentiometer was used as the volume sensor as shown in Figure 4.


Figure 4. System with Nutrient Solution.

A potentiometer is a component with a variable resistance that changes with the turning of the central knob. This allows it to be used in voltage and current signaling circuits. Its resistance decreases or increases with the turning of the knob in one direction or the other; in other words, it exhibits photo-conductivity. One end or terminal of the potentiometer is attached to the 3.3V supply on the Esp8266 Wi-Fi module while the other terminal is attached to the GND of the circuit. The rotating knob handle is attached through a rigid handle to a floating bulb that is carefully settled on the surface of the fluid solution such that increase or decrease of the fluid in the nutrient container also causes a corresponding upward or downward movement of the potentiometer knob which is subsequently converted to its corresponding change in its output voltage from its common (middle) terminal. The output voltage from the potentiometer is applied to the analog pin of control unit. When voltage across it increases, ADC reading also increases. The program lines are:

ADC reading = analogRead(A2);

Level = ADC reading*5/(1023);


ADC Reading >=70 to 100 //when solution level is full

ADC Reading <= 70 to 0    //when solution level is low

Control Unit

As shown in Figure 5, the control unit is made out of an Arduino Uno microcontroller board. The Arduino (ATmega328P) microcontroller board contains 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power port, an ICSP header, and a reset button. This means that it comes with everything you need to get started as a microcontroller by simply attaching it to a computer through USB and powering it with an AC-to-DC adapter or battery.


Figure 5. Circuit Diagram of Control Unit.



The Wi-Fi Module

The Wi-Fi module utilized was the ESP8266 Wi-Fi module as shown in Figure 6, which has a TCP/IP protocol stack built in and can offer a Wi-Fi network connection to any microcontroller. The ESP8266 is a preprogrammed SOC that must be communicated with via a UART interface by any microcontroller.

Figure 6. Circuit Diagram of ESP8266 Wi-Fi Module or Unit.

It requires a 3.3V supply voltage to operate. The AT commands are used to setup the module in client mode, and the microcontroller should be designed to deliver the AT commands in the correct order. Both client and server modes are supported by the module.

The Output Unit

The output unit consists of two DC motors and two power drivers ICs (L298), is shown in Figure 7. The L298 has all of the control circuitry needed to control DC, bipolar, and unipolar stepper motors. When combined with a microcontroller, the L298 provides a full microprocessor-to-DC or bipolar stepper motor interface. The L298N has two bridge drive stages, each controlled by two TTL-level logic inputs and a TTL-level enabled input. The emitter connections of the lower transistors are also carried out to external terminals, allowing current sensing resistors to be connected.


Figure 7. Circuit Diagram of Output Unit.

The L298N uses cutting-edge ion-implanted high voltage/high current technology to handle effective powers of up to 160W. (46V supply, 2A per bridge). To decrease dissipation and allow direct connection to other control logic, a separate 5V logic supply input is supplied. The translator generates four outputs, which are then processed by the output logic block, which implements inhibit and chopper operations. The translator is made out of a 3-bit counter and some combinational logic that generates a basic eight-step gray code sequence on the inside. This master sequence can easily produce all three drive sequences. This state sequence corresponds to full step mode when the HALF/ FULL input is set to a low level.

The M49SP DC motor was employed, which has a working voltage range of 12.6 to 14.5V. It is a tiny DC motor that can be used in a variety of applications.


After construction, certain tests and measurements were carried out on certain units and the system as a whole to determine its functionality. To handle and manage the automatic hydroponics application, the system is divided into four divisions. The system's many functions, including temperature and humidity sensors, as well as the water level sensor, are controlled by Arduino boards. The suggested system includes the steps of delivering data from sensors, receiving data from an intermediary data storage system, and sending data to an Android phone application or terminal. The system will then examine the transmitted value, and the relay module will operate as a switch to turn the nutrient pump module on or off.

Testing the Power Supply Unit

The circuit possesses a unique power supply system that consists of an AC to DC power supply converter and a solar power supply input. The output voltage from the power supplies was tested and measured with the aid of a digital multimeter. This was achieved by setting the range selector on the meter to DC voltage before using the red probe (+) to touch the output while the black probe  was connected to ground of the power supply.

Nutrient Pump Test

To remotely control the flow process of the Nutrient solution of water, the system gets the button status as sent by the mobile app terminal when the ‘on’ switch on the android terminal is activated. This signal is received and processed to turn on or turn off the nutrient pump.

Solution Level Test

Monitoring of the fluid level in the reserve container was tested by altering the volume of nutrient solution in the container while observing the display response on the android phone terminal. Every hour, the system collects sensor data from 2 seconds and saves it. The prototype can also be accessed and controlled via a mobile or web-based application.


Results and Discussion

From the power supply unit, Relay RL1 is used to select between solar power supply sources or mains AC supply depending on sun intensity level as interpreted by the microcontroller. When there is power supply from mains electricity supply during dull weather, RL2 becomes activated with signals from the control unit and this switches the output load to mains electricity supply though its normally open terminals (NO). Also, a signal is generated by the Arduino microcontroller which sends feedback to the recipient’s phone. When power supply from mains electricity supply is interrupted and there is enough sunlight, RL1 is deactivated by the control unit and this disconnects AC mains supply thereby enabling the solar power supply as long as there is sunlight.

The input unit has output from the LM35 temperature sensor, humidity sensor, and volume sensor. They are all connected to the analogue inputs of the microcontroller for conversion to its digital equivalent for processing. During operation, these parameters are constantly monitored and updated on the display and internet using the esp8266 Wi-Fi module while the appropriate action of pumping nutrient solution from the nutrient reservoir or aeration of the nutrient solution is achieved manually by the operator in charge of monitoring the system. The Wi-Fi module utilized was the ESP8266 Wi-Fi module, which includes a TCP/IP protocol stack on chip, allowing any microcontroller to connect to a Wi-Fi network. The ESP8266 is a preprogrammed SOC that must be communicated with via the UART port by any microcontroller.

As an open-loop monitoring system, automated feedback control is not done by the system but it allows for remote monitoring using IOT. The parameters to be monitored are measured and uploaded online through the Wi-Fi module. Proper monitoring and evaluation of the results from the system change to improve the crop yield can be carried out by the system operator.

The results obtained from the test carried out on the system as a whole is shown in Table 1.

From the results, it was observed that the temperature of the environment as measured with that of the system was 28.9 degree Celsius while the temperature measured simultaneously with the aid of a standard thermometer gave a value of 29.9 This is good as this temperature range falls well within the range that necessary for growing food, which is 0-50°C. It also shows that the designed system has a temperature accuracy of ±1°C. Similarly, the humidity of the environment as measured with that of the system was 82.4% while that measured simultaneously with the aid of a standard humidity meter gave a value of 84.3% which is to be expected at this time of the year that is rainy and moist. Every two seconds, the sensor can only receive new data. This should not be an issue with hydroponics because large changes in air temperature or humidity within two seconds are extremely unusual. The level of nutrient solution is also constantly monitored and displayed on the GSM mobile terminal for the end user to see and evaluate. Table 1 also shows that the remote or android button control terminal also has good control over the nutrient pump such that depressing the nutrient pump switch on the android mobile terminal switches on the pump. The application indicates that it can collect data from sensors quickly and sort out appropriate appliance control, suggesting that the designed system has completed the required functions. Users can see the humidity, light intensity, and water level in great detail. Customers can also choose whether or not to turn on the water pump and lamp remotely based on the collected data. The complete circuit diagram of the designed project is revealed in Figure 8; Figure 9 shows of the system’s nutrient supply distribution, while the completed work is depicted in Fig. 10.


Table 1. Expected and Measured Values.



Expected (with System)


(with meter)













Fluid  level





Power supply






Pump Switch









Figure 8. Complete Circuit Diagram of the Solar Powered Hydroponics System with IoT.


            Figure 9. System’s Nutrient Supply Distribution.

Figure 10. Completed Work.


At the onset of this project and in view of the recent hydroponic means of farming, this project work incorporated an online monitoring and solar power system as a means of taking advantage of the abundant solar energy available. This overall aim was achieved at the completion of the work. It is therefore hoped that this project work would enable one to have a better understanding of the usefulness of hydroponics farming and also provide a more flexible means of remote monitoring and control of farming operations.  It is also hoped that this project work would aid in the conception, improvement and development of better methods of implementing hydroponics systems.

Conflict of interest

The authors declare no potential conflict of interest regarding the publication of this work. In addition, the ethical issues including plagiarism, informed consent, misconduct, data fabrication and, or falsification, double publication and, or submission, and redundancy have been completely witnessed by the authors.


The author(s) received no financial support for the research, authorship, and/or publication of this article

Peuchpanngarm, C., Srinitiworawong, P., Samerjai, W., & Sunetnanta, T. (2016). DIY sensor-based automatic control mobile application for hydroponics. In 2016 Fifth ICT International Student Project Conference (ICT-ISPC), 57-60. IEEE.
Tembe, S., Khan, S., & Acharekar, R. (2018). IoT based automated hydroponics system. International Journal of Scientific & Engineering Research, 9(2), 67-71.
Shewale M. V., & Chaudhari, D. S. (2018). IoT based plant monitoring system for hydroponics agriculture: a review. International Journal for Research in Applied Science & Engineering Technology, 6(2), 1628-1631.
Pitakphongmetha, J., Boonnam, N., Wongkoon, S., Horanont, T., Somkiadcharoen, D. & Prapakornpilai, J. (2016). Internet of things for planting in smart farm hydroponics style. In 2016 International Computer Science and Engineering Conference (ICSEC) (1-5). IEEE.
Mahesh, P. J., Naheem, M., Mubafar, R., Shyba, S., & Beevi, S. (2016). New aspect for organic farming practices: Controlled crop nutrition and soilless agriculture. In 2016 IEEE global humanitarian technology conference (GHTC) (819-824). IEEE.
Arenella, V., Gabriele, P., Leccese, F., Cagnetti, M., Maiolo, L., Pecora, A. & Đurović-Pejčev, R. (2016, June). Procedure for the space certification of a controller for soilless cultivation. In 2016 IEEE Metrology for Aerospace (MetroAeroSpace) (359-364). IEEE.
Umamaheswari, S., Preethi, A., Pravin, E., & Dhanusha, R. (2016). Integrating scheduled hydroponic system. In 2016 IEEE International Conference on Advances in Computer Applications (ICACA) (333-337). IEEE.