Arduino UNO Controlled Automated Plant Watering System with OLED Display and Soil Moisture Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components with an Arduino UNO microcontroller to perform a series of tasks. The circuit includes a 128x64 OLED display for visual output, a 12V single-channel relay to control a water pump, a SparkFun Soil Moisture Sensor and a Soil Moisture Module to monitor soil conditions, and a DHT22 sensor to measure temperature and humidity. The system is powered by two 18650 Li-ion batteries. The Arduino UNO serves as the central processing unit, interfacing with the sensors and controlling the relay based on the sensor inputs.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- Provides digital and analog I/O pins
- Used for controlling the logic of the circuit
128x64 OLED Display (I2C IIC SPI Serial)
- A small display for showing data
- Communicates with the Arduino via I2C protocol
12V SINGLE CHANNEL RELAY
- An electromechanical switch
- Used to control high power devices like the water pump
Water Pump
- An electric pump for moving water
- Controlled by the relay
SparkFun Soil Moisture Sensor
- Measures the moisture level in the soil
- Provides analog output to the Arduino
DHT22
- A sensor for measuring temperature and humidity
- Provides digital output to the Arduino
Adafruit Proto Shield R3
- An add-on board for Arduino UNO
- Used for making custom circuits and connections
18650 Li-ion Battery x 2
- Provides power to the circuit
- Two batteries connected to supply sufficient voltage
Soil Moisture Module
- An additional module for detecting soil moisture
- Provides both analog and digital outputs
Wiring Details
Arduino UNO
A4connected to OLED DisplaySCLA5connected to OLED DisplaySDAD7connected to RelayIND6connected to Soil Moisture ModuleDigital
128x64 OLED Display (I2C IIC SPI Serial)
SCLconnected to Arduino UNOA4SDAconnected to Arduino UNOA5GNDconnected to Proto ShieldGNDVCCconnected to Proto Shield+5V
12V SINGLE CHANNEL RELAY
INconnected to Arduino UNOD7COMconnected to 18650 Li-ion Battery+NOconnected to Water PumppositiveGNDconnected to Proto ShieldGNDVCCconnected to Proto Shield+5V
Water Pump
positiveconnected to RelayNOnegativeconnected to 18650 Li-ion Battery-
SparkFun Soil Moisture Sensor
VCCconnected to Soil Moisture ModulepositiveGNDconnected to Soil Moisture ModulenegativeSIGnot connected in this documentation
DHT22
+connected to Proto Shield+5VOutconnected to Proto ShieldD2-connected to Proto ShieldGND
Adafruit Proto Shield R3
GNDconnected to OLED DisplayGND, RelayGND, Soil Moisture ModuleGround, and DHT22-+5Vconnected to OLED DisplayVCC, RelayVCC, Soil Moisture ModuleVCC, and DHT22+A0connected to Soil Moisture ModuleAnalogD2connected to DHT22Out
18650 Li-ion Battery x 2
+connected to RelayCOM-connected to Water Pumpnegative
Soil Moisture Module
positiveconnected to SparkFun Soil Moisture SensorVCCnegativeconnected to SparkFun Soil Moisture SensorGNDAnalogconnected to Proto ShieldA0Digitalconnected to Arduino UNOD6Groundconnected to Proto ShieldGNDVCCconnected to Proto Shield+5V
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not include specific functionality. It should be populated with the logic to read sensor data, control the relay, and update the display based on the requirements of the circuit's application.