Switches and latches based on the Hall effect compare magnetic fields. More correctly, they compare the B-field, or the magnetic flux density with a pre-specified threshold, giving out the comparison result as a single-bit digital value. It is possible to have four categories of digital or on/off Hall sensors—unipolar switches, omnipolar switches, bipolar switches, and latches.
Each of the above switches/latches has a unique transfer function. However, this depends on an important concept—the polarity of the magnetic flux density. The polarity of the B-field makes the Hall effect devices directional. Moreover, it is sensitive only to that component of the magnetic flux density that happens to be along its sensitivity axis.
When a component of the magnetic field applied to a device is in the direction of its sensitivity axis, the magnetic flux density is positive. However, if the component is in the opposite direction of the sensitivity axis, the polarity of the -field is negative at the sensor.
Hall sensor manufacturers follow another convention for the B-field polarity. They consider the magnetic field from the south pole of a magnet as positive, while that from the north pole, as negative. They base their assumption on the branded face of the sensor facing the magnet. The branded face of the Hall sensor is the front surface bearing the device part number.
Therefore, for a sensor with a SOT23 package, the sensitivity axis is perpendicular to the PCB. Whereas for a sensor with a TO-92 package, the sensitivity axis will be parallel to the PCB, provided the sensor is upright after soldering.
A unipolar switch has its thresholds in the positive region of the B-field axis. Its output state changes only when the south pole of a magnet comes near it. Bringing the north pole or a negative field close to the sensor produces no effect, hence the name unipolar.
When the sensor is off, its output is logic high. Gradually bringing a south-pole closer to the sensor causes the device to switch to a logic low as the magnetic field crosses its threshold. The opposite happens when the south pole gradually moves away from the sensor. However, as the threshold of switching for a decreasing magnetic field is different from the threshold of switching for an increasing magnetic field, the device shows a hysteresis effect. Manufacturers create this hysteresis deliberately to allow the sensor to avoid jitter.
An omnipolar switch responds to both—a strong positive field and a strong negative field. As soon as the magnitude of the magnetic field crosses the sensor’s threshold, it changes state. With omnipolar switches, the magnitude of the operating point is the same irrespective of the polarity of the B-field. However, the magnitude of the release point is different from the operating point, but the same for both polarities. Hence, the omnipolar switch also has a hysteresis effect.
A latch device turns on by an adequately large positive field but turns off only by an adequately large negative field. A bipolar switch behaves as a latch device, but its exact threshold values may change from device to device.