MagAlpha MA820
8-Bit Contactless Angle Encoder with
ABZ Output and Push Button Function
DESCRIPTION
FEATURES
The MA820 is an easy-to-use, magnetic, angle
encoder designed to replace analogic
potentiometers or rotary switches. The MA820
is designed for slow operation such as humanmachine interface, manual controls, etc. where
the rotating speed remains below 200 rpm. The
sensor detects the absolute angular position of
a permanent magnet attached to a rotating
shaft and outputs incremental ABZ encoder
data. The number of pulses per channel for
each A or B output is programmable from 1 to
64 via an SPI interface.
Magnet shapes and configurations are very
flexible. Typically, the MA820 is used with a
diametrically magnetized cylinder of 2 - 8mm in
diameter.
The MA820 features programmable magnetic
field strength thresholds, which allow for the
implementation of a push or pull button function.
These are output as two logic signals.
On-chip non-volatile memory provides storage
for configuration parameters, including the
reference zero angle position, ABZ pulses per
channel, and magnetic field detection threshold
settings.
8-Bit Resolution Absolute Angle Encoder
Contactless Sensing for Long Life with No
Wear
SPI Serial Interface for Chip Configuration
Incremental ABZ Encoder Interface with 1 64 Programmable Pulses Per Channel
Programmable Magnetic Field Strength
Detection for Push/Pull Button Detection
3.3V, 12mA Supply
-40 to +125°C Operating Temperature
Available in a QFN-16 (3mmx3mm)
Package
APPLICATIONS
Rotary Knob Control Interfaces
Manual Controls
Encoders
Automotive
White Goods
All MPS parts are lead-free, halogen-free, and adhere to the RoHS directive. For
MPS green status, please visit the MPS website under Quality Assurance. “MPS”
and “The Future of Analog IC Technology” are registered trademarks of
Monolithic Power Systems, Inc.
TYPICAL APPLICATION
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
1
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
ORDERING INFORMATION
Part Number*
MA820GQ
Package
QFN-16 (3mmx3mm)
Top Marking
See Below
* For Tape & Reel, add suffix –Z (e.g. MA820GQ–Z)
TOP MARKING
AXX: product code of MA820GQ
Y: year code
LLL: lot number
PACKAGE REFERENCE
TOP VIEW
GND MISO
8
/Z
7
B
CS
6
5
9
4
MOSI
3
Z
TEST
10
MGL
11
2
A
SCLK
12
1
/A
17
PAD
13
14
15
16
VDD
N/C
/B
MGH
QFN-16 (3mmx3mm)
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
2
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
ABSOLUTE MAXIMUM RATINGS (1)
Supply voltage ............................ -0.5V to +4.6V
Input pin voltage (VI) ................... -0.5V to +6.0V
Output pin voltage (VO) ............... -0.5V to +4.6V
(2)
Continuous power dissipation (TA = +25°C)
..................................................................2.0W
Junction temperature ............................... 125°C
Lead temperature .................................... 260°C
Storage temperature .................. -65°C to 150°C
MA820 Rev. 1.01
6/15/2018
(3)
Thermal Resistance
θJA
θJC
QFN-16 (3mmx3mm) ............ 50 ....... 12 ... °C/W
NOTES:
1) Exceeding these ratings may damage the device.
2) The maximum allowable power dissipation is a function of the
maximum junction temperature TJ (MAX), the junction-toambient thermal resistance θJA, and the ambient temperature
TA. The maximum allowable continuous power dissipation at
any ambient temperature is calculated by PD (MAX) = (TJ
(MAX)-TA)/θJA.
3) Measured on JESD51-7, 4-layer PCB.
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
3
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
ELECTRICAL CHARACTERISTICS
Parameter
Symbol Condition
Recommended Operating Conditions
Min
Typ
Max
Units
Supply voltage
VDD
3.0
3.3
3.6
V
Supply current
IDD
10.2
11.7
13.8
mA
Operating temperature
Top
-40
Applied magnetic field
B
30
MA820 Rev. 1.01
6/15/2018
125
60
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
°C
mT
4
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
GENERAL CHARACTERISTICS
VDD = 3.3V, 45mT < B < 100mT, Temp = -40°C to +125°C, unless otherwise noted.
Parameter
Symbol Condition
Min
Typ
Max
Units
20
4
90
ms
ms
Hz
0.7
deg
1.1
deg
Response Time
(4)
Power-up time
(5)
Latency
(4)
Filter cutoff frequency
Accuracy
Constant speed propagation delay
Fcutoff
At room temperature over the full
field range
Over the full temperature range
and field range
INL at 25°C
INL between -40°C to +125°C
(5)
Output Drift
Temperature induced drift at
(5)
room temperature
Temperature induced variation
(5)
0.015
0.04
deg/°C
From 25°C to 85°C
0.5
1.2
deg
From 25°C to 125°C
1.0
0.005
2.1
deg
deg/mT
deg/V
(5)
Magnetic field induced
(5)
Voltage supply induced
Incremental Output – ABZ
0.3
ABZ update rate
Resolution - edges per turn
Pulses per channel per turn
(5)
ABZ hysteresis
(5)
Systematic jitter
Random jitter (3σ)
Overall ABZ jitter
Absolute Output – Serial
16
PPT+1
H
Programmable
4
256
Programmable
1
64
2.1
6.0
0.6
0.4
deg
%
%
deg
1100
kHz
8
bit
For PPT = 63, 0 - 100krpm
For PPT = 63, 0 - 100krpm
Refresh rate
850
Data output length
Magnetic Field Detection Thresholds
VIH
VIL
RPU
RPD
Input low voltage
Pull-up resistor
Pull-down resistor
Rising edge slew rate
5
6
-600
MagHys
Input high voltage
980
8
(5)
Accuracy
(5)
Hysteresis
(5)
Temperature drift
Digital I/O
MHz
mT
mT
ppm/°C
2.5
5.5
V
-0.3
0.8
V
46
66
97
kΩ
43
55
97
kΩ
(4)
TR
CL = 50pF
0.7
V/ns
(4)
TF
CL = 50pF
0.7
V/ns
Falling edge slew rate
NOTES:
4) Guaranteed by design.
5) Guaranteed by characteristic test.
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
5
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
TYPICAL CHARACTERISTICS
VDD = 3.3V, Temp = 25°C, unless otherwise noted.
ABZ Jitter at PPT = 63
Filter Transfer Function
Error Curves at 50mT
2
1.1
5
1.5
1
0.8
0.7
0.6
0.5
1
0
-5
-45癈
0
-0.5
-10
-1
-15
0.4
25癈
125癈
0.5
-3 dB
ERROR (deg)
FILTER TRANSFER FUNCTION (dB)
RANDOM JITTER (%)
0.9
-1.5
0.3
-2
0.1
1
10
100
1000
10
4
10
5
-20
0
1
10
100
1000
10
50
100
150
200
250
300
350
4
ROTATION SPEED (rpm)
ANGLE (deg)
f (Hz)
Non-Linearity (INL and
Harmonics)
Current Consumption at
VDD = 3.3V
1.5
12
11.5
SUPPLY CURRENT (mA)
NON-LINEARITY (deg)
INL
1
H1
0.5
H2
11
10.5
10
0
0
20
40
60
MAGNETIC FIELD (T)
MA820 Rev. 1.01
6/15/2018
80
100
-50
0
50
100
150
TEMPERATURE (癈 )
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
6
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
PIN FUNCTIONS
Package
Pin #
Name
Description
1
2
3
4
/A
A
Z
MOSI
Channel A inverted. A is the output of the incremental interface.
Channel A. A is the output of the incremental interface.
Index pulse Z. Z is the output of the incremental interface.
Data in (SPI). MOSI has an internal pull-down resistor.
5
6
CS
B
7
MISO
8
9
10
11
GND
/Z
TEST
MGL
Chip select (SPI). CS has an internal pull-up resistor.
Channel B. B is the output of the incremental interface.
Data out (SPI). MISO has an internal pull-down resistor that is enabled at a high
impedance state.
Supply ground.
Index pulse Z inverted. Z is the output of the incremental interface.
Connect to ground.
Digital output indicating field strength below MGLT level.
12
13
14
15
16
SCLK
VDD
N/C
/B
MGH
Clock (SPI). SCLK has an internal pull-down resistor.
Supply 3.3V.
No connection. Leave N/C unconnected.
Channel B inverted. B is the output of the incremental interface.
Digital output indicating field strength above MGHT level.
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
7
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
BLOCK DIAGRAM
Figure 1: Functional Block Diagram
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
8
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
OPERATION
Sensor Front-End
The magnetic field is detected with integrated
Hall devices located in the center of the
package. The angle is measured using the
SpinaxisTM method, which digitizes the direction
of the field directly without complex arctangent
computation or feedback loop-based circuits
(interpolators).
The SpinaxisTM method is based on phase
detection and generates a sinusoidal signal with
a phase that represents the angle of the
magnetic field. The angle is then obtained by a
time-to-digital converter, which measures the
time between the zero crossing of the
sinusoidal signal and the edge of a constant
waveform (see Figure 2). The time-to-digital is
output from the front-end to the digital
conditioning block.
Sensor – Magnet Mounting
The sensitive volume of the MA820 is confined
in a region less than 100µm wide and has
multiple integrated Hall devices. This volume is
located both horizontally and vertically within
50µm of the center of the QFN package. The
sensor detects the angle of the magnetic field
projected in a plane parallel to the package’s
upper surface. This means that the only
relevant magnetic field is the in-plane
component (X and Y components) in the middle
point of the package.
By default, when looking at the top of the
package, the angle increases when the
magnetic field rotates clockwise. Figure 3
shows the zero angle of the unprogrammed
sensor, where the cross indicates the sensitive
point. Both the rotation direction and the zero
angle can be programmed.
Top: Sine Waveform
Bottom: Clock of Time-to-Digital Converter
Figure 2: Phase Detection Method
The output of the front-end delivers a digital
number proportional to the angle of the
magnetic field at the rate of 1MHz in a
straightforward and open-loop manner.
Digital Filtering
The front-end signal is further treated to
achieve the final effective resolution. This
treatment does not add any latency in steady
conditions. The filter transfer function can be
calculated with Equation (1):
H ( s)
1 2s
(1 s) 2
(1)
Where τ is the filter time constant related to the
cutoff frequency by: τ = 0.38/Fcutoff. See the
General Characteristics table on page 5 for the
value of Fcutoff.
MA820 Rev. 1.01
6/15/2018
Figure 3: Detection Point and Default Positive
Direction
This type of detection provides flexibility for the
design of an angular encoder. The sensor only
requires the magnetic vector to lie essentially
within the sensor plane with a field amplitude of
at least 30mT. Note that the MA820 can work
with fields smaller than 30mT, but the linearity
and resolution performance may deviate from
the specifications. The most straightforward
mounting method is to place the MA820 sensor
on the rotation axis of a permanent magnet (i.e.:
a diametrically magnetized cylinder) (see Figure
4). The recommended magnet is a Neodymium
alloy (N35) cylinder with dimensions Ø5x3mm
inserted into an aluminum shaft with a 1.5mm
air gap between the magnet and the sensor
(surface of package). For good linearity, the
sensor is positioned with a precision of 0.5mm.
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
9
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
In general, the MagAlpha works well with or
without the exposed pad connected to anything.
For optimum conditions (electrically, thermally,
and mechanically), it is recommended that the
exposed pad be connected to ground.
Figure 4: End-of-Shaft Mounting
Figure 5 shows an example of sensor and
magnet mounting in a contactless switch
assembly. A Neodymium alloy magnet is
inserted into an aluminum shaft. The air gap
between the magnet and the sensor is 1.0mm.
The sensor is positioned on the rotation axis
with a precision of 0.5mm.
Serial Interface
The sensor supports the SPI serial interface for
register programming. SPI is a four-wire,
synchronous, serial communication interface.
The MagAlpha supports SPI Mode 3 and Mode
0 (see Table 1 and Table 2). The SPI Mode (0
or 3) is detected automatically by the sensor
and therefore does not require any action from
the user. The maximum clock rate supported on
SPI is 25MHz. There is no minimum clock rate.
Note that real-life data rates depend on the
PCB layout quality and signal trace length. See
Figure 7 and Table 3 for SPI timing.
All commands to the MagAlpha (whether for
writing or reading a register content) must be
transferred through the SPI MOSI pin and must
be 16 bits long. See the SPI Communication
section on page 12 for details.
Table 1: SPI Specification
Figure 5: Example of Potentiometer-Like
Assembly
Electrical Mounting and Power Supply
Decoupling
It is recommended to place a 1µF decoupling
capacitor close to the sensor with a low
impedance path to GND (see Figure 6).
SCLK idle state
Data capture
Data transmission
CS idle state
Data order
Table 2: SPI Standard
3.3 V
MGL
MGH
MISO
Mode 0
Mode 3
Low
High
On SCLK rising edge
On SCLK falling edge
High
MSB first
CPOL
CPHA
Data order (DORD)
Mode 0
Mode 3
0
1
0
1
0 (MSB first)
MOSI
VDD
SCLK
1 mF
MA820
GND
CS
A
B
TEST
Exposed pad
Z
Figure 5: Connection for Supply Decoupling
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
10
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
tcsL
CS
tsclk
tsclkL tsclkH
tcsH
tMISO
tMISO
tidleAngle
tidleReg
tnvm
SCLK
tMISO
MISO
hi-Z
MOSI
MSB
X
LSB
MSB
hi-Z
MSB
X
LSB
MSB
tMOSI
Figure 6: SPI Timing Diagram
tidleAngle
tidleAngle
tidleAngle
tidleReg
tidleReg
tidleAngle
tnvm
tidleReg
CS
MISO
Angle
Angle
Angle
Angle
Reg Value
Angle
Angle
Reg Value
Angle
MOSI
0
0
0
Read Reg Cmd
0
0
Write Reg Cmd
0
0
Figure 7: Minimum Idle Time
Table 3: SPI Timing
Parameter
(6)
Description
Min
Max
tidleAngle
Idle time between two subsequent angle transmissions
150
ns
tidleReg
Idle time before and after a register readout
750
ns
tnvm
Idle time between a write command and a register readout
(delay necessary for non-volatile memory update)
20
ms
tcsL
Time between CS falling edge and SCLK falling edge
80
ns
tsclk
SCLK period
40
ns
tsclkL
Low level of SCLK signal
20
ns
tsclkH
High level of SCLK signal
20
ns
tcsH
Time between SCLK rising edge and CS rising edge
25
ns
tMISO
SCLK setting edge to data output valid
tMOSI
Data input valid to SCLK reading edge
15
15
Unit
ns
ns
NOTE:
6) All values are guaranteed by design.
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
11
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
SPI Communication
The sensor supports three types of SPI
operation:
Read angle
Read configuration register
Write configuration register
Each operation has a specific frame structure
described below.
SPI Read Angle
See Figure 8 for the diagram of a full SPI angle
reading. See Figure 10 for a partial SPI angle
reading. A full angle reading requires 16 clock
pulses. The sensor MISO line returns:
MSB
LSB
MISO
Angle(15:0)
MOSI
0
The MagAlpha family has sensors with different
features and levels of resolution. See the data
output length section in the General
Characteristics table on page 5 for the number
of useful bits delivered at the serial output. If the
data length is smaller than 16, the rest of the
bits sent are zeros.
SPI Read Register
A read register operation is constituted of two
16-bit frames. The first frame sends a read
request, which contains the 3-bit read
command (010) followed by the 5-bit register
address. The second frame returns the 8-bit
register value (MSB byte). The last eight bits of
the frame must all be set to zero.
The first 16-bit SPI frame (read request) is:
MSB
MISO
MOSI
LSB
Angle(15:0)
command
reg. address
0 1 0 A4 A3 A2 A1 A0
0 0 0 0 0 0 0 0
The second 16-bit SPI frame (response) is:
reg. value
MISO V7 V6 V5 V4 V3 V2 V1 V0
0 0 0 0 0 0 0 0
MSB
LSB
MOSI
0
See Figure
overview.
for a complete transmission
For example, to get the value of the magnetic
level high and low flags (MGH and MGL), read
register 27 (bit 6, bit 7) by sending the following
first frame:
MSB
MISO
MOSI
LSB
Angle(15:0)
command
0 1 0
reg. address
1 1 0 1 1
0 0 0 0 0 0 0 0
In the second frame, the MagAlpha replies:
Figure 8: Full 16-Bit SPI Angle Reading
reg. value
MISO MGH MGL X X X X X X
0 0 0 0 0 0 0 0
MSB
MOSI
LSB
0
See Figure for a complete example.
Figure 9: Partial 8-Bit SPI Angle Reading
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
12
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
Figure 11: Two 16-Bit Frames Read Register Operation
Figure 12: Example Read Magnetic Level Flags High and Low (MGH, MGH) on Register 27, Bit 7-6
SPI Write Register
Table 4 shows the programmable 8-bit registers.
Data written to these registers are stored in the
on-chip non-volatile memory and reloaded
during power-on automatically. The factory
default register values are shown in Table 5.
A write register operation is constituted of two
16-bit frames. The first frame sends a write
request, which contains the 3-bit write
command (100) followed by the 5-bit register
address and the 8-bit value (MSB first). The
second frame returns the newly written register
value (acknowledge).
request and read angle do not require this wait
time.
First 16-bit SPI frame (write request):
MSB
LSB
MISO
Angle(15:0)
MOSI
command
reg. address
reg. value
1 0 0 A4 A3 A2 A1 A0 V7 V6 V5 V4 V3 V2 V1 V0
Second 16-bit SPI frame (response):
reg. value
MISO V7 V6 V5 V4 V3 V2 V1 V0
0 0 0 0 0 0 0 0
MSB
The on-chip memory is guaranteed to endure
1,000 write cycles at 25°C.
It is critical to wait 20ms between the first and
second frame. This is the time taken to write the
non-volatile memory. Failure to implement this
wait period results in the register’s previous
value being read. Note that this delay is only
required after a write request. A read register
MA820 Rev. 1.01
6/15/2018
MOSI
LSB
0
The read-back register content can be used to
verify the register programming. Figure 13
complete transmission overview.
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
13
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
For example, to set the value of the output
rotation direction (RD) to counterclockwise
(high), write register 9 by sending the following
first frame:
MSB
MISO
Send the second frame after a 20ms wait time.
If the register is written correctly, the reply is:
reg. value
MISO 1 0 0 0 0 0 0 0
MSB
Angle(15:0)
MOSI
MOSI
command
1 0 0
0 0 0 0 0 0 0 0
LSB
reg. address
0 1 0 0 1
reg. value
1 0 0 0 0 0 0 0
LSB
0
See Figure 14 for a complete example.
Figure 13: Overview of Two 16-Bit Frames Write Register Operation
Figure 14: Example Write Output Rotation Direction (RD) to Counterclockwise (High), on Register 9, Bit 7
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
14
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
REGISTER MAP
Table 4: Register Map
Bit 7
MSB
No
Hex
Bin
0
0x0
00000
Z(7:0)
1
0x1
00001
Z(15:8)
0x4
00100
5
0x5
00101
6
0x6
00110
9
0x9
01001
RD
-
-
-
-
27
0x1B
11011
MGH
MGL
-
-
-
4
(7)
Bit 6
PPT(1:0)
-
-
Bit 5
Bit 4
0
0
-
-
MGLT(2:0)
Bit 3
Bit 2
Bit 1
Bit 0 LSB
0
0
0
0
PPT(5:2)
MGHT(2:0)
-
-
-
-
-
-
-
-
NOTE:
7) Bits (5:0) must be set to 000000.
Table 5: Factory Default Values
No
Hex
Bin
Bit 7
MSB
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
LSB
0
0x0
00000
0
0
0
0
0
0
0
0
1
0x1
00001
0
0
0
0
0
0
0
0
4
0x4
00100
1
1
0
0
0
0
0
0
5
0x5
00101
0
0
0
0
1
1
1
1
6
0x6
00110
0
0
0
1
1
1
0
0
9
0x9
01001
0
0
0
0
0
0
0
0
Table 6: Programming Parameters
Parameters
Symbol
Number of Bits
Description
See Table
Zero setting
ABZ pulses per
360 deg turn
Magnetic field high
threshold
Magnetic field low
threshold
Z
16
7
PPT
6
Set the zero position
Sets the pulses per turn on each
channel
MGHT
3
Sets the field strength high threshold.
13
MGLT
3
Sets the field strength low threshold.
13
RD
1
Determines the sensor positive
direction
9
Rotation direction
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
10
15
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
REGISTER SETTINGS
Zero Setting
The zero position of the MagAlpha (a0) can be
programmed with 16 bits of resolution. The
angle streamed out by the MagAlpha (aout) is
given by Equation (2):
aout araw a0
(2)
Where araw is the raw angle provided by the
MagAlpha front-end.
The parameter Z(15:0), which is zero by default,
is the complementary angle of the zero setting.
In decimals, it can be written as shown in
Equation (3):
a0 2 Z (15 : 0)
16
Table 7: Zero Setting Parameter
Zero pos.
a0 (16 bit dec)
65536
65535
65534
…
2
1
0
1
2
…
65534
65535
Zero pos.
a0 (deg)
360.000
359.995
359.989
…
0.011
0.005
Example
To set the zero position to 20 deg, the Z(15:0)
parameter must be equal to the complementary
angle shown in Equation (4):
Z (15 : 0) 216
20 deg 16
2 61895
360 deg
RD
Positive Direction
0
1
Clockwise (CW)
Counterclockwise (CCW)
ABZ Incremental Encoder Output
The MA820 ABZ output emulates an 8-bit
incremental encoder (such as an optical
encoder) providing logic pulses in quadrature
(see Figure 16). Compared to signal A, signal B
is shifted by a quarter of the pulse period. Over
one revolution, signal A pulses N times, where
N is programmable from 1 to 64 pulses per
revolution. The number of pulses per channel
per revolution is programmed by setting the
parameter PPT, which consists of six bits split
between registers 0x4 and 0x5 (see Table 4).
The factory default value is 64. Table 10
describes how to program PPT(5:0) to set the
required resolution.
Table 10: PPT
(4)
In binary, it is written as 1111 0001 1100 0111.
Table 8 shows the content of registers 0 and 1.
Table 8: Register Content
Reg Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0
1
1
0
0
0
1
1
1
1
1
1
1
1
0
0
0
1
Rotation Direction
By default, when looking at the top of the
package, the angle increases when the
magnetic field rotates clockwise (CW) (see
Figure 15 and Table 9).
MA820 Rev. 1.01
6/15/2018
Table 9: Rotation Direction Parameter
(3)
Table 7 shows the zero setting parameter.
Z(15:0)
Figure 15: Positive Rotation Direction of the
Magnetic Field
PPT(5:0)
000000
000001
000010
000011
…
111100
111101
111110
111111
Pulses per
Revolution
1
2
3
4
…
61
62
63
64
Edges per
Revolution
4
8
12
16
…
244
248
252
256
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
MIN
…
MAX
16
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
For example, to set 30 pulses per revolution
(120 edges), set PPT(5:0) to 30 - 1 = 29. In
binary, this is written as 011101. The registers
0x4 and 0x5 must be set as shown in Table 11.
Table 11: Register Setting for 30 Pulses Per Turn
Reg Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
4
0
1
0
0
0
0
0
0
5
0
0
0
0
0
1
1
1
Figure 18: Hysteresis of the Incremental Output
ABZ Jitter
The ABZ state is updated at a frequency of
16MHz.
The jitter characterizes how far a particular ABZ
edge can occur at an angular position different
from the ideal position (see Figure 19).
Figure 16: Timing of the ABZ Output
Signal Z (zero or index) raises only once per
turn at the zero-angle position. The position and
length of the Z pulse is programmable via bits
ILIP(3:0) in register 0x5 (see Figure 17).
Figure 19: ABZ Jitter
The measurable jitter is composed by a
systematic jitter (i.e.: always the same deviation
at a given angle) and a random jitter.
The random jitter reflects the sensor noise.
Therefore, the edge distribution is the same as
the SPI output noise. Like the sensor resolution,
it is defined as the 3σ width of this distribution.
Figure 17: ILIP Parameter Effect on Index Shape
By default, the ILIP parameter is 0000. The
index rising edge is aligned with the channel B
falling edge. The index length is half the A or B
pulse length.
ABZ Hysteresis
A hysteresis larger than the output noise is
introduced on the ABZ output to avoid any
spurious transitions (see Figure 18).
MA820 Rev. 1.01
6/15/2018
In fact, the random jitter is a function of the
rotation speed. At a lower speed, the random
jitter is smaller than the sensor noise.
This is a consequence of the fact that the
probability of measuring an edge at a certain
distance from the ideal position depends on the
number of ABZ updates at this position.
The minimum field for ABZ reading is 30mT.
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
17
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
Magnetic Field Thresholds
Push Button Detection
The MA820 has two threshold options (MGHT
or MGLT), which are complementary in
operation. The flag MGH becomes true (logic 1)
if the magnetic field increases above MGHT.
The flag MGL becomes true (logic 1) if the
magnetic field falls below MGLT (see Figure 20).
In this way, it is possible to implement both a
push or pull action.
MagHys, the hysteresis on the signals MGH
and MGL, is indicated in the General
Characteristics table on page 5. The MGLT and
MGHT thresholds are coded on three bits and
stored in register 6 (see Table 12).
Table 12: Register 6
Reg Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
6
MGLT
MGHT
The 3-bit values of MGLT and MGHT
correspond to the magnetic field (see Table 13).
Table 13: MGLT and MGHT Binary to mT Relation
MGLT or
(9)
MGHT
Figure 20: MGH and MGL Signals as a Function
of the Field Strength
The MGL/MGH flags can be used for detecting
an approaching magnet (e.g.: when a button is
pressed). With the 5mmx3mm magnet example,
if the MGHT threshold is set to binary 110 (106
- 112mT), the MGH signal is set to logic high
when the sensor-magnet airgap is smaller than
1.0mm (see Figure 21).
000
001
010
011
100
101
110
111
Field threshold in mT
From low to high
magnetic field
26
41
56
70
84
98
112
126
(8)
From high to low
magnetic field
20
35
50
64
78
92
106
120
NOTES:
8) Valid for VDD = 3.3V. If different, then the field threshold is
scaled by the factor VDD/3.3V.
9) MGLT can have a larger value than MGHT.
The alarm flags MGL and MGH can be read in
register 27 (bit 6 and bit 7), and their logic state
is also given at the digital output pins 11 and 16.
To read the MGL and MGH flags by SPI, send
the 8-bit command write to register 27:
command
0 1 0
reg. address
1 1 0 1 1
value
LSB
0 0 0 0 0 0 0 0
MSB
The MA820 answers with the register 27
content in the next transmission:
Reg Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
27 MGH MGL x
x
x
x
x
x
Figure 21: Magnetic Field Produced by a
5mmx3mm N35 Magnet as a Function of the
Airgap with Threshold Set to 110mT
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
18
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
TYPICAL APPLICATION CIRCUIT
Figure 22: Typical Connecton to a Host Microprocessor
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
19
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
PACKAGE INFORMATION
QFN-16 (3mmx3mm)
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
20
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
APPENDIX A: DEFINITIONS
Resolution (3σ noise level)
This is the smallest angle increment distinguishable from the noise.
The resolution is measured by computing three times σ (the standard
deviation in degrees) taken over 1,000 data points at a constant
position. The resolution in bits is obtained with log2(360/6σ).
Refresh Rate
Rate at which new data points are stored in the output buffer.
ABZ Update Rate
Rate at which a new ABZ sate is computed. The inverse of this rate is
the minimum time between two ABZ edges.
Latency
The time elapsed between the instant when the data is ready to be
read and the instant at which the shaft passes that position. The lag in
degrees is lag lantency v , where v is the angular velocity in deg/s.
Power-Up Time
Time until the sensor delivers valid data starting at power up.
Integral Non-Linearity (INL)
Maximum deviation between the average sensor output (at a fixed
position) and the true mechanical angle.
Figure A1: Integral Non-linearity
Drift
MA820 Rev. 1.01
6/15/2018
Angle variation rate when one parameter is changed (e.g.:
temperature, VDD) and all the others, including the shaft angle, are
maintained constant.
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
21
MA820 – 8-BIT, DIGITAL ANGLE SENSOR WITH ABZ
APPENDIX B: SPI COMMUNICATION CHEATSHEET
Read Angle
Read Register
Write Register
NOTICE: The information in this document is subject to change without notice. Users should warrant and guarantee that third
party Intellectual Property rights are not infringed upon when integrating MPS products into any application. MPS will not
assume any legal responsibility for any said applications.
MA820 Rev. 1.01
6/15/2018
www.MonolithicPower.com
MPS Proprietary Information. Patent Protected. Unauthorized Photocopy and Duplication Prohibited.
© 2018 MPS. All Rights Reserved.
22