3D Magnetic Sensor for Angle Measurements

Similar documents
Replacement of HITFET devices

Digital encoding requirements for high dynamic range microphones

TLE5014 Programmer. About this document. Application Note

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22.

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22

TVS (transient voltage suppressor) Bi-directional, 18 V (AC), 13 V (DC), 0.3 pf, 0201, RoHS and halogen free compliant

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22

TVS (transient voltage suppressor) Bi-directional, 5.5 V, 0.1 pf, 0201, 0402, RoHS and halogen free compliant

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22.

IPM Motor Drive Simulator User Manual

CIPOS IPM Motor Drive Simulator User Manual

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22

Qualified for Automotive Applications. Product Validation according to AEC-Q100/101

BGA5L1BN6 BGA5L1BN6. 18dB High Gain Low Noise Amplifier for LTE Lowband VCC GND. Features

Application Note, V 1.0, Feb AP C16xx. Timing, Reading the AC Characteristics. Microcontrollers. Never stop thinking.

TLE493D-A2B6. 1 Overview. Low Power 3D Hall Sensor with I2C Interface

The BFP840FESD is a discrete RF heterojunction bipolar transistor (HBT) with an integrated ESD protection suitable for 5 GHz band applications.

TLE4916-1K. Datasheet. Sense & Control. Low Power Automotive Hall Switch. Rev.1.0,

Internally matched general purpose LNA MMIC for 50 MHz- 3.5 GHz applications

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22.

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22.

CDM10V programming user manual describes the COOLDIM_PRG_BOARD burner board usage, the UART protocol handling and the fusing details.

Schottky diode mixer for 5.8 GHz radar sensor

Robust low noise broadband pre-matched RF bipolar transistor

Application note Sensors For Motor Control Feedback Loops

Guidelines for CoolSiC MOSFET gate drive voltage window

For broadband amplifiers up to 1 GHz at collector currents from 1 ma to 20 ma For mixers and oscillators in sub-ghz applications

TLS10xB0MB Demoboard. Preface Z8F Table of contents

TLE4990 TLE4990-E6782

BGA855N6 BGA855N6. Low Noise Amplifier for Lower L-Band GNSS Applications GND. Features

Low Power 3D Hall Sensor with I2C Interface and Wake Up Function

Qualified for industrial applications according to the relevant tests of JEDEC47/20/22.

OPTIREG Linear TLE4263

TLE4976-1K / TLE4976L

Improving PFC efficiency using the CoolSiC Schottky diode 650 V G6

OPTIREG Linear TLE4262

TLV4946K, TLV4946-2K. Datasheet. Sense and Control. Value Optimized Hall Effect Latches for Industrial and Consumer Applications. Rev1.

IRS SOT-23 High-Side Gate Driver IC IRS10752LPBF. Features. Description. Package Options. Applications. Typical Connection Diagram

TLV4946-2L. Datasheet. Sense and Control. Value Optimized Hall Effect Latch for Industrial and Consumer Applications. Rev1.

1 General Description

PCB layout guidelines for MOSFET gate driver

Dynamic thermal behavior of MOSFETs

January 2009 TLE4906K / TLE4906L. High Precision Hall Effect Switch. Data Sheet V 2.0. Sensors

Small Footprint Ultra Low Current Low Noise Amplifier for Global Navigation Satellite Systems (GNSS)

Data Sheet, V 1.1, Oct TLE4906H TLE4906L. High Precision Hall-Effect Switch. Sensors

TLE4941plusC. Product Information. Sense & Control. Advanced Differential Speed Sensor. TLE4941plusC. TLE4941plusCB

EMC output filter recommendations for MA120XX(P)

Applications of 1EDNx550 single-channel lowside EiceDRIVER with truly differential inputs

Smart High-Side Power Switch BTS4140N

Evaluation Board for CoolSiC Easy1B half-bridge modules

Application Information Analysis of a Hall-Effect System With Two Linear Sensor ICs for 30 mm Displacement

MT6803 Magnetic Angle Sensor IC

PROFET ITS716G Ω Ω. Green Product (RoHS compliant) Data Sheet 1 Rev. 1.1,

Rotational Absolute Magnetic Kit Encoder Version 33 LP and HP Displacement Sensor

LITIX Basic+ LED driver family

Thermal behavior of the new high-current PROFET

LOW EMI CURRENT SENSE HIGH SIDE SWITCH

MT6804 Magnetic Rotary Encoder IC

AA746. MagnetoResistive FreePitch Sensor. Data sheet

Series PVT322PbF. Microelectronic Power IC HEXFET Power MOSFET Photovoltaic Relay Dual Pole, Normally Open, 0-250V, 170mA AC/DC

AUTOMOTIVE GRADE. A I DM Pulsed Drain Current -44 P A = 25 C Maximum Power Dissipation 3.8 P C = 25 C Maximum Power Dissipation 110

Inverse Operation Behavior

TLS202A1. Data Sheet. Automotive Power. Adjustable Linear Voltage Post Regulator TLS202A1MBV. Rev. 1.0,

