Water level detection: I used a PIC 16F84 a couple of years ago to build an automatic bilge pump control for my sailboat. To detect the water level, I used two stainless steel bolts connected to two pins of the PIC. One pin was set to be output, the other, as input. When the water level covered the two pins, there was sufficient current flow through the water to turn the i/p pin on. Now, there is a potential problem with this - putting DC on a pair of electrodes in an electrolyte will eventually corrode them. The solution (and this is why I used two pins on the PIC rater than just one pin and the 5v supply) was to swicth the function of the two pins each time through the testing loop - the one that was o/p became the i/p and vice-versa. This results in the pins having an AC voltage on them. Just an idea. And there are opto-isolated AC relays available that you could use to drive the valves. Larry At 02:19 AM 3/28/2002 -0600, you wrote: >Hi all, > > (stuff deleted) >(3) I built a water-level sensor by experimenting with a transistor switch > circuit and some resistor values. Got it working, but I noticed that > the dry and wet voltage levels weren't always consistent. So I > thought I could add this neat feature where an A/D in the PIC would > take a snapshot of the water detector voltage level at startup (which > should be dry) and add a small voltage amount to that for use as > the trigger-level. Should I bother? Or is there a standard water-level > circuit somewhere that would give me better consistency. (Not much > luck with web-search). For simplicity, I'm avoiding using additional > chips such as schmitt triggers, etc. However, space is not an issue > with this circuit, and the cost difference is minimal, so I'd still like to > hear any suggestions. > Larry Bradley Orleans (Ottawa), Ontario, CANADA -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads