The Internet of Things (IoT) holds the capacity to catalyze the fourth industrial revolution, greatly increasing agricultural output and efficiency by refining farming processes. This investigation aims to engineer a solar-powered IoT irrigation system. The configuration included a 20W photovoltaic module to power the base station, a Raspberry Pi 4 for pump regulation, and a 12V 7.5Ah cell for energy storage. Numerous field data-gathering nodes were deployed to capture on-site information. The ESP8266 microcontroller was paired with a Capacitive Soil Moisture Sensor (V1.2) and a DHT 22 sensor to communicate soil moisture, ambient temperature, and humidity measurements to the base station via the Message Queuing Telemetry Transport (MQTT) protocol. Factoring in a peak discharge of 75%, the cell can drive the motor for at least 2 nocturnal hours, a duration sufficient to operate the data collection substation. The trigger for initiating the pump was defined as soil moisture dipping beneath 45%, with cessation triggered at or exceeding 80% to preserve ideal hydration levels. A web portal was built using the Python Django framework and an SQLite3 database, enabling real-time monitoring and remote control of the irrigation pump. A set of irrigation decision rules was formulated to improve the pump’s effectiveness, ensuring the engineered system could operate efficiently. This methodology equips farmers to remotely monitor field conditions and control irrigation via a web interface, thereby reducing dependence on conventional energy sources and minimizing water waste during irrigation.
Bangladesh, a predominantly agricultural nation in South Asia, relies heavily on farming for its economic sustenance, with 8.52 million hectares of arable land and annual crop and vegetable production of 37.266 million metric tons [1]. Nonetheless, the nation’s irrigation water situation is acute, particularly during the dry summer and winter seasons, despite plentiful river resources [2]. To accommodate the requirements of an increasing population, elevating crop yield is imperative, achievable by dispensing the precise volume of water at the opportune moment, a prerequisite for any crop’s maturation. Historically, watering has been carried out manually, requiring considerable effort and expertise and resulting in significant water waste [3]. Growers resort to earthen channels to convey water to their plots owing to minimal upfront expenditure, a practice that incurs substantial losses of 50%–60%, predominantly from seepage [4]. To remedy this challenge, adopting a technique that ensures precise water distribution without waste or excess is critical. This constitutes the foundational premise of IoT-centric agriculture, which formulates choices by scrutinizing data harvested from the plot.
Given the country’s intense water deficit, most Bangladeshi farmers tap underground water reservoirs with electric and diesel-motor-operated pumps. Roughly 0.2 million such units are in service to lift water. These pumps collectively demand 1300MW of electrical energy each day to function [5]. About 84% of the nation’s irrigation segment is presently reliant on diesel, while 1.34 million diesel-powered pumps discharge 0.9 million tons of fumes per annum [6]. Hence, safeguarding a green ecosystem necessitates curtailing reliance on fossil fuels and seeking alternative energy sources.
IoT-integrated irrigation frameworks represent a premier choice for the trajectory of intelligent agriculture, as they enable surveillance and evidence-based, real-time watering [7]. This innovation not only conserves manpower and time but also ensures optimal and efficient water use. IoT, the Internet of Things, refers to a mechanism that streamlines information exchange among devices, logistics, and operators, profoundly affecting production engineering, fabrication, domestic and security spheres, and various other sectors. Pioneering approaches such as IoT in agriculture have opened avenues for intelligent farming research to boost yields and overcome constraints. IoT is reshaping agriculture and helping growers overcome enormous challenges. Growers can become familiar with emerging technologies and trends through IoT [8]. Embedding Wi-Fi into agricultural IoT architectures is gaining traction due to its expandability, which enables the incorporation of additional sensors and higher data throughput [9].
Additionally, lightweight protocols such as Message Queuing Telemetry Transport (MQTT) enhance the effectiveness of smart irrigation systems by enabling streamlined oversight and ensuring secure communication between IoT devices and operators [10]. SQLite3, an adaptable open-source embedded database engine, bolsters the capability of IoT implementations. Its architecture is lean, encompassing fewer than 30,000 lines of ANSI C code, and it supports up to 2 terabytes of growth. This provides binary uniformity across various platforms, making it especially well-suited for agricultural IoT deployments [11, 12]. Nginx (engine x) is a high-performance web server and reverse proxy that efficiently handles large concurrent requests with minimal resource consumption. This technology is indispensable for governing data-heavy IoT frameworks in agriculture [13]. Rolling out this sophisticated technology is transforming farming, arming growers with indispensable tools to boost yields and address challenges effectively.
The expansion of agriculture in rural areas is increasing electricity requirements for the holistic development of the nation [14]. Yet these very rural areas are disproportionately affected by energy scarcity [15]. Deploying mains electricity grids to power electric water pumps for agrarian and watering purposes in rural locales poses a formidable barrier [16]. Bearing in mind the grave predicaments confronting conventional watering systems, including electricity deficits, fuel costs, and technological underuse, it becomes apparent that renewables are indispensable to provide sufficient energy for agricultural operations. In this setting, solar power emerges as a cost-effective alternative to irrigation systems in agricultural ventures, reducing the consumption of fossil fuels and electricity [17]. Hence, IoT-anchored solar pumps for watering stand as an outstanding and economical choice for cultivators.
A self-regulating solar-fuelled irrigation apparatus can act as a budget-friendly mechanized remedy for growers. This system adeptly maintains equilibrium between watering requirements and delivery by continuously sensing soil moisture layers and correlated factors, such as air moisture content and thermal conditions. Superfluous watering of a plot imposes an additional financial burden on the cultivator, whereas insufficient watering stunts crop growth [18]. Moreover, adopting this tactic reduces reliance on traditional electricity delivery modes, thereby aiding a decline in operational expenditure.
Antecedent inquiries in the domain of watering systems have repeatedly highlighted the potential of mechanization to enable the development of viable intelligent irrigation systems. For example, Campoverde [19] proposed an IoT-based irrigation system using a Raspberry Pi 4 and an Arduino UNO to control irrigation pumps based on soil moisture and evapotranspiration. Other investigators have likewise grappled with hurdles to remote access to smart irrigation and have proposed IoT-based, solar-powered irrigation architectures [20, 21]. Of note, Mahalakshmi [22] and Pernapati [23] engineered the surveillance and governance of a watering apparatus, leveraging the MQTT protocol for effective data relay from earth moisture detectors and water depth sensors. Heble et al. [24] focused on low-expenditure IoT web solutions for soil moisture tracking and evaluated them based on energy consumption and cost. Monica et al. [25] harnessed IoT to activate a self-operating irrigation system to secure peak water allocation and ultimately reduce irrigation-related water waste. Adopting an alternative method, Krishnan et al. [26] employed the Global System for Mobile Communications (GSM) to dispatch confirmation messages regarding input variables (such as soil moisture, thermal state, and air moisture) based on an intelligent algorithm. Correspondingly, Saha et al. [27] applied a GSM unit to enhance system mechanization, underscoring its promise to simplify workflows and improve efficiency. GSM-centered mechanized cellular frameworks relay results to agro-producers and enable coded cellular telephone directives to supervise the entire watering operation.
Concurrently, numerous researchers have delved into water conditions in Bangladesh [28-30]. Biswas and Hossain [31] observed that among domestic pumps, 83% are diesel-motor-driven and 17% are electrically driven. Additionally, they advanced a contamination-free, ecologically sound water-lifting system for irrigation. This seeks to mitigate economic strain while incentivizing cultivators to embrace an economical power source such as solar [32]. In their study, Sarkar and Ghosh [33] lucidly outlined the potential and merits of solar-powered irrigation systems. Be that as it may, a large portion of them were unsuccessful in forging a user interface to command the constructed system. All things considered, a body of studies championed the adoption of solar-powered irrigation pumps [1, 6, 28-33]. That said, only a handful of studies have specifically focused on the engineering of IoT-enabled intelligent watering systems that harness solar-driven water-pumping installations [3, 17, 20-22].
Accordingly, to address the extant research gaps, this inquiry focused on conceiving and fabricating a novel solar-powered watering apparatus integrated with IoT. By accumulating readings from the detectors, the Raspberry Pi 4 could automate the pump via the relay module based on the plot states. A reactive web-sourced user dashboard was additionally developed to enable real-time scheme oversight. The upshot is that, provided an Internet link exists, observation may occur from any locale at any instant. This is intended to reduce the operator’s burden and enhance the water pump’s operational performance.
A framework anchored in IoT was advanced to capture, relay, and decode intelligence on cropland soil moisture, thermal readings, ambient moisture content, and climate projections to administer irrigation judiciously.
Figure 1 presents the configuration map of the IoT-anchored solar irrigation apparatus. Aligned with the advanced framework, the apparatus could pull in climatic metrics from multiple locations across the growing area and feed them to the command hub to dictate the motor’s actions. A browser-accessible dashboard rendered live surveillance figures and override switches. The motor operates autonomously by crunching detector feeds and enforcing decision rules on the Raspberry Pi 4, or it can be tripped by hand via the operator console to engage the pump whenever circumstances call for it.