Figure 1: Functional Block Diagram

LOW QUIESCENT CURRENT MOSFET DRIVER

Computer Numeric Control

Automotive IPS. Low side AUIPS1025R INTELLIGENT POWER LOW SIDE SWITCH. Automotive grade

Triple Voltage Regulator TLE 4471

Low Drop Voltage Regulator TLE

Latest fast diode technology tailored to soft switching applications

Figure 1: Functional Block Diagram

EBI7903CAx-DA-IF Incremental Sensor Module

Low Drop Voltage Regulator TLE 4274

Evaluation Board for DC Motor Control with the IFX9201. This board user manual provides a basic introduction to the hardware of the H-Bridge Kit 2Go.

Emitter Controlled 4 High Power Technology IDC73D120T8H

Base Part Number Package Type Standard Pack Orderable Part Number

AA747. MagnetoResistive Angle Sensor. DAtA Sheet

High voltage CoolMOS CE in SOT-223 package

Data Sheet 1 Rev. 1.1, PG-TO

Application Information

Tracking Regulator TLE 4252

Parameter Symbol Min Typ Max Unit Note Strip Length L 300±2 mm Active length = 300mm Strip Width W 10±0.2 mm Active width = 10mm 1,3±0, 15

AUIRF1324S-7P AUTOMOTIVE GRADE

3. Use your unit circle and fill in the exact values of the cosine function for each of the following angles (measured in radians).

MT6801 Magnetic Rotary Encoder IC

5.1 Graphing Sine and Cosine Functions.notebook. Chapter 5: Trigonometric Functions and Graphs

AUTOMOTIVE GRADE. Thermal Resistance Symbol Parameter Typ. Max. Units R JC Junction-to-Case 1.9 R JA Junction-to-Ambient ( PCB Mount) 50 C/W

AP CANmotion. Evaluation Platform with BLDC Motor featuring XC886CM Flash Microcontroller Version 2007/10. Microcontrollers

Application Note V

Application Information Advanced On-chip Linearization in the A1332 Angle Sensor IC

AA745A. MagnetoResistive FreePitch Sensor DATA SHEET

Edition Published by Infineon Technologies AG Munich, Germany 2010 Infineon Technologies AG All Rights Reserved.

Application Note No. 099

Low Drop Voltage Regulator TLE 4276

XC83x AP Application Note. Microcontrollers. intouch Application Kit - Touch Sliders V1.0,

TLS102B0. Features. Potential applications. Product validation. Description. High Precision Voltage Tracker

Type Package Configuration L S (nh) Marking BB814 SOT23 common cathode 1.8 SH1/2*

The sensor can be operated at any frequency between 0 Hz and 1 MHz.

Transcription:

Application Note 3D Magnetic Sensor for Angle Measurements TLE493D-W2B6, TLE493D-A2B6, TLI493D-A2B6 About this document Scope and purpose This application note gives detailed information about how Infineon's 3D magnetic sensor is effectively used in angular applications. Based on the angle measurement results of five TLE493D-W2B6 samples it is shown how the angle accuracy is affected by various aspects such as magnet strength, temperature or timing and how the application can be designed for the best performance. Intended audience Everybody interested or working with Infineon's 3D magnetic sensor. Application Note Please read the Important Notice and Warnings at the end of this document 1.1 www.infineon.com

Table of contents Table of contents About this document................................................................... 1 Table of contents....................................................................... 2 1 Angle applications with a 3D magnetic sensor............................................3 1.1 End of shaft rotation..................................................................... 3 1.2 Measuring principle......................................................................4 1.3 Angle measurements in this application note...............................................5 2 Angle accuracy without calibration...................................................... 6 2.1 Raw data measurement.................................................................. 6 2.2 Basic angle accuracy..................................................................... 6 2.3 Dependency on the applied magnetic field.................................................8 2.4 Dependency on temperature............................................................. 9 2.5 Consolidated non-calibrated angle accuracy.............................................. 10 3 Angle accuracy with calibration........................................................ 11 3.1 Compensation procedure............................................................... 11 3.2 Determination of calibration parameters................................................. 12 3.3 Calibration options..................................................................... 13 3.4 Angle accuracy results.................................................................. 14 4 Improved angle accuracy at low magnetic fields........................................ 16 5 Timing analysis........................................................................18 5.1 Configuration example..................................................................18 5.2 Absolute time delay.................................................................... 19 5.3 Sample time error...................................................................... 21 6 Conclusion............................................................................ 23 7 Related documents.................................................................... 24 Revision history....................................................................... 25 Disclaimer............................................................................ 26 Application Note 2 1.1

