Hi,
I have the following ciruit:

The ultrasonic receiver is putting out a 40kHz sinewave with about 200-1000mVpp depending on the distance from the transmitter. My goal is to use the comparator to convert the signal into a square wave which can be fed into a microcontroller for phase difference measurements between channels. A zero crossing detector basically. I was expecting to get a 50% duty cycle square wave at the comparator output, but instead I'm getting like a 70% duty cycle sq wave. When troubleshooting I found out that the sine wave from the receiver, when measured directly at the receiver pins has a significant DC offset (varies with signal amplitude, but its roughly 100-200mV), which of course explains the output of the comparator. Where in the world does this DC component come from though? When I disconnect the receiver from the circuit and measure it on its own, it of course has a nice centered sinewave on its output...
Components used:
- both resistors 1kohm
- comparator MAX944
Any help with this is appreciated!