SBAA539A march 2022 – may 2023 TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5173-Q1 , TMAG5273
In addition to the various mechanical errors, signal chain errors can exist that further complicate angle measurements. These factors can play a direct role in the quality of the measurement how the data is used. For linear Hall-effect sensors including TMAG5170, TMAG5173-Q1, TMAG5273, or TMAG5170D-Q1 it is recommended to understand the following parameters when designing for angle measurements.
As discussed earlier, amplitude mismatch can result in output angle non-linearity. Even in cases where the sensor is located with an appropriate input, it is possible that the sensitivity gain error for each channel can vary somewhat. Small errors between each channel can be corrected using the same method to correct for input amplitude mismatch. That is, a scalar sensitivity gain adjustment can be applied to normalize the two output channels to the same amplitude.
Input referred offset presents itself as a fixed DC offset to the device output. This can directly create angle error as described in Offset. Perform an initial sweep with any rotating magnet to correct for this error. Using peak measured values, both sensitivity gain error and input referred offset can be minimized for any system.
Another key parameter that can impact the angle accuracy is the noise. Considering an RMS input referred noise parameter, this represents a 1 sigma value. When considering any measurement system, the signal to noise ratio (SNR) impacts the best case resolution possible. When plotting SNR vs peak angle error, the final accuracy can generally follow the trend shown in Figure 5-1
Unless the SNR meets or exceeds the value in this plot, the resulting error in angle calculation can create uncertainty which cannot be corrected for through calibration.
To combat limitations of SNR, a few options are available. Firstly, it is possible to use sample averaging to reduce the input noise by a factor of the square root of the number of samples. TMAG5170, TMAG5173-Q1, TMAG5273, and TMAG5170D-Q1 all offer up to 32x averaging which can be used to achieve a dramatic reduction in noise. This comes with the drawback of an increased sample time, which can cause undesirable delay that can limit maximum sample rates.
Another option is to adjust the magnet strength or sensor proximity. Each of these options increases the available magnetic field and improve the SNR of the measurement.
Quantization error occurs as a result of converting the analog Hall-voltage to a digital using an ADC. The number of available bits in the ADC sets a minimum measurement resolution available to the microcontroller. For any given sample the typical maximum error is less than or equal to 1/2 LSB. For demonstration purposes, the angle error using a full scale input into an 8-bit ADC is compared to the angle quantization error of a 12-bit ADC in Figure 5-2 and Figure 5-3.
TMAG5170 has an integrated 12-bit ADC and is able to return averaged results using a 16-bit output word length.
For any magnetic sensing application to determine position of a moving target, is important to consider propagation delay of the sensor. The feedback to the microcontroller can be received by the microcontroller after some time and motion continues uninterrupted in that time. Because of this, the measured angle of the rotating magnet has some fixed phase delay that varies based on the conversion time of the sensor.
When the speed of the motor is known, this information can be used along with the sample rate of the sensor to calculate the change of position of the magnet during the conversion.
TMAG5170, TMAG5173-Q1, TMAG5273, and TMAG5170D-Q1 each allow for a customizable sampling pattern as well as averaging. This creates a variable propagation delay. Complete timing information is located in the data sheet. As an example the expected delay for various averaging modes using the XYX sample pattern are shown in Figure 5-4
A critical step in establishing a quality measurement is to use a deterministic measurement scheme. This can be accomplished using the integrated trigger modes. Triggering the conversion to start at a known time allows for the most accurate association of the output result to the actual magnet position.
As was discussed in Temperature Drift the magnetic field of any magnet is subject to vary with temperature. This can create certain challenges for measurement. TMAG5170, TMAG5173-Q1, TMAG5273, and TMAG5170D-Q1 all offer programmable temperature compensation to allow the sensor to adjust to these changes in the magnetic field strength. Settings of 0.12%/C, 0.2%/c, and 0 are available to help accommodate most magnet configurations.
When considering other magnetic options, is is additionally important to evaluate the impact of other error sources such as magnetic hysteresis and cross-axis sensitivity, which do not significantly affect TMAG5170, TMAG5173-Q1, TMAG5273, or TMAG5170D-Q1. These factors tend to be more common in devices utilizing integrated magnetic concentrators or magneto-resistive sensors such as GMR or TMR.
Magnetic hysteresis is the result of having applied a magnetic field to a ferromagnetic material. Similar to the behavior shown in Figure 2-3, there is some residual magnetization of the concentrator depending on the prior state of the magnetic field from the permanent magnet. As a result, angle measurements depend on the previous position of the magnet, and there are differences to the observed input with a clockwise rotation of the magnet vs a counter clockwise rotation.
Cross-axis sensitivity is the result of some portion of one magnetic field channel being coupled into the measurement for another axis. This produces some underlying non-linearity that is dependent on the state of the other channel. Removing this error from measurement requires a complex calibration routine.