> I am looking for a reliable way to detect water, > although the sensor is covered with a layer of dirt, > oil film, etc. And the water may be pure or contaminated. Two cheap and quick methods: Manual reset: aspirin under micro switch Auto reset: Go to toy store. Buy monster that expands when wet. Cut off small piece. Place under micro switch. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.