Angle applications with a 3D magnetic sensor 1 Angle applications with a 3D magnetic sensor Infineon s 3D magnetic sensors measures the magnetic field in three dimensions: X, Y and Z. In combination with a magnet the sensor can be used for position sensing in a variety of applications. Any two out of three sensing directions can be used to calculate the angle of a magnetic field. The angle calculation is the basis for many applications and may include: End of shaft rotation (e.g. human machine interfaces such es rotation knobs) Out of shaft rotation (e.g. rotor position) Joystick (parallel calculation of two angles, e.g. top column module) Linear movement in slide by configuration (e.g. valve position detection) This application note focuses on the classic angular application, the end of shaft rotation. Nevertheless, the given information may be helpful for any angular based application. Also visit the Infineon web page for further dedicated application notes. N S X Y N S S N Z Figure 1 3D magnetic sensor 1.1 End of shaft rotation Figure 2 shows two possible configurations for an end of shaft angle measurement. On the left hand side, the XY channel pair is used to determine the rotation angle of the magnet. This is the conventional setup as it is used with many angle sensors. The 3D magnetic sensor further enables the use of other channel pairs. The right hand side of Figure 2 shows an angle measurement setup with the YZ channel pair. Similarly, the XZ channel pair can be used. This additional degree of freedom allows the system designer to place the sensor to an alternative location and therefore may reduce the system size or cost. Application Note 3 1.1

Angle applications with a 3D magnetic sensor XY YZ Figure 2 3D magnetic sensor in end of shaft configurations 1.2 Measuring principle This section gives a short overview about architecture of Infineon's 3D magnetic sensors in order to utilize them efficiently. The 3D magnetic sensors measures the magnetic field with two vertical and one horizontal Hall plate as it is shown in Figure 3. All Hall plates are evaluated sequentially and converted into a digital value with a single ADC. The results are stored in registers and can be read out via the digital interface. It is the task of the microcontroller to calculate the absolute angle with the arctan function, out of the measured magnetic field values. Also any further compensation is done by the controller. L O G I C IBias Z Reg.-Map X- Hall IBias XY M U X A D C SDA SCL /INT Temperature Figure 3 Sensing principle based on the TLE493D-W2B6 The X and Y vertical Hall plates are designed to achieve a very high level of matching accuracy. This is especially beneficial for angle measurements as they are sensitive to a relative error between both channels. Additionally, X and Y have the same temperature drift characteristics. This makes the 3D magnetic sensor a very capable sensor for angular measurements in XY direction within the full specified temperature range. In contrary to X and Y, the Z channel is built as a traditional horizontal Hall plate. The difference in technology reduces the matching between X to Z and Y to Z. From performance point of view it is preferred to use the XY channel pair. The XZ and YZ channel pairs extend the possible uses of the sensor. The approach with one ADC further improves the matching accuracy between all channels, but introduces a delay between the magnetic measurements. This delay may lead to an angle error in fast rotating systems and is further analyzed in the chapter Sample time error. Application Note 4 1.1

Angle applications with a 3D magnetic sensor 1.3 Angle measurements in this application note The data shown in this application note demonstrates the accuracy that can be achieved with Infineon's 3D magnetic sensor. The sensors are measured in an angular test bench in which the sensors are rotated in a mostly homogenous field. In this way the error contributed by a real magnet and displacement tolerances are minimized. For an angle application with a magnet these system influences need to be considered as well. The reference angle used for the error calculation is measured with a high accuracy rotary encoder. The sensor is configured to full range mode for measurements with B > 100mT and to short range mode with B <= 100mT. All presented measurements were performed with the 3D magnetic sensor TLE493D-W2B6 A0. However, the results are evenly valid for following products: TLE493D-W2B6 A1 TLE493D-W2B6 A2 TLE493D-W2B6 A3 TLE493D-A2B6 TLI493D-A2B6 Application Note 5 1.1

Angle accuracy without calibration 2 Angle accuracy without calibration This chapter provides information about the angle accuracy that could be achieved without any calibration of the sensor. It is shown how the accuracy is influenced by the chosen channel pair, the applied magnetic field and temperature. 2.1 Raw data measurement The 3D magnetic sensor measures the magnetic field in the three dimensions X, Y, and Z. Figure 4 shows the sensor output for an angular measurement with the XY and YZ channel plotted over the reference angle. Ideally, the used magnetic components have a sinusoidal waveform with 90 phase shift, while the third component is zero. A microcontroller reads out the magnetic field data and performs further calculation. Figure 4 Raw data measurement for B=160mT and T=25 C 2.2 Basic angle accuracy The basic angle accuracy of five sensors is presented for an applied magnetic field of B=160mT and at room temperature T=25 C. Depending on the used channel pair of the sensor, the magnetic angle α is calculated with one of the following equations: α XY = arctan By Bx α YZ = arctan Bz By α XZ = arctan Bz Bx Equation 1 If available, the software function arctan2() can be used to resolve 360. Application Note 6 1.1

