Smart irrigation system for arid areas - SCOPES Digital Fabrication

Lesson Details

Age Ranges
Fab-Safety.2, Fab-Programming.2, Fab-Electronics.2, Fab-Modeling.2, Fab-Fabrication.2, Fab-Design.2
Additional Contributors

You need to login or register to bookmark/favorite this content.


Tom Anto


Projects intends to provide a solution for problems seen arid areas.

What You'll Need

*Soil moisture sensor

*5V pump

*Arduino uno

*Relay module

*pipes and Jumper wires

*3D printer

The Instructions

Downloading and Installing Arduino Ide, Sketch Up

We need a software to write our code for Arduino uno. The software used for this purpose is called Arduino Ide. Sketch Up for 3D designing

Go to and download the latest Arduino ide depending on the operating system used from the site.Open the downloaded setup file and follow the instructions.


Download sketch up 3 d designing software from

Connecting the components.

Before writing the code,lets connect all the components together

The Soil moisture sensor outputs analog value,therefore connect the output pin of soil moisture sensor to any analog pin of the arduino uno(A0,A1,…,A5).

The relay module input pin is to be connected to any of the Digital pin of arduino(D0 to D13).

The positive wire of pump is connected of NO pin of relay and negative is connected to Ground.The common pin of relay is connected to +5V.

Remember to connect the VCC and ground wire of relay and soil moisture sensor to +5V pin and Ground pin respectively of arduino uno

Writing the code

The code or instruction which the arduino should follow is to be written

open a new file in Arduino ide. Now two functions will be there Void setup(); and Void main();.First we need to initialize the output pins and input pins in setup function.For initializing a output we use the command “pinMode(pin,OUTPUT);”.The ‘pin’ should be replaced with the input pin of relay.

analogRead(pin) command is used to read sensor value from soil moisture sensor.The pin should be replaced with pin to which sensor is connected to Uno.Using “if” condition we can check the threshold and if the water is less than a particular value then relay pin is made high which will in turn turn on the pump.To turn on a pin we use the command digitalWrite(pin,HIGH);

After some time pump can be turned off using the command digitalWrite(pin,LOW);

Compiling and uploading

After writing the code the code should be checked if it have any error and after that the code can be uploaded to arduino uno

In arduino IDE on top left side there is an ‘tick’ symbol in blue,press this button to compile the code.If there is any syntax error in the code,the error will be displayed in the bottom box.After clearing that error code should be compiled again and the process is to be repeated till the code is clear of all the error.After compiling the code can be uploaded to our board.For this connect the board to system via USB cable and select the port in Arduino ide.Now press the ‘left arrow’ button on top left of arduino ide and the code will be uploaded.


3d Designing

for creating a 3D model to 3D print

Using Sketchup you can create a 3d model of casing that can used to insert all electronic component , power sources. Depending upon your requirement and 3d drawing skills you can fix the size and shape. Save your drawing in stl. , obj. file.

refer 3d designing tutorials for more details

3d printing

how to 3d print your model

upload you cad drawing in slicing software convert it to machine code and upload the same to 3d prinetr and completing the preparation steps you can start printing the object. Please refer 3d printing tutorials for more details


Assemble all components inside the casing printed by 3d printer

Use your skills to insert all electronic components inside your casing. place the sensors, pumps and other parts outside the casing


Now you can present the product in appealing way.


  • (Fab-Safety.2): I can operate equipment in a Fab Lab following safety protocols.
  • (Fab-Programming.2): I can create a program with more than one instruction.
  • (Fab-Electronics.2): I can follow a schematic diagram and create a circuit including a microcontroller with electronic components.
  • (Fab-Modeling.2): I can construct compound shapes and multi-part components ready for physical production using multiple representations.
  • (Fab-Fabrication.2): I can develop workflows across four or more of the following: modeling softwares, programming environments, fabrication machines, electronic components, material choices, or assembly operations.
  • (Fab-Design.2): I can participate in design reviews with prepared presentation materials as well as give and receive feedback from peers.