it's probably because that part has some high frequency gain and 1M is an awfully high input impedance, especially for capacitively coupled ac. i'd suggest putting a capacitor from input to ground, 0.1 uF or less should probably work and not give too much of a time delay. you also have a long input lead, which is another great way to pick up feedback, you may also very well be picking up radio transmissions on the input lead and amplifying them. Michael O'Donnell wrote: > > Hi, > I am trying to use a LM339 comparator to tell me when two probes are shorted by water. I have one probe connected to Vs and the other going into the +input of the comparator. The -input is connected to a pot between the supply and gnd, which should let me set the threshold at which it decides the probes are shorted. I have a 1M pulldown on the input pin, and a 3.3K pullup resistor on the output. > > This seems to be working fine, but there is some sort of oscillation on the output that is puzzling me... essentially, when the probes are open, it sits at zero, but when they are shorted, it sits at about 3.1V with a few mV of wiggle. I thought the pullup would eliminate this, but apparently not. > > I've posted the schematic here: > http://www.moosecraft.org/comparator.html > > thanks for any suggestions. > > cheers, > mike > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu