AN-1314: AMR Angle Sensors


Anisotropic magnetoresistive (AMR), thin film materials are becoming increasingly important in today’s position sensing technologies. Magnetoresistive (MR) position measurement has many advantages over traditional technologies. Reliability, accuracy, and overall robustness are the primary factors contributing to the development of MR sensing technologies. Low cost, small relative size, contactless operation, wide temperature range, dust and light insensitivity, and operation over a wide magnetic field range all lead to a robust sensor design. The MR effect is the ability for a material to change its electrical resistance with a change in direction or magnitude of an externally applied magnetic field. The two different areas of operation for AMR materials are high field and low field. This application note discusses high field applications, where the applied external magnetic field is much greater than the internal field of the sensor, and the sensor is said to be operating in saturation. During this mode of operation, the change in resistance only depends on field direction and not on the applied field strength. Due to the nature of AMR films, the resistance change of the material is identical for opposing directions, meaning that the sensor itself cannot distinguish a north magnetic pole from a south magnetic pole. Therefore, the output information for a single rotating dipole magnet repeats twice over an entire mechanical revolution. This effect limits the measurement range to 180°. The change in resistance can be modeled by the following equation:


R is the sensor resistance.
R0 is the unexcited sensor resistance.
ΔR0 is the change in sensor resistance.

For AMR sensors, in general, ΔR0 is approximately 3% of the overall resistance of the bridge. Due to this small change in resistance, an instrumentation amplifier is needed to further amplify the output signal to a useable value proportional to the supply voltage.

Magnet Configurations

AMR technology can be used to detect both linear as well as rotary position. There are many different types of magnetic configurations used in conjunction with AMR angle sensors, including linear, off shaft, and end of shaft magnet configurations.


For linear applications, the magnet must be located in the same plane as the sensor, as shown in Figure 1. The red and blue sides of the magnet show the orientation of the north and south poles. This orientation direction is interchangeable because AMR sensors do not distinguish between a north and south pole. To achieve the most linear response from the AMR sensor, the center of the sensor and the center of the magnet must be located half of the magnet distance away from each other.

Figure 1. Linear Magnet Configuration.

Off Shaft

One magnet configuration for rotary measurement uses a pole ring. Figure 2 shows an idealized pole ring. The colored regions depict the outer magnetic field orientation as seen by the AMR sensor. Similar to linear measurement, the ring must be placed in the plane of the sensor at half of the distance of the pole length to achieve a linear response. The sensor response for this type of magnet configuration repeats as many times as there are poles over a full mechanical revolution. For the ring in Figure 2, there are 5 north poles and 5 south poles for a total of 10 magnetic poles seen by the sensor. The AMR sensor output for the ring shown repeats 10 times for each revolution and, therefore, gives 36° of absolute information.

Figure 2. Off Shaft Magnet Configuration.

End of Shaft

The primary measurement configuration discussed in this application note is a simple magnet configuration generally called end of shaft. In end of shaft magnet configurations, a dipole magnet that has been magnetized diametrically is located at the end of a rotating shaft. The sensor is located underneath the rotating shaft and magnet. In this mechanical setup the north and south poles of the diametric magnet form a uniform field above the center of the magnet. As the magnet and shaft rotates, so does the magnetic field. The sensor is placed such that the uniform magnetic field is located in the same plane as the sensing elements. Figure 3 shows an end of shaft magnet configuration.

Figure 3. End of Shaft Magnet Configuration.

The end of shaft magnet configuration lends itself well to brushless dc motor position and control. In the case of the ADA4571, or any 180° angle sensor, the brushless dc motor used must be an even pole pair motor, because odd pole pair motors require full 360° position information.

