Arduino UNO Based Soil Moisture Monitoring and Plant Watering System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino UNO microcontroller with a set of sensors and actuators to perform various tasks. The Arduino UNO serves as the central processing unit, interfacing with an HC-SR04 Ultrasonic Sensor, a Micro servo 9G, and a Moisture Sensor. The HC-SR04 is used for distance measurement, the Micro servo 9G is an actuator controlled by PWM signals, and the Moisture Sensor is used to detect the moisture level in the soil. The circuit is powered by a 5V supply from the Arduino UNO, which is distributed to the other components. Ground connections are shared among all components to complete the circuit.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
HC-SR04 Ultrasonic Sensor
- An ultrasonic distance sensor that provides 2cm to 400cm of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm.
Micro servo 9G
- A small-sized, lightweight servo motor suitable for applications where small weight and size are critical.
Moisture Sensor
- A simple breakout for measuring the moisture in soil and similar materials. It has both analog and digital outputs.
Wiring Details
Arduino UNO
- 5V pin provides power to the Moisture Sensor, HC-SR04 Ultrasonic Sensor, and Micro servo 9G.
- GND pin is connected to the ground pins of all other components to complete the circuit.
- A0 pin is connected to the analog output of the Moisture Sensor.
- D10 pin is connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- D8 pin is connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- D6 pin is connected to the PWM input of the Micro servo 9G.
HC-SR04 Ultrasonic Sensor
- VCC pin connected to 5V from the Arduino UNO.
- TRIG pin connected to digital pin D8 on the Arduino UNO.
- ECHO pin connected to digital pin D10 on the Arduino UNO.
- GND pin connected to the ground on the Arduino UNO.
Micro servo 9G
- +5V pin connected to 5V from the Arduino UNO.
- GND pin connected to the ground on the Arduino UNO.
- PWM pin connected to digital pin D6 on the Arduino UNO.
Moisture Sensor
- 5v+ pin connected to 5V from the Arduino UNO.
- GND pin connected to the ground on the Arduino UNO.
- A0 pin connected to analog pin A0 on the Arduino UNO.
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 setup and loop functions to control the connected sensors and actuators based on the requirements of the circuit's application.