Angle accuracy without calibration To determine the angle error Δα the encoder reference angle Δα ref is subtracted from the calculated angle α: Δα = α α ref Equation 2 Figure 5 shows the measured angle error of five samples for one clockwise and one anti-clockwise rotation. Figure 5 Non-calibrated angle error waveforms for B=160mT and T=25 C In case the XY channel pair is used, all five sensors achieve an angle error below 0.5 degree over the full rotation. The accuracy for the YZ channel pair is a little less and varies more between the samples. This is due to a reduced matching accuracy between Y and Z as described in the chapter Measuring principle. The X/Y to Z matching is factory trimmed in rough steps, resulting in sample to sample spread. In this case the result is better for the sensors 2, 3 and 4 than for the sensors 1 and 5. In the next chapter it is explained how the accuracy is improved by an external calibration. Nevertheless, the non-calibrated angle accuracy in YZ direction is still below 1.6 degree for all samples. The XZ channel pair is not shown here, but the accuracy is similar to YZ. Table 1 summarizes the results of each waveform by only extracting the maximum absolute angle error over the full revolution. Table 1 Maximum non-calibrated angle error for B=160mT and T=25 C for five samples Sample Worst case #1 #2 #3 #4 #5 XY 0.17 0.46 0.32 0.45 0.19 0.46 YZ 1.51 0.49 0.29 0.24 1.18 1.51 Application Note 7 1.1

Angle accuracy without calibration 2.3 Dependency on the applied magnetic field The correlation between angle accuracy and applied magnetic field is investigated. This information should help to select the right magnet for a target application. Measurements are executed for four different magnetic fields: B=10mT, 30mT 70mT and 160mT. For each measurement the maximum angle error of the rotation is extracted and plotted in Figure 6. The numerical results can be found in Table 2. Note: B=160mT is measured in full range mode, while B=10mT, B=30mT and B=70mT are measured in short range mode for higher resolution..non-calibrated angle error vs. applied magnetic field for 5 samples at T=25 C Figure 6 Table 2 Non-calibrated angle error vs. applied magnetic field for 5 samples at T=25 C Magnetic field B [mt] Sample #1 #2 #3 #4 #5 Worst case XY 10 1.00 1.60 1.17 1.40 1.33 1.60 30 0.32 0.74 0.51 0.74 0.59 0.74 70 0.22 0.61 0.34 0.54 0.31 0.61 160 0.17 0.46 0.32 0.45 0.19 0.46 YZ 10 2.84 2.07 2.03 1.63 2.32 2.84 30 1.75 0.81 0.91 0.71 0.45 1.75 70 1.61 0.55 0.47 0.33 0.24 1.61 160 1.51 0.49 0.29 0.24 0.18 1.51 Application Note 8 1.1

Angle accuracy without calibration From the measurement data it can be seen that accuracy of all senors generally benefit from a higher magnetic field. The best results can be achieved with the maximum magnetic field within the linear range of B=160mT. Another major benefit of high magnetic fields is the reduced influence of external stray fields. For example, the stray field robustness with a magnetic field of B=160mT is four times larger than with B=40mT. Still, the wide linear range of the senor also allows it to be used in applications that require a much smaller magnetic field. The main difference in accuracy comes from quantization, offset error and noise. While a very low magnetic field is not recommended for high accuracy applications, it is still possible to achieve good results by averaging the magnetic readouts, as described in the section Improved angle accuracy at low magnetic fields. 2.4 Dependency on temperature The application usually requires the sensor to be operated in a certain temperature range. The influence of a temperature drift is presented below. Figure 7 shows the maximum absolute angle error of five TLE493D-W2B6 samples for four temperatures between -40 C and 125 C. The numerical values are also summarized in Table 3. The measurements are again performed without calibration. Figure 7 Table 3 Non-calibrated angle error vs. temperature for 5 samples at B=160mT Non-calibrated angle error vs. temperature for 5 samples at B=160mT Temperatur e T [ C] Sample #1 #2 #3 #4 #5 Worst case XY -40 0.15 0.41 0.43 0.53 0.37 0.53 25 0.17 0.46 0.32 0.45 0.19 0.46 85 0.24 0.36 0.22 0.34 0.21 0.36 125 0.25 0.36 0.26 0.34 0.25 0.36 Application Note 9 1.1

Angle accuracy without calibration Table 3 Non-calibrated angle error vs. temperature for 5 samples at B=160mT (continued) Temperatur e T [ C] Sample #1 #2 #3 #4 #5 YZ -40 1.78 0.72 0.75 0.38 1.66 1.78 25 1.51 0.49 0.29 0.24 1.18 1.51 85 1.86 0.61 0.83 0.46 1.69 1.86 125 0.52 1.83 1.26 1.48 0.44 1.83 Worst case The XY angle accuracy is only slightly affected by the temperature. The maximum absolute angle error is below 0.6 for all five samples over the full temperature range. The YZ angle accuracy shows a larger temperature drift, especially at high temperatures. This is due to the different temperature behavior of the vertical and horizontal Hall plate. Refer also to the chapter Measuring principle. Still, the example shows that the five sensors achieve an angle accuracy below 2 over the full temperature range. The XZ channel pair is comparable to YZ. 2.5 Consolidated non-calibrated angle accuracy This chapter gives a summary for all non-calibrated angular measurements. Figure 8 shows the worst case angle error of five senors in XY and YZ direction for each measurement condition. The diagram gives a overview of the angle accuracy which can be expected for different magnetic fields over the full temperature range. Figure 8 Non-calibrated max. angle error (worst case values of 5 samples) Application Note 10 1.1

