I have seen and used non-contact soap dispensers and water taps in public toilets for a long time already, but only recently have I begun wondering, what kind of sensors they use and how exactly those work. Many of those devices seem to feature some kind of infrared light source, but how do you cheaply measure distances using light without measuring travelling time? Because I guess that would be too expensive and complex for such devices. Or do those sensors not measure distance? And are there any technologies, that don't use infrared light?

Thanks for all the answers so far. They cover most of the devices I have had a look at. I'd now just like to know, whether there are any other technologies to do this, that do not use infrared light. Because there is this one non-contact hand dryer in my university, which does not seem to feature any IR equipment. Or maybe it is just very well hidden.

  • \$\begingroup\$ I'm not saying that this is how the faucets work, but you can maximally detect at a certain distance by separating an IR transmitter and IR receiver and pointing them to converge at the distance of interest. This is often done with reflective object sensors. You don't have to actually measure the distance with the sensor. A minimal amount of processing would allow you compensate for ambient light (or modulation and filtering for ambient light removal). \$\endgroup\$
    – Tut
    Mar 26, 2014 at 19:54

3 Answers 3


You are probably looking for Reflective Object Sensors

Article with nice image

You often see a red filter glass on the automatic tap, indicating there is an IR reflective sensor behind it, containing from an IR LED and an IR photodiode. The LED and photodiode look in the same direction, so in normal circumstances the phototransistor won't receive any of the LED's light.

When however you wave your hand in front of the combination, the IR light will reflect from your skin onto the phototransistor and the tap will activate.

The trick is that the LED is flashing, and the receiving photodiode is trying to synchronously detect these flashes. If it detects IR light that is not flashing in sync with the LED, it knows that the source of the light is coming from somewhere else and thus the tap must not be opened.

I suspect the electronics in a tap is powered by a small 'generator' in the water line, that will spin from the water flowing through the tap. I have never seen a battery compartment or power adapter, but then again I am not responsible for these facilities.


A slightly different solution for consumer market, are the electronic soap dispensers for the home. These do work slightly different from the ones I think you refer to, but still valuable to know.

For the Dettol soap dispenser there is an IR beam that you break with your hand. The IR transmitter is easy to spot if you look under the arm. If you look closely you'll notice that the lens is slightly pointing toward the body of the dispenser. The IR photodiode is looking up under an angle behind the red glass, aiming at the LED in the arm.

enter image description here

To save energy and improve reliability the LED is flashing and the receiver will look for these flashes. Once it misses the flashes from the LED the pump is activated.

Apart from a chip on board, a single TO-92 transistor (power stage to the pump motor) and a hand full (SMD) components: resistors, couple small caps and a transistor there is very little (to hack) in there.


Passive Infrared detectors. They're essentially IR cameras, albeit very crude (low resolution) ones, that notice a moving object against a stationary background by comparing successive "images". It's the same motion-detection technology used in home security alarms.

  • \$\begingroup\$ PIR sensors are not cameras and they don't use "images". The pyroelectric materials are sensitive to changes in the long-wavelength IR that impinges upon them, simple as that. \$\endgroup\$
    – Joe Hass
    Mar 26, 2014 at 19:50
  • 1
    \$\begingroup\$ Ok, too much analogy, not enough detail. Point being, they see differences in the infrared due to warm objects - hands - moving nearby. \$\endgroup\$
    – JRobert
    Mar 26, 2014 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.