All I want to do is create a sensor that beeps when water bridges a pair of contacts. However, I'm an electronics newbie and don't know how to evaluate which is the best method. The sensor will be battery powered and I would like to maximize battery life. I'm using a 16 series PIC and PBP. I realize that a PIC is overkill for this application, but I'm also using the chip for a couple of other things (serial I/O, etc).
Some of the ideas that I've researched/considered:
- Simply using digital I/O: one probe is connected to gnd, the other to a digital I/O pin though a 1M resistor. When the pin goes low, sound the alarm.
- Using and ADC channel to read the resistance across the probes. Normal state should be infinite resistance; anything less and sound the alarm. However, I don't know how to use ADC to measure resistance. According to the datasheet, the max recommended impedance 10k for ADC is anyhow. So I don't know if this is a poor idea besides the point.
- Using a comparator. It would make the coding portion easier since it's a simple bit (and one that I can use with an interrupt and sleep mode). However, I don't know how to design the necessary circuit. And I don't know if it would be flexible enough since the resistance of water varies with temperature and dissolved impurities.
- Using an 555 IC and COUNT. This idea seems to be fairly popular several places online. However, it might be overkill for my needs. I only need a binary "water present" / "no water present" sensor.
Anyhow... I've been at this for days and my head is spinning. Any help would be greatly appreciated. Thanks!
Bookmarks