top of page
Writer's pictureSanskruti Ashtikar

Designing an Automatic Plant Watering System Using TinkerCAD

Updated: Nov 25

An automatic plant watering system ensures that plants receive the right amount of water even when you're not around. This project will guide you through designing an automated system using TinkerCAD. We’ll use an Arduino, a soil moisture sensor, a relay module, and a water pump to create a system that waters plants based on soil moisture levels.





Materials Needed:


  • Arduino Uno

  • Soil Moisture Sensor

  • Relay Module

  • Submersible Water Pump

  • Water Reservoir

  • Breadboard

  • Jumper Wires

  • Power Supply (for the water pump)


Step 1: Understanding the Components


  1. Soil Moisture Sensor:

    • VCC: Connects to the 5V pin on the Arduino.

    • GND: Connects to the GND pin on the Arduino.

    • Analog Out: Provides an analog voltage proportional to soil moisture (connects to an analog input pin on the Arduino).

  2. Relay Module:

    • VCC: Connects to the 5V pin on the Arduino.

    • GND: Connects to the GND pin on the Arduino.

    • IN: Connects to a digital pin on the Arduino (controls the relay).

    • NO (Normally Open): Connects to one terminal of the water pump.

    • COM (Common): Connects to the positive terminal of the power supply.

    • Water Pump: The other terminal of the pump connects to the ground of the power supply.

  3. Water Pump:

    • A submersible pump used to water the plants.

    • Power: Connects to an external power supply.

    • Ground: Connects to the ground of the power supply.


Step 2: Setting Up the Circuit in TinkerCAD


  1. Arduino Uno: Place the Arduino Uno on the TinkerCAD workspace. This will be the central controller for your plant watering system.

  2. Soil Moisture Sensor:

    • Place the soil moisture sensor on the breadboard.

    • Connect the VCC pin of the sensor to the 5V pin on the Arduino.

    • Connect the GND pin to the GND pin on the Arduino.

    • Connect the Analog Out pin to an analog input pin on the Arduino (e.g., pin A0).

  3. Relay Module:

    • Place the relay module on the breadboard.

    • Connect the VCC pin of the relay module to the 5V pin on the Arduino.

    • Connect the GND pin to the GND pin on the Arduino.

    • Connect the IN pin to a digital pin on the Arduino (e.g., pin 7).

  4. Water Pump:

    • Place the water pump in the water reservoir.

    • Connect the NO terminal of the relay to one terminal of the water pump.

    • Connect the COM terminal of the relay to the positive terminal of the external power supply.

    • Connect the other terminal of the water pump to the ground of the power supply.

  5. Power: Ensure the Arduino is powered, either through a USB connection or an external power source. The water pump should be powered by an appropriate external power supply.





Step 3: Writing the Arduino Code


The Arduino code will read the soil moisture level and activate the relay to control the water pump when the soil is dry.


const int soilMoisturePin = A0; // Analog pin connected to the soil moisture sensor
const int relayPin = 7;         // Digital pin connected to the relay module
const int moistureThreshold = 400; // Threshold for soil moisture reading (adjust as needed)
void setup() {
  pinMode(relayPin, OUTPUT); // Set relay pin as output
  digitalWrite(relayPin, LOW); // Ensure the pump is off initially
  Serial.begin(9600);         // Start serial communication for debugging
}
void loop() {
  int soilMoistureValue = analogRead(soilMoisturePin); // Read soil moisture value
  Serial.print("Soil Moisture: ");
  Serial.println(soilMoistureValue); // Print soil moisture value for debugging
  if (soilMoistureValue < moistureThreshold) {
    // Soil is dry, activate the water pump
    digitalWrite(relayPin, HIGH);
    Serial.println("Watering the plant...");
  } else {
    // Soil is wet, deactivate the water pump
    digitalWrite(relayPin, LOW);
    Serial.println("Soil is moist.");
  }
  delay(10000); // Wait 10 seconds before taking another reading
}




Step 4: Simulating the Circuit in TinkerCAD


  1. Start the Simulation: Click the "Start Simulation" button in TinkerCAD. The water pump should turn on or off based on the soil moisture level.

  2. Testing the System: Simulate different soil moisture levels by adjusting the analog reading. Observe how the relay module controls the water pump based on the moisture threshold.

  3. Troubleshooting: If the system does not behave as expected, check the connections and ensure the code is correctly uploaded. Verify that the soil moisture readings and relay activation logic are functioning properly.


Step 5: Enhancing the System


Once you have the basic automatic plant watering system working, consider these enhancements:

  • Adjustable Threshold: Implement a user interface or physical control to adjust the soil moisture threshold.

  • Scheduled Watering: Add a real-time clock (RTC) module to schedule watering times in addition to moisture-based control.

  • Water Level Monitoring: Integrate a water level sensor to monitor the water reservoir and prevent pump operation if the water level is low.

  • Multiple Zones: Expand the system to manage multiple plants or zones with separate moisture sensors and pumps.


Step 6: Building the Physical Circuit


After successfully simulating the circuit in TinkerCAD, you can build the physical automatic plant watering system.

  1. Assemble Components: Transfer the TinkerCAD design to a physical breadboard or custom PCB.

  2. Upload Code: Connect your Arduino to a computer, upload the code, and test the system with real components.

  3. Test and Calibrate: Verify the system’s response with actual soil moisture readings and adjust the calibration as needed.


Step 7: Expanding the Project


With a working prototype, you can explore further possibilities:

  • Wireless Monitoring: Add Wi-Fi or GSM modules to monitor and control the system remotely.

  • Mobile App Integration: Develop a mobile app to interact with and manage the watering system.

  • Data Logging: Implement data logging to track soil moisture levels and watering history.





Conclusion


Congratulations on designing and simulating an automatic plant watering system using TinkerCAD! This project demonstrates how to integrate soil moisture sensing and relay-controlled watering to create a practical solution for plant care. The skills and concepts learned in this project can be applied to various automation and environmental monitoring applications.

With the foundation you’ve built, you can continue to innovate and develop more sophisticated systems for plant care and automation.


Happy tinkering!



Want us to guide you through your project or make the project for you ?






Create Various Projects

Check out our Free Arduino Projects Playlist - Arduino Projects 

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects 

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects 

Check out our Free IoT Projects Playlist - IoT Projects 

Check out our Free Home Automation Projects Playlist - Home Automation Projects 

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects 



15 views0 comments

Related Posts

See All

Comments


bottom of page