Figure 1. Architecture of the proposed system.
The decision-making chain of the apparatus follows the operational sequence outlined in Figure 2. Once booted, the microcontroller acquires the detector outputs. It pushes them to an off-site repository for assessment. The feed of immediate field readings governs the pump’s state, locking it into either activation or deactivation to mirror field requirements. The moment the stipulated watering quota is met, the apparatus’s soundness is borne out further as the pump cuts out on its own.

Figure 2. Flow diagram of the automatic solar pump operation.
The apparatus was architected to function without human intervention by ingesting cordless field metrics, while every subassembly drew its power exclusively from the sun. For this very reason, the physical architecture was bisected into two principal segments: 1. Central command hub, and 2. Field telemetry nodes. The particulars of the chief hardware constituents are cataloged in Table 1.
Table 1. Hardware components and specifications.
System role | Hardware module | Rewritten technical specifications |
Processing and control | Raspberry Pi 4 | Equipped with a quad-core Cortex-A72 processor operating at 1.5 GHz, supported by 4 GB RAM. Operates with a 5V, 3A power supply and provides GPIO, USB 3.0, HDMI, and Ethernet connectivity interfaces. |
Processing and control | NodeMCU | ESP8266-based Node Microcontroller Unit supporting input voltages between 4.5V and 9V through USB power. Communication data rates range from 110 bps to 460,800 bps, with an operating temperature span from −40 °C to +125 °C. |
Environmental monitoring | Capacitive Soil Moisture Sensor | Capacitive-type soil moisture detector functioning within a voltage range of 3.3V–5V. Supports both analog and digital outputs and uses a 3-pin interface with VCC, GND, and Signal terminals. |
Environmental monitoring | DHT22 Sensor | The temperature-sensing range is −40 to +80 °C, with an accuracy of ± 0.5 °C. Humidity detection covers 0%–100% with ±2 % precision. Operates between 3V and 5.5V and samples data at 0.5 Hz. |
Actuation and irrigation | Water Pump | Submersible pumping device rated at 1100 GPH and powered by 12V DC. Designed for quiet performance and long-term durability. |
The brain of the operation, a Raspberry Pi 4, ingested information over Wi-Fi emanating from an array of field telemetry nodes and accordingly steered the electric pump’s engagement.
As sketched in Figure 3, the electrical supply circuitry taps a photovoltaic module to top up a 12V rechargeable DC lead-acid accumulator. This accumulator stored the charge and delivered the required electricity to both the Raspberry Pi 4 and the DC pump. An LM2596 buck converter stepped the 12V feed down to 5V to keep the Raspberry Pi 4 energized. A 4-channel relay module was mated to the Raspberry Pi 4 to orchestrate the motor’s activity.

