I would like to build an automatic water faucet, but wasn't sure what the sensor in a unit like the one below consists of. Here is a sample picture:
What kind of sensor do these faucets use? Would it work well outside? I'm thinking of building an automatic water fountain for my dog which would consist of mostly everyday parts. The goal is to take a sink fixture and mount it upside down or sideways so the dog can reach it easily. The water source would likely come from inside and be slightly elevated from the exit point. The reason is so that once the valve has shut off the water will drain out and prevent freezing.
I only got one copy of his question. Are you sure your newsreader is working properly?
You can do this with an IR LED and photodiode mounted next to each other so that an object in the target area will be illuminated by the LED. The photodiode is positioned to detect the reflected light, so the LED should not be able to directly illuminate it (for instance, by reflecting off of the back of a filter).
Depending on the ambient lighting and the objects in the installation, you may have to trigger the valve on a rise, fall, or change in reflected light. A porcelain sink is pretty reflective, so a typical sensor probably looks for a drop as a pair of hands obstructs the light path.
You will also have to put some kind of low pass filtering on there to eliminate changing sunlight conditions.
Another approach is to use a patterned emitter. In this case the emitter is not fed with a steady current, but a square wave of around
30 kHz. Any light reaching the photodiode that is modulated at this frequency is guaranteed to be reflected from the emitter. Passing the photodiode output through a high-pass filter will eliminate sunlight, car headlights, streetlamps, etc. This is how TV remote controls work; you can in fact buy an IR remote receiver module for a couple dollars; however, many of them will not work in steady-state conditions (i.e., they were designed to measure thousands of bits per second, not dogs per hour.)
There are a few ways to cope with this time scale problem; I can keep rambling if I'm getting you any closer to a solution.
It looks to me like David Harmon has seen the same question posted to another newsgroup, or more. This is called "multi-posting", and is frowned upon. In a case where there are up to five possible newsgroups of interest, the accepted USENET convention is to crosspost - i.e., send one message with up to five comma-separated newsgroups in the "newsgroups" header. That way, others can benefit from the answers; and if an answer is group-specific, or the thread diverges, then we use the "followups-to" header to narrow the scope of the branch.
And there's only one copy of the message body on the server; only the header gets duplicated.
The example you show probably relies on an infra-red-light-emitting diode to illuminate a pair of hands or a dog, and an infra-red-sensitive photo-diode to dtect the light they reflect (or perhaps the light that a reflective background doesn't reflect).
As stickyfox says, such systems normally modulate the light emitted at a frequency in the kiiloherz range, not unlike a TV remote. Unlike a TV remote receiver, you can use synchronous detection to reject external light sources.
An alternative approach, used in some automatic hand-driers, is to measure the capacitance between a pair of extended electrodes on either side of the target volume. If you put a decent sized lump of water - a human hand or the head of a dog - into this volume, the capacitance between the electrodes is increased.
You don't want to make the system too senstive - if the column of water coming out of the tap increased the capacitance above the threshold value, the tap would turn on okay, but would never turn itself off.
Probably a PIR, passive thermal-electret infrared sensor, like a security system sensor or one of those automatic light switches.
I have a sensor like that in my garage. It replaces the regular light switch, and has adjustable sensitivity and on time. So when I walk into the garage with my hands full of power tools or the stinky kitty-litter bin, the light goes on for me. Get something like that at Home Depot, maybe an outdoor version, and use it to switch a washing-machine solenoid valve. A small leak would take care of the freeze-drain situation.
Why doesn't anybody sell a small consumer-type PLC? It could have a couple of contact closures in/out, a temp sensor, a light sensor, a PIR, maybe a remote. You could program it from a PC. That could be dirt cheap, and I bet lots of people would have use for them around the house.