What this system does

An automatic tap water system starts the water pump the moment a hand comes near the tap, and stops it the moment the hand moves away. There is no microcontroller in the loop and no code to write: an infrared sensor watches for the hand, and a relay module does the switching.

Systems like this are used in homes, schools, offices and hospitals wherever touch-free water matters — for hygiene, for saving water, and for convenience. The version described here runs on a single 3.7V lithium-ion cell, so it is fully portable and easy to demonstrate.

Automatic Tap Water System circuit diagram — IR sensor, relay module, 5V DC water pump, 18650 battery and ON/OFF switch, Smart Circuit Hub

Working principle

The system has three stages: sense, switch, pump.

How the automatic tap water system works — hand, IR sensor, relay, pump

1. Sense — the IR sensor. The infrared sensor module emits invisible IR light from its transmitter LED and looks for a reflection with its receiver. With nothing in front of it, the reflected light is weak and the module’s OUT pin stays in its idle state. When a hand comes within a few centimetres, the reflected IR becomes strong enough to cross the module’s threshold, and OUT changes state. A small potentiometer on the module sets that threshold — in other words, it sets the detection distance.

2. Switch — the relay module. The sensor’s OUT pin is wired to the IN pin of a 1-channel 5V relay module. When OUT changes state, the relay’s coil energises and its contacts close. The relay is doing the heavy work here: the sensor’s signal is tiny, but the relay can switch the full pump current. The module’s screw terminals are marked NO (Normally Open), COM (Common) and NC (Normally Closed). The pump is wired to NO, so it only receives power while the relay is energised.

3. Pump — the load. The 5V DC submersible pump sits in the water container. While the relay contacts are closed, battery power flows through the relay to the pump and water is pushed through the silicone pipe to the tap. When the hand moves away, the sensor output returns to idle, the relay opens, and the pump stops.

Components

Circuit connections

The whole circuit runs on one 3.7V cell. The red wires carry the positive supply, the black wires are the common ground, and the blue wires carry the signals.

FromToWire
Battery +ON/OFF switch → relay COMRed
Battery +IR sensor VCC, relay module VCCRed
Battery −IR sensor GND, relay module GND, pump −Black
IR sensor OUTRelay module INBlue
Relay NOWater pump +Blue
Water pump −Battery −Black

A note on the relay terminals: COM is the moving contact. With the relay off, COM is connected to NC and disconnected from NO. When the relay energises, COM moves to NO. That is why the pump must be wired to NO — wired to NC, it would run all the time and stop when a hand appears, which is the opposite of what is wanted.

Building it, step by step

Step 1: Power first

Fit the 18650 cell in its holder. Take the + wire through the ON/OFF switch — the switch is the master control for the whole system — and take the − wire to the common ground (sensor GND, relay GND and pump −). Leave the switch off while wiring the rest.

Step 2: Wire the sensor

Connect the sensor’s VCC to + (red), GND to − (black) and OUT to the relay IN (blue). Switch the system on briefly: the sensor’s power LED should light. If it does not, the VCC/GND pair is the first thing to check.

Step 3: Wire the relay

Connect the relay module’s VCC to + (red), GND to − (black) and IN to the sensor OUT (blue). On the screw terminals, connect COM to the + wire coming from the switch and NO to the pump + (blue).

Step 4: Wire the pump

Connect the pump’s + wire to relay NO and its − wire to battery −. Fit the silicone pipe on the pump outlet and place the pump in the water container, with the pipe end positioned over the basin.

Step 5: Test and calibrate

Switch on and hold a hand 5–10 cm in front of the sensor. You should hear the relay click and see the pump start. Remove the hand and the pump should stop within about a second.

If the behaviour is wrong, adjust the potentiometer on the sensor module with a small screwdriver: one direction increases the detection range, the other decreases it. Calibrate until the pump starts reliably at hand distance and stays off otherwise.

Design notes

Troubleshooting

Where this is used

Touch-free water systems appear in washbasins, school labs, clinics, offices and public places. For students, the same circuit is a strong final-year project base: add a water-level sensor in the tank, a second IR sensor, or a small display showing pump status, and the project has a complete, demonstrable story.

Need this built for you?

Smart Circuit Hub builds custom Arduino, IoT and automation systems in Lahore — for homes, schools and final-year engineering projects. If you want this tap water system built, installed, or extended with extra features, get in touch:

Parts for this project are available from our store. A detailed step-by-step build guide is also available.

Want a ready-made system? Contact us — Smart Circuit Hub can build the complete automatic tap water system for you. Components are also available — order the parts from our store.

FAQs

Does this system need an Arduino or any code?

No. The sensor output drives the relay directly. There is no microcontroller and nothing to program.

What powers the sensor and relay?

The same 3.7V cell. Its + line (through the switch) feeds the relay COM and the VCC pins of both modules; its − line is the common ground for the sensor, relay and pump.

How far away does the sensor detect a hand?

Typically 5–10 cm after calibration. The onboard potentiometer adjusts the range.

Why must the pump be wired to NO and not NC?

NO (Normally Open) only connects to COM when the relay is energised — that is, only when a hand is detected. Wired to NC, the pump would run when no hand is present and stop when one appears.

Can I run it from a 5V adapter instead of a battery?

Yes. A regulated 5V DC adapter is better for permanent use; the battery is best for portable demonstrations.

Can this be extended for a final-year project?

Yes. Common extensions are a tank water-level sensor with automatic refill, a second sensor, a flow display, or a mobile notification when the tank is low.

Leave a Reply

Your email address will not be published. Required fields are marked *