Patent attributes
Described embodiments provide a magnetic field sensor that includes first and second spaced magnetic field sensing elements that each generate a signal indicative of a magnetic field associated with a target. A switching module couples a first terminal of the first magnetic field sensing element having a first polarity to a first terminal of the second magnetic field sensing element having a polarity opposite the first polarity to generate a first combined signal. The switching module couples a second terminal of the first magnetic field sensing element having a polarity opposite the first polarity to a second terminal of the second magnetic field sensing element having the first polarity to generate a second combined signal. The switching module simultaneously couples the first and the second combined signals to an amplifier, which generates an output signal indicative of the magnetic field that has stray magnetic field effects cancelled.