svskits - 1

Friday, 28 July 2023

Automatic irrigation using Arduino Nano and soilmoisture sensor

 www.svsembedded.com             SVSEMBEDDED                                   svsembedded@gmail.com,

CONTACT: 9491535690, 7842358459

Automatic irrigation using Arduino Nano and soilmoisture sensor


Sure, I can help you with that. Here are the steps on how to build an automatic irrigation system using Arduino Nano and soil moisture sensor:

  1. Gather the necessary materials. You will need the following:

    • Arduino Nano
    • Soil moisture sensor
    • Relay module
    • DC water pump
    • Breadboard
    • Jumper wires
    • Power supply
  2. Connect the components to the breadboard. The following is the schematic diagram of the circuit:

    +5V
    |
    RELAY
    |
    GND
    |
    SOIL MOISTURE SENSOR
    |
    A0
    |
    GND
    |
    DC WATER PUMP
  1. Write the Arduino code. The following is a sample code that you can use:
int soilMoisturePin = A0;
int relayPin = 2;
int threshold = 500;

void setup() {
  pinMode(soilMoisturePin, INPUT);
  pinMode(relayPin, OUTPUT);
}

void loop() {
  int moistureValue = analogRead(soilMoisturePin);
  if (moistureValue < threshold) {
    digitalWrite(relayPin, HIGH);
  } else {
    digitalWrite(relayPin, LOW);
  }
}
  1. Upload the code to the Arduino Nano.

  2. Test the system. Once the code is uploaded, you can test the system by connecting the power supply and placing the soil moisture sensor in the soil. The water pump should turn on when the soil moisture level is below the threshold value.

Here are some additional tips for building an automatic irrigation system:

  • Use a high-quality soil moisture sensor. This will ensure that the readings are accurate and reliable.
  • Set the threshold value appropriately. The threshold value is the moisture level at which the water pump will turn on. You will need to experiment to find the right value for your plants.
  • Use a relay module with a high current rating. This will ensure that the water pump can get enough power to operate.
  • Use a DC water pump that is designed for irrigation. This type of pump will be able to deliver a steady stream of water.

I hope this helps!

No comments:

Post a Comment

IEEE Projects for ECE 2024 – 2025 TITLES

  www.svsembedded.com               SVSEMBEDDED                                    svsembedded@gmail.com , CONTACT: 9491535690, 7842358459...