3D Magnetic Sensor - How to make a magnetic design for joysticks

Infineon 3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
3D Magnetic Sensor
Application Note
Rev. 1.0 2016-06-21
Integrated Sensors
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Table of Contents
1
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3
3.1
3.1.1
3.1.2
3.2
3.3
Joystick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Basic principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Digital joysticks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Analog joysticks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Joystick with 3D sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Generals in joystick movements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
4
4.1
4.2
4.3
4.3.1
4.3.2
4.3.3
4.3.4
4.3.5
4.4
4.4.1
4.4.1.1
4.4.1.2
4.4.1.3
4.4.2
4.4.3
How to design a joystick with a magnetic 3D sensor? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Definition for joystick applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Magnetic design for standard solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Variations of magnet HF2 (Option 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Dependency on lever . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Dependency on airgap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Influence of the pill height of magnet HF2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Influence of the diameter of magnet HF2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Lever = 0 mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Variations of magnet shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Pill magnet: lever and airgap variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Results for lever = 5mm and airgap = 6 mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Result for lever = 15mm and airgap = 6 mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Result for lever = 15mm and airgap = 3 mm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Usage of a cylindrical magnet in the center of rotation (airgap 6 mm, no lever (Option 3)) . . . . . 23
Ball shaped magnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6
6.1
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Conversion from X,Y and Z coordinates to spherical coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
7
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Application Note
2
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Scope
1
Scope
After reading this application note you know how to make the magnetic design for a joystick application with
a hall based 3D sensor. Directly, magnet and design parameters are proposed to come quickly to the first
running solution. Furthermore, some degrees of freedom or restrictions are presented. Go directly to
Chapter 4.2 to check out the magnetic design proposal.
Note: The following information is given as a hint for the implementation of our devices only and shall not be
regarded as a description or warranty of a certain functionality, condition or quality of the device.
2
Introduction
This application note describes a possible realization of a Joystick Application. With the new product family
of the 3D Magnetic Sensor, beginning with TLV493D-A1B6, Infineon offers an innovative solution for threedimensional magnetic position sensing. By allowing a measurement of all three components of a magnetic
field at the same time, it enables a multitude of applications with different ranges. Furthermore the integrated
temperature sensor enables the application to compensate possible temperature-dependent magnetic field
changes. The family supports automotive requirements as well, e.g. with the TLE493D-W1B6.
Note: Please also check out the online simulation tool at the Infineon homepage
https://design.infineon.com/3dsim/#/.
Application Note
3
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Joystick
3
Joystick
3.1
Basic principle
A joystick is an input device consisting of a stick that pivots on a base and reports its angle or direction to the
device it is controlling. It is also known as the control column and like that mostly used to control video games
with multiple buttons. Besides this, joysticks are used for controlling different types of machines in industry,
e. g. fork lift trucks.
According to the different purposes of the joysticks, they can be found as analog or digital ones. An analog
joystick is a joystick which has a continuous range of positional states, that can be measured as a movement
of x and y values. A digital joystick gives only the on-off states of a group of switches, each corresponding to a
direction of applied force.
Integrating a 3D sensor inside of the analog joystick, provides more abilities without the need to add any extra
mechanics. It detects all movements of the handle in all possible directions. In the next chapter, more details
about advantages of this joystick will be described.
Basic_principle.vsd
Figure 1
Basic principle of the joystick
A joystick is built out of numerous parts that must be integrated and must match together, in order to
implement good results. Depending of desire, joysticks can be built on different ways.
3.1.1
Digital joysticks
Digital joysticks have only four switches for four directions (up, down, left, right). Nevertheless, this type of
joystick does not have sensitive control for e. g. racing games.
3.1.2
Analog joysticks
According to this fact, analog joysticks lately replaced digital ones. Analog joystick are more suited for racing
games, but need complex mechanics to convert stick movement to 2 axis rotation for potentiometer. An
analog design of joystick can be done with two potentiometers, or variable resistors. A potentiometer is there
to translate the stick's physical position into an electrical signal. This electrical signal is totally analog. The
Application Note
4
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Joystick
potentiometer joystick technology, on the other hand, has limitations in terms of long term durability and
reliability. This problem occurs due to the wearing of moving parts.
Some joysticks use an additional potentiometer for a Z-axis, activated by rotating the stick itself. Bringing one
more potentiometer in the joystick, makes this system more robust and complicated. New technology with
just one 3D sensor implemented can detect all three axis and bring more precise results. With this sensor,
lifetime of joystick functionality is extended and more options for future games or industrial implementations
of joystick are possible. In the next chapter the new feature of implementing 3D sensor in joystick, without
need for potentiometer or more complex system, will be explain in details.
Application Note
5
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Joystick
3.2
Joystick with 3D sensor
The hall effect joystick has an advantage versus the potentiometer joystick since it does not have moving parts
that will become worn over time. Using a 3D Sensor in analog joysticks brings more advantage than before.
One 3D sensor, replaces two or more potentiometers or any extra mechanics. In this case, no separate AD
converter is needed. This sensor inside of the joystick features accurate three-dimensional sensing. The
magnetic 3D sensor used here, has included temperature sensor as well so it helps with detecting the changes
of temperature in a system. Magnetic field detection in x, y, and z direction, allow the sensor to reliably
measure three-dimensional, linear and rotation movements.
3.3
Generals in joystick movements
z
θ
B
0
φ
y
x
Gen eral_Move.vsd x
Figure 2
Joystick movements
•
In the Zero position (= Z-axis) θ = 0° & ϕ = 0°
•
θ can be between 0° and 180°. ϕ can be between 0° and < 360° (in-plane of x-y).
•
A pure forward or backward movement along the x-axis will lead to an increasing (absolute) Theta θ value.
Forward ϕ = 180°; Backward ϕ = 0°
•
A pure left or right movement along the y-axis will lead to an increasing absolute θ value.
(ϕ will jump from 0° to 90°); Left ϕ = -90°; Right ϕ = +90°
•
All other movements/positions can be described as a combination of θ & ϕ
See Appendix in Chapter 6 for calculations from x-y-z to spherical coordinates.
Application Note
6
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4
How to design a joystick with a magnetic 3D sensor?
4.1
Definition for joystick applications
First of all, the basic requirements of a joystick shall be noted:
•
Mechanical range of movement in x & y direction: α = ±40°
•
Accuracy < 5°
•
Lifetime = 3 Million cycles
•
Current Consumption = < 5 mA
Pivot point
er
lev
α = ±40°
airgap
sensor
general_parameters.vsd
Figure 3
Definition of design parameters (general)
Application Note
7
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.2
Magnetic design for standard solution
Option 1 (Standard)
This parameter set offers you a quick and easy solution for your first magnetic design. Further details and
design degrees for this option are presented in Chapter 4.3.
•
Magnet (HF2)
– Br = 390 mT
– Shape = pill magnet
– Dimensions: Diameter = 8 mm, h= 2mm
– Material = Hard Ferrite Y30
– Magnetization Direction = Axial (Z-Direction)
– Link to magnet supplier: https://www.magnet-shop.net/ferritmagnete/scheibenmagnete/scheibenmagnet-8.0-x-2.0-mm-y30-ferrit-haelt-150-g
•
Airgap (Distance Magnet – Sensor) = 4 mm
•
Lever Arm (Distance pivot point to magnet) = 4 mm
4mm
airgap 4mm
sensor
general.vsd
Figure 4
Standard solution (option 1)
Further possible solutions:
Option 2
•
Hard ferrite (Y35 ~ HF 30/16)
– Br = 410 mT
– Shape = pill magnet
– Dimensions: Diameter = 10 mm, h = 5 mm
– Material = Hard Ferrite Y35
– Magnetization Direction = Axial (Z-Direction)
– Link: www.supermagnete.de/scheibenmagnete-ferrit/scheibenmagnet-durchmesser-10mmhoehe-5mm-ferrit-y35-unbeschichtet_FE-S-10-05
•
Airgap (Distance Magnet – Sensor) = 4 mm
•
Lever Arm (Distance pivot point to magnet) = 4 mm
Application Note
8
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
Option 3 (see Chapter 4.4.2)
This enables a solution with the magnet in the center of rotation.
•
NdFeB
– Br = 900 mT
– Shape = cylindrical magnet
– Dimensions: d = 3mm, h = 8 mm [d = 2 mm simulated]
– Magnetization Direction = Axial (Z-Direction)
– Link:
https://www.supermagnete.de/stabmagnete-neodym-rund/stabmagnet-durchmesser-3mmhoehe-6mm-neodym-n48-vernickelt_S-03-06-N
•
Airgap (Distance Magnet – Sensor) = 6 mm
•
Lever Arm (Distance pivot point to magnet) = 0 mm
Note: With block magnets out of the same material a very similar result is assumed compared to the pill or
cylindrical shaped magnets.
Application Note
9
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3
Variations of magnet HF2 (Option 1)
In this chapter the dependency on lever and airgap and a change of mechanical dimensions of the magnet are
simulated:
Hard ferrite (Y30 magnetization)
Table 1
Parameters
Standard design parameters
Variations of parameters
Magnet
Y30
Br
390 mT
Ø
8 mm
Ø: 8 mm → 6 mm + 10 mm; see Chapter 4.3.3
h
2 mm
h: 2 mm → 1 mm + 3 mm; see Chapter 4.3.4
Lever
4 mm
Range of lever: 6 .. 10 mm; see Chapter 4.3.1
Airgap
4 mm
Range of airgap: 3 .. 8 mm; see Chapter 4.3.2
Mechanical angle α
±40°
Link:
https://www.magnet-shop.net/ferrit-magnete/scheibenmagnete/scheibenmagnet-8.0-x-2.0-mm-y30ferrit-haelt-150-g
Application Note
10
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3.1
Dependency on lever
In this chapter the dependency on the lever was simulated.
Table 2
Design parameters
Magnet
Y30
Br
390 mT
Ø
8 mm
h
2 mm
Lever
6 .. 10 mm
Airgap
4 mm
Mechanical angle α
±40°
variation
of lever
airgap
4mm
sensor
Variation_11.vsd
Figure 5
Magnetic flux in spherical coordinates
Application Note
11
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
Conclusion
Table 3
Magnet
Dimension
AG [mm]
Lever [mm]
θ Range
B-Field
Br = 390 mT
Ø = 8 mm
4
0
± 0°
24..30 mT
4
2
± 23°
24..27 mT
4
4
± 50°
24..19 mT
4
6
± 76°
24..11 mT
4
8
± 95°
24..7 mT
4
10
± 110°
24..4mT
Findings:
•
The bigger the lever, the bigger the available magnetical angle range θ
•
The bigger the lever, the smaller is the B-field at mechanical end of movement
Conclusion:
A lever of 4 mm combined with 4 mm airgap is a reasonable approach to have sufficient magnetic field with
enough change in magnetic angle θ.
Application Note
12
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3.2
Dependency on airgap
In this chapter the dependency on the airgap was simulated.
Table 4
Design parameters
Magnet
Y30
Br
390 mT
Ø
8 mm
h
2 mm
Lever
4 mm
Airgap
3 .. 8 mm
Mechanical angle α
±40°
lever
4mm
variation
of airgap
sensor
Variation_13.vsd
Figure 6
Magnetic flux in spherical coordinates
Application Note
13
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
Conclusion
Table 5
Magnet
Dimension
AG [mm]
Lever [mm]
θ Range
B-Field
Br = 390 mT
Ø = 8 mm
h = 2mm
3
4
± 55°
35..33 mT
4
4
± 50°
24..18 mT
5
4
± 48°
17..11 mT
6
4
± 46°
12..8 mT
7
4
± 45°
9..6 mT
8
4
± 43°
7..4 mT
Findings:
•
The bigger the airgap the smaller the field.
•
The bigger the airgap the smaller is the available magnetically angle range θ. But the available range is
always sufficient!
Conclusion:
A lever of 4 mm combined with 4 mm airgap is a reasonable approach to have sufficient magnetic field with
enough change in magnetic angle θ.
Application Note
14
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3.3
Influence of the pill height of magnet HF2
In this chapter the influence of different magnet dimensions are simulated.
Now the pill height h is modified from nominal value 2 mm to h = 1 mm and h = 3 mm.
Table 6
Parameters
Magnet
Y30
Br
390 mT
Ø
8 mm
h
1 mm and 3 mm
Lever
4 mm
Airgap
4 mm
Mechanical angle α
±40°
Figure 7
airgab 4mm
sensor
Dependency of pill height
Findings:
•
The pill height modulates the available field, the higher the bigger the field.
•
The higher the pill the non-magnetic angle is usable.
Conclusion:
All variations are suitable for a joystick design, even for the thinnest pill.
Application Note
15
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3.4
Influence of the diameter of magnet HF2
In this chapter the influence of the diameter of the magnet is simulated.
The nominal value of d = 8 mm is changed to d = 6 mm and d = 10 mm.
Table 7
Parameters
Magnet
Y30
Br
390 mT
Ø
6 mm and 10 mm
h
2 mm
Lever
4 mm
Airgap
4 mm
Mechanical angle α
±40°
lever = 4mm
airgap 4mm
sensor
lever_4mm_Pill_diameter.vsd
Figure 8
Dependency of diameter
Findings:
•
Magnetic field is maybe too small for d = 6 mm (depends on magnetic surroundings).
•
Theta is always sufficient.
Conclusion:
A joystick design is feasible for sure with d ≥ 8 mm.
Application Note
16
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.3.5
Lever = 0 mm
Table 8
Parameters
Magnet
Y30
Br
390 mT
Ø
8 mm
h
2 mm
Lever
0 mm; no lever
Airgap
3 mm and 4 mm
Mechanical angle α
±40°
in center of rotation
no lever
40°
airgap 3mm + 4mm
sensor
Simulation_11.vsd
Figure 9
Mag. flux in spherical coordinates @ airgap 3 mm and lever = 0 mm
Application Note
17
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
Figure 10
Mag flux in spherical coordinates @ airgap 4 mm
Conclusion:
The angle range theta is very small and not the best solution for a joystick application.
But, out of Chapter 4.3.4 a reduction of the diameter will increase Theta and may be sufficient for a joystick
design.
Furthermore, Chapter 4.4.2 shows the possibility if the magnet needs to be located in the center of
rotation!
Application Note
18
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.4
Variations of magnet shape
In this chapter more solutions are indicated. Considered are different shapes of magnets.
For further details please check out the dedicated chapter.
Table 9
Summarized key parameters
Magnet
Shape
Dimension
Lever
[mm]
AG
[mm]
θ Range
B-Field
see
Br = 900 mT
Pill
d = 8 mm
h = 2mm
5
6
± 40°
≥ 30 mT
Chapter 4.4.1.1
15
6
± 105°
≥ 7 mT
Chapter 4.4.1.2
15
3
± 138°
≥ 12 mT
Chapter 4.4.1.3
Cylindrical
Option 3
d = 2mm;
h = 8 mm
0
3
± 42°
≥ 7 mT
Chapter 4.4.2
Ball
d = 4 mm
15
3
± 100°
≥ 15 mT
Chapter 4.4.3
General conclusion:
•
The bigger the diameter the smaller the change of θ.
•
The bigger the lever the higher the range of θ and the smaller the minimum B-field.
Application Note
19
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.4.1
Pill magnet: lever and airgap variations
4.4.1.1
Results for lever = 5mm and airgap = 6 mm
Table 10
Parameters
Magnet
Y30
Br
900 mT
Ø
8 mm
h
2 mm
Lever
5 mm
Airgap
6 mm
Mechanical angle α
± 40°
5mm
airgap 6mm
sensor
result_1.vsd
Figure 11
Results
Findings:
•
Proportional change of Theta to magnet angle movement
•
40° real movement correspond to 50° change of Theta
Conclusion:
This parameter set suits well for a joystick application.
Application Note
20
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
At the first degrees of movement, phi is very sensitive to slight changes in Bx, By. The error peak comes from
small simulation fluctuations.
4.4.1.2
Result for lever = 15mm and airgap = 6 mm
Table 11
Parameters
Magnet
Y30
Br
900 mT
Ø
8 mm
h
2 mm
Lever
15 mm
Airgap
6 mm
15mm
airgap 6mm
Mechanical angle α ± 40°
sensor
Figure 12
Results for a lever of 15 mm and an airgap (at 0°) of 6 mm in spherical coordinates
Findings:
•
Very linear and big range of Theta
•
A small field at the end of motion fits only in applications with very little magnetic noise
Conclusion:
In order to increase the magnetic field the airgap shall be decreased a bit.
Application Note
21
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.4.1.3
Result for lever = 15mm and airgap = 3 mm
Table 12
Parameters
Magnet
NdFeB
Br
900 mT
Ø
8 mm
h
2 mm
Lever
15 mm
Airgap
3 mm
Mechanical angle α
± 40°
15mm
airgap 3mm
sensor
result_1_3.vsd
Figure 13
Movement in x-direction; Results for a lever of 15 mm and an airgap (at 0°) of 3 mm in
spherical coordinates
Conclusion:
Parameter set fits for joystick application.
Application Note
22
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.4.2
Usage of a cylindrical magnet in the center of rotation (airgap 6 mm, no lever
(Option 3))
In this second simulation, a very thin, cylindrical magnet is used (Br = 900 mT)
Table 13
Parameters
Magnet
NdFeB
Br
900 mT
Ø
2 mm
h
8 mm
Lever
0 mm
Airgap
6 mm
Mechanical angle α
± 40°
2mm
in center of rotation
no lever
8mm
±40°
airgap 6 mm
sensor
cylindrical_bar.vsd
Figure 14
Cylindrical magnet (option 3)
Conclusion:
If a solution is needed to have the magnet in the center of rotation a cylindrical magnet is needed.
For realization the magnet below shall be used and the airgap may be reduced to 4 or 5 mm for best fit.
https://www.supermagnete.de/stabmagnete-neodym-rund/stabmagnet-durchmesser-3mm-hoehe6mm-neodym-n48-vernickelt_S-03-06-N
Application Note
23
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
How to design a joystick with a magnetic 3D sensor?
4.4.3
Ball shaped magnet
Table 14
Parameters
Magnet
NdFeB
Magnetization
Diametral
Shape
Ball
Br
900 mT
Ø
10mm
Lever
15 mm
Airgap
3 mm
Mechanical angle α
± 40°
The best performance can be realized with a ball shape magnet.
The change of Theta
for a spherical
magnet is closer to
being linear than the
magnetic pill
Figure 15
Ball shaped magnet
Results
•
The change of Theta for a ball magnet is nearly linear.
•
The magnetic field is always higher than 10 mT.
Conclusion:
Quite good for joysticks, but the cost position of the magnet is not at it’s optimum.
Application Note
24
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Summary
5
Summary
With the new 3D sensor implemented in joystick, robust systems with small package can be enabled.
Implementing 3D sensor in analog joystick removes the need for complex mechanics and brings better
precision in usage of a joystick.
Further Information about the package can be found here:
http://www.infineon.com/cms/packages/SMD_-_Surface_Mounted_Devices/TSOP/TSOP6.html
Further Information about the 3D sensors can be found here:
www.infineon.com/3dmagnetic
For more information, please visit the website or contact Technical Support Infineon Technologies. We can
attend to your concerns and help you most like to work together to find a solution to your concerns.
Application Note
25
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Appendix
6
Appendix
6.1
Conversion from X,Y and Z coordinates to spherical coordinates
The readouts have been translated from X, Y & Z coordinates to spherical coordinates.
z
B
θ
γ
0
φ
y
x
Move_spherical.vsd x
Figure 16
Movements in spherical coordinates
Following formulas have been used for the translation from cartesian to spherical coordinates:
The mag. flux density vectors are given by the following formulas:
x = r ⋅ sin θ ⋅ cos ϕ
y = r ⋅ sin θ ⋅ sin
ϕ
z = r ⋅ cosθ
→ r, x, y, z corresponds to Br, Bx, By, Bz
The sensor measures Bx, By, Bz (with some errors)
µC calculates:
r = x2 + y 2 + z 2
theta
θ = arccos
Application Note
z
x +y +z
2
2
2
= arccos
26
z π
= − arctan
r 2
z
x + y2
2
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Appendix
phi
y
⎫
⎧
if x > 0
⎪
⎪arctan( x ),
⎪
⎪
π
⎪
⎪sgn( y ) ,
if x = 0
⎪⎪
⎪⎪
2
ϕ = a tan 2( y , x ) = ⎨
⎬
y
⎪arctan ⎛⎜ ⎞⎟ + π ,
if x < 0 ∧ y ≥ 0 ⎪
⎝x⎠
⎪
⎪
⎪
⎪
y
⎛
⎞
⎪arctan ⎜ ⎟ − π ,
if x < 0 ∧ y < 0 ⎪
⎪⎭
⎪⎩
⎝x⎠
Application Note
27
Rev. 1.0 2016-06-21
3D Magnetic Sensor
How to Make a Magnetic Design for Joysticks
Revision History
7
Revision History
Revision
Date
Changes
1.0
2016-06-21
Initial release.
Application Note
28
Rev. 1.0 2016-06-21
Trademarks of Infineon Technologies AG
AURIX™, C166™, CanPAK™, CIPOS™, CoolGaN™, CoolMOS™, CoolSET™, CoolSiC™, CORECONTROL™, CROSSAVE™, DAVE™, DI-POL™, DrBLADE™, EasyPIM™,
EconoBRIDGE™, EconoDUAL™, EconoPACK™, EconoPIM™, EiceDRIVER™, eupec™, FCOS™, HITFET™, HybridPACK™, Infineon™, ISOFACE™, IsoPACK™, iWafer™, MIPAQ™, ModSTACK™, my-d™, NovalithIC™, OmniTune™, OPTIGA™, OptiMOS™, ORIGA™, POWERCODE™, PRIMARION™, PrimePACK™,
PrimeSTACK™, PROFET™, PRO-SIL™, RASIC™, REAL3™, ReverSave™, SatRIC™, SIEGET™, SIPMOS™, SmartLEWIS™, SOLID FLASH™, SPOC™, TEMPFET™,
thinQ!™, TRENCHSTOP™, TriCore™.
Other Trademarks
Advance Design System™ (ADS) of Agilent Technologies, AMBA™, ARM™, MULTI-ICE™, KEIL™, PRIMECELL™, REALVIEW™, THUMB™, µVision™ of ARM Limited,
UK. ANSI™ of American National Standards Institute. AUTOSAR™ of AUTOSAR development partnership. Bluetooth™ of Bluetooth SIG Inc. CAT-iq™ of DECT
Forum. CIPURSE™ of OSPT Alliance. COLOSSUS™, FirstGPS™ of Trimble Navigation Ltd. EMV™ of EMVCo, LLC (Visa Holdings Inc.). EPCOS™ of Epcos AG.
FLEXGO™ of Microsoft Corporation. HYPERTERMINAL™ of Hilgraeve Incorporated. MCS™ of Intel Corp. IEC™ of Commission Electrotechnique Internationale.
IrDA™ of Infrared Data Association Corporation. ISO™ of INTERNATIONAL ORGANIZATION FOR STANDARDIZATION. MATLAB™ of MathWorks, Inc. MAXIM™ of
Maxim Integrated Products, Inc. MICROTEC™, NUCLEUS™ of Mentor Graphics Corporation. MIPI™ of MIPI Alliance, Inc. MIPS™ of MIPS Technologies, Inc.,
USA. muRata™ of MURATA MANUFACTURING CO., MICROWAVE OFFICE™ (MWO) of Applied Wave Research Inc., OmniVision™ of OmniVision Technologies,
Inc. Openwave™ of Openwave Systems Inc. RED HAT™ of Red Hat, Inc. RFMD™ of RF Micro Devices, Inc. SIRIUS™ of Sirius Satellite Radio Inc. SOLARIS™ of
Sun Microsystems, Inc. SPANSION™ of Spansion LLC Ltd. Symbian™ of Symbian Software Limited. TAIYO YUDEN™ of Taiyo Yuden Co. TEAKLITE™ of CEVA,
Inc. TEKTRONIX™ of Tektronix Inc. TOKO™ of TOKO KABUSHIKI KAISHA TA. UNIX™ of X/Open Company Limited. VERILOG™, PALLADIUM™ of Cadence Design
Systems, Inc. VLYNQ™ of Texas Instruments Incorporated. VXWORKS™, WIND RIVER™ of WIND RIVER SYSTEMS, INC. ZETEX™ of Diodes Zetex Limited.
Trademarks Update 2014-11-12
www.infineon.com
Edition 2016-06-21
Published by
Infineon Technologies AG
81726 Munich, Germany
© 2014 Infineon Technologies AG.
All Rights Reserved.
Do you have a question about any
aspect of this document?
Email: [email protected]
Document reference
Legal Disclaimer
THE INFORMATION GIVEN IN THIS APPLICATION NOTE
(INCLUDING BUT NOT LIMITED TO CONTENTS OF
REFERENCED WEBSITES) IS GIVEN AS A HINT FOR THE
IMPLEMENTATION OF THE INFINEON TECHNOLOGIES
COMPONENT ONLY AND SHALL NOT BE REGARDED AS
ANY DESCRIPTION OR WARRANTY OF A CERTAIN
FUNCTIONALITY, CONDITION OR QUALITY OF THE
INFINEON TECHNOLOGIES COMPONENT. THE
RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY
ANY FUNCTION DESCRIBED HEREIN IN THE REAL
APPLICATION. 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) WITH RESPECT TO ANY AND ALL INFORMATION
GIVEN IN THIS APPLICATION NOTE.
Information
For further information on technology, delivery terms
and conditions and prices, please contact the nearest
Infineon Technologies Office (www.infineon.com).
Warnings
Due to technical requirements, components may
contain dangerous substances. For information on the
types in question, please contact the nearest Infineon
Technologies
Office.
Infineon
Technologies
components may be used in life-support devices or
systems only with the express written approval of
Infineon Technologies, if a failure of such components
can reasonably be expected to cause the failure of that
life-support device or system or to affect the safety or
effectiveness of that device or system. Life support
devices or systems are intended to be implanted in the
human body or to support and/or maintain and
sustain and/or protect human life. If they fail, it is
reasonable to assume that the health of the user or
other persons may be endangered.