Automatic Water Tap Without Using Microcontroller

Ashwini kumar sinha


Water scarcity is one of the biggest issues plaguing the world today. To prevent this from becoming any worse, we need to focus on water conservation.

Water is the most precious resource on earth, and it is our responsibility to conserve it. But knowingly or unknowingly, we tend to waste a lot of water every day. One of the most obvious water-wasting habits is forgetting to turn off the tap after using it or leaving the water running when brushing our teeth, shaving or doing the dishes.

To help reduce water wastage from taps, we bring to you a smart solution. Today in this DIY project, we will be making a smart water tap that automatically turns off when you are not using it. It will automatically turn on when it detects hand or glass near it and turn off after the container is filled.

This automatic tap can be used in various sectors like industrial automation and even in water vending machine.


We are going to use two I.R proximity sensors in our prototype. While one sensor detects the object or hand near it to turn on/off the water flow, another sensor is mounted on top of the tap to detect the water level. When this sensor detects that the container is filled with water up to the top, it immediately cuts the flow of water.

Components we need

  • 2 Channel Relay Boards
  • 2 I.R sensor Modules
  • Solenoid valve
  • Some wires
  • A water tap
  • Water pipe
  • 5V D.C battery
  • 12 to 24 V A.C to D.C Power adapter (according to requirement of your solenoid valve).


First, we need to connect the ground wires of the sensors and relay module to the negative terminal of a 5V battery. After that join the VCC wires of the relay module and sensors to the positive terminal of the battery. Then connect the output of the first sensor to relay input pin 1 and second sensor output pin to relay module input pin 2.


Fig 1. Circuit Diagram

ensor to relay input pin 1 and second sensor output pin to relay module input pin 2.

Then connect the solenoid valve one wire to N.C (Normally Close) part of relay 1 and another wire to No (Normally Open) part of relay 2. After this connect the common 1 of relay 1 to negative 24 V DC power and common pin of relay 2 to negative of 24 V DC power supply. Refer Fig 1 for connection of components.

Working and Testing.

Our circuit depends on two sensors for its operation. While one sensor detects the object/hand near it, the other sensor detects the level of water filled in the container. When the first sensor detects an object, it gives signal to relay 1 that results in the movement of plunger of relay module towards Normally Open and the valve gets connected to the “Normally Open 1” wire of the relay module. After the circuit is completed, water starts flowing through the valve. When the sensor 2 detects that the glass/container is filled up to the top, it gives signal to the second relay input and the plunger of relay move to disconnect the valve circuit, automatically turning off the water flow.This system work more accurately when you use the colored soft drink or with any juice.With water due to low reflection the flow of water will stop when the water level touch the I.R sensor.

Fig 2. Working



  1. There is one one drawback with simple ir light the circuit will get interrupted by normal light to make this circuit more efficient it is advisible to use modulated IR which will neglect the normal light. Of course it will increase components and cost of the project but by a fraction of amount

  2. How can be a IR sensor used for sensing water level?? i think it may be refract and we can’t get desired output.. can soneone give me explanation how it can be possible??

  3. Godd idea given to conserve water.. but is it possible to use same ckt confuguration?? 2 channel relay + 1 IR sensor and 1 ultrasonic sensor?? in house

    • I think in case of ultrasonic sensor we need a small micro controller to measure distance.At tiny is perfect for that small and low power use.
      Or you can try a sharp IR sensor module it might work.


Please enter your comment!
Please enter your name here