Most closed-loop, brushless dc motor controls use hall sensors to provide rotor position feedback to determine the correct position for commuting the coils. These sensors range in accuracy, but are generally on the order of 5° to 10° accurate. To create a smoother and more efficient motor response and to reduce torque ripple, more accurate rotor angle information is needed. Analog Devices, Inc., AMR sensors provide mechanical accuracies on the order of ±0.1° typical, ±0.5° maximum. This level of accuracy can also be achieved through a more conventional means of incremental encoders. However, startup, stall errors, and environmental effects are much more of a problem with incremental encoders. Analog Devices AMR sensors provide absolute position information on startup or stall condition regardless of motor position. This absolute position information allows much better torque control, a smoother motor startup, as well as more efficient motor start and stall performance.

Bridge Configuration

Analog Devices AMR sensors are manufactured in a wheatstone bridge configuration, which allows both a wider output voltage swing as well as rejecting large dc offsets compared to a single resistive element. When a single bridge output is measured differentially over the revolution of a single dipole magnet, it is only possible to obtain 90° of usable range. The output waveform for a single bridge element over the 360° mechanical revolution of a single dipole magnet is shown in Figure 4. Note that for each voltage output level, there are four possible mechanical positions.

Figure 4. Single Bridge Output.

By placing two sensing elements on the same die rotated 45° from one another; the sensor can be used over a full 180° measurement range. Figure 5 shows a simplified circuit of two bridges.

Figure 5. Simplified Circuit Diagram for Double Wheatstone Bridge Sensor.

An AMR sensor has an identical output whether looking towards a magnetic north or south pole. Due to this effect, only a 45° relative rotation is needed to create a 90° phase shift between the two sinusoidal outputs when monitoring each channel differentially from the respective wheatstone bridge. Figure 6 shows the two outputs from both AMR bridges over an entire mechanical revolution in the dipole magnet configuration.

Figure 6. Two Bridge Output.

AMR Sensor Element

The layout of the AMR sensing element determines the end performance of the device. Analog Devices uses AMR sensing technology from Sensitec GmbH, a proven industry leading MR sensor manufacturer. The Sensitec AMR sensor used in Analog Devices products leverages PERFECTWAVE® technology. PERFECTWAVE sensors use curved sensor elements to reduce higher order harmonics and to improve accuracy.


Magnetic Angle vs. Mechanical Angle

Two different angle scales must be understood for AMR technology: magnetic angle and mechanical angle. Due to the nature of AMR technology, the ADA4571 is a 180° mechanical sensor for a single dipole magnet. Because the outputs of two AMR bridges rotated at 45° from each other are sinusoidal with a relative phase shift of 90°, the absolute angle over 180° can be obtained by performing an arctangent2 calculation.


The information gathered from the arctangent2 calculation repeats twice over 360° for a single dipole magnet and more for a multipole pair magnet. Figure 7 shows an example output waveform after this arctangent2 calculation for a single dipole magnet.

Figure 7. Magnetic vs. Mechanical Angle.

When the arctangent2 calculation is performed, a linear angle response is generated. Neither the absolute voltage nor the absolute field strength is important in the calculation of the magnetic angle, which makes the sensors insensitive to magnetic and amplitude shifts and drifts, compared to competing angle sensor technologies.

Magnet Selection Considerations

When working with AMR sensors, it is important to mate the sensor with an appropriate magnet to obtain optimal performance. Due to their direction dependency on the field, the magnet used must be magnetized diametrically instead of axially. Such a magnet is shown in Figure 8. The blue and red areas of the magnet indicate the north and south poles. The magnetic field lines travel from the north pole of a magnet to a south pole. On top of the magnet, where the AMR sensor must be located for an end of shaft magnet configuration, as shown in Figure 3, the field lines are uniform in the plane of the sensor.

Figure 8. Dipole Magnet Pole Orientation.

Generally, rare earth magnets are mated with AMR sensors due to their high magnetic energy to weight ratio. However, lower cost ferrite magnets can be used as long as the minimum saturation field strength requirements of the sensor are met. However, for high performance and high temperature applications, an increase in performance comes with a rare earth magnet due to the higher field strength seen by the AMR sensor. A higher field strength also helps to reduce the influence of stray fields on the sensor accuracy.

