OTHERS

Arduino Smart Garden Monitoring System

The Arduino Smart Garden Monitoring System is a sophisticated solution designed to optimize plant care and environmental monitoring in home gardens or indoor plant setups.

This system leverages Arduino technology and various sensors to ensure that plants receive the ideal growing conditions. It continuously monitors key environmental parameters such as temperature, light intensity, and soil moisture levels, providing real-time feedback to users via an LCD display.

Additionally, it incorporates an alarm system to alert users to critical conditions such as extreme temperatures or low soil moisture levels.

Component List:

U11Arduino Uno R3
R11Photoresistor
D11Green LED
D21Red LED
R2
R3
2220 Ω Resistor
R4120 kΩ Resistor
PIEZO1
PIEZO2
2Piezo
SW11DIP Switch DPST
U21Temperature Sensor [TMP36]
R51250 Ω Resistor
R61130 Ω Resistor
D31Blue LED
U31LCD 16 x 2
Rpot11250 Ω Potentiometer

The system operates by continuously reading data from the temperature, light, and soil moisture sensors. Based on the sensor readings, it determines whether the environmental conditions are optimal for plant growth. If the temperature falls below or exceeds a certain threshold, the alarm is triggered to alert the user. Similarly, if the soil moisture level is too low, indicating that the plants need watering, the system activates the relay module to turn on the water pump. The LCD display provides users with real-time updates on environmental parameters and system status, enabling them to make informed decisions about plant care. Overall, the system ensures that plants receive the necessary attention and care for healthy growth.

Arduino code:

#include <LiquidCrystal.h>
int notWatered = 9;
int watered = 10;
int button1A = 7;
int alarm = 6;
int alarm2 = 8;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensePin = A1;
int sensorInput;
double temp;
void setup() {
pinMode(notWatered, OUTPUT);
pinMode(watered, OUTPUT);
pinMode(button1A, INPUT_PULLUP);
pinMode(alarm, OUTPUT);
pinMode(alarm2, OUTPUT);
pinMode(13, OUTPUT);
lcd.begin(16, 2);
Serial.begin(112500);
}
void loop() {
lcd.setCursor(0, 0);
int light = analogRead(A0);
int Switch = digitalRead(button1A);
sensorInput = analogRead(A1);
temp = (double)sensorInput / 1024;
temp = temp * 5;
temp = temp - 0.5;
temp = temp * 100;
if (temp < 10) { tone(alarm2, 280, 400); delay(500); digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500); } else if (temp >= 11 && temp <= 40) { noTone(alarm2); delay(500); digitalWrite(13, LOW); delay(500); } else if (temp > 40) {
tone(alarm2, 280, 400);
delay(500);
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
lcd.print("Temperature: ");
lcd.setCursor(0, 1);
lcd.print(temp);
lcd.print(" Celsius");
if (light < 500 && Switch == 1) { digitalWrite(notWatered, HIGH); digitalWrite(watered, LOW); Serial.print("NOT watered and it's NIGHT\nSensor is now : "); Serial.println(light); noTone(alarm); } else if (light < 500 && Switch == 0) { digitalWrite(watered, HIGH); digitalWrite(notWatered, LOW); Serial.print("Watered and it's NIGHT\nSensor is now : "); Serial.println(light); noTone(alarm); } else if (light >= 500 && Switch == 0) {
digitalWrite(watered, HIGH);
digitalWrite(notWatered, LOW);
Serial.print("Watered and it's MORNING\nSensor is now : ");
Serial.println(light);
noTone(alarm);
} else if (light >= 500 && Switch == 1) {
digitalWrite(watered, LOW);
digitalWrite(notWatered, HIGH);
Serial.print("Watered and it's MORNING\nSensor is now : ");
Serial.println(light);
delay(1000);
tone(alarm, 380);
}
else {
noTone(alarm);
}
}

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button