ABSTRACT
Water scarcity presents a significant challenge in agriculture, making the development of efficient irrigation systems essential to optimize water use and enhance crop yields. Manual irrigation methods are labor-intensive, time-consuming, and tend to waste water through inconsistent application. This study explores the design, construction, and testing of a solar-powered automatic irrigation system using the ATmega328P microcontroller. The system combines soil moisture sensors, a relay module, and water pumps to automate watering based on real-time soil moisture data. Simulations and experiments on sandy, clay, and loamy soils confirmed the system's reliability and stable connections. Results showed that sandy soil needed the most frequent watering, 3 to 4 times daily, due to quick drainage, while clay and loamy soils required 1 to 2 and 2 to 3 activations per day, respectively. Sandy soil also responded fastest (5-10 seconds), compared to clay (15-20 seconds) and loamy (10-15 seconds). Temperature readings peaked in sandy soil (30 °C), followed by loamy (26 °C) and clay (25 °C). Flow rates were highest in sandy soil (65 cl/h), with clay and loamy soils at 50 cl/h and 12 cl/h. Relative humidity and moisture content were lowest in sandy soil (62% and 22%) versus clay (80%, 39%) and loamy (72%, 32%). Overall, the system responded quickly, operated reliably, and distributed water efficiently. The findings confirm that integrating microcontrollers and moisture sensors provides a cost-effective, scalable, and sustainable solution for precision agriculture.