The two most common types of magnetic material for permanent rare earth magnets are neodymium (NdFeB) and samarium-cobalt (SmCo). Table 1 shows a comparison of the two different magnetic materials, showing the main advantages of each material. There are many different grades of these two magnetic materials; therefore, this is a high level comparison. For specific characteristics, each grade of material must be examined separately. The grades of the magnetic materials indicate the energy product of the material and are expressed in megaGauss Oersteds (MGOe). This value is taken by the maximum of the BH curve for that magnetic material. As a general rule, a material with double the MGOe has double the pull strength for a same size magnet.

Table 1. Comparison of NdFeB and SmCo Magnetic Materials
Parameter NdFeB SmCo
Price Medium High
Field Strength High Medium to High
Maximum Temperature 80°C to 180°C 160°C to 300°C
Temperature Coefficient −0.08 %/K to −0.13 %/K −0.03 %/K to −0.04 %/K
Corrosion Protection Nickel (typical) Not needed

In the case of AMR technology, a higher strength magnet always performs better than a lower strength magnet.

Increasing the field strength seen by the AMR sensor element improves the performance of the device. Higher order harmonics are present in all AMR sensors due to the physical limitations of the devices. The Sensitec AMR sensors used in Analog Devices products have a curved structure that reduces the fourth harmonic present in many other sensors, which allows lower field strength operation to achieve similar performance.

The AMR sensing element used in the ADA4571 has a minimum operating magnetic field of 25 kA/m. Operation at a lower field strength is possible, but results in reduced accuracy. Higher field strengths increase accuracy and do not damage the device. Due to the field direction measurement of AMR sensors, as opposed to flux measurement, a larger temperature coefficient of magnetic field strength can be tolerated while still achieving the error specified by the device. However, magnets selection must ensure that field strength degradation is accounted for at operating temperature extremes. The degradation can be calculated from the nominal field strength and the temperature coefficient.

Magnet to Sensor Relationship

Mechanical alignment is critical for maximizing the performance of an AMR sensor. There are several key parameters to keep in mind when designing the physical system. The x-y alignment tolerances between the magnet and the sensor must be sufficiently controlled so that the field direction seen by the sensor is in the desired direction. The physical misalignment of the center of the sensor to the center of the magnet contributes an error to the whole system that is dependent on the size and uniformity of the magnetic field around the sensor location. Within the ADA4571 8-lead SOIC package, the center of the magnetic sensor is located between the top edge of Pin 2 and Pin 7 in the center of the package. During packaging, the position accuracies are within a precision of ±50 µm in each direction of this nominal position. See the ADA4571 data sheet for specific alignment drawings. The end of shaft system being controlled must have its magnetic center of axis in line with the center of the magnetic sensor.

Air gap, or z direction, is also important to the performance of an AMR sensor. While not as critical in absolute alignment as the x-y relative position, the air gap must be understood to maximize the performance of the sensor. To achieve the specified performance of the AMR sensor, the magnetic stimulus must be designed to provide at least the minimum required field strength of the sensor. The required field strength for the ADA4571 is 25 kA/m. One way to increase the magnetic field strength seen by the sensor is to decrease the working air gap. However, it is important to note that decreasing the distance to a magnet does not always increase the performance of the device. Near the surface of magnets, the magnetic field produced becomes non-uniform.

Air gap insensitive operation is an important feature of AMR technology. As long as the sensor is fully saturated by the exciting magnetic field, the angle information gathered from the sensor does not change with magnetic field strength. This tolerance means that small z axis movement due to vibration, stress, or lifetime mechanical drift has little impact on angular accuracy. The amount of movement tolerance depends on the magnet material and geometries, but can range from a few millimeters to a centimeter or more.

Misalignment and Air Gap Measurements

