By Chris Francis
Magnetic sensors are typically Hall effect sensors (named after Edwin Hall who discovered the effect in 1879), whereby a small voltage difference can be measured across a conductor with current flowing through it when a perpendicular magnetic field is applied. They are available as small, integrated solutions with signal or multiple outputs, and analog or digital outputs. The magnetic field normally comes from a magnet. While the earth’s magnetic field can be detected, it isn’t usually wanted and could be a nuisance. For that reason strong magnets and low sensitivity hall sensors are used.
The Allegro Microsystems A139x range is an example of a single axis linear output sensor with analog output.
The different versions have different sensitivities, giving an output proportional to the magnetic field. The effect of the earth’s magnetic field will be small – the sensitivity is only up to 10mV/Gauss and the earth’s magnetic field is never more than 1Gauss on the earth’s surface. They are intended to be used with an applied magnet. Bear in mind that the direction of the magnetic field is important. With a single axis hall effect sensor the maximum sensitivity will be when the magnetic field is perpendicular to the current flow. If the magnetic field is in line with the current flow you will detect nothing. Also, there will be a small signal present depending on the device orientation due to the earth’s magnetic field.
A multi-axis sensor will give a signal whatever the orientation of the magnetic field and you will be able to detect the orientation of the magnetic field. The Infineon TLV493D above is one example of a 3D magnetic sensor. It has an I²C interface and very low current consumption, as low as 10µA when operating. While the current consumption of the A139x series at 3.2mA seems very high by comparison, the Infineon device is already strobing the sensor at 10Hz to save power. While actually measuring the TLV493D will consume 3.7mA. With a hall sensor the voltage detected is proportional to the current flowing so ultra-low power consumption is difficult to achieve. While the signal can be amplified, if you start with a very small signal you will then have more problems with offsets and noise so the sensors typically rely on strobing the sensor to keep power consumption low. This is a typical design practice in battery operated equipment anyway.
One use for magnetic sensors is for non-contact position detectors. A control element such as a joystick or knob with an embedded magnet can provide a linear (or rotary) control signal. An alternative for a rotary control would be an optical encoder, although they tend to have a quadrature output which will require something to continuously monitor the outputs to detect movement. Also rotary encoders for user controls are not usually absolute, although they can have a zero position index. The current consumption of an optical encoder is often quite high and being incremental you would have to be very careful if you wanted to strobe it without risking missing pulses. An example of a rotary optical encoder would be the Bourns EN series, but they are expensive. A magnetic sensor based control can be tiny with devices often only 2mm or 3mm across. You need a tiny magnet and system for holding and moving the magnet so it is not a “complete” solution compared to an optical encoder which will take a standard control knob. Magnetic sensors are cheap though – often less than $1.
Some hall sensors are actually switches such as the Allegro Microsystems A122x series. They have an open drain output and various versions with different switching thresholds. They are “latching” so once turned on with a north pole they need an equally strong south pole to turn them off, which makes them only suitable for certain applications.
More general purpose devices are the Allegro A110x series which don’t need the opposite polarity to release them, but they do have hysteresis to prevent output chatter. They can be used where you want to detect if something is open or closed, for example a refrigerator door.
Another class of Hall based sensor is used for detecting gear teeth for speed measurement of motors and for automobile ABS sensors such as the Allegro ATS642LSH. They incorporate a magnet so a passing ferrous metal can be detected as it disturbs the magnetic field reaching the hall sensor.
AMS AG in Germany make a range of magnetic sensors for rotary and linear position measurement. The also sell magnets which include multipole magnet strips such as the AS5000-MS20-150. That magnet is 300mm long and has 150 poles making construction of long linear sensors possible.
iC-Haus, also in Germany, make a range of magnetic encoder and interpolator ICs which will perform up to 16 bit sine/cosine interpolation for making very high resolution encoders. The simple hall sensor seems to have found quite a variety of uses.