Introduction: Use of Microcontrollers to Operate and Monitor Remote Irrigation System ​

farmers and greenhouse operators for a low-cost automatic irrigation system.

In this project, we integrate an electronic soil moisture sensor with a microcontroller to automatically irrigate plants when the soil is too dry without human intervention, and to remotely operate and monitor soil conditions over the world wide web by sending push notifications to a mobile phone via SMS or Twitter; or other device capable of displaying a web browser via html and JavaScript. The system consists of a soil moisture sensor connected to an ESP8266 microcontroller capable of hosting a web server and responding to http requests. The microcontroller receives analog signals from the moisture sensor and activates a pump through a transistor circuit. A study correlating moisture level by water weight percent to conductivity probe output is complete. It was found that the moisture sensor saturates at a relatively low moisture level, which might limit the applicability of this sensor to certain plant and soil-type combinations. We have not yet succeeded in implementing push notifications to a mobile device via Node Red, though in theory this should be achievable.

Step 1: Checking the Moisture Level With the Conductivity Probe

I measured the conductivity in 9 pots

with different percentage content of water in order to calibrate the conductivity probe to moisture level. This allows the user to select a moisture level consistent with the needs of her particular plant species and soil combination

Step 2: Connecting the Water Pump and LCD Screen to the Arduino

I connected the water Pump to activate for 0.5 seconds in two-second intervals until desired moisture level is reached. LCD outputs set-point level and measured conductivity level (expressed as a percent of the probe saturation level)

Arduino codes

int setpoint = 0;

int moisture = 0;

int pump = 3;

pinMode(A0, INPUT); // Setting pot

pinMode(A1, INPUT); // Conductivity probe

pinMode(pump, OUTPUT); // Pump

lcd.init(); //initialize the lcd

lcd.backlight(); //open the backlight

lcd.setCursor ( 0, 0 ); // go to the top left corner

lcd.print("Setpoint: "); // write this string on the top row

lcd.setCursor ( 0, 1 ); // go to the 2nd row

lcd.print("Moisture:"); // pad string with spaces for centering

lcd.setCursor ( 0, 2 ); // go to the third row

lcd.print(" "); // pad with spaces for centering

lcd.setCursor ( 0, 3 ); // go to the fourth row

lcd.print(" D&E, Hussam ");

Step 3: Printing the Design of the Box

Basically I made a simple box for the Automatic irrigation system that has the screen place in the front and two holes for "Setpoint" and "Power" switch. Also I designed another hole on the side for the power supplies

Step 4: Final Step Putting All Parts Together

The parts price

  • Arduino $20
  • Pump $6
  • Conductivity probe $8
  • Jumper wires $6
  • Breadboard $8
  • Power Supply $12
  • LCD $10
  • Total $70