Automatic Plant Irrigation System - Self Watering Plant System

by 1006541 in Circuits > Arduino

228 Views, 4 Favorites, 0 Comments

Automatic Plant Irrigation System - Self Watering Plant System

0.jpg

It might be difficult to properly water your plants, especially if you lead a hectic life. It's simple to forget to water your plants between work, social obligations, and the occasional vacation, which results in withered foliage and dry soil. However, what if technology could assist? Envision a system that keeps an eye on the requirements of your plants and watered them on their own, making sure they always get the proper quantity of moisture—even when you're not there. This concept may be realized by building an autonomous plant irrigation system with an Arduino UNO, a few electronic parts, and some basic code.

Imagine having a smart garden where your plants grow healthily and are properly hydrated thanks to an elegant, automated system. This self-watering system may be customized to meet your demands, regardless of the size of your indoor herb garden or your luxuriant outdoor plant collection. You may construct a system that eliminates uncertainty in plant maintenance by fusing the capabilities of contemporary technology with a hint of do-it-yourself enthusiasm. This will not only guarantee the happiness and health of your plants at all times, but it will also free up your time and ease your mind. Let's get started on setting up your very own automated haven at home.

Supplies

0.jpg

Components:

  1. Red LED - Indicates when the pump is on and the plant needs water.
  2. Green LED - Indicates when the pump is off and the plant has sufficient moisture.
  3. 330 Ohm Resistor - Limit the current flowing through the LEDs
  4. Arduino Uno - The microcontroller board that controls the system.
  5. Breadboard - Facilitates easy wiring of components.
  6. Soil Moisture Sensor v1.2 - Measures soil moisture levels.
  7. Relay Module - Acts as a switch to control the water pump.
  8. Jumper Wires - Male Female & Male Male - Connect various components
  9. Water Pump - Pumps water to the plant when necessary (5v Water Pump).

Setup the Arduino and the Breadboard and Wiring the LEDs

0.jpg
0.jpg
0.jpg

Connect your Arduino Uno to a breadboard to begin building your automated plant watering system. Your irrigation system's Arduino Uno will act as its brain, analysing data from the soil moisture sensor and adjusting the water pump and indication LEDs as necessary. To make wiring simple and tidy, place the breadboard and Arduino adjacent to one another.

After that, concentrate on configuring the indicator LEDs, which will offer a visual representation of the system's condition. As you arrange the red and green LEDs on the breadboard, make sure that the longer anodes and shorter cathodes of each LED are in a different row. By using a jumper wire to link the red and green LED cathodes, make sure they have a common ground connection. Next, use a 330 ohm resistor to link this common cathode to the breadboard's negative rail. This resistor is essential because it prevents the LEDs from burning out by limiting the amount of current that passes through them.

Attach the anodes of the LEDs to the Arduino after making the common ground connection. Attach the red LED's anode, or long leg, to digital pin 7 on the Arduino. By doing this, the red LED can be controlled by the Arduino, turning it on or off to show if the water pump is operating. In a similar manner, link the green LED's anode, or long leg, to digital pin 10 on the Arduino. The green LED, which turns on to show when the soil is sufficiently moist and the pump is off, is controlled by the Arduino through this connection. The LEDs will be able to convey the irrigation system's status through these connections, giving you a clear visual signal of whether the plant is sufficiently hydrated or needs more water.

Connect the Soil Moisture Sensor & Set Up the Relay Module

0.jpg

Making sure the VCC, GND, and signal pins are positioned appropriately on the breadboard is the first step in configuring the soil moisture sensor. A jumper wire is used to connect the sensor's VCC pin to the breadboard's positive rail, providing the required power for the sensor to function. Next, connect the sensor's GND pin to the breadboard's negative rail. Lastly, connect the sensor's signal pin to the Arduino's A0 analogue input pin. Through this connection, the analogue voltage output from the sensor—which represents the soil's moisture content—can be read by the Arduino. The soil moisture sensor can precisely detect soil moisture using these connections, and it can send that data to the Arduino for processing.