Angle accuracy with calibration 3 Angle accuracy with calibration The angle accuracy of the sensor can be improved by calibration. This chapter first describes how the sensor measurements are compensated correctly. Then it is shown how the necessary calibration parameters can be derived. Finally, different calibration options are compared and the angle measurement results of five TLE493D- W2B6 samples presented. 3.1 Compensation procedure In this section, the compensation process of raw measurement data is described. As an example the XY channel pair is used for the angle application. The compensation can be done likewise for any other channel pair. For a 3D magnetic sensor the following parameters should be corrected by compensation: Offset (O X, O Y ) Amplitude (A X, A Y ) How to derive these parameters is described in the next section. The figure below illustrates the full compensation process. Calibration algorithm OX OY AX AY Bx - Bx1 / Bx2 Arctan α By - By1 / By2 Offset compensation Amplitude compensation Angle calculation Figure 9 Angle calculation with compensated measurement data Step 1: Compensate offset First, the measured data is compensated by subtracting an offset value. Bx 1 = Bx O X By 1 = By O Y Equation 3 Application Note 11 1.1

Angle accuracy with calibration Step 2: Normalize amplitude The resulting values of step 1 are further normalized to the same amplitude. Bx 2 = Bx 1 A X By 2 = By 1 A Y Equation 4 Step 3: Final compensated angle After correcting the offset and amplitude mismatch, the resulting angle can be calculated using the arctan function. If available, the software function arctan2() can be used to resolve 360. α compensated = arctan By 2 Bx 2 Equation 5 3.2 Determination of calibration parameters A simple way to calculate the calibration parameters used for the compensation is the Min-Max method. The Min-Max method does not require a reference angle and needs low computational effort. Hence, it is well suited for an end of line or ongoing calibration as described in the next chapter. As the calculation only uses the minimum and maximum magnetic field values of a rotation, it is sensitive to noise. For a higher accuracy of the calibration parameter it is beneficial to introduce filtering or repeat the process several times. For the maximum performance there are alternative calibration methods possible. For more information refer to the "TLE5xxx(D) Calibration 360 " application note [3]. The same procedures could be applied for the 3D magnetic sensor. Step 1: Magnetic field measurement Continuously measure the Bx and By magnetic field values and perform at least one full rotation of the magnet. Store the maximum and minimum magnetic field measurements of the revolution. Depending on the sample rate it is necessary to rotate the system in a moderate speed to get the peak values. Bx min Bx max By min By max Step 2: Calculate the calibration parameter The measured extreme values are used to calculate the calibration parameters for the offset and amplitude with following equations: O X = Bx max + Bx min 2 O Y = By max + By min 2 Equation 6 Application Note 12 1.1

Angle accuracy with calibration A X = Bx max Bx min 2 A Y = By max By min 2 Equation 7 The calibration parameters are then applied to compensate the measurements like it is described in the section Compensation procedure. 3.3 Calibration options There are different calibration schemes possible. The single calibration describes the process when the calibration parameters are calibrated one time only. This is usually done at the end of production line. The determined calibration parameters are then used in the application and do not change with the temperature. Single calibration has the advantage of a relative low effort, but does not compensate temperature drifts. For a full calibration, the calibration process is repeated for several temperatures at the end of production line. The calibration parameters as a function of temperature are stored in a look up table in the microcontroller. During operation, the internal temperature sensor of the 3D magnetic sensor can be used to measure the temperature and recall the corresponding calibration parameter. The values between two temperatures can be interpolated. Note that the temperature steps at the calibration should not be too large, because the calibration parameters as function of temperature might be non-linear. The full calibration yields a high accuracy, but has the disadvantage of a significant higher effort as each sensor must be measured at several temperature points. Another possibility is the ongoing calibration. Here the microcontroller continuously performs the Min-Max calibration in the application. This method requires full turn revolutions at the same temperature to get the calibration parameter. An ongoing calibration can achieve a high accuracy without the need of extensive end of line calibration. However it is not possible in all applications and requires additional microcontroller processing time. Table 4 Comparison of different calibration methods, which are used in this application note Non-calibrated The reference angle is corrected to zero degree Single Calibration The reference angle is corrected to zero degree The calibration parameters offset and amplitude error are measured at 25 C only All measurements are offset and amplitude compensated with the calculated calibration parameters at 25 C Full calibration The reference angle is corrected to zero degree The calibration paramters offset and amplitude error are determined for all temperatures (either end of line or by ongoing calibration) All measurements are offset and amplitude compensated with the temperature specific calibration parameters Application Note 13 1.1

