DIY Moisture-based Smart Irrigation

by PallaviMadhukar in Circuits > Sensors

8532 Views, 81 Favorites, 0 Comments

DIY Moisture-based Smart Irrigation

circuit_diagram.jpg

We know that plants require water as a transportation medium for nutrients by carrying the dissolved sugar and other nutrients through the plant. Without water, plants will wither. However, excessive watering fills pores in the soil, disturbing the air-water balance and preventing the plant from breathing. A proper balance of water is important. The soil moisture sensor measures the moisture content of the soil. By deciding on a particular percentage of moisture content for the soil, we can be reminded to water our plants when the soil is too dry.

Besides this, when we do water our plants, we do not measure the amount of water flow each time we water them and often we are either watering them too much or too little. To water them properly, we can use a flow sensor to measure the flow of water and a relay to stop the flow after a particular amount of water has been supplied.

Materials Required

  1. Arduino UNO
  2. Breadboard
  3. Jumper Cables
  4. Soil Moisture Sensor and Probes
  5. Flow Sensor
  6. Relay
  7. Casing Box
  8. Power Adaptor

Setup Breadboard: 5V and GND Connections

breadboard_connection.jpg
Step1.jpg
  1. A mini-breadboard is used here. For any other type, please check the connections as they differ.
  2. The mini-breadboard is divided into two halves by a ridge to ensure no cross-connection between the halves. Each connection point in the breadboard is numbered, with sets of points connected by metal strips underneath the plastic. These connections are shown in the image. For series connection (same signal given to multiple points at once), place jumper cables into points that are in the same line of connection.
  3. Connect 5V from Arduino UNO to a breadboard point using jumper cables. If this point is A1, then any 5V or VCC connection (that any sensor or device needs) must be placed in line 1 using jumper cables.
  4. Connect GND from Arduino UNO to breadboard point using jumper cables. If this point is A10, then any GND connection (that any sensor or device needs) must be placed in line 10 using jumper cables.

Connect the Soil Moisture Sensor to Arduino UNO

Step2.jpg
  1. How The Sensor Works: The Soil Moisture Sensor uses the property of resistance to measure moisture content of the soil. More the water content, more the conductivity between the probes and lower the resistance offered. Thus a low signal is transmitted. Similarly, when the water content is low, a high signal is transmitted.
  2. Soil Moisture Sensor pins (4) - VCC ,GND,analog pin A0, digital pin D0 (WE will NOT use D0)
  3. Make connections as follows-
  • VCC to 5V (breadboard) - series connection using jumper cables - connect to a point in the same line as that of 5V connection from Arduino UNO to breadboard. e.g. B1.
  • GND to GND (breadboard) - series connection using jumper cables - connect to a point in the same line as that of GND connection from Arduino UNO to breadboard. e.g. B10
  • A0 to A0 (analog pin 0 on Arduino UNO)

4.To check the working of the sensor, download the sketch attached and upload it to the Arduino UNO.

Downloads

Connect the Flow Sensor to Arduino UNO

Step3.jpg
  1. How The Sensor Works: The Flow Sensor contains an integrated magnetic hall effect sensor that outputs an electrical pulse with every revolution of the pinwheel.
  2. Flow meter pins (3) - VCC, GND, data pin
  3. Make connections as follows-
  • VCC (red) to 5V (breadboard) - series connection using jumper cables - connect to a point in the same line as that of 5V connection from Arduino UNO to breadboard. e.g. C1
  • GND (black) to GND (breadboard) - series connection using jumper cables - connect to a point in the same line as that of GND connection from Arduino UNO to breadboard. e.g. C10
  • Data pin (yellow) to D2 (digital pin 2 on Arduino UNO)

4.To check the working of the sensor, download the sketch attached and upload it to the Arduino UNO.

Downloads

Connect the Relay to Arduino UNO

Step4.jpg
  1. Relays are electrically operated switches. They are used when high power circuit like a pump or a fan has to be controlled using a low power circuit like the Arduino UNO.
  2. Relay pins (3) - VCC, GND, data pin
  3. Make connections as follows-
  • VCC to 5V (breadboard) - series connection using jumper cables - connect to a point in the same line as that of 5V connection from Arduino UNO to breadboard. e.g D1
  • GND to GND (breadboard) - series connection using jumper cables - connect to a point in the same line as that of GND connection from Arduino UNO to breadboard. e.g. D10
  • Data pin to D8 (digital pin 8 on Arduino UNO)

Insert the Soil Moisture Probe Into Soil

Step5.jpg
  1. Insert Soil Moisture Probe into soil as shown.
  2. Extend connections as per required using jumper cables.

Attach the Flow Sensor to the Tap

Step6.jpg
  1. The Flow Sensor sits in line with the water flow such that the arrow on it indicates the direction of flow.
  2. Attach Flow Sensor to tap as shown.
  3. Extend connections as per required using jumper cables.

Connect the Relay With the Pump

Step7.jpg
  1. Relay contacts (3) -Normally open(NO),Normally closed(NC),Change over(CO)
  • Normally-open (NO) contacts connect the circuit when the relay is activated so the circuit is disconnected when the relay is inactive.
  • Normally-closed (NC) contacts disconnect the circuit when the relay is activated so the circuit is connected when the relay is inactive
  • Change-over (CO) contacts control two circuits: one NO contact and one NC contact with a common terminal.
  1. Make connections as follows-
  • CO to power Supply
  • NC to pump

Download the Final Sketch Attached and Upload It to the Arduino UNO.

Downloads

Packaging

Step9.jpg

  1. Using a power adapter as a power source for the Arduino UNO ensures 24/7 usage.
  2. Few components such as the Arduino UNO and the relay are not water-proof. Hence it is advisable to package it in a box.