Muhammed Jaseel
Published © MIT

Timer Controlled Valve for Irrigation

Valve automatically closes after user-defined time

IntermediateShowcase (no instructions)11,979
Timer Controlled Valve for Irrigation

Things used in this project

Hardware components

Arduino 101
Arduino 101
3/4" Ball Valve
×1
3/4" Ball Valve
You Can buy from Local Harware Shop
×1
Servos (Tower Pro MG996R)
Minimum 15Kg Torque
×1
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
Multi-Turn Precision Potentiometer- 10k ohms (25 Turn)
×1
Battery 12 V
Battery to Power arduino and Servo
×1

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Schematics

Circuit Diagram

Code

Arduino Program

Arduino
#include <Servo.h>
Servo myservo;//servo object to control servo
int potPin = A0;    // select the input pin for the potentiometer

int val = 0;       // variable to store the value coming from the sensor
int timerdelay;

void setup() {
myservo.attach(9);//Servo Connected to Pin 9
}

void loop() {
  val = analogRead(potPin);
if(val<100)
{
timerdelay=5*1000*60://5 Minutes Delay
}
else if(val>=100 && val<=200)
{
timerdelay=10*1000*60;//10 Minutes delay
}
else if(val>200 && val<=300)
{
timerdelay=15*1000*60;//15 minutes Delay
}
else if(val>300 && val<=400)
{
timerdelay=20*1000*60;//20 Minutes Delay
}
else
{
timerdelay = 0;
}
myservo.write(180);//Open the Valve
delay(timerdelay);//Wait for specified delay
myservo.write(0);//Close the Valve
                
}

Credits

Muhammed Jaseel

Muhammed Jaseel

4 projects • 20 followers
I am a Maker and Developer

Comments