Technical Article

Technical
Article
Magnetic position sensors and stray field interference:
demonstrating the effect of differential technology
By David Schneider and Marcel Urban
Technical
Article
Magnetic position sensors and stray field interference:
demonstrating the effect of differential technology
David Schneider and Marcel Urban, ams AG
Magnetic position sensing has proved popular in a range of motion- and motor-control applications
in the industrial and automotive markets. Various methods for measuring flux density have evolved,
leading to the development of the fully integrated position sensor IC or magnetic position sensor
(MPS), which incorporates the magnetic sensing element, signal conditioning and signal processing
on a single chip. The latest generation of 3D MPS from ams can sense magnetic flux in three dimensions, permitting their use in a wider range of applications than ever before (see Figure 1).
Whichever method for magnetic sensing is used, magnetic technology is more robust and reliable
than optical sensing or contacting (potentiometer) methods for position sensing, since it is unaffected by the dust, dirt, grease, vibration and humidity commonly found in harsh automotive and industrial applications.
Design engineers who use conventional MPS are increasingly running into a problem, however: interference from stray magnetic fields, which tends to corrupt the MPS’s output or reduce the signalto-noise ratio (SNR) to unacceptable levels. Even the known risk of malfunction due to stray magnetism is damaging to safety-critical designs, which in the automotive field must comply with the
stringent risk-management requirements of the ISO26262 functional safety standard.
The increased risk has emerged as electrification in vehicles has been extended. Motors and cables
carrying high current are particularly powerful sources of stray magnetism; these can equally be
found in many industrial applications.
Counter-measures to protect a vulnerable MPS from stray magnetism are cumbersome and expensive. As this article will show, a better method is to make the MPS highly immune to stray magnetic
fields.
Fig. 1: visualisation of the three vectors of the magnetic field around a 3D MPS
Page 2 / 11
Technical
Article
Methods to protect the sensor from stray fields
A common approach to dealing with magnetic stray fields is to shield the sensor IC. This is a blunt
tool to use, for two reasons. First, the shielding material interacts not only with the magnetic stray
field, but also with the field of the magnet with which the MPS is paired. (This paired magnet is attached to the moving object to be measured. The static MPS converts the changes in magnetic flux
as the paired magnet moves towards or away from it into precise measurements of displacement.)
The shielding material may itself become magnetised, and its characteristics will also tend to
change as the temperature changes. In addition, shielding materials exhibit hysteretic behaviour,
potentially redirecting the paired magnet’s flux lines away from the sensor. To prevent these parasitic properties of the shield disrupting the system’s operation, it has to be placed at some distance
from the magnet.
This limits the system designer’s freedom to place, route and enclose the sensor module’s components. It also makes the system larger, heavier, more complicated, more difficult to assemble and
more expensive.
A completely different approach, which requires no shielding, is to pair the MPS with a magnet that
has very high remanence (Br), and to assemble it in close proximity to the MPS. The effect is to
make the signal-to-stray-field ratio much more favourable; it has the same effect on the overall
SNR.
Unfortunately, strong magnets, such as the NdFeB or SmCo types, are around ten times more expensive than cheap hard ferrite or plastic-bounded magnets, ruining the economic case for MPS in
many cases. In addition, this option is not available to the many applications which cannot accommodate the magnet close to the IC.
Dual-pixel sensor ICs: built-in immunity
Better than either of these approaches is to make the sensor immune to stray magnetism. And in
fact, a basic mathematical operation enables the noise from stray magnetic fields to be cancelled –
provided the sensor’s hardware supports the technique.
In addition, intelligent placement of the paired magnet, as close to the IC as possible, will always
help to increase a sensor module’s tolerance of stray magnetism. But the only way to achieve immunity to stray fields is to use an MPS which has this feature built-in.
The crucial hardware feature of an MPS with stray field immunity is a dual-pixel magnetic sensing
element (see Figure 2). Unlike a conventional absolute 3D magnetic position sensor, a dual-pixel
type uses two pixel cells instead of one to determine the position of the magnet. This dual-pixel
structure then enables the implementation of differential measurement.
Page 3 / 11
Technical
Article
Fig. 2: structure of an AS54xx dual-pixel sensor IC
Each pixel cell can measure all three vectors of the magnetic field: Bx, By and Bz. In members of
the AS54xx sensor family from ams, these two pixel cells are spaced 2.5mm apart.
To illustrate the mathematical operation simply, the following description of the sensor’s working
principle focusses on a linear application (see Figure 3). Here, only the vectors Bx and Bz are
measured by the device.
Fig. 3: measuring linear motion with an MPS and a two-pole magnet
The sensor IC measures the following values to determine the position of the magnet:
Bx_Pix0...x vector of the magnetic field, measured by Pixel 0
Bx_Pix1...x vector of the magnetic field, measured by Pixel 1
Bz_Pix0...z vector of the magnetic field, measured by Pixel 0
Bz_Pix1...z vector of the magnetic field, measured by Pixel 1
Figure 4 shows the output curves of this application over a magnet travel of -15mm to +15mm. At
magnet position = 0 the magnet is exactly centred over the package of the IC. At this position, the
north-to-south pole transition of the magnet is exactly between the two pixels. Since the pixels are
2.5mm apart, there is a ±1.25mm phase shift between the Pix0 and Pix1 curves.
Page 4 / 11
B [mT]
Technical
Article
-15
-10
-5
25
20
15
10
5
0
-5 0
-10
-15
-20
-25
Bx_Pix0
Bx_Pix1
5
10
15
Bz_Pix0
Bz_Pix1
magnet position [mm]
Figure 4: measurement outputs of a two-pixel sensor IC
From these four values the sensor IC calculates two differential signals, called Bi (for the x vector)
and Bj (for the z vector):
Bi = Bx_Pix0 – Bx_Pix1
Bj = Bz_Pix0 – Bz_Pix1
Then let us imagine a stray field, Bs, applied to the device being measured. The source of a stray
field is usually much further away from the sensor IC than its paired magnet is. This means the designer can assume that the same stray field vector is applied to both pixel cells.
Here, then, are the same Bi and Bj formulas, but with stray field Bs applied to them:
Bi = Bx_Pix0 ± Bs – Bx_Pix1 ± Bs
Bi = Bx_Pix0 ± Bs – Bx_Pix1 ± Bs
Bj = Bz_Pix0 ± Bs – Bz_Pix1 ± Bs
Bj = Bz_Pix0 ± Bs – Bz_Pix1 ± Bs
It is easy to see that the value of Bs has no influence on the values of Bi and Bj. Bs can simply be
eliminated from the calculation, to produce accurate position measurements without any interference from stray fields (see Figures 5 and 6). This is the differential principle of position measurement, a patented invention of ams’s, in action.
Page 5 / 11
Technical
Article
15
10
B [mT]
5
Bi = Bx_Pix0 - Bx_Pix1
0
-15
-5
5
15
Bj = Bz_Pix0 - Bz_Pix1
-5
-10
-15
magnet position [mm]
Fig. 5: sin, cos signal calculated by the sensor IC
The magnet’s position (MPos) may then be calculated from the values of Bi and Bj by an ATAN2
function.
MPos = ATAN2( - Bj ; Bi )
150
magnet position [deg]
100
50
0
-15
-10
-5
0
5
10
15
-50
-100
-150
magnet position [mm]
Fig. 6: magnet position, calculated by the sensor IC
Page 6 / 11
Technical
Article
A demonstration of stray field immunity
The superior performance of a dual-pixel MPS with differential sensing has been demonstrated in
the laboratory. The test described below compared the measurement results from an automotive
position sensor module containing a dual-pixel MPS with another automotive module which contains a conventional single-pixel sensor. The modules measured the movement of a magnet in an
arc above the sensor IC (see Figure 9). The sensor IC’s output voltage changes in relation to
changes in the position of the magnet (see Figure 10). This kind of measurement would typically be
required in an application such as measuring the movement of a car’s brake, accelerator or clutch
pedal.
A Helmholtz coil applied a stray field to the modules (see Figure 7). The coil was configured to generate a stray field of known strength in the vectors Bx, By, or Bz.
The output voltage of the modules was measured with an oscilloscope (see Figure 8).
Fig. 7: both modules in the Helmholtz
coil
Fig. 9: the test measured the movement of
a magnet in an arc
Fig. 8: schematic of the measurement set-up
Fig. 10: output characteristic of the two modules
The captured data shown in Figure 11 show that the error of the single-pixel sensor IC is more than
30 times greater than the error of the dual-pixel IC when exposed to a stray field in the z direction.
Page 7 / 11
Technical
Article
Conditions of test:
Magnet position: 4V
Stray field direction: z
Stray field frequency: 50Hz
Stray field strength: 2500A/m
Fig. 11: output voltages in the presence of a stray field. Channel 1 shows the results
from the dual-pixel sensor, and Channel 2 the single-pixel sensor
DC stray fields appear as an offset superposed on the desired signal. AC stray fields appear as
noise; the frequency of the stray field is superposed on the desired signal.
Figure 12 also shows a clear difference between the two sensor types. The ±1% error limit is a typical requirement in automotive motion-sensing applications. The test measured all noise sources,
including the stray magnetic field. Integral non-linearity and temperature drift are application-dependent, and so their values are not included in this diagram.
Page 8 / 11
Technical
Article
Fig. 12: error comparison between the two modules when subject to AC and DC stray fields.
Noise value is shown in blue, and offset in yellow.
Dual-pixel products on the market
The dual-pixel method of differential sensing is implemented in all the AS54xx series of automotivequalified MPS from ams. They can be used in a temperature range of -40°C to 150°C, with no temperature compensation. Extremely sensitive, they can operate in a large input range from 5mT to
100mT. When combined with high tolerance of magnetic stray fields, this allows the use of small
and cheap magnets.
Reliable operation in the presence of stray magnetism helps automotive system designers to comply with ISO26262. Other functional-safety features in the AS54xx devices include integrated selfmonitoring functions. The safety layer provides protection in the event of a failed ground connection
or power supply, as well as under- and over-voltage protection. Advanced safety functions include
an EEPROM self-check which detects bit flips.
Page 9 / 11
Technical
Article
The dual-pixel differential principle of operation does not only provide for stray field immunity, however: it also eliminates the need to offset for drift over temperature and time. Featuring 14-bit resolution, these MPS offer both accuracy and precision, making them suitable in a wide variety of applications (see Figure 13).
Fig. 13: typical measurement applications for the AS54xx family of MPS
Conclusion
In the automotive arena, stray field immunity is going to become an increasingly important attribute
of MPS as the drivetrain of vehicles becomes partially or wholly electrified. New standards such as
ISO11452-8 add to the challenge.
In this electromagnetically and mechanically harsh environment, 3D dual-pixel sensor ICs provide a
means for designers to achieve robust performance and to provide for compliance with the most exacting functional safety standards, without the need for complicated and expensive magnetic shielding.
Page 10 / 11
Technical
Article
Summary
Magnetic position sensors (MPS) have proved popular in a range of motion- and motor-control applications in the industrial and automotive markets. The latest generation of 3D MPS from ams can
sense magnetic flux in three dimensions, permitting their use in a wider range of applications than
ever before.
Magnetic technology is more robust and reliable than optical sensing or contacting (potentiometer)
methods for position sensing, since it is unaffected by the dust, dirt, grease, vibration and humidity
commonly found in harsh automotive and industrial applications.
Design engineers who use conventional MPS are increasingly running into a problem, however: interference from stray magnetic fields, which tends to corrupt the MPS’s output or reduce the signalto-noise ratio to unacceptable levels. The increased risk has emerged as electrification in vehicles
has been extended. Motors and cables carrying high current are particularly powerful sources of
stray magnetism; these can equally be found in many industrial applications.
Counter-measures to protect a vulnerable MPS from stray magnetism are cumbersome and expensive. As this article shows, a better method is to make the MPS immune to stray magnetic fields.
It describes the operation of differential sensing, a technique made possible by the use of MPS with
dual-pixel sensing elements. It then shows the results of tests of a dual-pixel and a conventional
single-pixel MPS, revealing the superior rejection of stray magnetism by the dual-pixel version.
Biography
David Schneider graduated with a Bachelor of Science degree from the FH Joanneum Kapfenberg
University of Applied Sciences. On graduating he joined ams AG as an application engineer, specialising in 3D magnetic position sensors.
For further information
ams AG
David Schneider
Marketing Application Engineer
Tel: +43 (0) 3136 500 31495
[email protected]
www.ams.com
Page 11 / 11