Angle accuracy with calibration 3.4 Angle accuracy results This chapter shows the achievable angle accuracy with an amplitude and offset compensation. All results are based on measurement results of five TLE493D-W2B6 samples. The left side of Figure 10 shows the angle accuracy of the sensors in YZ direction without any calibration. Especially the blue and purple curve show the effect of an amplitude mismatch. By performing a amplitude and offset calibration, the angle error is significantly reduced for all samples as shown on the right hand side. Figure 10 Non-calibrated vs calibrated angle error waveforms for 5 samples, YZ, B=160mT and T=25 C In Figure 11 the described single and full calibration methods are compared to the non-calibrated angle error. The calibration has little influence to XY angle accuracy. Even the non-calibrated samples achieve an angle accuracy of below 0.6 degree over the full temperature range. In YZ the angle accuracy can be significantly improved with calibration. A single calibration yields low angle errors at the calibrated temperature. The error then increases with a temperature change. Especially for a limited temperature range the accuracy can be improved with this method. With the five samples it is possible to achieve an angle accuracy of below 1 degree if the temperature is limited to max. 85 C. The full or ongoing calibration enables a low angle error over the full temperature range. The XZ channel pair is not shown here, but the results will be comparable to YZ. Application Note 14 1.1

Angle accuracy with calibration Figure 11 Max. angle error for different calibration options vs. temperature for 5 samples at B=160mT Application Note 15 1.1

Improved angle accuracy at low magnetic fields 4 Improved angle accuracy at low magnetic fields The Hall based 3D magnetic sensor performs best at high magnetic fields. Additionally, any impact of magnetic stray fields is reduced with a higher magnetic field. Nevertheless, it is still possible to improve the accuracy of angle measurements at a low field which is demonstrated in this chapter. As an example, Figure 12 shows angle error waveforms with the YZ channel pair for four different measurements at B=10mT. Figure 12 Angle accuracy at B=10mT (YZ) In first plot the angle error is measured in "full range mode" without any calibration. As a result the angle error is mainly influenced by quantization noise and the maximum angle error is about 2 degree. In the second plot the sensor is reconfigured to "short range mode". The short range mode limits the maximum measurable magnetic field, but effectively doubles the sensitivity of the sensor. Therefore the quantization noise is reduced. Note that the short range mode slightly increases the measurement time. In the third plot averaging is introduced. Each point is measured twenty times and the angle is calculated based on the average magnetic field values. Averaging significantly increases the measurement time but improves the Application Note 16 1.1

Improved angle accuracy at low magnetic fields accuracy. Hence, it is recommend to use averaging for slow moving applications as for example human machine interfaces. In the fourth plot the averaged data is offset and amplitude calibrated. Note that at low magnetic fields also a small offset error can cause a significant angle error. With the calibration, the angle accuracy is further improved and in this example an angle error below 0.5 degree is reached. As a summary the following measures should be considered in case a weak magnet has to be used in the application: The sensor should be configured to short range mode, if the maximum magnetic field is within the specified range The sensor output should be averaged If possible, the sensor should be calibrated Still it is not recommended to use very low magnetic fields, such as the 10mT shown in this example. For further information also refer to the chapter Dependency on the applied magnetic field. Application Note 17 1.1

Timing analysis 5 Timing analysis The 3D magnetic sensor sequentially measures the magnetic field in three dimensions and transfers the raw data to a microcontroller. In this chapter it is shown how this timing can be calculated and how it affects the angle measurement of a rotating system. 5.1 Configuration example Based on the requirements of an application it is possible to configure the 3D magnetic sensor in various ways. For this analysis an example application is assumed that requires a XY angle measurement at a defined point in time. Table 5 shows a possible sensor configuration that can be used. By choosing the master controlled mode the microcontroller is able to trigger the measurement when it is necessary. One option to start the measurement is to transmit an empty write frame with the corresponding trigger bits. The clock stretching feature allows to already start the data readout while the measurement is ongoing without the risk of data corruption. Disabling the temperature and Z-channel measurement are means to reduce the conversion time. For detailed information about the sensor options refer to the corresponding user manual [2]. Note that different sensor configurations enable other design goals, e.g. a high update rate or the measurement with a different channel pair. Table 5 Example configuration for a XY angle measurement Power mode Master controlled mode I2C protocol 1-byte read protocol Further settings Active clock stretching, deactivated /INT signal Full range sensitivity Disabled temperature measurement X/Y angular measurement Figure 13 shows the timing of one measurement trigger and readout with the selected configuration. The sensor is triggered with an I2C write frame and the measurement starts directly after the I2C stop condition. The microcontroller then initiates a read command to the same sensor. After transmitting the address byte, the sensors pulls the I2C clock pin to low for as long as the measurement is ongoing (clock stretching). Once the ADC is finished, the clock line is released and the data is read out. Application Note 18 1.1

Timing analysis CPU ATAN αnew trigger command read command receive finsished I2C addr, W trig. addr, R clock stretching data 0 data 1 data 2 data 3 data4 data 5 diag trigger SCL release ADC Bx By time tnew_trigger tsample_bx tsample_by tnew_data tsample_α ti2c_trigger trdn trdn ti2c_readout tadc_startup Figure 13 TLE493D-W2B6 timing example The following times are defined in the diagram: t new_trigger : t new_data : t sample_bx/by t sample_α : t RDn : t ADC_startup : t I2C_trigger : t I2C_readout : Point in time when the microcontroller starts a new trigger command. Point in time when the microcontroller finishes the readout of new sensor data. Equivalent sample time of the magnetic measurement. Equivalent sample time of the angular measurement. It is right between the sampling times of the used magnetic channel pair. Conversion time of one magnetic measurement. The exact timing depends if full or short range mode is used and is defined in the product datasheet [1]. Startup time of the ADC in the master controlled mode (typ. 7μs). Time interval between beginning of the trigger command and start of the ADC conversion. Time interval between end of the ADC conversion and finished I2C data transfer. 5.2 Absolute time delay In this section the absolute time delay for the given example configuration is evaluated. The time delay depends on a reference time at which the angle data is needed. Two different time delays and their effect on a rotating system are analyzed. Time delay between the measurement trigger t new_trigger and angle sample time t sample_α The delay for the given example configuration can be calculated with the following equation: Application Note 19 1.1

