Arduino UNO-Based Automated Soil Moisture Monitoring and Watering System with LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to monitor soil moisture levels and control a water pump based on the moisture readings. It uses an Arduino UNO microcontroller to read data from a soil moisture sensor and display the information on an LCD screen. Additionally, a relay is used to control the water pump, which is powered by a battery.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
SparkFun Soil Moisture Sensor
- Description: A sensor used to measure the moisture content in the soil.
- Pins: VCC, GND, SIG
12V SINGLE CHANNEL RELAY
- Description: A relay module used to control high voltage devices like a water pump.
- Pins: NC, COM, NO, IN, GND, VCC
Water Pump
- Description: A pump used to water plants.
- Pins: positive, negative
LCD screen 16x2 I2C
- Description: A 16x2 character LCD display with I2C interface.
- Pins: SCL, SDA, VCC, GND
Battery
- Description: A power source for the water pump.
- Pins: -, +
Wiring Details
Arduino UNO
- 5V: Connected to VCC of SparkFun Soil Moisture Sensor, VCC of LCD screen 16x2 I2C, and VCC of 12V SINGLE CHANNEL RELAY.
- GND: Connected to GND of SparkFun Soil Moisture Sensor, GND of LCD screen 16x2 I2C, and GND of 12V SINGLE CHANNEL RELAY.
- SCL: Connected to SCL of LCD screen 16x2 I2C.
- SDA: Connected to SDA of LCD screen 16x2 I2C.
- D7: Connected to IN of 12V SINGLE CHANNEL RELAY.
SparkFun Soil Moisture Sensor
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- SIG: Not connected in this circuit.
12V SINGLE CHANNEL RELAY
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- IN: Connected to D7 of Arduino UNO.
- COM: Connected to negative of Water Pump.
- NC: Not connected in this circuit.
- NO: Not connected in this circuit.
Water Pump
- positive: Connected to + of Battery.
- negative: Connected to COM of 12V SINGLE CHANNEL RELAY.
LCD screen 16x2 I2C
- SCL: Connected to SCL of Arduino UNO.
- SDA: Connected to SDA of Arduino UNO.
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
Battery
- +: Connected to positive of Water Pump.
- -: Not connected in this circuit.
Code Documentation
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup() function is where you initialize your components and settings, and the loop() function is where you place the main logic that runs repeatedly. In this circuit, you would typically add code to read the soil moisture sensor, display the readings on the LCD, and control the relay to turn the water pump on or off based on the moisture levels.