Maker Pro

How to Make a Motion-Activated Faucet

August 30, 2017 by Robin Mitchell

Create a simple motion-activated water faucet, just like in public restrooms.

Despite sinks being critical to hygiene, manual taps are still pretty nasty and so newer “automatic” sinks are used in many public spaces. In this DIY Hacking project, we will create a simple IR water dispenser!

IR-Controlled Tap Schematic

How Does the Motion-Activated Sink Work?

The circuit is split into three main sub-circuits: the IR detection circuit, a monostable, and a toggle latch for enabling and disabling the flow of water. There's also a reset circuit.

IR-Detection Circuit

The first stage of the circuit involves an IR LED emitting a constant beam of IR light. When a hand or other object crosses this beam, some IR light is reflected back to the circuit. This reflection is detected by the photodiode D2 which results in a voltage drop across D2.

However, we do not want to react to a level of IR detection but instead react to a change in IR signal (i.e., motion) and so a capacitor (C2) is used to remove and DC offset.

This DC offset is then amplified by U1A and the amplification factor can be adjusted with RV1. This amplified signal is further coupled with U1B which is configured as a Schmitt trigger such that only large detections are allowed to trigger the system.

555 Monostable

When a large detection is made, U1B triggers the 555 monostable (IC1) which results in the output of the 555 to be on for a short duration (this duration is dependent on C4 and R1). This output pulse is then fed into a flip-flop (U2A) which is configured as a toggle latch.

Toggle Latch

Every time there is a pulse on the clock input, the state of the flip-flop will reverse and so every large motion detection results in a change of state of the toggle latch.

When the output of the toggle latch is on, then the relay RL1 turns on and enables power to the air pump. As the air pump pumps air into the water container, it forces water out of the pipe and thus the tap operates.

Reset Circuit

To ensure that the circuit does not start pumping water as soon as it is turned on, a simple reset circuit has been designed which consists of C10, R13, C1, and R2.

When the power is first applied, both of these capacitors are discharged and the corresponding RESET pins set to low. This results in both devices staying in their RESET state and, as time passes, both capacitors charge and therefore stop the RESET state.

When the 7474 IC is in its RESET state, the output of Q is low which prevents the relay from operating.


This project uses all through-hole components and thus can be constructed using many different circuit construction techniques. Such techniques include breadboard, stripboard, matrix board, and PCBs. For this project, I have adopted the use of stripboard for technical reasons (that my CNC is currently offline and will be for some time).

For this project, I have adopted the use of stripboard since my CNC is currently out of commission.

Creating the tap, itself, is rather easy as it only consists of an air pump, a water bottle, and some tubing.

The bottle cap has two holes drilled into it: one for the water output and the other for the air pump inlet.

The water pipe needs to go through one of the two holes and be able to reach the bottom of the water bottle while the air pipe only needs to go into the container partially. These holes that now house the pipe must be air tight (as the bottle must be, as well) when the cap is screwed on. However, screwing on the lid should be just fine.

When the air pump begins to operate, it will force air into the bottle. This will, in turn, force water out of the water pipe and thus dispense water. 

This is more desirable than using a fluid pump as it firstly prevents the water from coming into contact with mechanical parts that may have residue (such as oil and grease). Secondly, it allows for a sealed container to dispense water and helps to reduce the chance of contaminates from getting to the water.

Downloadable Code

IR-Powered Tap


Robin Mitchell

Graduated from the University Of Warwick in Electronics with a BEng 2:1 and currently runs MitchElectronics.

Related Content


You May Also Like