Measurement results showing varying magnet size, strength, air gap, and misalignment are shown in the following sections. Additional magnets have been tested using the methods outlined. Contact Analog Devices for more information on magnet selection for specific applications.

Measurement Setup

Each magnet was mounted onto a slotless, brushless dc motor and spun at a constant rotational velocity of 3000 rpm.

The motor is mounted on a movable platform with two linear actuators, one for the x direction and one for the y direction with respect to the sensor. Figure 9 shows the defined direction for x and y movement.

Figure 9. Defined Alignment Directions Relative to the ADA4571 Package.

The z direction, or air gap from sensor to magnet, is fixed throughout a measurement sweep. The indicated air gap for each measurement is defined as the distance from the magnet to the top of the package. The AMR sensor is located 0.38 mm nominally, with a tolerance of ±0.025 mm, from the top of the package. To find the distance from the AMR sensor die within the ADA4571 package to the magnet, add this distance to the air gap measurements.

The two linear actuators are moved in 50 μm increments to cover an entire square of 2 mm × 2 mm, or 1 mm in each direction away from the center of the AMR sensor. The maximum radial misalignment tested by this method is 1.4 mm as located at the corners of the sweep.

Note that all results were digitally filtered and upsampled to create a smoother looking plot. Absolute error values remain the same.

Field Strength Study

Table 2. Magnet Dimensions for Comparison 1
Parameter NdFeB (35 MGOe) SmCo (32 MGOe)
Diameter 6 mm 6 mm
Thickness 3 mm 3 mm

To study the effect of different field strengths on misalignment, two magnets were chosen. Both magnets are 6 mm in diameter and 3 mm thick. One magnet is NdFeB with an energy grade of 35 MGOe, and the other magnet is SmCo with an energy grade of 32 MGOe. Other reasons to choose a SmCo magnet over NdFeB include a higher temperature grade for SmCo, as well as a lower temperature coefficient of the magnetic material. These effects are more critical for high temperature applications. The magnets chosen are examples to show the effect of different field strengths. There are also different NdFeB and SmCo magnetic materials with various energy grades available.

In Figure 10 and Figure 11, the color scale indicates angular error in degrees. The minimum angular error for these plots, located in the center of the plot when the magnet is perfectly aligned with the sensor, is 0.07°.

Figure 10. SmCo (32MGOe) with 1 mm Air Gap.

Figure 11. NdFeB (35 MGOe) with 1 mm Air Gap.

Due to the increase in field strength from the NdFeB magnet, this magnet maintains higher performance over a larger displacement distance from the magnet position in comparison to the SmCo magnet. The effective field strength at the sensor element for these two magnets at a 1 mm air gap is approximately 60 kA/m for the NdFeB magnet and 50 kA/m for the SmCo magnet. A larger, lower energy grade magnet is considered in the following section.

Large, Lower Energy Grade Magnet

Table 3. Magnet Dimensions for Comparison 2
Parameter SmCo (24 MGOe)
Diameter 10 mm
Thickness 5 mm

The SmCO magnet described in Table 3 was tested at 2 mm, 4 mm, and 6 mm air gaps, as shown in Table 4, which lists the minimum and maximum reported errors (the center and edges of the plot).

Table 4. Minimum and Maximum Error for Comparison 2
Parameter 2 mm 4 mm 6 mm
Minimum Error 0.0774 0.1002 0.1477
Maximum Error (1.4 mm Misalignment) 0.6118 0.7522 0.7074
Approximate Field Strength (kA/m) 60 35 20

In Figure 12 to Figure 14, the color scale indicates angular error in degrees. The maximum angular error for these plots is 0.8°.

Figure 12. SmCo (24MGOe) with 2 mm Air Gap.

Figure 13. SmCo (24MGOe) with 4 mm Air Gap.

Figure 14. SmCo (24MGOe) with 6 mm Air Gap.

