Arduino UNO-Based Smart Agriculture System with Soil Monitoring and Automated Water Pump Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface with various sensors and a display module, controlled by an Arduino UNO microcontroller. The sensors include a soil moisture sensor, a soil temperature sensor, an NPK soil sensor, and a DHT11 temperature and humidity sensor. The circuit also includes an RS485 transceiver for serial communication and a water pump for actuation. A 9V battery provides power to the system. The display module is a 0.96" OLED screen for visual output. The Arduino UNO manages sensor readings, controls the water pump, and communicates data through the RS485 transceiver.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- Used as the main controller for the circuit
RS485 Transceiver
- Serial communication module for long-distance and differential communication
SparkFun Soil Moisture Sensor
- Measures the volumetric content of water in soil
Soil Temperature Sensor
- Measures the temperature of the soil
NPK Soil Sensor (mini)
- Measures the nitrogen, phosphorus, and potassium content in the soil
DHT11 Sensor V2
- Measures ambient temperature and humidity
9V Battery
- Provides power to the circuit
0.96" OLED
- Small display module for visual output of sensor data
Water Pump
- Actuator for controlling water flow based on sensor readings
Wiring Details
Arduino UNO
- A4 (SCL) connected to Soil Temperature Sensor (SCK) and OLED (SCK)
- A5 (SDA) connected to Soil Temperature Sensor (SDA) and OLED (SDA)
- GND connected to OLED (GND), Soil Moisture Sensor (GND), DHT11 Sensor (GND), Water Pump (GND), and Soil Temperature Sensor (GND)
- 3.3V connected to OLED (VDD), Soil Moisture Sensor (VCC), and DHT11 Sensor (VCC)
- 5V connected to Soil Temperature Sensor (VCC) and RS485 (VCC)
- D13 connected to Water Pump (VCC)
- D12 connected to RS485 (DI)
- D11 connected to RS485 (DE)
- D10 connected to RS485 (RE)
- D9 connected to RS485 (RO)
- D3 connected to Soil Moisture Sensor (SIG)
- D2 connected to DHT11 Sensor (DAT)
RS485 Transceiver
- VCC connected to Arduino UNO (5V)
- GND connected to NPK Soil Sensor (GND)
- B connected to NPK Soil Sensor (B)
- A connected to NPK Soil Sensor (A)
- DE connected to Arduino UNO (D11)
- DI connected to Arduino UNO (D12)
- RE connected to Arduino UNO (D10)
- RO connected to Arduino UNO (D9)
SparkFun Soil Moisture Sensor
- VCC connected to Arduino UNO (3.3V)
- GND connected to Arduino UNO (GND)
- SIG connected to Arduino UNO (D3)
Soil Temperature Sensor
- VCC connected to Arduino UNO (5V)
- SDA connected to Arduino UNO (A5)
- GND connected to 9V Battery (-)
- SCK connected to Arduino UNO (A4)
NPK Soil Sensor (mini)
- VCC connected to 9V Battery (+)
- GND connected to RS485 (GND)
- A connected to RS485 (A)
- B connected to RS485 (B)
DHT11 Sensor V2
- VCC connected to Arduino UNO (3.3V)
- DAT connected to Arduino UNO (D2)
- GND connected to Arduino UNO (GND)
9V Battery
- (+) connected to NPK Soil Sensor (VCC)
- (-) connected to Soil Temperature Sensor (GND)
0.96" OLED
- VDD connected to Arduino UNO (3.3V)
- SCK connected to Arduino UNO (A4)
- SDA connected to Arduino UNO (A5)
- GND connected to Arduino UNO (GND)
Water Pump
- VCC connected to Arduino UNO (D13)
- GND connected to Arduino UNO (GND)
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 needs to be completed with setup configurations and loop operations to handle sensor readings, data processing, and actuator control.