The ADA4571 is an anisotropic magnetoresistive (AMR) sensor that integrates a signal conditioning amplifier and ADC driver, as well as a temperature sensor for temperature compensation. The ADA4571 generates two analog outputs that indicate the angular position of the surrounding magnetic field.
The ADA4571 integrates an AMR sensor and a fixed-gain (nominal G = 40) instrumentation amplifier. The ADA4571 provides clean, amplified cosine and sine output signals related to the angle of a rotating magnetic field. T output voltage range is proportional to the supply voltage.
The sensor contains two permalloy Wheatstone bridges at an angle of 45° to each other. The rotating magnetic field in the xy sensor plane provides two sinusoidal output signals, and the angle (α) between the sensor and the direction of the magnetic field doubles the frequency. Within a homogeneous field in the xy plane, the output signal is independent of the physical position in the z direction (air gap).
The output voltage swing range for the sine and cosine outputs is 7% V
DD to 93% V
DD . There are two diagnostic bands ( 0% to 7% of
VDD and 93% to 100% of VDD ), thus providing wire break detection to all internal connections.
The ADA4571 is available in an 8-pin SOIC package.
The VSIN and VCOS outputs have an output impedance of 50 Ω and form a 318 kHz noise filter with external 10 nF capacitors.
The AD7866 is a dual-channel, simultaneous sampling, 12-bit, 1 MSPS SAR ADC. The polarity of the RANGE pin determines the analog input range and output encoding. If this pin is tied to a logic high when the chip select signal goes low, the analog input range for the next conversion is 0 V to 2 × VREF (0 V to 5 V), which is 0.35 V to 4.65 for the ADA4571 AMR sensor The V signal provides approximately 350 mV headroom.
Tying the REFSEL pin low configures the ADC to use the internal 2.5 V reference. This voltage is available on the V
REF pin, but a buffer must be used before it can be used elsewhere in the system. The D
CAP A pin and D
CAP B pin are decoupled with a 470 nF capacitor to ensure normal operation of the ADC.
The AD7866 simultaneously samples both channels of the sensor. The digital words typically include 1 leading zero per data stream in D
OUT A and D
OUT B, followed by 3 status bits, plus 12 bits of conversion data. However, by holding
the CS pin low for an additional 16 clock cycles, both digital words are available from one channel (D
OUT A). Therefore, the SPI interface allows access to two channels on one data line.
The AD7866 has dual channel multiplexers on both ADC inputs. A logic 0 on the A0 input pin allows the A1 and A2 inputs to transition, while a logic 1 on the A0 input pin allows the B1 and B2 inputs to transition. The temperature sensor output of the ADA4571 connects to the B1 input of the AD7866 and allows software temperature calibration of the system.
Magnetoresistance (MR) Theory
Magnetoresistance is the ability of a material to change its resistance value in the presence of an external magnetic field. The most commonly used MR sensors are based on AMR technology.
Figure 2. Anisotropic magnetoresistance example.
An example of the AMR effect is shown in Figure 2. Electric current (I) flows through a conductor and is affected by an external magnetic field (H
Y ). The change in conductor resistance is a function of the angle (Ø) between the magnetization vector (M) and the current vector (I). The magnetization vector is the net sum of the internal magnetic field (H
X ) and the applied external magnetic field (H
Y
).
There is maximum resistance when the magnetization vector (M) is parallel to the current vector (I). There is minimum resistance when the magnetization vector (M) is perpendicular to the current vector (I).
Effective utilization of the AMR effect requires that the conductor itself must be insensitive to mechanical stress but sensitive to magnetic confinement. For these reasons, permalloy (80% nickel, 20% iron) is the most commonly used alloy in AMR sensor manufacturing.
Permalloy Properties
Permalloy strips have two properties that create design challenges when creating angle measurement systems.
First, permalloy has a narrow linear operating area (see Figure 3). The response is linear only when the angle (Ø) between the magnetization vector (M) and the current vector (I) becomes larger. Unfortunately, the linear response soon saturates the permalloy.
Figure 3. The relationship between permalloy resistance and magnetic field.
Secondly, permalloy is not sensitive to polarity. Regardless of whether the angle (Ø) between the magnetization vector (M) and the current vector (I) is positive or negative, the resistance of the permalloy strip will decrease.
Two-color strip magnetic poles
A common method to improve the linearity and non-sensitive characteristics of magnetic poles is to add aluminum strips at an angle of 45° to the axial direction of the metal strips (called two-color strip magnetic poles, as shown in Figure 4). Any current flowing between the magnetic poles of the two-color strip will take the shortest path - the vertical path, and the angle between the current vector (I) and the magnetization vector (M) will be offset by 45°.
Figure 4. Two-color strip magnetic pole effect of permalloy strips.
Figure 5 shows the results after adding two-color strip magnetic poles to permalloy strips. The current vector is shifted by 45°, but the magnetization vector remains unchanged. Notice that the linear properties now exist in the central part of the graph.
Figure 5. Two-color stripe magnetic pole permeable alloy resistance versus magnetic field
strength
. A magnetic field strength of at least 25 kA/m is required to ensure that the specifications in the ADA4571 data sheet are met. This excitation magnetic field must intersect the central portion of the sensing element within the ADA4571 package.
When selecting a magnet, consider the air gap between the sensor and the magnet, as shown in Figure 6. If the magnet is not placed close to the sensor (i.e. the distance d is extremely large), a stronger or larger magnet may be required to ensure that the minimum magnetic field strength requirements are met.
Figure 6. Basics of magnet orientation and air gap sensors for shaft angle measurement.
A standard AMR sensor consists of two Wheatstone bridges with a relative angle of 45° to each other, as shown in Figure 7.
Figure 7. ADA4571 dual Wheatstone bridge configuration.
The rotating magnetic field produces sine (2Ø) and cosine (2Ø) output signals, as shown in Figure 8. Both signals are periodic over a 180° range, so a full 360° measurement is not possible without additional components or reference points.
Figure 8. Magnetoresistive sensor output voltage
channel sensitivity.
The ADA4571 sensor has a nominal sensitivity of 52 mV/° per channel, which means that each degree change between the magnetization vector and the sensor orientation produces a 52 mV change in the output voltage. Angle sensitivity is not constant. The part where sensitivity decreases is the part of the output where the line slope approaches zero.
As shown in Figure 8, the cosine output (green line) loses sensitivity as the magnetization vector angle approaches 0°, 90°, 180°, or 270°. Similarly, the sinusoidal output (red line) loses sensitivity at magnetization vector angles near 45°, 135°, 225°, and 315°. Fortunately, when one channel's sensitivity decreases, the other channel is in a high-sensitivity zone.
System bandwidth, magnetic field rotation and
magnetic field angle vector are important elements for understanding circuit bandwidth. The ADC converts one sample every microsecond. To obtain 1° resolution, the magnetic field can only move 1° in 1 ms (2.778 kHz), otherwise the ADC cannot sample at a high enough speed to keep up with the changing magnetic field. For a 1 MSPS ADC, this means that the maximum available angular velocity of the magnetic field is 2.778 kHz.
Rotational Measurement Test Results
Attach a diametrically oriented N42 magnet (diameter = 0.5 inches, thickness = 0.125 inches) to the end of the metal rod. Precision DC motors provide fine angle control of the metal rods. The sensor is mounted precisely on the front of the magnet. The air gap is set to 2 mm. As long as magnet excitation fully saturates the sensor, the results are essentially independent of the air gap.
The motor rotates, creating a rotating magnetic field that intersects the sensor, producing repetitive sine and cosine output voltages suitable for angle calculations and data collection.
Figure 9 shows the functional block diagram of this setup. Figure 10 is a photo of the setup that can be used to collect data on the axle tail configuration. The setup consists of a brushless DC motor, physical mounting, magnets, and a PCB integrating the corresponding ADA4571 sensor.
Figure 9. Data acquisition test setup—shaft tail configuration
Figure 10. Photo of the brushless DC motor benchmark test setup.
Figure 11 compares the mechanical angle of the motor to the calculated magnetic field angle of the sensor through multiple rotations of the magnet. This calculation utilizes the arctangent function of the ratio of the two outputs. Without calibration, the error is close to ±1°.
Figure 11. Angular error before offset correction versus mechanical angle.
Figure 12 shows the error with only one offset correction. No additional adjustments are required for amplitude mismatch, nonlinearity, or orthogonality correction of sine and cosine. Using the peak-to-peak or average value of each channel determines the offset value as it occurs throughout the mechanical rotation. The offset is subtracted from the corresponding channel to obtain a linear sensor response. The maximum error is close to ±0.2°, and most errors in this range are less than ±0.1°.
Figure 12. Angular error versus mechanical angle after correcting for offset only
Linear position test results
Only minimal modifications are required when creating an incremental linear position measurement system. The existing magnet is replaced by a multipolar strip magnet consisting of a series of changing north and south poles, as shown in Figure 13.
Figure 13. Linear position measurement magnet, PCB and sensor
As the sensor moves parallel to the magnet, it detects the magnetic field every 180° of the pole's length. The pole length (P) and the angular accuracy of the sensor (Ø = 0.05°) determine the theoretical accuracy (Δx).
Δx = P × ΔØ/180°
This results in an absolute measuring system with only one pole length. If the magnet has multiple poles, counting the passing poles will give a more accurate reading. The ideal distance between the sensor and the magnet is half the length of the magnet's poles. Test the EVAL-CN0368-SDPZ
PCB
by installing a magnet on the arm of a digital caliper . Place the EVAL-CN0368-SDPZ PCB so that the front of the ADA4571 AMR sensor (U5) is perpendicular to the front of the magnet. As the magnet moves, the digital caliper displays the distance moved to an accuracy of 0.0005 inches. At the same time, the magnetic field lines intersect the sensor, providing the available output range. Figure 14 is a functional block diagram of the setup and Figure 15 is a photograph of the setup.
Figure 14. Data acquisition test setup for linear measurements
Figure 15. Photo of the benchmark setup.
This setup uses a 2-inch-long magnet positioned 1 inch away from the sensor. The recommended sensor-to-magnet air gap for linear motion detection is equal to half the magnet pole length. Data is collected by moving the magnet along the x-axis and the evaluation software readings are compared to the readings on the caliper's digital display. Figure 16 shows the recorded output position error within 1.0 inches. The error is ±2 mils over the entire range.
Figure 16. Magnetic Field Position Error: 1.0-inch Range
Limiting the measurement range to 0.4 inches provides better measurement results. Note that 0.4 inches coincides with the linear portion of the triangle wave shown in Figure 8 and limits the measurement to 30°. Applying the new gain correction factor to this changed range results in an error of ±1 mil, as shown in Figure 17.
Figure 17. Magnetic field position error: 0.4-inch range.
The sensor is placed in the center of the magnet body, as shown in Figure 18. As the sensor moves up and down relative to the magnet, a common source of error is vertical alignment error.
Figure 18. Benchmark setup photo: Vertical alignment error
Figure 19 shows the error caused by vertical misalignment of the sensor and magnet. Test moving the PCB up or down 0.25 inches and 0.5 inches and then get the data. For a 1.0-inch measurement range, moving the target up or down 0.25 inches will add several mils of error to the calculation. Moving up or down 0.5 inches will make the measurement worse, adding tens of mils to the error in the original reading.
Figure 19. Magnetic Field Position Error: Vertical Alignment Error
These errors can be reduced, but not completely eliminated, by adjusting the gain correction coefficient. Increasing the distance from the magnet can adversely affect the strength of the magnetic field, and the direction of the magnetic field lines can make some data unrecoverable.
The second common error source is rotational alignment error, as shown in Figure 20. Although the sensor and magnet are ideally positioned relative to the vertical axis, the sensor is not parallel to the front of the magnet.
Figure 20. Benchmark setup photo: rotational alignment error
Figure 21 shows the readings related to rotational alignment error. The green line shows the error recorded for the parallel configuration, and the red and blue lines show the additional error caused by rotating the sensor left and right relative to the front of the magnet.
Figure 21. Magnetic Field Position Error: Rotational Alignment Error
The last common source of error is the sensor-to-magnet distance, as shown in Figure 22. The ideal distance between the sensor and the magnet is half the length of the magnet. Increasing or decreasing this distance will result in data set errors. Figure 22 shows a benchmark setup where the magnet and sensor are too close to each other.
Figure 22. Photo of the benchmark setup: plane distance changes.
The distance between the magnet and the sensor was set to 0.1 inch, 0.5 inch, and 1 inch, and then the data was acquired. Figure 23 shows the errors associated with different configurations.
Figure 23. Magnetic Field Position Error: Plane Distance Variation
By adjusting the gain correction coefficient, these errors can be reduced, but cannot be completely eliminated. Increasing or decreasing the distance from the magnet can adversely affect the strength of the magnetic field, and the direction of the magnetic field lines can make some data unrecoverable.
Figure 24 is a screenshot of LabVIEW® evaluation software, which can be used to display and calculate all readings for angular position applications. Figure 25 is a screenshot of the Linear Measurement tab.
Figure 24. CN0368 Evaluation Software Rotation Measurement Tab Screenshot
Figure 25. CN0368 Evaluation Software Linear Measurement Tab Screenshot The maximum and minimum voltage output (V MAX
and V
MIN )
of each Wheatstone bridge is determined during calibration . Knowing these values allows for a more precise mapping of voltages to digital codes. By selecting the calibration method drop-down box, the user can have two methods to determine the V
MAX and V
MIN values. The first method is for the software to determine V
MAX and V
MIN
while the magnetic excitation rotates 360° . The software then calculates the offset voltage values for each channel and uses these values to determine the magnetic field angle. The second method is for the software to determine V
MAX , V
MIN
and V
TEMP
when the magnetic excitation is rotated 360° . Then repeat this step at different temperatures. The software uses these variables to calculate the offset voltage and temperature dependence of each channel to calculate the magnetic field angle.
PCB Layout Considerations
In any circuit where precision is important, power and ground return layout on the circuit board must be carefully considered. The PCB should isolate the digital part and the analog part as much as possible. The PCB of the
CN-0368 system is stacked with 4-layer boards, with large area polygons for the ground layer and power layer. See
the MT-031 guide for a detailed discussion of layout and grounding, and
the MT-101 guide for information on decoupling techniques .
All IC power supplies should be decoupled with 1µF and 0.1µF capacitors for proper noise suppression and ripple reduction. These capacitors should be placed as close to the device as possible. For all high frequency decoupling, ceramic capacitors are recommended.
Power traces should be as wide as possible to provide a low impedance path and reduce the effects of glitches on the power lines. Clocks and other fast-switching digital signals are digitally shielded so that they do not affect other components on the circuit board. Figure 26 is a photo of the PCB.
A complete design support package for the CN-0368 is available at
www.analog.com/CN0368-DesignSupport .
Figure 26. Photo of EVAL-CN0368-SDPZ board