Hi all,
I have an interesting problem with a fairly simple comparator circuit that converts a low-level sine wave to 3.3V logic levels to measure frequency. Part of the system is shown below, and was reverse engineered from an obsolete design.
The input signal is a sine wave in the range 200mVpp to several volts p-p, ground referenced. The hysteresis is set at 70mV to cater for the low amplitude signal. The output feeds a microcontroller timer input to measure frequency/timing.
The input RC filter rolls off around 15Hz because the signals of interest are only a few Hz or tens of Hz and amplitude increases with frequency. The sensor is effectively a small AC generator.
Our problem is that this circuit is in close proximity to a GPRS modem and the power supply is shared, although with separate regulation and ground planes on a 4-layer SMD PCB. We've tried to reduce grounding issues during layout, but still suffer some false comparator transitions when the GPRS modem is operating.
Removing the input filter capacitor (C20 on attached schematic) usually clears up the glitches, but we're not sure why. The capacitor ground is direct to the comparator ground. Is it possible there's some sort of input instability with a capacitor like this, and relatively high source impedance?
Does anyone have ideas on what to look at in terms of decreasing noise sensitivity? We suspect that we're getting some RF breakthrough/demod too, and figure it's likely to be a combination of things...
Any thoughts welcome!
Regards,
Matthew