Timing analysis t sample_α t new_trigger = t I2C_trigger + t ADC_startup + t RDn where t I2C_trigger = n bits_trigger f I2C Equation 8 The trigger consists of the start condition, one address byte, one data byte (á 8 data and 1 acknowledge bits) and the stop condition. The number of transmitted bits until the measurement starts is therefore given by n bits_trigger = 1 + 2 8 + 1 + 1 = 20. For an I2C speed of f I2C = 1 MHz and full range setting the total delay (typ.) is calculated as follows: t sample_α t new_trigger = 20 + 7µs + 43µs = 70 µs 1 MHz Equation 9 Time delay between the angle sample time t sample_α and finished I2C data readout t new_data The delay for the given example configuration can be calculated with the following equation: t new_data t sample_α = t RDn + t I2C_readout where t I2C_readout = n bits_readout f I2C Equation 10 The data read out once the ADC has finished consists of 7 data bytes (á 8 data and 1 acknowledge bits) and the stop condition. This equals to a total number of bits of: n bits_readout = 7 8 + 1 + 1 = 64. For an I2C speed of f I2C = 1 MHz and full range setting the total delay (typ.) is calculated as follows: t new_data t sample_α = 43 µs + 64 1 MHz = 107µs Equation 11 In case the diagnosis information is not required by the application, the read frame can be ended after data4 to reduce the delay of the data readout. Furthermore, if 8 bit resolution suffice for the application, the read frame can be ended after data1, thus further reducing the total delay (typ.) to 62 us. Angle error due to absolute time delay in a rotating system The angle error Δα delay caused by a time delay t delay in a rotating system with constant speed can be calculated with following equation: Δα delay = t delay f rotation 360 Equation 12 Table 6 lists the resulting angle errors for the previously calculated delay times for several rotation speeds. Application Note 20 1.1

Timing analysis Table 6 Example angle error due to absolute time delay in XY direction (f_i2c = 1MHz) Rotation per minute [RPM] Rotation frequency [1/s] Angle error by delay (typ.) Trigger to sample time (70 μs) Sample time to finished data readout (107 μs) 10 0.17 0.00 0.01 100 1.67 0.04 0.06 1000 16.67 0.42 0.64 10000 83.33 4.20 6.42 The angle error is constant for the full rotation. It can be compensated in case the rotation speed information is known. 5.3 Sample time error Besides the absolute time delay, the sample time error needs to be considered in fast moving angle applications. The sequential magnetic field measurement of X, Y and Z result in a slight timing mismatch of the individual components. In Figure 13 the timing of an example measurement is shown. The sample time of a magnetic measurement can be assumed in the middle of an ADC conversion and the sample time of the angle calculation is right between the two used magnetic components. The conversion time of the ADC can be found in the datasheet [1]. In full range mode the conversion time is called t RDn and in short range mode t RDn_SR. In a rotating system these sample time errors lead to an angle error which can be derived as follows: Assuming an ideal rotating field in the XY plane, the magnetic field values for Bx and By can be calculated with the sine and cosine function: Bx ideal t By ideal t = B sin 2π f rotation t = B cos 2π f rotation t Equation 13 Including the sample time error into the magnetic field equations results in the measured Bx and By values: Bx measured t By measured t = B sin 2π f rotation t t RDn 2 = B cos 2π f rotation t + t RDn 2 Equation 14 The angle error caused by sample time mismatch can be calculated by subtracting the ideal from the measured magnetic angle: Δα sample_time_mismatch = α measured α ideal Δα sample_time_mismatch = arctan By measured Bx measured arctan By ideal Bx ideal Equation 15 Application Note 21 1.1

