AN296097 Hall Effect System With Two Linear Sensor ICs
AN296097 Hall Effect System With Two Linear Sensor ICs
AN296097 Hall Effect System With Two Linear Sensor ICs
Introduction
A classic Hall sensing system uses a single sensor in front The proposed system consists of two linear Hall sensor ICs
of a magnet, but linear measurement of the magnetic field positioned at a fixed distance from each other, and parallel
is limited to only a short displacement path unless a magnet to the translation path of the magnet (figure 1). The separa-
with large dimensions is used. Certain applications cannot tion pitch, P, between the Hall elements of the two sensor
accommodate a large magnet in the system. A solution needs ICs depends on the magnet length, L, and is independent of
to be determined for such systems in order to achieve a good the air gap, AG. This process is known as slide-by operation.
linear response through a large displacement range.
The measurement is based on the displacement, D, of the
In this application note we are investigating how to extend
magnet along its polarization (north-south) axis, which is
the displacement range for linear detection by using two
parallel to the plane formed by the two ICs. This exposes
sensor ICs, using typical Allegro™ MicroSystems devices as
the ICs to both poles of the magnet. Figure 2 shows a typical
examples.
magnetic mapping from a single sensor IC for slide-by oper-
ation with a cylindrical magnet. The proposed system has
AG
+G
Magnetic Flux Density, B (G)
–D
L 0
+D
L = 10 mm
D (max) ≈ ±15 mm
P = 7 mm (typ)
AG = 7.5 mm (typ)
–G
– 2L –L 0 +L +2L
Displacement, D (mm)
Figure 1. Proposed system with two Allegro MicroSystems Figure 2. Slide-by operation; example of classic configuration
A1363 sensor ICs and a 10 mm diameter cylindrical magnet using a single sensor IC and a cylindrical magnet
296097-AN
a cylindrical magnet of 10 mm length, allowing linear measure- and there is less linearity error in the system. Figure 4 reports
ment through a displacement of 30 mm (±15 mm) approximately. the mapping of two sensor ICs positioned in order to have a
The magnetic mapping from a single sensor is shown in figure 3. 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
From the analysis of the mapping in figure 3, it can be observed
been chosen.
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 400
is possible to observe that the magnetic profiles are very much
AG = 7.5 mm
similar to a sinusoidal signal over a large air gap range. If the 300
P = 7 mm
Hall1 –300
θ = arctan2 (1)
Hall2 –400
0 5 10 15 20 25 30 35
where Hall1 and Hall2 are the outputs of sensor 1 and sen-
Displacement, D (mm)
sor 2 respectively.
Thus an optimum distance needs to be determined between the
two sensor ICs so that a 90-degree phase shift can be achieved Figure 4. Magnetic flux density versus magnet displacement
1500
AG = 2 mm
1250 AG = 3 mm
1000 AG = 4 mm
Magnetic Flux Density, B (G)
750 AG = 5 mm
500
250
0 AG = 6 mm
AG = 7 mm
–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)
2 P = 3 mm
4
1 P = 4 mm
Arctan2
Arctan2 Error (mm)
P = 8 mm
Arctangent (Rad)
result 2
0 P = 5 mm
P = 7 mm
P = 6 mm
–1 0
–2
–2
–3
Linear Best Fit –4
–4
–5 –6
–20 –15 –10 –5 0 5 10 15 20 –20 –15 –10 –5 0 5 10 15 20
Displacement, D (mm) Displacement, D (mm)
Figure 5. Best fit curve for arctan2 result in order to measure linearity error Figure 8. Linearity error at AG = 5.5 mm for various IC pitches
0.6 6
AG = 7.5 mm
P = 3 mm
0.4 4
P = 4 mm
Arctan2 Error (mm)
P = 8 mm
0.2 2
P = 5 mm
P = 7 mm
P = 6 mm
0 0
–0.2 –2
–0.4 –4
–0.6 –6
–20 –15 –10 –5 0 5 10 15 20 –20 –15 –10 –5 0 5 10 15 20
Displacement, D (mm) Displacement, D (mm)
Figure 6. Linearity error curve of magnetic system Figure 9. Linearity error at AG = 7.5 mm for various IC pitches
0.2
magnetic simulation are very similar as those given by mapping
0
results for these particular dimensions of magnet.
AG = 7.5 mm
400
Sensor 1 Sensor 2
0.5 Experimental Experimental
300
Magnetic Flux Density, B (G)
Linearity Error Tolerance
0.4 200
Sensor 1
AG = 3 mm
Range (±mm)
Simulation
0.3 100
Sensor 2
AG = 5.5 mm Simulation
AG = 7.5 mm 0
0.2
–100
0.1 P = 7 mm
–200 AG = 7.5 mm
P = 7 mm
0
–300
15 20 25 30 35
Displacement, 2D (mm) –400
5 10 15 20 25 30 35
Displacement, D (mm)
Figure 11. Linearity error tolerance range (±mm) versus absolute Figure 12. Hall output results for experimental and simulated values of the
displacement, for 7 mm sensor pitch at various air gaps magnet with sensor 1 and sensor 2
The error numbers are based on a worst case statistical calcula- –300
tion of the device datasheet parameters. –400
0 5 10 15 20 25 30 35
The worst combination of errors for two sensor ICs has been
used for the analysis. In equation 2, for sensor 1, the sensitivity Displacement, D (mm)
error and offset errors have been added to the ideal Hall output of Figure 14. A1363 Hall output results with and without considering sensor
sensor 1. For sensor 2 (equation 3), the polarity of sensitivity and IC offset and sensitivity errors
offset errors has been reversed
Hall output of sensor 1 = Hallideal1 + (Hallideal1 × 0.6
errorsensitivity / 100) + offseterror (2)
0.4
Hall output of sensor 2 = Hallideal2 – (Hallideal2 ×
errorsensitivity / 100) – offseterror (3)
Arctan2 Error (mm)
0.2
The Hall voltage outputs for sensor 1 and sensor 2 are shown in A1363
figure 14, with and without shifting due to offset and sensitivity 0
errors. Linearity error curves are shown in figure 15, with and A1363 shifted for error
without sensitivity and offset errors taken into consideration. The –0.2
acceptable error for 7.5 mm air gap and 7 mm sensor pitch as a
function of displacement is reported in figure 16. –0.4
–0.6
–20 –15 –10 –5 0 5 10 15 20
0.6
Displacement, D (mm)
AG = 7.5 mm
P = 7 mm Figure 15. A1363 linearity error curves with and without considering
0.4
sensor IC offset and sensitivity errors
Experimental
Arctan2 Error (mm)
0.2
0.5
Linearity Error Tolerance
0
Simulation 0.4
Range (±mm)
–0.2
0.3
A1363 shifted
for error A1363
–0.4 0.2
–0.6 0.1
–20 –15 –10 –5 0 5 10 15 20
Displacement, D (mm) 0
10 15 20 25 30 35
Displacement, 2D (mm)
Figure 13. A1363 linearity error curves for experimental and simulation Figure 16. A1363 linearity error tolerance range (±mm) versus absolute
values maintaining a 7 mm sensor IC pitch and an air gap of 7.5 mm displacement, with and without considering sensor IC offset and
sensitivity errors
The worst combination of errors for two sensor ICs has been
A1324 shifted for error
used for the analysis. In equation 4, for sensor 1, the sensitivity –0.2
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 –0.4
offset errors has been reversed
–0.6
Hall output of sensor 1 = Hallideal1 + (Hallideal1 ×
–20 –15 –10 –5 0 5 10 15 20
errorsensitivity / 100) + offseterror (4)
Displacement, D (mm)
Hall output of sensor 2 = Hallideal2 – (Hallideal2 ×
errorsensitivity / 100) – offseterror (5) Figure 18. A1324 Hall output results with and without considering sensor
IC offset and sensitivity errors
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. 0.5
Linearity Error Tolerance
0.4
400
Range (±mm)
Sensor 1 shifted
for error 0.3
300 A1324 shifted
Sensor 2 for error
Magnetic Flux Density, B (G)
A1324
200 0.2
Sensor 1
Sensor 2 shifted
100 for error 0.1
0 0
10 15 20 25 30 35
–100
Displacement, 2D (mm)
–200
AG = 7.5 mm
–300 P = 7 mm Figure 19. A1324 linearity error tolerance range (±mm) versus absolute
displacement, with and without considering sensor IC offset and
–400 sensitivity errors
0 5 10 15 20 25 30 35
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
It can be noted that with the longer magnet (magnet 2), larger • Use more than two sensor ICs
displacements can be measured with less linearity error. For
instance, a 30 mm displacement can be measured with an accu- • Use a magnet with large dimensions
racy of ±0.03%, or a 60 mm displacement with an accuracy of • Use post-processing compensation such as linearization to cor-
±0.5% (figure 20). The result can be improved even more by rect residual error
applying post-processing linearization (figure 21).
From the above analysis, it can be noted that the magnetic simu-
Conclusion lation results correlate very well with the empirical measurements
By using two ideal sensor ICs and a cylindrical magnet with for various magnets, with regard to displacement range measure-
diameter 10 mm and length 10 mm (referred to as magnet 3), a ment and error tolerance. Hence, both empirical and simulation
30 mm displacement can be measured with an accuracy of ±1%. approaches can be followed.
0.5 1.5
1.0 Without linearization
Arctan2(Hall1 / Hall2) (rad)
0.4 0.5
Linearity Error Tolerance
With
linearization
0
Range (±mm)
0.3
–0.5
–1.0
0.2
–1.5
Magnet 3 Magnet 2
0.1 –2.0
Magnet 1
–2.5
0 –3.0
10 20 30 40 50 60 70 –20 –15 –10 –5 0 5 10 15 20
Displacement, 2D (mm) Displacement, D (mm)
Figure 20. Comparison of linearity error tolerance range (±mm) versus Figure 21. Effect of linearization of arctangent error curve to reduce
absolute displacement, for various magnet configurations linearity error
ANSYS®, Ansoft®, and ANSYS® MAXWELL® are registered trademarks of ANSYS, Inc.
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 infor-
mation 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.