Figure 3. Circuit diagram of base station.
This unit pulled in the plot’s earth dampness, air temperature, and ambient humidity via its detectors, then sent the metrics to the server via NodeMCU over Wi-Fi. The field telemetry node banked on solar radiation for its operating current, and the metrics were beamed to the command hub through the air. Inside the power conditioning block, the diminutive photovoltaic module replenished the 18,650 rechargeable lithium cells, with a TP4056 lithium cell charging board enlisted to temper the charging regime. This board also put out a regulated 5V rail to power the ESP8266. The capacitive earth dampness probe and DHT22 sensor captured the moisture, temperature, and humidity datasets within the sensing block. Firmware was burned onto the NodeMCU to decode detector signals. Thereafter, the datasets were pushed to the command hub by the NodeMCU employing the MQTT framework. The circuit schematic of the assembly is shown in Figure 4.

Figure 4. Circuit diagram of data collecting sub-station.
During the software construction phase, the MQTT framework was used to transmit node readings to the command hub over Wi-Fi. The Arduino Integrated Development Environment (IDE) constituted the workspace for authoring routines and flashing them onto the microcontroller to sample detector outputs. Beyond that, the Visual Studio Code (VS Code) editor was used for Python scripting, and an adaptive, browser-based application was painstakingly crafted in HTML, CSS, and JavaScript to manage detector data visualization and pump actuation. The web portal was crafted to provide operators with uninterrupted access from desktops and portable devices and was deliberately kept intuitive for first-time users. On top of that, embedding the SQLite3 database engine facilitated archival and retrospective analysis. The dashboard renders live detector metrics and manual override levers for pump engagement. The ordered stages of web portal development are illustrated in Figure 5. In parallel, the diverse server-side toolkits used for portal development are listed in Table 2.

