Arduino UNO-Based Smart Garden System with DHT22, UV Sensor, and Soil Moisture Sensor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed using an Arduino UNO microcontroller. The circuit includes various sensors, a water pump, a fan, an LED strip, and several MOSFETs and resistors. The Arduino UNO is programmed to control these components based on sensor inputs.
Component List
Arduino UNO
- 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
- Description: Microcontroller board based on the ATmega328P.
DHT22
- Pins: +, Out, -
- Description: Digital temperature and humidity sensor.
Adafruit GUVA-S12SD UV Light Sensor
- Pins: 5V, Out, GND
- Description: UV light sensor.
Capacitive Soil Moisture Sensor V1.2
- Pins: GND, VCC, AOUT
- Description: Soil moisture sensor.
Water Pump
- Pins: VCC, GND
- Description: Small water pump.
Fan
- Pins: GND, 5V
- Description: Small cooling fan.
nMOS Transistor (MOSFET)
- Pins: gate, drain, source
- Description: n-channel MOSFET transistor.
Resistor
- Pins: pin1, pin2
- Description: Resistor with a resistance of 10k Ohms.
7.4v Battery
- Pins: +, -
- Description: 7.4V battery.
12V White LED strip
- Pins: +12V, GND
- Description: LED strip with white LEDs.
Wiring Details
Arduino UNO
- D9: Connected to the gate of an nMOS Transistor (MOSFET) through a 10k Ohm resistor.
- D10: Connected to the gate of another nMOS Transistor (MOSFET) through a 10k Ohm resistor.
- D11: Connected to the gate of another nMOS Transistor (MOSFET) through a 10k Ohm resistor.
- D2: Connected to the output of the DHT22 sensor through a 10k Ohm resistor.
- 5V: Connected to the VCC of the Capacitive Soil Moisture Sensor, Adafruit GUVA-S12SD UV Light Sensor, and DHT22 sensor through a 10k Ohm resistor.
- Vin: Connected to the VCC of the Water Pump, Fan, and +12V of the LED strip through the + terminal of the 7.4V battery.
- GND: Connected to the source of all nMOS Transistors (MOSFETs), GND of the Capacitive Soil Moisture Sensor, Adafruit GUVA-S12SD UV Light Sensor, and DHT22 sensor, and the - terminal of the 7.4V battery.
- A0: Connected to the AOUT of the Capacitive Soil Moisture Sensor.
- A1: Connected to the output of the Adafruit GUVA-S12SD UV Light Sensor.
DHT22
- +: Connected to the 5V pin of the Arduino UNO.
- Out: Connected to the D2 pin of the Arduino UNO through a 10k Ohm resistor.
- -: Connected to the GND pin of the Arduino UNO.
Adafruit GUVA-S12SD UV Light Sensor
- 5V: Connected to the 5V pin of the Arduino UNO.
- Out: Connected to the A1 pin of the Arduino UNO.
- GND: Connected to the GND pin of the Arduino UNO.
Capacitive Soil Moisture Sensor V1.2
- GND: Connected to the GND pin of the Arduino UNO.
- VCC: Connected to the 5V pin of the Arduino UNO.
- AOUT: Connected to the A0 pin of the Arduino UNO.
Water Pump
- VCC: Connected to the Vin pin of the Arduino UNO through the + terminal of the 7.4V battery.
- GND: Connected to the drain of an nMOS Transistor (MOSFET).
Fan
- GND: Connected to the drain of another nMOS Transistor (MOSFET).
- 5V: Connected to the Vin pin of the Arduino UNO through the + terminal of the 7.4V battery.
12V White LED strip
- +12V: Connected to the Vin pin of the Arduino UNO through the + terminal of the 7.4V battery.
- GND: Connected to the source of all nMOS Transistors (MOSFETs) and the GND pin of the Arduino UNO.
nMOS Transistor (MOSFET)
- Gate: Connected to the D9, D10, and D11 pins of the Arduino UNO through 10k Ohm resistors.
- Drain: Connected to the GND of the Water Pump, Fan, and 12V White LED strip.
- Source: Connected to the GND pin of the Arduino UNO and the - terminal of the 7.4V battery.
Resistor
- 10k Ohm Resistors: Used to connect the gates of the nMOS Transistors (MOSFETs) to the D9, D10, and D11 pins of the Arduino UNO, and the output of the DHT22 sensor to the D2 pin of the Arduino UNO.
7.4v Battery
- +: Connected to the Vin pin of the Arduino UNO, VCC of the Water Pump, Fan, and +12V of the LED strip.
- -: Connected to the GND pin of the Arduino UNO and the source of all nMOS Transistors (MOSFETs).
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:
}
Additional Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and the code used for the Arduino UNO microcontroller.