The problem
An Automatic Toilet Flusher with IR Sensor and Water Saving Timer is a touch-free flushing unit that flushes a toilet only after the user leaves, and for a fixed, limited time. An infrared proximity sensor watches the space in front of the toilet; when a person steps away, an Arduino Uno controller waits a short delay, then energises a 12 V DC solenoid valve through a relay module, releasing water for a preset flush duration before closing the valve. A manual push button provides a flush on demand, and the unit runs from a 12 V DC adapter, with optional battery backup. Public toilets are often left unflushed because users avoid touching a dirty handle, and manual cisterns keep running when a float valve sticks, wasting water with every use. This project solves both problems at once: nothing needs touching, and every flush is capped at a timed duration, so hygiene improves while water use stays controlled.
12 V DC adapter supplying the control board, sensor and solenoid valve.
Follow the working sequence
How it works
The flush cycle runs from sensing to water flow. The IR proximity sensor emits infrared light at 940 nm and watches for its reflection; while a person stands in front of the toilet, the reflected signal holds the sensor output occupied. When the person steps away, the reflection disappears, the output changes, and the Arduino Uno reads that change as the user having left. The controller waits a short delay so a passing movement does not trigger a flush, then switches on the relay module, which connects the 12 V DC supply to the normally-closed solenoid valve. The valve opens and water flows for the flush duration set in the timer, then the controller switches the relay off, the valve springs closed, and the system returns to watching the sensor. Pressing the manual override button runs the same timed flush, and the valve stays closed whenever power is off, so a power cut can never leave water running.
- The IR proximity sensor module continuously emits 940 nm infrared light and monitors the reflected signal from the space in front of the toilet.
- When a user is present, the reflected infrared holds the sensor output in the occupied state; the Arduino Uno reads this digital signal on an input pin.
- When the user steps away, the reflection disappears, the sensor output changes, and the Arduino registers the departure.
- The controller waits a short delay (approximately 3–5 s, design target) so a person only passing by does not trigger a flush.
- After the delay, the Arduino drives the single-channel relay module, which connects the 12 V DC supply to the normally-closed solenoid valve.
- The valve opens and water flows for the preset flush duration (approximately 3–8 s, design target), then the Arduino switches the relay off and the valve springs closed.
- The system returns to sensing. Pressing the manual override button at any time runs the same timed flush immediately.
Tech stack:
- Arduino Uno (ATmega328P)
- IR proximity sensor module (LM393 comparator)
- 12 V DC solenoid valve (normally closed)
- Single-channel 5 V relay module (SRD-05VDC-SL-C)
- Arduino IDE (Embedded C)
- 12 V DC adapter power supply
- Breadboard · jumper wires · push button
- PVC pipe and fittings (plumbing demo rig)
| Parameter | Value |
|---|---|
| Controller | Arduino Uno — ATmega328P, 16 MHz clock (datasheet value) |
| IR sensor | IR obstacle avoidance module with LM393 comparator, 940 nm wavelength (datasheet value) |
| IR detection range | 2–30 cm, adjustable by onboard potentiometer (datasheet value) |
| IR detection angle | 35° (datasheet value) |
| IR sensor supply | 3.3–5 V DC (datasheet value) |
| Solenoid valve | 1/2 inch, 2/2-way, normally closed, 12 V DC coil (datasheet value) |
| Valve operating pressure | 0.02–0.8 MPa (datasheet value) |
| Valve coil current | Approximately 0.3–1.0 A depending on valve model (datasheet value) |
| Relay module | Single-channel 5 V, SRD-05VDC-SL-C, contacts rated 10 A at 125 V AC / 7 A at 240 V AC / 7 A at 28 V DC resistive (datasheet values, Form C) |
| Departure delay | Approximately 3–5 s before flushing starts (design target) |
| Flush duration | Approximately 3–8 s per flush, set in firmware (design target) |
| Power supply | 12 V DC adapter, 2 A (design target) |
| Manual override | Push button, runs one timed flush on press |
Project features
The strongest capabilities of this build are touch-free IR sensing, a water-saving flush timer, and relay-isolated switching of a real solenoid valve. The IR proximity sensor watches the space in front of the toilet without any contact, so the flush is triggered by departure rather than by a handle. The flush timer caps every flush at a fixed duration set in firmware, which is the feature that limits water use instead of leaving it to the user. A single-channel relay module keeps the low-voltage Arduino side electrically separate from the 12 V valve circuit, and the normally-closed valve stays shut whenever power is off. One lesson from the build is worth recording: the sensor must be angled slightly downward and shielded from direct sunlight, because a sensor aimed straight across a bright washroom false-triggers on ambient light and a sensor aimed at a glossy tiled wall reads the wall as a permanent user.
- [Touch-free IR sensing] The IR proximity sensor module detects a user in front of the toilet and their departure afterwards, so flushing needs no handle, button or physical contact.
- [Water-saving flush timer] Every flush runs for a fixed duration set in firmware (approximately 3–8 s, design target), so the valve can never be left running the way a stuck manual cistern can.
- [Departure delay logic] The controller waits a short delay (approximately 3–5 s, design target) after the user leaves before flushing, so a brief movement past the sensor does not waste a flush.
- [Manual override button] A push button triggers the same timed flush on demand, so the toilet can still be flushed when the sensor is covered, being cleaned or under test.
- [Relay-isolated valve switching] A single-channel 5 V relay module (SRD-05VDC-SL-C) switches the 12 V solenoid valve while keeping the Arduino control side electrically isolated from the valve circuit.
- [Fail-closed solenoid valve] The normally-closed 12 V DC solenoid valve opens only while energised and springs shut when power is removed, so a power cut can never leave water running.
- [Adjustable sensitivity and flush duration] The sensor detection range is set with its onboard potentiometer and the delay and flush duration are set in firmware, so the unit can be tuned to the washroom it is installed in. (Configurable feature.)
- [Optional battery backup] A 12 V battery backup can be added so flushing continues during a power cut. (Optional customisation — not part of the base build.)
What is included
- Working prototype (Arduino Uno, IR sensor module, relay module, solenoid valve, PVC pipe demo rig)
- Arduino firmware source code with adjustable departure delay and flush duration
- Circuit diagram and wiring documentation
- Component list with part numbers
- Setup and calibration instructions (sensor range adjustment and mounting angle)
- Project abstract PDF
- Project report and PPT presentation for final review
- Viva Q&A preparation document (sensors, relays, solenoid valves, timers)
Limitations & prerequisites
- IR sensing depends on the user standing within the 2–30 cm detection range (datasheet value) and on surface reflectivity; dark clothing and bright sunlight can shorten the effective range.
- The valve needs a minimum water pressure of approximately 0.02 MPa (datasheet value); a very low-pressure supply may not open it reliably.
- The prototype is a demonstration rig with a short PVC pipe section, not a certified plumbing installation; fitting it to a real toilet needs a plumber and local water-fitting rules.
- Flush duration and water use are design targets, not measured values; actual water per flush depends on supply pressure and the valve model fitted.
- The 12 V adapter must stay dry; the control board is not waterproof and needs an enclosure for a real washroom.
- Battery backup is optional and is not included in the base build.
Frequently Asked Questions
How does the IR sensor know when to flush?
The sensor does not see the person — it sees its own infrared light reflected back. Its IR LED emits 940 nm light, and when a user stands in front of the toilet the reflected light holds the sensor output in the occupied state. When the user steps away, the reflection disappears, the sensor output changes, and the Arduino reads that change as a departure. The Arduino then starts the flush sequence after a short delay.
How does the water-saving timer work?
The timer caps every flush at a fixed duration set in the firmware, instead of letting water run until someone releases a handle. Once the departure delay passes, the Arduino energises the solenoid valve for approximately 3–8 s (design target) and then switches it off. Because the duration is fixed, each flush uses a bounded amount of water; the exact volume depends on supply pressure and the valve model, so no measured saving is claimed.
What happens if the power goes out?
Nothing runs and no water is wasted. The solenoid valve is normally closed, so it springs shut the moment power is removed and stays shut until power returns. The Arduino and sensor also stop, so no flush is triggered during the outage. A 12 V battery backup can be added as an optional customisation if flushing during outages is required.
Can the flush duration be changed?
Yes. The flush duration and the departure delay are both constants in the Arduino firmware, so they can be changed by editing two values and re-uploading the code. The sensor detection range is adjusted separately with the potentiometer on the sensor module itself, without any code change.
Is this project suitable for a final-year project?
Yes — for Electrical, Electronics and Instrumentation Engineering programs. It demonstrates infrared sensing, microcontroller timing logic, relay switching of a real load, solenoid valve control and a genuine water-saving application, and the working prototype gives the student a live demonstration for the final review.
Components & software requirements
- Arduino Uno (ATmega328P)
- IR proximity sensor module (LM393 comparator)
- 12 V DC solenoid valve (normally closed)
- Single-channel 5 V relay module (SRD-05VDC-SL-C)
- Arduino IDE (Embedded C)
- 12 V DC adapter power supply
- Breadboard · jumper wires · push button
- PVC pipe and fittings (plumbing demo rig)
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.