Figure 5. Development process for website building.
Table 2. Different platforms are used for website development.
Functional description | Implemented software/Technology |
Operating platform | Raspberry Pi Operating System (Raspbian OS) |
Backend web framework | Flask framework developed in Python |
Frontend web development | HTML, CSS, JavaScript, and Bootstrap 4 |
Web hosting server | Nginx web server |
Application hosting service | uWSGI-based Web Server Gateway Interface |
Data management system | SQLite3 database engine |
DNS and port-forwarding solution | Remote.it service for Domain Name System (DNS) and remote access forwarding |
The built command hub ran entirely on solar power, sustaining the entire apparatus with no backup power supply. The assembled command hub wiring is exhibited in Figure 6(a). The 20W photovoltaic module electrified the command hub. The electricity was stored in the 12V DC accumulator and dispensed to keep the apparatus alive. Every component was tied into the solar charge regulator. An output leg from the solar charge regulator fed the Raspberry Pi 4. The step-down regulator converted the 12V DC supply into a 5V DC supply, purpose-built for the Raspberry Pi. A set of field telemetry nodes was produced, each likewise wholly sun-reliant. Every node was self-sufficient in acquiring climatic data and capable of yielding standalone measurements. A photographic view of the field telemetry node is shown in Figure 6(b). Each node packs a capacitive earth-dampness probe and a DHT22 sensor to measure climatic metrics. The earth dampness probe was secured to the forward face of a conduit, driven deep enough into the ground to deliver higher-fidelity readings. The accumulator, charging board, and NodeMCU were housed inside the enclosure. The photovoltaic module was positioned on the top plane of the node, and it revitalized the lithium accumulator to energize the assembly.

Figure 6. Developed stations: (a) Base station, and (b) Substation.
The irrigation apparatus was initially set up in the laboratory to confirm its functionality, as depicted in Figure 7a. It operated under indoor conditions. It managed to warehouse datasets and govern the pump actions competently. Subsequently, for the plot-level trial, the apparatus was sited outdoors, as shown in Figure 7b. The apparatus proved capable of operating solely on solar-derived electricity. The plot-level trial was conducted, and the complete meteorological dataset was archived at one-minute spacing.

