Which of these is better to detect touch on a water tap?

I found two solutions:

  1. Arduino Playground - CapacitiveSensor
  2. Arduino Playground - HomePage

Which method would be best to detect touch of a water tap ??

Aren't the water taps grounded to earth where the water pipes enter the dwelling?
Not sure how much capacitance you'd see there.

Ahh, totally forgot about that, is there any other way to detect touch on the tap?

Have the hand pass thru light beams, assume the tap is being touched if one or more beams are broken?
Use ultrasonic sensor, if distance is close enough ...
Infrared sensor ...

Hmm, Thanks.

I already had that in mind. But i was more interested in this because it does not require any thing additional to be installed near the tap, just a wire connected to tap.

A human hand isn't going to add much capacitance to a long piece of metal pipe that goes to ground.

I am just thinking out loud here,
is there anyway to un-ground the tap without changing the piping?
is there any way to make capsense through wire very sensitive/ (maybe by adding another capacitor or resistor) so that it detect hand also even though the tap is grounded?

Well... you can get plastic tubing to replace what goes from the pipe to the tap. Connect the Arduino's "ground" (circuit common) to the grounded pipe coming out of the wall.

The conductivity of the water will affect the reading. But the key thing is that the reading will change quickly for a touch, only slowly for changes in water composition.

Thanks polymorph,
will grounding the arduino to the pipe will also work even without replacing the section with plastic tubing ?.

Well, then you are just shorting the sensor lead to the ground/common. So, no.

got a picture of the tap you have in mind?..

Faucets are sold now that do this; I have no idea how they work. But if it happens it must be possible. Most of the faucets in my house (copper plumbing) are connected to the shutoff valves with flexible plastic tubing, so this would provide some amount of isolation from the supply pipes entering the building; of course the water is still conductive but not to the extent of metallic pipe. Newer homes use plastic tubing (PEX), a little older may be CPVC.

These are the taps which i have in mind..

Thanks Jack for the information.

The no-touch faucets I'm aware of use IR reflection from your hands. If you look under the tap, you'll see a little dark plastic circle. That is and IR pass plastic window.

You could add something that isn't on the faucet itself. A sensor that sticks up nearby, you wave your hands in front of it to activate the faucet for a fixed amount of time, extendable by waving a hand in front of it again.

I've never seen a residential installation where the faucet is not connected to the water supply with flexible tubing. Imagine the precision required when plumbing the fixture if you were using solid lines between the faucet and supply.

FWIW, Delta sells fixtures that are touch sensitive: http://www.deltafaucet.com/smart-solutions/touch2o-technology.html

I think he meant flexible all-plastic as opposed to flexible metallic. The hoses running from the pipes in my house to the faucets are all metal mesh enclosed plastic, with metal fittings. I seem to recall that this was originally flexible plated copper tube.

This:

Instead of this:

Chagrin:
I've never seen a residential installation where the faucet is not connected to the water supply with flexible tubing. Imagine the precision required when plumbing the fixture if you were using solid lines between the faucet and supply.

My laundry tub is plumbed as below, if a person can solder SMT, this is hardly a challenge! :smiley:

Just because the tap/faucet is grounded wrt mains, it does not mean it's grounded wrt to the Arduino's ground and will depend on the power supply being used, i.e. linear with earth connected to DC ground or not, smpsu with "floating" earth and so on.

Before taking a multimeter and checking for continuity between your tap and the Arduino's pcb ground, first set the multimeter to AC volts and measure between the two points.
Depending on the grounding system of your Arduino's power supply and if it's connected to your PC or not, you may get a reading of half the mains supply.

This reading is also dependent on how the mains ground is generated when it's fed off the municipals 3 phase to single phase transformer arrangement that feeds your home.

Another possible method is to get the Arduino to generate a pulse train on one of it's digital pins (freq not critical, few hundred KHz) then fed that via a high pass filter (to remove any 50/60Hz) and via a high resistance to the tap.
The theory being that anyone touching that tap will reduce the level of the pulse train which can be detected via the ADC.
Something like this:

The circuit below shows that voltage dividing action that will occur when the tap is touched.
R1 is the output impedance of the filter and R2 + C1 is the equivalent resistance and capacitance of the persons hand touching the tap.

Even if the tap is grounded wrt to the Arduino, the taps ground wire will have a certain inductance and resistance which at 50/60Hz will have minimal effect, but it will be much more pronounced at a higher frequency like several hundred KHz and thus will act to "decouple" the tap from ground at these higher frequencies.

Depending on the length and gauge (and hence the resistance and inductance) of the taps ground wire, it may still work.

Of course the higher in frequency we go, the more effect the inductance will have, but there is a practical limit due to the response of the ADC, the wiring we use and so on.