Hey readers, we are back with another new project. do you want to make a touchless water tap using Arduino? In this article, we are going to teach you how to make aTouchless Automatic Water Tap Using Arduino and some other components. This touchless water tap is able to detect your hand under the tap with the help of an IR sensor. Make the connections according to the given circuit diagram and then upload the code to the Arduino. For more information about this project please visit the original post of this project also bookmark TECHATRONIC.COM as all my future projects and tutorials will be pre-uploaded there.
How does This work?For detecting the hands we are using an IR sensor in this project. When a hand is detected, the IR sensor will generate a digital signal which is sent to the Arduino UNO. When you put your hands under the tap then the green LED will glow and the water comes out automatically from the tap. When the sensor is not detecting any presence of the hand then the Red LED glows continuously and the water pump remains off.
Components Required- Arduino UNO
- IR Sensor
- Single Channel Relay Module
- 12V DC Water Pump
- 12V DC Power Supply
- LED(Green And Red)
- 2x 220-ohm Resistor
- Jumper wires
- Breadboard
- USB Cable to connect Arduino UNO to Computer
NOTE: This is the Arduino code for the project that we are making.
// Techatronic.com
int val = 0 ;
void setup()
{
Serial.begin(9600);
pinMode(4,INPUT); // IR sensor output pin connected
pinMode(8,OUTPUT); // Green led pin
pinMode(9,OUTPUT); // Red led pin
pinMode(10,OUTPUT); // Relay
pinMode(10,HIGH); // Relay
}
void loop()
{
val = digitalRead(4); // pir sensor output pin connected
Serial.println(val); // see the value in serial monitor in Arduino IDE
delay(100);
if(val == 1 )
{
digitalWrite(8,HIGH); // Green led on
digitalWrite(9,LOW); // Red led off
digitalWrite(10,HIGH); // Relay Module
}
else
{
digitalWrite(8,LOW); // Green led off
digitalWrite(9,HIGH); // Red led on
digitalWrite(10,LOW); // Relay Module
}
}
We hope that you liked this project.
HAPPY LEARNING!
Comments