The increase in minimum error in the center of these plots, and as shown in Table 4 is a result of a much lower field strength at the AMR sensor, especially at 6 mm. This magnet was designed to provide 25 kA/m at 3 mm.


Several post processing diagnostics can be helpful for monitoring the ADA4571 to ensure proper system operation and/or to monitor performance. In an end of shaft or off shaft configuration, the magnetic field strength must be uniform throughout an entire mechanical revolution. The magnitude of this field must exceed 25 kA/m to fully saturate the sensor to overcome its internal magnetization. With this condition met, the output amplitude of both the sine and cosine channels must be synchronous with a 90° phase difference. As a result of this output synchronization, the radius is constant at a constant temperature. The radius can be calculated using the following formula:


When the radius, VRAD, is monitored by an external processor or electronic control unit (ECU), any significant deviation from the nominal radius points to a fault in the system. Real time mechanical failure and misalignment, as well as magnetic field degradation, can be monitored by this radius calculation.

Depending on the gain control pin (GC) configuration of the ADA4571, the allowable output radius is bounded by the following values. This range is represented by the shaded region shown in Figure 15 and Figure 16. Typical VRAD values for −40°C, +25°C, +125°C, and +150°C are also indicated. Minimum and maximum values are included in the ADA4571 data sheet. Monitoring the temperature at the device can further tighten up the allowable range.

Figure 15. Bounded Radius with GC On.

Figure 16. Bounded Radius with GC Off.

While the amplitude of the sine and cosine signals are largely independent of the magnetic field strength, an unsaturated sensor begins to show degradation in output amplitude compared to a saturated sensor.

The following radius and fast Fourier transform (FFT) plots, Figure 17 to Figure 20, were taken with the previously discussed SmCo magnet with a diameter of 10 mm and a thickness of 5 mm. The sensor was biased at a 5 V supply and held at room temperature.

Figure 17 shows a radius plot of a saturated sensor, excited with 40 kA/m, and an unsaturated sensor, excited with 10 kA/m.

Figure 17. Radius of Unsaturated and Saturated Sensors.

An FFT of the sine and cosine output signals can be a powerful tool for examining the performance of the sensor and in overall system troubleshooting.

Figure 18 shows the FFT of a well aligned sensor. Figure 19 shows the FFT of a sensor that has been misaligned 1 mm away from the magnetic center. Figure 20 shows the FFT of an unsaturated, high air gap sensor with a stimulus of 10 kA/m.

Note that the measurement noise floor was increased in both the misaligned and unsaturated sensor plot. In the case of the unsaturated sensor, higher order harmonics are much more prevalent in the system. These harmonics are the main contributors to a decrease in sensor accuracy.

Figure 18. FFT of Well Aligned Sensor.

Figure 19. FFT of Misaligned Sensor.

Figure 20. FFT of Unsaturated Sensor.

Error Sources

To minimize the angular error of the sensor, it is important to understand the different error contributions and how each can be calibrated.

Offset Error

Error due to the offset of the sensor is the largest error contribution to the system. However, after proper calibration, as described in the Calibration Procedure section, the offset error can be reduced to near zero.

Amplitude Synchronization Error

For the ADA4571, careful layout of both the sine and cosine channels has been taken for both the sensing element and signal conditioning circuit to ensure good matching performance. As a result, the error due to amplitude synchronization on the ADA4571 is negligible, and correction for amplitude mismatch error is not needed.

Phase Error

As a result of the production layout of the two AMR wheatstone bridges on a single die, the inherent phase error between the sine and cosine channels is negligible. However, a phase error is introduced if the outputs are not sampled synchronously, that is, by a muxed analog-to-digital converter (ADC). The error due to asynchronous sampling is greater at higher magnetic field rotation speeds due to a larger phase lag between samples. It is recommended to use two separate ADCs or a muxed ADC with two simultaneous track-and-hold amplifiers to sample the sine and cosine outputs synchronously to avoid error due to phase lag. The degree of sampling phase error maps directly onto the degree of calculated electrical error.

