PDF version

Application Information
Analysis of a Hall-Effect System
With Two Linear Sensor ICs for 30 mm Displacement
By Andrea Foletto, Andreas Friedrich, and
Sanchit Gupta
Allegro MicroSystems, LLC
Introduction
A classic Hall sensing system uses a single sensor in front
of a magnet, but linear measurement of the magnetic field
is limited to only a short displacement path unless a magnet
with large dimensions is used. Certain applications cannot
accommodate a large magnet in the system. A solution needs
to be determined for such systems in order to achieve a good
linear response through a large displacement range.
In this application note we are investigating how to extend
the displacement range for linear detection by using two
sensor ICs, using typical Allegro™ MicroSystems devices as
examples.
The proposed system consists of two linear Hall sensor ICs
positioned at a fixed distance from each other, and parallel
to the translation path of the magnet (figure 1). The separation pitch, P, between the Hall elements of the two sensor
ICs depends on the magnet length, L, and is independent of
the air gap, AG. This process is known as slide-by operation.
The measurement is based on the displacement, D, of the
magnet along its polarization (north-south) axis, which is
parallel to the plane formed by the two ICs. This exposes
the ICs to both poles of the magnet. Figure 2 shows a typical
magnetic mapping from a single sensor IC for slide-by operation with a cylindrical magnet. The proposed system has
AG
Hall Sensor 1
A1363 Hall IC
Hall Sensor 2
A1363 Hall IC
A1324
–D
AG
L
L = 5 mm
D (max) = ±10 mm
+D
P
–D
L
+D
L = 10 mm
D (max) ≈ ±15 mm
P = 7 mm (typ)
AG = 7.5 mm (typ)
Magnetic Flux Density, B (G)
+G
0
–G
– 2L
–L
0
+L
+2L
Displacement, D (mm)
Figure 1. Proposed system with two Allegro MicroSystems
A1363 sensor ICs and a 10 mm diameter cylindrical magnet
296097-AN
Figure 2. Slide-by operation; example of classic configuration
using a single sensor IC and a cylindrical magnet
From the analysis of the mapping in figure 3, it can be observed
that the region of linear response is only around the center of the
magnet thus explaining why only a short path can be measured
with a single sensor. Looking in more detail at the mapping, it
is possible to observe that the magnetic profiles are very much
similar to a sinusoidal signal over a large air gap range. If the
magnetic mapping results for the two sensor ICs are considered
to be sinusoidal, then a net maximum linearity range can be
attained when the two signals are in 90-degree phase difference
with each other.
The two sinusoidal signals with 90-degree phase difference can
be processed with an arctan2 function in order to achieve maximum linearity. The expression is given by:
θ = arctan2
Hall1
Hall2
(1)
and there is less linearity error in the system. Figure 4 reports
the mapping of two sensor ICs positioned in order to have a
phase shift of 90 degrees. For this specific case, with a magnet of
10 mm diameter and 10 mm length, a sensor pitch of 7 mm has
been chosen.
400
Magnetic Filux Density, B (G)
a cylindrical magnet of 10 mm length, allowing linear measurement through a displacement of 30 mm (±15 mm) approximately.
The magnetic mapping from a single sensor is shown in figure 3.
100
Sensor 2
0
Sensor 1
–100
–200
–300
0
5
10
15
20
25
30
35
Displacement, D (mm)
Thus an optimum distance needs to be determined between the
two sensor ICs so that a 90-degree phase shift can be achieved
1500
Figure 4. Magnetic flux density versus magnet displacement
AG = 2 mm
1250
AG = 3 mm
1000
Magnetic Flux Density, B (G)
200
–400
where Hall1 and Hall2 are the outputs of sensor 1 and sensor 2 respectively.
AG = 7.5 mm
P = 7 mm
300
AG = 4 mm
750
AG = 5 mm
500
250
AG = 6 mm
AG = 7 mm
0
–250
AG = 8 mm
–500
–750
–1000
–1250
–1500
–20
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Figure 3. Magnetic mapping of the results of a single sensor IC detecting a cylindrical magnet of
10 mm length and 10 mm diameter (slide-by configuration as in figure 1)
296097-AN
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
2
Analysis of mapping data to minimize
linearity error
In this section, the effect of varying the pitch between the two
sensor ICs (P in figure 1) and the air gap (AG) will be analyzed
for the effect on linearity error. The optimum distance between
the two sensor ICs can be determined by verifying the linearity
error curves at various air gaps. Figures 7, 8, and 9 report the
accuracy error for air gaps of 3 mm, 5.5 mm, and 7.5 mm respectively, while varying the sensor pitch from 3 to 8 mm. It can be
noted that the 7 mm pitch gives the minimum linear error overall
at the various air gaps.
6
Arctan2 Error (mm)
Figure 5 reports the arctangent and the best linear fit that represent the displacement movement. Linearity error can be calculated comparing the arctangent with the linear curve. The linearity error curves are shown in figure 6.
P = 5 mm
0
P = 8 mm
P = 7 mm
P = 6 mm
–2
–20
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Figure 7. Linearity error at AG = 3 mm for various IC pitches
6
P = 3 mm
4
1
Arctan2
result
0
Arctan2 Error (mm)
Arctangent (Rad)
2
–6
2
–1
–2
–3
P = 4 mm
2
P = 5 mm
0
P = 8 mm
P = 7 mm
P = 6 mm
–2
–4
Linear Best Fit
–4
–6
–20
–15
–10
–5
0
5
10
15
0.6
–20
20
Displacement, D (mm)
Figure 5. Best fit curve for arctan2 result in order to measure linearity error
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Figure 8. Linearity error at AG = 5.5 mm for various IC pitches
6
AG = 7.5 mm
0.4
P = 3 mm
4
Arctan2 Error (mm)
Arctan2 Error (mm)
P = 4 mm
–4
3
–5
P = 3 mm
4
0.2
0
–0.2
–0.4
P = 4 mm
2
P = 5 mm
0
P = 8 mm
P = 7 mm
P = 6 mm
–2
–4
–0.6
–6
–20
–15
–10
–5
0
5
10
15
20
–20
Displacement, D (mm)
Figure 6. Linearity error curve of magnetic system
296097-AN
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Figure 9. Linearity error at AG = 7.5 mm for various IC pitches
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
3
The sensor pitch can be considered to be independent from the
air gap, so as the next step the linear error curves for a sensor IC
pitch of 7 mm have been plotted for air gaps of 3 mm, 5.5 mm,
and 7.5 mm (figure 10). It can be noted that linearity error
reduces with the increase in air gap. At an air gap of 7.5 mm, a
30 mm displacement can be measured with an accuracy of ± 1%.
The linearity error tolerance expressed in millimeters versus displacement is reported in figure 11 for air gaps of 3 mm, 5.5 mm,
and 7.5 mm, with 7 mm sensor pitch. It can be noted that similarly, error tolerance decreases with increasing air gap.
0.6
0.4
Arctan2 Error (mm)
P = 7 mm
AG = 3 mm
A comparison of the output plots from experimental (mapped)
and simulation results for 7.5 mm air gap and sensor IC pitch of
7 mm are shown in figure 12. It can be noted that in both cases,
the sensor IC response is very similar to a sinusoidal signal, as
expected.
AG = 7.5 mm
Linearity error behavior analysis using two
Allegro sensor ICs
–0.2
–0.4
–0.6
–20
This section presents further analysis that has been carried out
for an air gap of 7.5 mm and sensor pitch of 7 mm. The previous
measurements from mapping can be validated through simulations of the magnetic system. A similar linearity error analysis
will be carried out with the simulation results. The tool used for
the magnetic simulation is ANSYS® Maxwell®.
The linearity error curves using two real sensor ICs and the simulations are shown in figure 13. The error has been measured in
millimeters. It can be noted that the linearity error results for the
magnetic simulation are very similar as those given by mapping
results for these particular dimensions of magnet.
AG = 5.5 mm
0.2
0
Verification of measurements through
magnetic simulations
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Figure 10. Linearity error versus displacement, for 7 mm sensor pitch at
various air gaps
In this section, the effects of offset and sensitivity errors will be
considered, because these errors are intrinsic in every sensor.
For this purpose, a combination of two linear sensor ICs will be
analyzed. An air gap of 7.5 mm and sensor pitch of 7 mm has
been used. The analysis will be performed using pairs of Allegro
devices, first using the A1363, followed by the A1324.
400
0.4
AG = 3 mm
0.3
AG = 5.5 mm
AG = 7.5 mm
0.2
P = 7 mm
0.1
0
Magnetic Flux Density, B (G)
Linearity Error Tolerance
Range (±mm)
0.5
15
20
25
30
35
Displacement, 2D (mm)
Sensor 1
Experimental
300
200
100
Sensor 2
Experimental
Sensor 1
Simulation
Sensor 2
Simulation
0
–100
AG = 7.5 mm
P = 7 mm
–200
–300
–400
5
10
15
20
25
30
35
Displacement, D (mm)
Figure 11. Linearity error tolerance range (±mm) versus absolute
displacement, for 7 mm sensor pitch at various air gaps
296097-AN
Figure 12. Hall output results for experimental and simulated values of the
magnet with sensor 1 and sensor 2
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
4
Intrinsic sensor errors need to be considered for a realistic
scenario. The sensitivity and offset errors for the A1363 device,
through the full automotive temperature range, are:
•Sensitivity error calculated for A1363 sensor = 2.68%
•Offset error calculated for A1363 sensor = 4.44 G
The error numbers are based on a worst case statistical calculation of the device datasheet parameters.
The worst combination of errors for two sensor ICs has been
used for the analysis. In equation 2, for sensor 1, the sensitivity
error and offset errors have been added to the ideal Hall output of
sensor 1. For sensor 2 (equation 3), the polarity of sensitivity and
offset errors has been reversed
400
Magnetic Flux Density, B (G)
A1363 device results
The Allegro A1363 is a low-noise, high precision, programmable
linear Hall-effect sensor IC with high-bandwidth (120 kHz)
analog output. For this analysis, an air gap of 7.5 mm and a 7 mm
pitch between two A1363 devices are used.
300
Sensor 1
Sensor 2 shifted
for error
100
0
–100
AG = 7.5 mm
P = 7 mm
–200
–300
–400
0
5
10
15
20
25
30
35
Displacement, D (mm)
Figure 14. A1363 Hall output results with and without considering sensor
IC offset and sensitivity errors
0.6
0.4
Arctan2 Error (mm)
The Hall voltage outputs for sensor 1 and sensor 2 are shown in
figure 14, with and without shifting due to offset and sensitivity
errors. Linearity error curves are shown in figure 15, with and
without sensitivity and offset errors taken into consideration. The
acceptable error for 7.5 mm air gap and 7 mm sensor pitch as a
function of displacement is reported in figure 16.
Sensor 2
200
Hall output of sensor 1 = Hallideal1 + (Hallideal1 ×
errorsensitivity / 100) + offseterror(2)
Hall output of sensor 2 = Hallideal2 – (Hallideal2 ×
errorsensitivity / 100) – offseterror(3)
Sensor 1 shifted
for error
0.2
A1363
0
A1363 shifted for error
–0.2
–0.4
–0.6
–20
0.6
Simulation
–0.2
–0.4
–0.6
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Linearity Error Tolerance
Range (±mm)
Arctan2 Error (mm)
0
5
10
15
20
0.5
0
–20
–5
Figure 15. A1363 linearity error curves with and without considering
sensor IC offset and sensitivity errors
Experimental
0.2
–10
Displacement, D (mm)
AG = 7.5 mm
P = 7 mm
0.4
–15
0.4
0.3
A1363 shifted
for error
A1363
0.2
0.1
0
10
15
20
25
30
35
Displacement, 2D (mm)
Figure 13. A1363 linearity error curves for experimental and simulation
values maintaining a 7 mm sensor IC pitch and an air gap of 7.5 mm
296097-AN
Figure 16. A1363 linearity error tolerance range (±mm) versus absolute
displacement, with and without considering sensor IC offset and
sensitivity errors
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
5
A1324 device results
The Allegro A1324 is a low noise, linear Hall-effect sensor IC
with analog output. For this analysis, an air gap of 7.5 mm and a
7 mm pitch between two A1324 devices are used.
0.6
•Sensitivity error calculated for A1324 sensor = 13.61%
0.4
•Offset error calculated for A1324 sensor = 27.10 G
The error numbers are based on a worst case statistical calculation of the device datasheet parameters.
The worst combination of errors for two sensor ICs has been
used for the analysis. In equation 4, for sensor 1, the sensitivity
error and offset errors have been added to the ideal Hall output of
sensor 1. For sensor 2 (equation 5), the polarity of sensitivity and
offset errors has been reversed
Arctan2 Error (mm)
Intrinsic sensor errors need to be considered for a realistic
scenario. The sensitivity and offset errors for the A1324 device,
through the full automotive temperature range, are:
Magnetic Flux Density, B (G)
400
Sensor 1 shifted
for error
300
Sensor 2
200
Sensor 1
Sensor 2 shifted
for error
100
0
–20
–10
–5
0
5
10
15
20
Figure 18. A1324 Hall output results with and without considering sensor
IC offset and sensitivity errors
0.5
0.4
0.3
A1324 shifted
for error
0.2
A1324
0.1
10
15
20
25
30
35
Displacement, 2D (mm)
–200
AG = 7.5 mm
P = 7 mm
–300
–400
–15
Displacement, D (mm)
0
–100
A1324 shifted for error
–0.2
–0.6
Linearity Error Tolerance
Range (±mm)
The Hall voltage outputs for sensor 1 and sensor 2 are shown in
figure 17, with and without shifting due to offset and sensitivity
errors. Linearity error curves are shown in figure 18, with and
without sensitivity and offset errors taken into consideration. The
acceptable error for 7.5 mm air gap and 7 mm sensor pitch as a
function of displacement is reported in figure 19.
A1324
0
–0.4
Hall output of sensor 1 = Hallideal1 + (Hallideal1 ×
errorsensitivity / 100) + offseterror(4)
Hall output of sensor 2 = Hallideal2 – (Hallideal2 ×
errorsensitivity / 100) – offseterror(5)
0.2
0
5
10
15
20
25
30
35
Figure 19. A1324 linearity error tolerance range (±mm) versus absolute
displacement, with and without considering sensor IC offset and
sensitivity errors
Displacement, D (mm)
Figure 17. A1324 linearity error curves for experimental and simulation
values maintaining a 7 mm sensor pitch and an air gap of 7.5 mm
296097-AN
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
6
Analysis with other magnet configurations
Further analysis was carried out with two other cylindrical magnet configurations:
•Cylindrical magnet with diameter 5 mm and length 10 mm,
which will be referred to as magnet 1
•Cylindrical magnet with diameter 10 mm and length 20 mm,
which will be referred as magnet 2
The cylindrical magnet analyzed in the previous sections
with diameter 10 mm and length 10 mm will be referred to
as magnet 3.
The two sensor ICs are positioned in a manner to generate two
sinusoidal signals at a 90-degree phase difference; equivalent, in
this case, to a 7 mm pitch.
The diameter of the magnet does not affect the maximum displacement using an ideal sensor, as demonstrated by magnet 1
but, in this case, the detected magnetic field strength reduces and
a higher error is expected when the sensor IC tolerances (offset
and accuracy) have been taken into account.
The analysis performed on magnet 1, the same as that described
in the previous sections for magnet 3, shows that the pitch
between the sensor ICs is the same, 7 mm. The difference in
diameter does not affect the sensor pitch.
By increasing the length of the magnet to 20 mm as in case of
magnet 2, it is possible to measure a 30 mm displacement with an
accuracy of ±0.03%, or a 60 mm displacement with an accuracy
of ±0.5%. In this case, the pitch of the sensor ICs should be
adjusted in order to have two sinusoidal signals at a 90-degree
phase difference.
It can be noted that in case of magnet 1, with smaller diameter
than magnet 3, the detected magnetic field strength is reduced.
This implies that the system is more susceptible to sensitivity and
offset errors of the sensor ICs. Magnet 2 has instead a greater
length than magnet 3 and, in order to have two sinusoidal signals
shifted by 90 degrees, the two sensor ICs should have a 12 mm
pitch.
When the sensitivity and offset errors of the sensor ICs are
included, the linearity error is slightly affected. The increased
linearity error depends on the type of the sensor ICs and on the
magnetic field strength. In the case of very accurate systems, the
linearity errors can be further reduced using, for example, the
following techniques:
It can be noted that with the longer magnet (magnet 2), larger
displacements can be measured with less linearity error. For
instance, a 30 mm displacement can be measured with an accuracy of ±0.03%, or a 60 mm displacement with an accuracy of
±0.5% (figure 20). The result can be improved even more by
applying post-processing linearization (figure 21).
•Use more than two sensor ICs
Conclusion
By using two ideal sensor ICs and a cylindrical magnet with
diameter 10 mm and length 10 mm (referred to as magnet 3), a
30 mm displacement can be measured with an accuracy of ±1%.
•Use a magnet with large dimensions
•Use post-processing compensation such as linearization to correct residual error
From the above analysis, it can be noted that the magnetic simulation results correlate very well with the empirical measurements
for various magnets, with regard to displacement range measurement and error tolerance. Hence, both empirical and simulation
approaches can be followed.
1.5
0.5
Arctan2(Hall1 / Hall2) (rad)
Linearity Error Tolerance
Range (±mm)
1.0
0.4
0.3
0.2
Magnet 2
Magnet 3
0.1
0
10
Magnet 1
20
30
0.5
0
Without linearization
With
linearization
–0.5
–1.0
–1.5
–2.0
–2.5
40
50
60
70
–3.0
–20
Figure 20. Comparison of linearity error tolerance range (±mm) versus
absolute displacement, for various magnet configurations
296097-AN
–15
–10
–5
0
5
10
15
20
Displacement, D (mm)
Displacement, 2D (mm)
Figure 21. Effect of linearization of arctangent error curve to reduce
linearity error
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
7
1 G (gauss) = 0.1 mT (millitesla)
ANSYS®, Ansoft®, and ANSYS® MAXWELL® are registered trademarks of ANSYS, Inc.
Copyright ©2013, Allegro MicroSystems, LLC
The information contained in this document does not constitute any representation, warranty, assurance, guaranty, or inducement by Allegro to the
customer with respect to the subject matter of this document. The information being provided does not guarantee that a process based on this information will be reliable, or that Allegro has explored all of the possible failure modes. It is the customer’s responsibility to do sufficient qualification
testing of the final product to insure that it is reliable and meets all design requirements.
296097-AN
Allegro MicroSystems, LLC
115 Northeast Cutoff
Worcester, Massachusetts 01615-0036 U.S.A.
1.508.853.5000; www.allegromicro.com
8