Arduino UNO-Based Solar-Powered Smart Irrigation System with Ultrasonic and IR Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, multiple DC motors, an ultrasonic sensor, an IR receiver, a water pump, a solar panel, a rocker switch, a motor driver, a relay module, a voltage regulator, and batteries. The circuit is designed to control various components using the Arduino UNO, with power supplied by batteries and a solar panel.
Component List
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
DC Motor
- Description: Standard DC motor.
- Pins: pin 1, pin 2
HC-SR04 Ultrasonic Sensor
- Description: Ultrasonic distance sensor.
- Pins: VCC, TRIG, ECHO, GND
IR Receiver
- Description: Infrared receiver module.
- Pins: DATA, VCC, GND
Water Pump
- Description: Small water pump.
- Pins: positive, negative
Solar Panel
- Description: Solar panel for power generation.
- Pins: +, -
Rocker Switch (SPST)
- Description: Single Pole Single Throw rocker switch.
- Pins: 1, 2
Motor Driver (L298N)
- Description: Dual H-Bridge motor driver.
- Pins: OUT 1, OUT 2, OUT 3, OUT 4, +12V INPUT, GND, +5V OUTPUT, ENA, IN 1, IN 2, IN 3, IN 4, ENB
Relay 4 Channel 5v
- Description: 4-channel relay module.
- Pins: GND, IN1, IN2, IN3, IN4, VCC, COM1, COM2, COM3, COM4, NO1, NO2, NO3, NO4, NC1, NC2, NC3, NC4
Voltage Regulator
- Description: Voltage regulator for power management.
- Pins: GND, IN, OUT
5v Battery
- Description: 5V battery for power supply.
- Pins: +, -
Wiring Details
Arduino UNO
- 5V: Connected to VCC of IR Receiver, VCC of HC-SR04 Ultrasonic Sensor, VCC of Relay 4 Channel 5v, IN of Voltage Regulator, positive of Water Pump, pin 2 of Rocker Switch, +5V OUTPUT of Motor Driver, + of Solar Panel, + of 5v Battery.
- GND: Connected to GND of IR Receiver, GND of HC-SR04 Ultrasonic Sensor, GND of Motor Driver, GND of Relay 4 Channel 5v, negative of Water Pump.
- D12: Connected to DATA of IR Receiver.
- D11: Connected to IN4 of Relay 4 Channel 5v.
- D10: Connected to ENB of Motor Driver, IN3 of Relay 4 Channel 5v.
- D9: Connected to ENA of Motor Driver, IN2 of Relay 4 Channel 5v.
- D8: Connected to IN1 of Relay 4 Channel 5v.
- D7: Connected to IN 4 of Motor Driver.
- D6: Connected to IN 3 of Motor Driver.
- D5: Connected to pin 1 of Rocker Switch.
- D4: Connected to ECHO of HC-SR04 Ultrasonic Sensor.
- D3: Connected to pin 1 of Rocker Switch.
- D2: Connected to TRIG of HC-SR04 Ultrasonic Sensor.
- D1: Connected to OUT of Voltage Regulator.
- D0: Connected to COM1 of Relay 4 Channel 5v.
DC Motor
- pin 1: Connected to OUT 3 of Motor Driver.
- pin 2: Connected to OUT 3 of Motor Driver.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V of Arduino UNO.
- TRIG: Connected to D2 of Arduino UNO.
- ECHO: Connected to D4 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
IR Receiver
- DATA: Connected to D12 of Arduino UNO.
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
Water Pump
- positive: Connected to 5V of Arduino UNO.
- negative: Connected to GND of Arduino UNO.
Solar Panel
- +: Connected to 5V of Arduino UNO.
- -: Connected to GND of Voltage Regulator.
Rocker Switch (SPST)
- 1: Connected to D5 of Arduino UNO.
- 2: Connected to 5V of Arduino UNO.
Motor Driver (L298N)
- OUT 1: Connected to pin 1 of DC Motor.
- OUT 2: Connected to pin 1 of DC Motor.
- OUT 3: Connected to pin 1 of DC Motor.
- OUT 4: Connected to pin 1 of DC Motor.
- +12V INPUT: Not connected.
- GND: Connected to GND of Arduino UNO.
- +5V OUTPUT: Connected to 5V of Arduino UNO.
- ENA: Connected to D9 of Arduino UNO.
- IN 1: Connected to D5 of Arduino UNO.
- IN 2: Connected to D5 of Arduino UNO.
- IN 3: Connected to D6 of Arduino UNO.
- IN 4: Connected to D7 of Arduino UNO.
- ENB: Connected to D10 of Arduino UNO.
Relay 4 Channel 5v
- GND: Connected to GND of Arduino UNO.
- IN1: Connected to D8 of Arduino UNO.
- IN2: Connected to D9 of Arduino UNO.
- IN3: Connected to D10 of Arduino UNO.
- IN4: Connected to D11 of Arduino UNO.
- VCC: Connected to 5V of Arduino UNO.
- COM1: Connected to D0 of Arduino UNO.
Voltage Regulator
- GND: Connected to GND of 5v Battery.
- IN: Connected to 5V of Arduino UNO.
- OUT: Connected to D1 of Arduino UNO.
5v Battery
- +: Connected to 5V of Arduino UNO.
- -: Connected to GND of Voltage Regulator.
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:
}
Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code. Each component is described, and its connections are detailed to ensure clarity and ease of understanding.