Working :-

This complete project is based on Arduino Nano.

Arduino reads the output from IR sensor normally ,it high(5v) when no object detected .

When object is detected values becomes LOW(0v).

we just provide output to our relay based on the output of the IR sensor .

and then pump also works respectively. check out he code for more details.


Required Components:-

Components Used:::

Arduino nano:

Arduino nano cable:

Relay 5v:

IR Sensor Module:

Pump with pipe(9v):

Led's:

Jumper wires:

Board for PCB Prototype:

240v to 5v converter:

Cable for pump :


Circuit diagram:-




 Arduino nano code:-


void setup(){

   pinMode(2,INPUT);// 

   pinMode(3,OUTPUT);//

   Serial.begin(9600);//

}

void loop()

{

 bool value= digitalRead(2);

 if (value==1){

Serial.println("tap off");

digitalWrite(3,LOW);

}

else{

 Serail.println("tap on");

digitalWrite(3,HIGH);//

}

}


Full video:-