Skip to content
Chanakya Shukla edited this page Nov 12, 2023 · 1 revision

Welcome to the AutomaticPlantWateringSystemForArduinoNano wiki!


Automatic Plant Watering System for Arduino Nano

Welcome to the wiki page for the Automatic Plant Watering System using Arduino Nano. This project aims to create an efficient and automated solution for watering plants based on soil moisture levels.

Introduction

The Automatic Plant Watering System utilizes an Arduino Nano microcontroller, a soil moisture sensor, and a DC water motor pump. The system automatically adjusts the water supply to plants based on soil moisture readings, ensuring optimal conditions for plant growth.

Hardware Components

  • Arduino Nano: The microcontroller that processes soil moisture data and controls the water pump.

  • Soil Moisture Sensor: Measures the moisture level in the soil.

  • DC Water Motor Pump: Pumps water to the plants based on the Arduino Nano’s control.

Hardware Setup

  1. Connect the soil moisture sensor to the Arduino Nano.

  2. Connect the DC water motor pump to the Arduino Nano.

  3. Ensure proper power supply and ground connections.

  4. Verify the connections by referring to the provided wiring diagrams.

Code Explanation

The Arduino code reads soil moisture levels from the sensor and controls the water pump accordingly. The logic is designed to activate the pump when the soil is dry and deactivate it when the soil is sufficiently moist.

int water; //random variable 
void setup() {
  pinMode(13,OUTPUT); //output pin for relay board, this will sent signal to the relay, or you can connect it directly with the DC motor.
  pinMode(12,INPUT); //input pin coming from soil sensor
}

void loop() { 
  water = digitalRead(12);  // reading the coming digital signal from the soil sensor's DO pin.
  if(water == LOW) // if water level is full then cut the relay 
  {
  digitalWrite(13,LOW); // low is to cut the relay, and also to turn of DC motor.
  }
  else
  {
  digitalWrite(13,HIGH); //high to continue proving signal and water supply, and keeps the DC motor running.
  }
  delay(1000); 
}

//I modified this, I replaced the relay swith and connected pin 13 to direct DC water motor pump.
//I also reversed the code from LOW to HIGH and vice-versa, because there is no logical point to turn the pump on when the soil is wet.
//Logically the water pump should start when the sensor detects that the soil is losing moisture.

// thanks, the code is modified by Chanakya Shukla on 2 Nov. 2023 at 14:35.

Note: Modifications were made to the original code to accommodate direct control of the DC water motor pump.

Usage Instructions

  1. Power on the Arduino Nano setup.

  2. The system will automatically monitor soil moisture and activate the water pump as needed.

  3. Adjustments to the code can be made for specific requirements.

License Information

This project is licensed under the Creative Commons CC0 1.0 Universal License. For more details, refer to the [LICENSE](link-to-license-file) file.

Credits

  • Original code by Techie Lagan

  • Modified by Chanakya Shukla on 2 Nov. 2023 at 14:35.

Troubleshooting

Issue: Water Pump Does Not Activate

Description of Issue: The water pump does not activate even when the soil moisture level is low.

Solution: 1. Check Wiring Connections: Ensure that all wiring connections, especially those between the Arduino Nano, soil moisture sensor, and water pump, are secure and correctly configured. Any loose or incorrect connections can disrupt the system’s functionality.

  1. Verify Power Supply: Confirm that the Arduino Nano and the water pump are receiving an adequate power supply. Insufficient power can lead to malfunctions.

  2. Review Code Logic: Double-check the Arduino code to ensure that the logic for activating the water pump is correctly implemented. Verify that the code is responding appropriately to soil moisture readings.

  3. Test Components Individually: Test each component individually to identify if a specific component (Arduino Nano, soil moisture sensor, or water pump) is malfunctioning. This can help pinpoint the source of the issue.

Issue: Continuous Water Pump Activation

Description of Issue: The water pump remains continuously activated, even when the soil moisture level is sufficient.

Solution: 1. Adjust Sensitivity Threshold: Review the code and adjust the sensitivity threshold for soil moisture. If the threshold is too low, the system might erroneously interpret normal moisture levels as insufficient, leading to continuous pump activation.

  1. Inspect Soil Moisture Sensor: Examine the soil moisture sensor for any damage or malfunction. Clean the sensor probes to ensure accurate readings. If needed, recalibrate the sensor according to its specifications.

  2. Check for Interference: Nearby electronic devices or interference from other sources may affect the soil moisture sensor’s readings. Ensure that the system is placed in an environment with minimal interference.

  3. Update or Reinstall Arduino Code: If all else fails, consider updating or reinstalling the Arduino code. There may be a programming issue causing continuous activation.

Future Improvements

As technology evolves, there are various opportunities to enhance and expand the capabilities of the Automatic Plant Watering System. Here are some potential future improvements and development plans:

  1. Smart Irrigation System Integration: Explore the integration of IoT (Internet of Things) capabilities to create a smart irrigation system. This could include remote monitoring and control of the plant watering system through a mobile app or web interface.

  2. Data Logging and Analysis: Implement a data logging feature to record soil moisture levels over time. This data can be used for analysis, allowing users to track trends, optimize watering schedules, and gain insights into plant health.

  3. Multiple Plant Zones: Extend the system to support multiple plant zones with individualized watering schedules. This enhancement would cater to different plant types or areas with varying moisture requirements.

  4. Weather Sensing Integration: Integrate weather sensors to account for external factors such as rainfall. The system could adjust watering schedules based on weather forecasts to avoid overwatering during rainy periods.

  5. Solar-Powered Solution: Consider incorporating solar panels to power the system, promoting sustainability and reducing reliance on external power sources.

  6. User Interface and Customization: Develop a user-friendly interface that allows users to customize watering parameters easily. This could include options for adjusting moisture thresholds, setting watering durations, and receiving notifications.

  7. Expandable Modular Design: Design the system with an expandable and modular architecture, allowing users to add additional sensors or features easily. This provides scalability for different plant configurations or garden layouts.

  8. Community Collaboration: Foster a community around the project to encourage collaboration and the sharing of ideas. This could lead to additional features, improvements, and a diverse range of applications for the Automatic Plant Watering System.

Remember to adapt and expand on these ideas based on your specific goals and preferences for the project. The "Future Improvements" section is a space to inspire ongoing development and creativity within the community.