Skip to main content

Automatic Water Tap Control

Automatic Water Tap Control System Using Arduino


Hello, viewers welcome to our new project demonstration.The project title is automatic basin tap control system using Arduino with IR obstacle sensor. The project have another part which is detect the motion and control the light automatically. 

Let's see how it is made. 

Components list:

* Arduino Nano * 16*2 LCD display * Water Tap * IR Sensor * 10k potentiometer * PIR Motion Sensor * 5v LED light * 12v Dc water pump * 12v transformer * BC547 Transistor * 4*2 Battery * On/OFF Switch * 10k Resistor * 100ohm resistor * Veroboard * Some Jumper wire
For making this project single Arduino nano-board, 16*2 LCD Display. This is a PIR motion sensor and 5v LED light.The power switch for the circuit. This is another PIR motion sensor and 5v LED light. Here we supply the power using two 4V batteries. This is the rectifier circuit with 12V Auto Dc Transformer. Here we connect the 12V dc water pump motor. This IR obstacle sensor and water Tap.
 

Description:

This is our complete project view. This is our circuit diagram for the project.The the source code for the project is provided below. In the beginning of the code we include the LCD library. After that we define motion sensor pins, LED light pins, motor connected pin and IR sensor pin. Here we declare three variables. In the void setup section we initialize serial motion and LCD. Then we set motion pins for INPUT and LED light pin for OUTPUT. In the loop section we call two functions,one for motion control and another one is Motor control. Inside the motor control function we read the Ir sensor value. When the IR sensor value is less than 900 the motor will turn ON. And when the Ir sensor value is greater than 900 the motor will turn OFF. This is the motion control function.Here we read two motion control values. When motion sensor1 value will be equal to 1 then LED light1 will be turned ON else it will be OFF. When the motion sensor2 value will be equal to 1 LED light2 will be turned ON otherwise it will be OFF. The Source code will be given below description. You can easily download the source code from the link. After uploading the code let’s see how the project working. First we put some water into the cup. Next when I put my hand under the water tap,Ir sensor detected my hand and the water pump motor turn ON. we can see that water comes through the water tap and LCD display shows Motor is ON. Project is working Nicely. Next we will check another part of the project. When I put my hand inside the room light is turn ON and the LCD display shows the result.

Code:

int relay = 13;  // relay is connected with pin 13 
// this relay will be used to control the solenoid valve
int sensor = 4; // Infrared sensor is connected with pin4 
int flag = 0; // this is a flag and it is changed from 0 to 1 and from 1 to 0 each time sensor is activated 
int sflag = 0; // sensor flag which is used to monitor the state of the sensor when there is nothing infront of it. 
void setup()
{
  pinMode(relay, OUTPUT); 
  digitalWrite(relay, LOW); 
  
  pinMode(sensor, INPUT); 
  digitalWrite(sensor, HIGH); 
}
void loop()
{
  if( (digitalRead(sensor) == LOW) && (flag == 0) && (sflag == 0) )
  { 
    flag = 1; 
    digitalWrite(relay, HIGH); 
    sflag = 1; 
  } 
    if( (digitalRead(sensor) == LOW) && (flag == 1) && (sflag == 0) )
  { 
    flag = 0; 
    digitalWrite(relay, LOW); 
    sflag = 1; 
  }
      if( (digitalRead(sensor) == HIGH)) // if there is nothing in front of the sensor
  { 
    sflag = 0;
    delay(100); 
  }
}
I hope you enjoyed working on this project and completed it successfully.And if you find this blog interesting please do share it with your friends.

Comments

Post a Comment

If you have any doubts ,Please let me know.

amazon banner

Popular posts from this blog

Motion Detector Camera

Motion Detector With Photo Capture Camera   Hello friends!! Welcome to This Blog. In this Blog, we will make a motion sensor detector with photo capture using ESP32CAM and the PIR module. The logic behind is when the PIR sensor detects any motion, the ESP32CAM will start taking the pictures. So you can use this project as a security camera. In thisblog, I will share the circuitdiagram, Arduino sketch, and the component list, so after reading the complete article you can easily make this project. Now ESP32 CAM is a small camera module that has ESP32S chip on the back and some GPIO pins to connect peripherals and it also has a micro-SD card slot, where you can insert the micro-SD card and store the pictures. Now before going to the circuit diagram and Arduino sketch, let me give you a quick overview of this project.  Components Required ESP32-CAM  PIR Motion Sensor Module BC547 NPN Transistor 220ohm, 1k, 10k Resistor. LED 5-mm FTDI 232 USB to Serial Interface board 5 volt DC supply  The

Bidirectional Visitor Counter

Bidirectional Visitor Counter using Arduino A bidirectional visitor counter using Arduino may be a reliable circuit that takes over the task of counting variety of Persons/Visitors within the Room very accurately. if somebody enters into the space then the Counter is incremented by one and also leaves it might be incremented. MATERIALS REQUIRED: Arduino IR Module 16*2 LED 5V Relay Resistor(1K,220 ohm) Breadboard Jumper Wires The total number of persons inside the space is Shows on the 16X2 LCD module. The microcontroller does the work it receives the signals from the sensors, and this signals operated under the control of software which is stored in EPROM of Arduino. There are two IR Modules are used. first, one are often wont to count the amount of persons entering a hall within the up mode at the doorway gate. and therefore the other can count the amount of persons leaving the hall by decrementing the count at the exit gate. In this Project will helps to Wastage of electricity. In ou

Obstacle Avoiding Robot

Obstacle Avoiding Robot using Arduino and Ultrasonic Sensor A simple project on Obstacle Avoiding Robot is meant here. Robotics is a stimulating and fast growing field. Being a branch of engineering, the applications of robotics are increasing with the advancement of technology.The concept of Mobile Robot is fast evolving and therefore the number of mobile robots and their complexities are increasing with different applications. There are many kind of mobile robot navigation techniques like path planning, self – localization and map interpreting. An Obstacle Avoiding Robot may be a sort of autonomous mobile robot that avoids collision with unexpected obstacles. In this project, an Obstacle Avoiding Robot is supposed. It's an Arduino based robot that uses Ultrasonic range finder sensors to avoid collisions.  Components Required Arduino NANO or Uno  🛒 HC-SR04 Ultrasonic Sensor  🛒 LM298N Motor Driver Module  🛒 5V DC Motors  🛒 Battery  🛒 Wheels 🛒 Chassis  🛒 Jumper Wires  🛒 Circ