Timing analysis By inserting Equation 13 and Equation 14 into Equation 15, the angle error of a rotating system can be determined. As an example the angle error is plotted over the reference angle for a rotating system with constant 1000 and 5000 RPM in Figure 14. Figure 14 Typical sample time error of a TLE493D-W2B6 in XY or YZ direction (full range mode) In contrast to the time delay, the angle error caused by the sample time mismatch is not fixed, but changes within one rotation. The maximum angle error within a full rotation can be calculated with a simplified equation (valid for XY and YZ): max Δα sample_time_mismatch = 1 2 t RDn f rotation 360 Equation 16 Note: Due to the conversion sequence X-Y-Z it is recommended to use XY or YZ for the angle calculation. The XZ channel pair has twice the delay between the magnetic component measurement and therefore twice the sample time error as in the given equation. Finally, the following table gives an overview of the maximum sample time over a full rotation error for different maximal rotation speeds: Table 7 Max. angle error within one rotation due to sample time mismatch (full range mode) Rotation per minute [RPM] Rotation frequency [1/s] Max. angle error due to sample time mismatch (typ.) XY or YZ channel pair 10 0.17 0.00 0.00 100 1.67 0.01 0.03 1000 16.67 0.13 0.26 10000 83.33 1.29 2.58 XZ channel pair The values show that the sample time error is only significant for very fast moving applications. For many target applications of the 3D magnetic sensor, e.g. human machine interfaces, this effect can be neglected. Application Note 22 1.1

Conclusion 6 Conclusion General key aspects when designing an angular application: Infineon's 3D magnetic sensor is suitable for angle measurements in a variety of applications, for example human machine interfaces such as joysticks or rotation knobs. The sensor provides magnetic field measurements. The angle has to be calculated by the microcontroller. Any two out of the three channels of a 3D magnetic sensor (XY, XZ, YZ) can be used to measure an angle, providing flexibility in designs. The XY channel pair provides a higher angle accuracy than XZ and YZ. The angle accuracy as well as the stray field robustness generally benefits from a higher magnetic field. With the Hall technology of the referenced sensors it is possible to use magnetic fields up to B=160mT. The Infineon online simulation tool can be used to design a magnet with a desired magnetic field [4]. Short range mode and averaging are measures to improve the angle accuracy at low magnetic fields. In fast rotating systems, angle errors originating from delay and from sample time mismatch have to be considered. Angle accuracy results in a homogenous magnetic field based on five samples: Measurements in XY show an angle accuracy below 0.6 degree over the full temperature range without calibration at B=160mT. Measurements in YZ (XZ) show an angle accuracy below 2.0 degree over the full temperature range without calibration at B=160mT. Calibration has only minor benefits on the sensors XY angle accuracy. It may be beneficial to compensate positioning tolerances with a real magnet. For XZ and YZ a calibration is recommended for an increased angle accuracy. A single point end of line calibration yields high angle accuracies at a limited temperature range. The best results can be achieved with a full or ongoing calibration. The measurement results are valid for the TLE493D-W2B6, TLE493D-A2B6 and TLI493D-A2B6. Table 8 Measured max. angle error, worst case values of five TLE493D-W2B6 samples B [mt] Non-calibrated Single calibration T = -40 C T = 25 C T = 85 C T = 125 C T = -40 C T = 25 C T = 85 C T = 125 C XY 30 0.73 0.74 0.88 1.00 0.69 0.74 0.90 0.99 70 0.57 0.61 0.57 0.55 0.53 0.61 0.59 0.57 160 0.53 0.46 0.36 0.36 0.47 0.46 0.39 0.41 YZ (XZ similar) 30 1.95 1.75 2.22 2.32 0.92 0.97 1.43 2.34 70 1.90 1.61 2.00 2.03 0.75 0.38 0.88 1.79 160 1.78 1.51 1.86 1.83 0.71 0.30 0.82 1.68 Application Note 23 1.1

Related documents 7 Related documents [1] TLE493D-W2B6 datasheet [2] TLE493D-W2B6 user manual [3] TLE5xxx(D) Calibration 360 application note [4] 3D magnetic sensor simulation tool https://design.infineon.com/3dsim/#/ Application Note 24 1.1

Revision history Revision history Document version Date of release 1.1 2018-09-11 Full rework Description of changes 1.0 2016-06 Initial creation Application Note 25 1.1

Trademarks All referenced product or service names and trademarks are the property of their respective owners. Edition Published by Infineon Technologies AG 81726 Munich, Germany 2018 Infineon Technologies AG All Rights Reserved. Do you have a question about any aspect of this document? Email: erratum@infineon.com Document reference IFX-rjd1529918995597 IMPORTANT NOTICE The information given in this document shall in no event be regarded as a guarantee of conditions or characteristics ( Beschaffenheitsgarantie ). With respect to any examples, hints or any typical values stated herein and/or any information regarding the application of the product, Infineon Technologies hereby disclaims any and all warranties and liabilities of any kind, including without limitation warranties of non-infringement of intellectual property rights of any third party. In addition, any information given in this document is subject to customer s compliance with its obligations stated in this document and any applicable legal requirements, norms and standards concerning customer s products and any use of the product of Infineon Technologies in customer s applications. The data contained in this document is exclusively intended for technically trained staff. It is the responsibility of customer s technical departments to evaluate the suitability of the product for the intended application and the completeness of the product information given in this document with respect to such application. WARNINGS Due to technical requirements products may contain dangerous substances. For information on the types in question please contact your nearest Infineon Technologies office. Except as otherwise explicitly approved by Infineon Technologies in a written document signed by authorized representatives of Infineon Technologies, Infineon Technologies products may not be used in any applications where a failure of the product or any consequences of the use thereof can reasonably be expected to result in personal injury