Pin#2 is terminated with a metallic plate (which could be replaced by the faucet body) such that whenever somebody approaches the tap for washing hands, the sensor is triggered activating the connected relay. The relay finally opens the tap valve for releasing water.
However in the above design the relay is supposed to remain activated only for a short duration of time, which means the individual might require to move his hand to and fro frequently if the washing is required to be for a relatively prolonged period.
Another design which is shown below can be executed for the same:
A Improved Faucet Control Schematic
The above shown proximity detector circuit is a transistor based design and is designed to sense a human hand when brought at a relatively close proximity to the indicated plate.
The T1, and T2 transistors are rigged quite in the manner like a Darlington pairs forming a high gain detector stage.
The capacitive plate attached with the base of T1 sense the minute potential differences due to the variations in the capacitance of the plate in response to the human hand and conducts some current at its emitter lead, which is picked by T2 and amplified to a greater extent across its collector lead.
This preamplified signal is detected by the FET stages, which further amplify it to a level strong enough to cause the relay to toggle.
A typical 12V solenoid valve system can be witnessed below:
Integrating a 12V Solenoid
The two leads are supposed to be fed with a switchable 12V supply in order to close and open the water passage through the white plastic pipe. The white plastic pipe needs to be inserted in series with the faucet water transmission line so that the water supply from the faucet is appropriately controlled via the above discussed operations.