Arduino Nano-Based Smart Irrigation System with Soil Moisture and Light Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Nano microcontroller interfacing with various sensors, actuators, and other components. The primary components include multiple photocells (LDRs), resistors, a soil moisture sensor, servos, a DC motor driver, a buck converter, a TP5100 battery charger, a 18650 Li-Ion battery, a DC mini metal gear motor, and a 5V mini water pump. The Arduino Nano reads sensor data and controls the actuators based on the programmed logic.
Component List
Arduino Nano
- Description: A small, complete, and breadboard-friendly board based on the ATmega328P.
- 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
Photocell (LDR)
- Description: A light-dependent resistor used to detect light levels.
- Pins: pin 0, pin 1
Resistor
- Description: A passive electrical component that implements electrical resistance as a circuit element.
- Pins: pin1, pin2
- Properties: Resistance: 10,000 Ohms
GND
- Description: Ground connection.
- Pins: GND
Servo
- Description: A rotary actuator that allows for precise control of angular position.
- Pins: gnd, vcc, pulse
Buck Converter
- Description: A DC-DC converter that steps down voltage.
- Pins: IN+, IN-, OUT+, OUT-
TP5100
- Description: A battery charger module.
- Pins: B-, B+, IN-, IN+
Soil Moisture Sensor
- Description: A sensor used to measure the volumetric water content in soil.
- Pins: VCC, GND, SIG
18650 Li-Ion
- Description: A rechargeable lithium-ion battery.
- Pins: Positive, Negative
DC Mini Metal Gear Motor
- Description: A small DC motor with metal gears.
- Pins: IN1, IN2
5V Mini Water Pump
- Description: A small water pump powered by 5V.
- Pins: positive pin, negative pin
L298N DC Motor Driver
- Description: A dual H-Bridge 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
Wiring Details
Arduino Nano
- D3 connected to L298N DC motor driver ENB
- D4 connected to L298N DC motor driver IN4
- D5 connected to L298N DC motor driver ENA
- D6 connected to Servo pulse
- D7 connected to L298N DC motor driver IN3
- D9 connected to Servo pulse
- D11/MOSI connected to L298N DC motor driver IN1
- D12/MISO connected to L298N DC motor driver IN2
- GND connected to L298N DC motor driver GND
- A4 connected to Soil Moisture Sensor SIG
- A3 connected to Photocell (LDR) pin 1 through Resistor pin1
- A2 connected to Photocell (LDR) pin 1 through Resistor pin1
- A1 connected to Photocell (LDR) pin 1 through Resistor pin1
- A0 connected to Photocell (LDR) pin 1 through Resistor pin1
Photocell (LDR)
- pin 1 connected to Arduino Nano A3 through Resistor pin1
- pin 1 connected to Arduino Nano A2 through Resistor pin1
- pin 1 connected to Arduino Nano A1 through Resistor pin1
- pin 1 connected to Arduino Nano A0 through Resistor pin1
- pin 0 connected to Buck converter OUT+
Resistor
- pin1 connected to Photocell (LDR) pin 1 and Arduino Nano A3
- pin1 connected to Photocell (LDR) pin 1 and Arduino Nano A2
- pin1 connected to Photocell (LDR) pin 1 and Arduino Nano A1
- pin1 connected to Photocell (LDR) pin 1 and Arduino Nano A0
- pin2 connected to GND
GND
- GND connected to Resistor pin2
- GND connected to Resistor pin2
- GND connected to Resistor pin2
- GND connected to Servo gnd
- GND connected to Buck converter OUT-
- GND connected to TP5100 IN-
- GND connected to Soil Moisture Sensor GND
Servo
- pulse connected to Arduino Nano D6
- pulse connected to Arduino Nano D9
- vcc connected to Buck converter OUT+
- gnd connected to GND
Buck Converter
- OUT+ connected to Servo vcc
- OUT- connected to GND
TP5100
- B+ connected to 18650 Li-Ion Positive
- IN- connected to GND
- IN+ connected to 18650 Li-Ion Negative
Soil Moisture Sensor
- SIG connected to Arduino Nano A4
- VCC connected to Buck converter OUT+
- GND connected to GND
18650 Li-Ion
- Positive connected to TP5100 B+
- Negative connected to TP5100 IN+
DC Mini Metal Gear Motor
- IN1 connected to L298N DC motor driver OUT1
- IN2 connected to L298N DC motor driver OUT2
5V Mini Water Pump
- positive pin connected to L298N DC motor driver OUT4
- negative pin connected to L298N DC motor driver OUT3
L298N DC Motor Driver
- ENB connected to Arduino Nano D3
- IN4 connected to Arduino Nano D4
- ENA connected to Arduino Nano D5
- IN3 connected to Arduino Nano D7
- IN1 connected to Arduino Nano D11/MOSI
- IN2 connected to Arduino Nano D12/MISO
- GND connected to Arduino Nano GND
- OUT1 connected to DC Mini Metal Gear Motor IN1
- OUT2 connected to DC Mini Metal Gear Motor IN2
- OUT4 connected to 5V Mini Water Pump positive pin
- OUT3 connected to 5V Mini Water Pump negative pin
Code Documentation
Arduino Nano Code
File Name: sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
File Name: documentation.txt
This documentation provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and the code used in the Arduino Nano.