A system may intermittently illuminate a region, detect light from the intermittently illuminated region to form a detected signal, and process the detected signal with a demodulator. The demodulator may include a capacitor having an input to receive the detected signal, a resistor having an input connected to an output of the capacitor at a connection point, and a switch that connects the connection point to ground during times when the region is not illuminated. An output of the resistor may produce an output signal that is a high-pass filtered version of the detected signal during times when the region is illuminated, and a time-invariant ground signal during times when the region is not illuminated. Such a demodulator may reduce the effects of low-frequency noise sources, such as background light, op-amp offsets related to input bias, photodiode 1/f noise and dark current.