Calibration Procedure

To achieve the best performance from the ADA4571, a single calibration procedure is required. Fix the mechanical tolerances and align the mechanical setup as closely as possible following the recommendations for magnet to sensor alignment and air gap distance. Once the system is set, the offset and offset drift of the sensor are the primary sources of angular error. There are two different types of calibration that can be performed: dynamic calibration or a single point calibration. Dynamic calibration results in a lower angular error than a single point calibration but requires further real time processing.

A dynamic calibration can only be performed in 360° continuous or free running applications. In this mode, offset can be continuously monitored to calibrate the ADA4571 and to null the error contribution due to both offset and offset drift over the lifetime and temperature range of the system. There are several ways to gather offset information from the sensor output. Collecting the maximum and minimum values from the overall waveform provides an accurate representation of the offset. Averaging the past sampled values over multiple full mechanical revolutions also provides an accurate offset value. The offset of each channel is different and must be stored separately.

When the offset from each channel is collected, the controller must subtract the offset from its respective channel before performing an arctangent2 calculation to gather the angle information from the device.

Figure 21. Dynamic Calibration Operating Flow Chart.

A single point calibration can be performed in either a free running or static application in which the angle measurement does not move through an entire mechanical revolution. To perform a single point calibration for a 360° range, an even number of electrical revolutions must be captured before accurate offset information is extracted. For a 180° movement application, only one electrical revolution can be captured before accurate offset information is extracted. Store the relevant offset information for each output channel in the controller for offset compensation.

Regardless of the method to capture the offset, it is recommended that at least two full mechanical revolutions be used for offset calculations. This offset value is then subtracted from the signal output before recovering angle information. While a single point initial calibration can help to reduce the angular error due to offset, perform a dynamic calibration when possible to minimize the sensor error. This dynamic calibration helps to counter the temperature dependent offset drift inherent to AMR sensors.

Figure 22. Single Point Calibration Operating Flow Chart.

Layout Recommendations and Magnetic Interference

Due to the nature of magnetic sensing applications, the materials used near the sensor must be nonferrous or nonmagnetic in nature. High current carrying ac and dc wires or traces also must not be placed near the AMR sensor. Due to Lenz’s law, any high current carrying wires or traces can create magnetic interference that distorts the magnetic field direction being sensed and introduce extra error into the system. Magnetic fields deteriorate by a cubic term as the distance is increased from the magnet. Due to this cubic nature, any extra space that can be made between high current carrying wires and the sensor greatly decreases the amount of stray fields near the sensor.

If high currents must be placed near the sensor, there are several ways to help reduce the interference issue. Magnetic shielding around the sensor with a magnetically conductive material, such as steel, can help isolate the magnetic sensor and stimulus from the external environment. A higher strength magnet also helps to minimize the impact of an interference field.

VTEMP Output

The ADA4571 has an on-chip, coarse temperature sensor that can be used for diagnostic purposes. If temperature measurement is required, the readout must have an initial calibration at a known temperature. Temperature information can be calculated from the VTEMP pin readout by the following equation:


TVTEMP is the calculated temperature (°C) from the VTEMP output voltage.
VTEMP is the VTEMP output voltage during operation.
VDD is the supply voltage.
VCAL is the VTEMP output voltage during calibration at a controlled temperature.
TCAL is the controlled temperature during calibration.
TCO is the temperature coefficient of the internal circuit
TCVTEMP is the linear temperature coefficient for the VTEMP readout.

To increase accuracy, it is recommended that VDD is consistent between initial known temperature calibration and operation. TCVTEMP is the linear temperature coefficient for the VTEMP readout. While TCVTEMP varies with supply voltage used, TC = 3.173 mV/V/C results in a typical TVTEMP accuracy of ±5°C. Whether in use or not, a 22 nF capacitor to ground must be in place for electromagnetic interference (EMI) purposes.



Robert Guyol