Arduino Nano Controlled Soil Moisture Monitoring and Automated Irrigation System
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface various sensors and actuators with an Arduino Nano microcontroller. It includes a soil moisture sensor for detecting water content in the soil, two IR sensors for detecting proximity or line tracking, a servo motor for precise angular movement, an L298N DC motor driver for controlling two sets of motors and wheels, a 7805 voltage regulator to provide a stable 5V output from a higher voltage input, an 18650 Li-Ion battery as the power source, and an RGB LED for visual feedback.
Component List
Soil Moisture Sensor
- Pins: VCC, GND, SIG
- Description: A sensor that measures the volumetric water content in soil.
Servo
- Pins: gnd, vcc, pulse
- Description: A rotary actuator or linear actuator that allows for precise control of angular or linear position.
L298N DC Motor Driver
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
- Description: A motor driver module that can control up to two DC motors or one stepper motor.
Motor and Wheels
- Pins: vcc, GND
- Description: The actuator part of the circuit that converts electrical energy into mechanical motion.
Arduino Nano
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
- Description: A small, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.x).
7805 Voltage Regulator
- Pins: Vin, Gnd, Vout
- Description: A voltage regulator that outputs a stable 5V DC from a higher voltage input.
18650 Li-Ion Battery
- Pins: Positive, Negative
- Description: A rechargeable battery that provides power to the circuit.
IR Sensor
- Pins: out, gnd, vcc
- Description: An infrared sensor capable of detecting proximity or used in line tracking applications.
RGB LED (Wokwi compatible)
- Pins: R, COM, G, B
- Description: A light-emitting diode that can emit red, green, and blue light.
Wiring Details
Soil Moisture Sensor
- VCC: Connected to 5V of Arduino Nano
- GND: Connected to GND of Arduino Nano
- SIG: Connected to A0 of Arduino Nano
Servo
- gnd: Connected to GND of Arduino Nano
- vcc: Connected to Vout of 7805 Voltage Regulator
- pulse: Connected to D4 of Arduino Nano
L298N DC Motor Driver
- OUT1, OUT2: Connected to one set of Motor and Wheels
- OUT3, OUT4: Connected to another set of Motor and Wheels
- 12V: Connected to Positive of 18650 Li-Ion Battery
- GND: Connected to GND of Arduino Nano
- 5V: Not connected
- ENA, ENB: Not connected
- IN1: Connected to D11/MOSI of Arduino Nano
- IN2: Connected to D10 of Arduino Nano
- IN3: Connected to D9 of Arduino Nano
- IN4: Connected to D6 of Arduino Nano
Motor and Wheels
- vcc: Connected to OUT1 and OUT4 of L298N DC Motor Driver
- GND: Connected to OUT2 and OUT3 of L298N DC Motor Driver
Arduino Nano
- 5V: Connected to VCC of Soil Moisture Sensor, VCC of IR Sensors
- GND: Connected to GND of Soil Moisture Sensor, GND of IR Sensors, GND of Servo, GND of L298N DC Motor Driver
- VIN: Connected to Positive of 18650 Li-Ion Battery
- 3V3: Connected to COM of RGB LED
- D4: Connected to pulse of Servo
- D3: Connected to out of one IR Sensor
- D2: Connected to out of another IR Sensor
- D5, D7, D12/MISO: Connected to G, B, R of RGB LED respectively
7805 Voltage Regulator
- Vin: Connected to Positive of 18650 Li-Ion Battery
- Gnd: Connected to GND of Arduino Nano
- Vout: Connected to vcc of Servo
18650 Li-Ion Battery
- Positive: Connected to VIN of Arduino Nano, Vin of 7805 Voltage Regulator, 12V of L298N DC Motor Driver
- Negative: Connected to GND of Arduino Nano
IR Sensors
- out: Connected to D3 and D2 of Arduino Nano for two different IR Sensors
- gnd: Connected to GND of Arduino Nano
- vcc: Connected to 5V of Arduino Nano
RGB LED (Wokwi compatible)
- R: Connected to D12/MISO of Arduino Nano
- COM: Connected to 3V3 of Arduino Nano
- G: Connected to D5 of Arduino Nano
- B: Connected to D7 of Arduino Nano
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Filename: sketch.ino
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the components based on the wiring and the desired behavior of the circuit.