A sensor responsive to movement of a detection target includes a magnetic field transducer operative to provide a magnetic field signal proportional to a magnetic field associated with the detection target, a peak detector for tracking positive and negative peaks of the magnetic field signal to generate a tracking signal, and a comparator having a first input responsive to the magnetic field signal, a second input responsive to an input signal related to the tracking signal, and an output at which is provided an output signal comprising first pulses having a first pulse width when the detection target moves in a first direction and second pulses having a second pulse width when the detection target moves in a second direction.