Figure 7. Experimental setup: (a) Lab setup of the system, and (b) Outdoor setup of the system.
The apparatus relied entirely on solar-generated electricity, requiring the installation of photovoltaic modules to electrify each station. Rechargeable accumulators were tasked with stockpiling electricity and channeling it to the active gear. To achieve the intended outcome and assess the practicability of the electrical supplies, the accumulators at each station were evaluated.
A thorough reckoning of accumulator behavior at the central command hub is tabulated in Table 3. The accumulator’s held energy was computed at 90W, an amount judged fit for driving the irrigation apparatus. This accumulator was assumed to undergo a maximum drain of 75% in non-replenishing states, most critically after sundown. The Raspberry Pi 4’s electrical appetite, in the neighborhood of 3W, was forecast to total 36W across a 12-hour window when the accumulator remained unreplenished. The leftover charge was sufficient to operate the irrigation pump for > 2hr. The depleted accumulator took more than 4 hours to fully replenish. In a standby state, the accumulator kept the Raspberry Pi alive for > 30 hours.
Table 3. Base-station battery performance calculation.
Component | Parameter | Rewritten specification |
Solar panel | Nominal power output (W) | 20 W |
Battery | Operating voltage (V) | 12 V |
Battery | Rated current (A) | 7.5 A |
Battery | Output power capacity (W) | 90 W |
Battery | Estimated usable output power (W) | 67.5 W |
Battery | Time required to recharge a completely drained battery (h) | 4.74 h |
Irrigation pump | Operating voltage (V) | 12 V |
Irrigation pump | Current consumption (A) | 1.02 A |
Irrigation pump | Rated power usage (W) | 12.24 W |
Irrigation pump | Backup duration using a fully charged battery (hr) | 5.51 hr |
Irrigation pump | Nighttime available energy (W) | 31.5 W |
Irrigation pump | Operating duration during nighttime (hr) | 2.07 hr |
Raspberry Pi 4 | Supply voltage (V) | 5 V |
Raspberry Pi 4 | Current requirement (A) | 0.6 A |
Raspberry Pi 4 | Power consumption (W) | 3 W |
Raspberry Pi 4 | Runtime supported by a fully charged battery (hr) | 30 hr |
In contrast, every field telemetry node was furnished with a rechargeable 18,650 lithium-ion accumulator fed by a compact photovoltaic module. The compact photovoltaic panel carried a power production rating of 1.8 W. The photovoltaic panel would require roughly 4.33 hours to recharge a drained battery, assuming 95% conversion efficiency. A fully charged accumulator could theoretically deliver electricity to the telemetry node for up to 19.733 hours. Across a 12-hour nocturnal stretch with no photovoltaic replenishment, the assembly drew roughly 4.5W each hour. The accumulator can thereafter be revived via the photovoltaic module on multiple cycles. The selected accumulator was deemed a proper match for the field telemetry nodes. Table 4 sets forth the forecast accumulator behavior for the field telemetry nodes.
Table 4. Data collection for the sub-station battery performance calculation.
Component | Specification | Reformulated value |
Mini solar panel | Operating voltage (V) | 6 V |
Mini solar panel | Output current (A) | 0.3 A |
Mini solar panel | Maximum rated power (W) | 1.8 W |
Battery | Nominal voltage (V) | 3.7 V |
Battery | Current capacity (A) | 2 A |
Battery | Total power capacity (W) | 7.4 W |
Battery | Effective output power considering 95 % efficiency (W) | 7.03 W |
Battery | Duration required to fully recharge a depleted battery (hr) | 4.33 hr |
NodeMCU | Input voltage requirement (V) | 5 V |
NodeMCU | Operating current (A) | 0.075 A |
NodeMCU | Energy consumption (W) | 0.375 W |
NodeMCU | Battery-supported operating duration with full charge (hr) | 19.73 hr |
NodeMCU | Nighttime energy usage assuming 12 hr operation (Whr) | 4.5 Whr |
A browser-accessible local dashboard was built to handle metric observation, graphical rendering, and watering commands. The portal behaves as a networked service capable of ingesting detector streams from the plot, serving an adaptive screen-based console for live oversight, and enabling remote pump triggering.
An adaptive, screen-responsive operator panel was built using Flask, SQLite3, uWSGI, and Nginx to enable real-time viewing and scheduling of watering operations. The panel pushes detector figures the moment they arrive. The instantaneous viewing panel shown in Figure 8 allows operators to follow live readings. Operators can select individual nodes and their respective averaged readouts. Continuous tracking of thermal state, heat factor, air wetness, and ground dampness values is supported within the panel. Figure 9 presents a plot of the trends in climatic variables over time. The rendered graphs visually encode the archived figures and map out their developmental path. Figures 9a-9d sequentially showcase captured values for air wetness, heat factor, ground dampness, and thermal state. Accessing these plots requires nothing more than a tap on the symbol in the data aggregation pane for each metric.

Figure 8. Real-time monitoring of the developed website.

