ALPSALPINE HGARPS011A Analog Linear Output Type Magnetic Sensor User Guide
- June 26, 2024
- ALPSALPINE
Table of Contents
Magnetic Sensor (HGARPS011A)
Design Guide
Magnetic Sensor
Analog linear output type
HGARPS011A Analog Linear Output Type Magnetic Sensor
©2024 Alps Alpine Co., Ltd.
All rights reserved.
Document No: 830N0056-O
Apr. 2024 Rev1.0
Analog Linear Output Type Magnetic Sensor HGARPS011A
Alps Alpine high-precision magnetic sensors use Giant Magneto Resistive effect
(GMR) for horizontal magnetic fields detection. Utilizing the GMR element for
its high output and exceptional resistance to high temperatures and magnetic
fields, our sensors achieve high output level and sensitivity compared to
other GMR sensors; approximately 100 times higher than Hall element and 10
times higher than AMR element based on our research.
We offer various magnetic sensors for dedicated usage such as non-contact
switch applications, linear position detection and angle detection as well as
rotational speed and direction sensing in response to external magnetic
fields.
This document provides essential information for understanding and
implementing Analog Linear Output Type Magnetic Sensor (herein after magnetic
angle sensor) in your design. Please note that HGARPS011A is Magnetic Angle
sensor built-in amplifier.
Overview
This product is a magnetic sensor based on highly sensitive and accurate GMR magnetic detection element. It is widely used as a horizontal magnetic field detection sensor in automobiles, industrial equipment, home appliances, games, portable devices, and other fields. It can detect linear position, angle, rotation speed and direction based on external magnetic field, and is especially suitable for the field of rotation angle detection.
Application example
◼ Energy industry
Motor Rotation Detection
Robot joint and arm angle detection
Movement detection during linear stroke
◼ Game, VR-AR
Joystick angle
Paddle position
◼ Medical
Angle detection for nursing bed
Motor rotation detection for infusion pump
◼ Automotive
Motor rotation detection (EPS, EV main power motor, oil pump)
Angle detection for pedal lever (steering wheel, pedal, valve)
Feature
◼ The sensor device that detects the rotation angle of a magnet by GMR
magnetic technology.
◼ Compared with Hall, AMR, and TMR sensors, it has higher waveform stability
and high precision with an error of less than 0.05 degrees after compensation.
◼ Detects only the horizontal magnetic field angle and not affected by changes
in the magnetic field strength.
◼ 2-phase signals for sin and cos can be output regardless of the
magnetization interval.
◼ Allows front-to-back and side-to-side configuration of the magnet.
◼ Highly robust to magnet and sensor gap changes.
◼ External amplifier is not necessary thanks to built-in amplifier.
In the case of a 2-pole magnet
Fig.1 Output signal of magnetic angle sensor
Angle calculation for magnetic angle sensor
The process
The magnetic angle sensor (HGARPS011A) has four MR sensor bridges in the
package and the four sensor bridges output two phase signals with a phase
difference of 90 degrees.
① The magnetic angle sensor output four analog signal such as +sin, -sin, +cos
and -cos.
② Obtain the value for sin and cos by calculating the difference between +sin
and -sin also +cos and -cos. Depend on necessity amplify (or attenuate) the
signal level.
③ Angle can be obtained by calculation using the value sin and cos. Absolute
angle range: 0 to 360deg
Fig.2 Angle calculation flow
Structure examples for angle calculation system (reference only)
(ⅰ) Configuration to generate sin and cos signals after A/D conversion of
sensor output signals
(ⅱ) Configuration for A/D conversion after generating analog sin and cos signals
(ⅲ) Configuration in which the sensor output signal is converted to A/D by the ADC and then sin and cos signals are generated
Fig.3 Examples for system structure
Sensor layout to the magnet
2-pole magnet (column type or ring type) is recommended as Fig. 4.
Fig.4 shape of magnet
Some variations of layout are available between the sensor and the magnet (Fig. 5).
Fig.5 Layout of magnetic angle sensor
Design example
This section describes an example of a working design for a magnet perpendicular to a magnetic angle sensor when the following types of magnets are used.
Condition
Magnet type: Ferrite 2-pole ring shaped magnet
Magnet size: 10mm in diameter
Sensor layout: Shaft end of magnet
Magnet field strength: 50mT
⚫ Target of magnet field strength
Adjust the layout of the magnet and the magnetic angle sensor to ensure that
the magnetic field strength ranges from 10mT to 120mT. As shown in Fig.7, the
output voltage will almost saturate when the magnetic field strength is about
10mT or more, while it will stabilize at 100% output at 20mT or more. However,
if the magnetic field strength exceeds 120mT, waveform distortion may result
and too strong a magnetic field may damage the sensor.
Fig.6 Sensor output character (@VDD 5V)
Circuit design
Fig.7 shows reference circuit for magnetic angle sensor.
Fig.7 Reference circuit for magnetic angle sensor
Parameters
Supply voltage VDD=3.3V
Bypass Capacitor (VDD) CDD=0.1uF
Bypass Capacitor (Output) CL=1nF
Add suitable capacitor CL in your design. It is recommended that you set the capacity of CL to 10nF or less. Since adding capacitance to the sensor output may cause oscillation or waveform distortion. Be sure to decide the value of CL in the actual design.
Angle calculation method
Generally following 2 types of method are available for angle calculation.
◆ Calculation method
◆ Table transform method
Obtaining accurate angle with magnetic angle sensor requires eliminating error factors that affect the results. These error factors include variations in the characteristics of the sensor, asymmetry in the polarity of the magnet’s N and S poles, and tolerance of position between the sensor and the magnet. Althoug it is very difficult to completely eliminate these factors in a realistic environment, the accuracy of angle detection can be improved by a simple compensation process.
In the calculation method, different level of compensation calculations can be selected depending on the user’s desired accuracy. We provide an evaluation kit that allows you to try the compensation calculation of level 1 (Refer to the evaluation kit manual (HGARPS011A)).
The calculation method provides 3 levels of compensation. Following is the processing of compensation.
Fig.8 Compensation flow at desired level
In addition to the calculation method, compensation can be possible by creating a compensation table (Look Up Table). By obtaining an angular error profile beyond the 360-degree range and performing a pre-calculation of the angle by an arbitrary compensation process. The result of the calculation is made into a compensation table, which is written to an EPROM. The result of the angle calculation can be obtained directly at each calculation without performing angle calculation.
Description of the angle calculation
The angle can be calculated by following the different compensation levels step by step.
Compensation procedure for the calculation method
Compensation level can be selected depend on necessity. The next section
describes the method of angle calculation using the arithmetic method.
Compensation level 0
Step 1. AD conversion for sin and cos differential signal
Obtain AD converted V(sin) and V(cos) from sensor differential signal such as
+sin,-sin,+cos and -cos.
(Please note that the method of acquiring differential signals may vary depend
on the circuit structure)
Fig.9 sin and cos signals
Step 2.Define initial position: Zero angle0 [deg]
Define initial position (0 deg) as desired.
Zero angle0 [deg] = ATAN2 ※ (V(cos), V(sin))×
(case of V(sin) < 0:Zero angle0 = Zero angle0 +360deg)
※ The ATAN2 function is used to calculate the declination in a Cartesian
coordinate.
Step 3. Calculate detected angle: Raw angle [deg]
Raw angle [deg] = ATAN2 (V(cos), V(sin))×
(case of V(sin) < 0:Raw angle = Raw angle +360deg)
Step 4. Calculate detected angle: Lv0 angle [deg] Lv0 angle [deg] = ATAN2
(V(cos), V(sin))× – Zero angle0
(case of V(sin) < 0:Lv0 angle = Lv0 angle +360deg)
Fig. 10 Angle calculation (Zero adjust)
Compensation level 1
Step 1.Obtaining max/min values
Obtain max/min values of sin and cos signals from one cycle data. Rotate the
magnet 360 degrees to obtain the angle sensor output signal for one cycle.
V (sin)max, V (sin)min, V (cos) max, V (cos) min
Fig.11 Min/Max value for sin and cos signals
Step 2.Normalize sin and cos signals
Calculate the offset compensation value, amplitude compensation value and use
them to normalize the signal to an amplitude of 1 and an offset of 0.
Fig.12 Normalization (Amplitude 1, Offset 0)
Step 3.Calculate Pdiff (Pdiff: sin-cos Quadrature phase error)
Vnorm (sin – cos) = Vnorm (sin) – Vnorm (cos)
Vnorm (sin + cos) = Vnorm (sin) + Vnorm (cos)
Calculate Pdiff from max value of synthesis wave Vnorm (sin – cos) max,Vnorm (sin + cos) max
Pdiff [deg] = 1.92*(ATAN
Step 4. Normalize the signal to an amplitude of 1 and an offset of 0
Calculate the zero angle at initial position (user defined zero position).
Zero angle0 = ATAN2※ (V(cos), V(sin))×
(case of V(sin) < 0:Zero angle0 = Zero angle0 +360deg)
Norm angle0 [deg] = ATAN2 (Vnorm(cos), Vnorm(sin))×
(case of Vnorm(sin) < 0:Norm angle0 = Norm angle0 +360deg)
Calculate the normalized angle.
Step 5.Angle compensation
Calculate the angle with compensation value.
Compensation level 2
Further compensation can be possible after compensation level 1.
Step 1.Angle compensation
Note:
Wd2 and Wd4 are defined as follows:
Wd2(Temp) = (4.8×10-⁸× (Temp)³ – 128×10-⁷× (Temp)² + 106×10-⁵ × (Temp) –
0.0294)×(0.0000074 × B²-0.001869 × B+0.5267) 0.4773⁄
Wd4(Temp) = (-18×10-⁴× (Temp) + 0.526) × (0.0000074 × B² – 0.001869 × B +
0.5267) 0.4773⁄
Temp: Ambient temperature [deg] B: Applied magnetic field strength [mT]
Wd2(2nd), Wd4(4th) periodic angle error…coefficient in formula is eigen value of the product.
Compensation procedure for the table transform method
This method is particularly effective when the sensor does not output clear sin and cos signal. As shown in Fig.13, when the sensor is used by placing it on the side of the magnet, the output waveform will be the 3rd harmonic superimposed waveform. Normally compensation based on this waveform would require complex calculations each time. But using the table conversion method, angle calculations can be obtained with simple processing.
Fig.13 Layout of the magnet
Examples of magnetic strength field and sensor output
Fig. 14 Magnetic strength field near magnet (Br, Bθ) Fig. 15 Sensor output
How to create compensation table
Procedure to create simple compensation table is as follows:
Step 1. Define the initial position (0 deg position) as desired.
Step 2. Obtain the angle sensor output signal in one cycle while rotating
the magnet 360 degrees at arbitrary angular intervals. If you require the
resolution at 1 deg step, 361 data are needed (0 to 360 deg.). In this case
absolute angle is necessary in advance.
Step 3. Calculate the angle from sin and cos signals. There are several
calculation methods, but simplest is following trigonometric formula:
Step 4. Create a one-to-one correspondence table with the calculation
results and absolute angles. This becomes the compensation table.
Step 5. Rotate the magnet to an arbitrary position and obtain the sensor
detection angle from the same calculation as in step 3.
Step 6. Correct angle information can be obtained by matching the angle
obtained in step 5 with the compensation table.
Step 7. If the corresponding angle does not exist in the compensation
table, the angle can be calculated from a linear approximation between the two
nearest front and rear points. See below as example.
If the sensor detection angle is 1.9 deg, we can assume it as 2 deg.
If the sensor detection angle is 358.7 deg, there is no matching absolute
angle value in the table. In this case a directness approximation calculation
is performed using the data from the two points before and after, the
detection angles of 358.1 deg and 358.9 deg.
Let y be the absolute angle and x be the detected angle,
y = a × x + b
358 = 358.1 × a + b
359 = 358.9 × a + b
a = 1.25, b = −89.625
y = 1.25× x − 89.625
Absolute angle [deg | Detection angle [deg] |
---|---|
0 | -0.1 |
1 | 0.8 |
2 | 1.9 |
3 | 3.0 |
⁞ | ⁞ |
357 | 357.3 |
358 | 358.1 |
359 | 358.9 |
360 | 359.6 |
General precautions
The following are general precautions for using magnetic sensors and magnets.
Selecting the appropriate magnet
Select the type and strength of the magnet in accordance with the
specification of the magnetic sensor and the requirements of the application
scenario. Excessive strength of the magnet may cause the sensor to
malfunction.
Thermal environment
Magnets are sensitive to temperature and the strength of the magnetic field
varies with temperature. When the magnetic sensor and magnet are heated, the
stability of the magnetic field may be affected. Therefore it is necessary to
investigate appropriate thermal countermeasures.
Influence of Magnet Configuration and Surrounding Magnetic Materials
Magnetic sensors are affected by surrounding magnetic materials (e.g. magnets,
iron). Check whether the interference of the magnetic field affects the
operating performance of the magnetic sensor and take care to adjust the
magnet, the surrounding magnetic material and the sensor to the appropriate
positional relationship.
Static electricity
Magnetic sensors are semiconductor devices. They can be damaged by static
electricity that exceeds the capacity of the specified electrostatic
protection circuit. Take adequate measures to protect against static
electricity during use.
EMC
Magnetic sensors may be damaged or malfunction due to over-voltage of the
power supply in an automobile environment, exposure to radio waves, and so on.
Implement protection measures (Zener diodes, capacitors, resistors, inductors,
etc.) as necessary.
Disclaimer
- The contents of this document are subject to change without prior notice.
- Reproduction or copying of part or all of this document is strictly prohibited without the permission of the Company.
- The information in this document, such as software and circuit examples, is example for the standard operation and use of this product. When used in actual design, customers are requested to take responsibility for the products and designs their product. We are not responsible for any damage caused using these.
- The Company makes no warranty and assumes no responsibility for infringement of third-party patents, copyrights, and other intellectual property rights or disputes related thereto arising from the use of product data, diagrams, tables, programs, circuit examples, and other information described in this document.
- When exporting products that are subject to domestic or overseas export-related regulations, please obtain the necessary licenses, procedures, etc., based on compliance with such regulations.
- If you have any questions about the contents or products described in this document, please consult our sales department.
Inquiries about products and services
For inquiries about our products and services, please visit the inquiry window
on our website.
Revision history
Date | Version | Change |
---|---|---|
Apr. 18 2024 | 1.0 | Layout release (English version) |
©2024 Alps Alpine Co., Ltd.
All rights reserved.
Document No: 830N0056-O
Apr. 2024 Rev1.0
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>