Looking for help with using an LM339 comparator

Thread Starter


Joined May 28, 2009

I'm trying to take the output of a soil moisture sensor, which is a square wave frequency (~100-600kHz) of +/- .7V

and eventually put it into a wireless DAQ, that only likes voltage.

Here's what I've pieced together:

the freq-to-volt chip only goes to 500khz, so i added a binary counter to divide the freq by 2.
but the counter doesn't accept a frequency with such a low power (+/- .7V),
so i was given advice to run the frequency through a comparator to achieve a square wave with 0 to +12 V amplitude (rather than -.7 to .7).

I'm using an LM339 comparator, and have no idea how to do this. Can anyone help me out?

Also, does anyone know of any good faq's or help for frequency to voltage chips? (I'm using an ADVFC32 chip)


Joined Apr 5, 2008

Can you post a schematic?
The ADVFC32 has a logic output that has to pulled up with a resistor.



Joined Feb 4, 2008
If you want a 12V peak output from the comparator use a dual 12V supply. Connect the inverting input to ground and the output signal of the sensor to the non-inverting input. The output will be in phase with the input signal. If you want a 180 degrees phase shift connect the comparator inputs the other way round.