Figure 9. Web interface for real-time data monitoring: (a) Humidity, (b) Heat index, (c) Soil moisture, and (d) Temperature.
The server-side framework of the web utility was written in Python, while uWSGI handled the handshake between the plot-located hardware and the central machine. This entire setup ran locally atop a Nginx web server, which made short work of digesting incoming traffic. A Raspberry Pi 4 served as the plot-side device, tasked with collecting readings and sending them to the nearby server via the networked utility. The archived figures remained available for live viewing via a browser panel, which also included a feature for downloading records in Comma-Separated Values (CSV) format, given how straightforward this format is in spreadsheet software or number-crunching toolkits. Going further, the networked utility had been shaped to ride out network wobbles and full dropouts mid-synchronization, leaning on database-tier status flags to safeguard record wholeness and allow frictionless pickup once connectivity clicked back in. Figure 10 shows the metric observation view in the portal.

Figure 10. Field data monitoring on the website.
A networked utility was layered on top of the HTTP protocol to engage and disengage the pump. This utility could be accessed via a Python snippet running on the Raspberry Pi 4 to control the water pump’s state. That Python snippet, when executed on the Raspberry Pi 4, sent a message to flip the relay switch, thereby spinning up or shutting down the water pump. The browser-facing panel for pump direction is shown in Figure 11.

Figure 11. Web interface for controlling the water pump.
The rig’s working capability was formally put through its paces during a single trial staged across the spring season, blending logical checks and quantitative techniques while covering a broad spectrum of response and predictor variables. A close reading of the trial datasets was undertaken to pin down the influence of variables, lending a firm backbone to the conclusions drawn.
Figure 12 plots how climatic parameters shifted with the passage of time. The trace follows ground dampness, atmospheric wetness, and thermal readings. The firing threshold for ground dampness was set at 45%, with the pump kicking in automatically whenever the reading dropped below that level.

Figure 12. Trend of weather data with time (RH = Relative Humidity, SM = Soil Moisture, and Temp. = Temperature).
Figure 13 maps out the interplay between ground dampness percentage and pump runtime. The blue-hued area shows ground moisture percentage over time, whereas the red-hued area maps to the intervals during which the pump remained active. At the moment ground dampness hit the upper boundary of 80%, the pump cut out. Even so, the plot also reveals moments when ground moisture rose despite the pump being off. These rises, chalked up to rainfall spells, meant the pump was not called for during those windows, pointing to the rig’s knack for reading and reacting to shifting outdoor circumstances.

Figure 13. Pump operation with soil moisture content.
This sun-energized, IoT-grounded watering rig was designed with smart vegetable plot irrigation in mind, aiming to reduce water loss, improve the operator experience, and promote environmental stewardship. An adaptive website was rolled out to let operators stay on top of climatic and ground-dampness readings and conveniently toggle the motor from their personal devices. During the trial window of the fabricated rig, every piece of hardware was stationed outdoors and performed well in terms of wireless data transfer and motor state management. North of one hundred uninterrupted operational sequences of the watering rig were carried out. The 12V DC accumulator banked and doled out electricity, more than enough to keep the motor spinning for more than 5 hr. Repeated downpours threw up difficulties during rig placement. With the soil near saturation across large stretches of the testing window, the motor could not achieve much runtime relative to what a parched season would demand. A handful of compensations had to be baked into the command logic. Something close to ± 2% in timing drift, plus measurement discrepancies, had to be folded into any verdict on the system assembly. Deploying the watering rig within a genuinely cropped parcel mated to a properly sized photovoltaic array and a better-suited pump spanning more acreage, stands as a must for extracting truer-to-life conclusions than what the handpicked test bed could yield. Running further trials at an expanded scale and drawing on more sophisticated statistical tooling is unavoidable before broader applicability can be claimed. As a final, equally weighty point, building out the graphical user interface with additional capabilities and tooling will remain central to improving its overall usefulness and the quality of operator interaction going forward.
This research was made possible by the support of the Bangladesh Agricultural University Research System (BAURES), Bangladesh Agricultural University, Mymensingh, under project no. 2021/16/BAU.
None
None
None
Open Access The author(s) retain copyright. This article is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. It may be shared and adapted for non-commercial purposes with appropriate attribution, an indication of changes, and distribution of adaptations under the same license. Third-party material may be subject to separate terms identified in its credit line. View the license at https://creativecommons.org/licenses/by-nc-sa/4.0/.