Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Automatic Watering System

Automatic Watering System

Introduction: The Automatic Watering System is an essential project for those who want to automate the process of watering plants or gardens. This system ensures that plants receive the right amount of water at the right time, eliminating the need for manual watering and ensuring the health and vitality of the plants.

Project: The project aims to create an automatic watering system using Arduino. The system will monitor the moisture level of the soil and activate the water pump when the moisture level drops below a certain threshold. The system will also include a water level sensor to prevent overwatering. The main objectives of this project are to save time and effort in watering plants and ensure optimal watering conditions for plant growth.

Components List:

  1. Arduino Uno - 1x [Link: https://www.sparkfun.com/products/11021]

  2. Soil Moisture Sensor - 1x [Link: https://www.adafruit.com/product/4026]

  3. Water Pump - 1x [Link: https://www.amazon.com/dp/B07BNR2ZFH]

  4. Relay Module - 1x [Link: https://www.sparkfun.com/products/13815]

  5. Water Level Sensor - 1x [Link: https://www.adafruit.com/product/3397]

  6. Jumper Wires - As required [Link: https://www.sparkfun.com/products/11026]

Examples: Example 1: Reading Soil Moisture Level

// Define the analog pin for soil moisture sensor
const int soilMoisturePin = A0;

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
}

void loop() {
  // Read the soil moisture level
  int soilMoisture = analogRead(soilMoisturePin);

  // Print the soil moisture level
  Serial.print("Soil Moisture Level: ");
  Serial.println(soilMoisture);

  delay(1000);
}

Example 2: Activating Water Pump based on Soil Moisture Level

// Define the analog pin for soil moisture sensor
const int soilMoisturePin = A0;
// Define the digital pin for relay module
const int relayPin = 2;

void setup() {
  // Initialize the relay pin as an output
  pinMode(relayPin, OUTPUT);
  // Initialize serial communication
  Serial.begin(9600);
}

void loop() {
  // Read the soil moisture level
  int soilMoisture = analogRead(soilMoisturePin);

  // Activate the water pump if soil moisture is below threshold
  if (soilMoisture < 500) {
    digitalWrite(relayPin, HIGH);
    Serial.println("Water Pump Activated");
  } else {
    digitalWrite(relayPin, LOW);
    Serial.println("Water Pump Deactivated");
  }

  delay(1000);
}

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.