Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Mega 2560 Based Automated Irrigation System with Soil Moisture Sensing and LCD Display

View and Edit Project In Cirkit DesignerImage of Arduino Mega 2560 Based Automated Irrigation System with Soil Moisture Sensing and LCD Display

Circuit Documentation

Summary

This circuit is designed to automate a garden watering system. It includes an Arduino Mega 2560 microcontroller to manage inputs from soil moisture sensors and a DHT22 temperature/humidity sensor, control a 4-channel relay connected to water valves, and interface with an LCD display and an SD card reader for user interaction and configuration. The system allows for scheduling watering times, adjusting moisture thresholds, and can operate the valves even during rainfall if configured to do so.

Component List

Arduino Mega 2560

SD Card Reader (2 Pins)

LCD Display 20x4 I2C

DHT22

Relay 4 Channel 5V

Soil Moisture Module (3 instances)

RTC DS3231

YL-69 Sonda (3 instances)

2Pin Push Switch (2 instances)

Comment

Wiring Details

Power Supply Connections

Soil Moisture Modules

LCD Display 20x4 I2C

DHT22

Relay 4 Channel 5V

RTC DS3231

SD Card Reader

YL-69 Sonda

2Pin Push Switch

Documented Code

The code for the Arduino Mega 2560 is written in C++ and is designed to control the garden watering system. It includes libraries for interfacing with the RTC, DHT sensor, LCD display, and SD card. The code initializes the components, reads sensor data, and controls the relays based on the time, soil moisture, and user-defined settings. It also includes a menu system for user interaction via the serial monitor and functions for reading and writing configuration settings to the SD card.

The code is too extensive to include in this document fully, but here is a brief overview of its structure:

The code is well-commented, providing explanations for each section and its functionality. It also includes error handling for the RTC and SD card initialization.