After positioning the relay module on the breadboard and connecting it to the power supply and Arduino, you may use it. Attach the relay module's VCC pin to the breadboard's power line. Through the power rail on the breadboard, this connection guarantees that the relay module consistently receives a 5V power supply from the Arduino. Then, establish a common ground by connecting the GND pin of the relay module to the negative rail on the breadboard, which is linked to the GND pin on the Arduino. Finally, attach the relay module's IN (input) pin to the Arduino's digital pin 3. With the help of this connection, the Arduino can control the relay module, allowing it to turn the water pump on and off in response to changes in the moisture content of the soil. With these connections, the relay module may function as an Arduino-controlled intermediate switch to regulate the water pump's functioning.

Integrate the Water Pump

unnamed.jpg
unnamed.jpg
  • Positive terminal of the pump to the power source positive (+)
  • Negative terminal of the pump to the COM terminal on the relay
  • Power source negative (-) to the NO terminal on the relay

By connecting the water pump, the Arduino may securely control the high-power water pump by using the relay module as a switch. The negative terminal of the pump passes via the relay, while the positive terminal is linked to an external power source. Upon activation, the relay completes the circuit, permitting electricity to pass through the pump. To guarantee that the circuit is finished correctly and to prevent any electrical errors or shorts, the ground connections need to be treated carefully.

To ensure both safety and operation, careful handling of connections is necessary during the integration of the water pump. Establish a connection between the pump's positive terminal and the positive terminal of an external power source, such a battery. The relay's COM terminal and the pump's negative terminal need to be linked. Lastly, attach the power source's negative wire to the relay's NO (Normally Open) terminal. Upon activation, the relay completes the circuit, permitting current to pass through the pump and irrigate the plant.

Upload the Code to the Arduino

engineering-code-instrucatble.png

The Arduino code that is given is intended to read the moisture content of the soil and turn on a water pump as necessary to operate an automated plant irrigation system. The first line of code defines the pins that are required for the water pump, soil moisture sensor, and LEDs. The code initializes these pins as the water pump and LED outputs in the setup function and initiates serial connection for debugging. The soil moisture sensor's analogue value is read by the loop function, which then turns it into a percentage that represents the soil moisture levels. The percentage is then printed to the serial monitor for monitoring.

The code regulates the water pump and LEDs to show the state of the system based on the moisture percentage. The code shuts off the water pump (by setting the relevant pin high), turns off the red LED, and turns on the green LED to signal sufficient moisture if the soil moisture percentage is less than 10%, which indicates dry soil. On the other hand, the code indicates that the plant requires watering if the soil moisture percentage is greater than 80%, which indicates wet soil. It does this by turning on the water pump (by lowering the relevant pin), turning on the red LED, and turning off the green LED. By ensuring that the plant only gets water when needed, this reasoning helps to conserve water and avoid overwatering.

Testing & Finished Product

unnamed.jpg
unnamed.jpg

Your self-watering plant system is ready to use after everything is set up! The soil moisture sensor will continually check the soil moisture content and provide you with real-time information about how well-hydrated your plants are. It will be safely linked to your Arduino. The device activates when the moisture content falls below a set threshold, signifying that the soil is too dry. The water pump is turned on by the Arduino signaling the relay module. Water is sent straight to the plant's roots when the pump turns on, giving them the essential moisture they require to flourish.

The green LED will illuminate while the pump is operating, giving a clear visual cue that watering is taking place. You may be certain that your plants are receiving proper care and that the system is operating as intended by this instant feedback. The Arduino will disable the relay and shut off the water pump when the soil moisture sensor determines that the soil has achieved a sufficient moisture level. The red LED will now turn on, signaling that the watering cycle has finished and the soil is adequately hydrated.

Because of this automatic procedure, there is no chance of overwatering or underwatering your plants—just the ideal amount of water, just what they require. You may enjoy the ease and comfort of knowing your green buddies are in good hands whether you're at home, at work, or on vacation. By guaranteeing a regular watering schedule, the self-watering system encourages healthy plant development and makes gardening simpler and more pleasurable. Reject the uncertainty and stress associated with plant maintenance and embrace the practical, effective approach to maintaining a healthy garden.