AS5040
10Bit 360° Programmable Magnetic Rotary Encoder
1 General Description
The AS5040 is a contactless magnetic rotary encoder
for accurate angular measurement over a full turn of
360°. It is a system-on-chip, combining integrated Hall
elements, analog front end and digital signal processing
in a single device.
To measure the angle, only a simple two-pole magnet,
rotating over the center of the chip, is required. The
magnet may be placed above or below the IC.
The absolute angle measurement provides instant
indication of the magnet’s angular position with a
resolution of 0.35° = 1024 positions per revolution. This
digital data is available as a serial bit stream and as a
PWM signal.
Furthermore, a user-programmable incremental output
is available, making the chip suitable for replacement of
various optical encoders.
An internal voltage regulator allows the AS5040 to
operate at either 3.3 V or 5 V supplies.
Figure 1: Typical Arrangement of AS5040 and Magnet
Data Sheet
2 Key Features
Contactless high resolution rotational position
encoding over a full turn of 360 degrees
Two digital 10bit absolute outputs:
- Serial interface and
- Pulse width modulated (PWM) output
Three incremental output modes:
- Quadrature A/B and Index output signal
- Step / Direction and Index output signal
- 3-phase commutation for brushless DC
motors
- 10, 9, 8 or 7 bit user programmable
resolution
User programmable zero / index position
Failure detection mode for magnet placement
monitoring and loss of power supply
Rotational speeds up to 30,000 rpm
Push button functionality detects movement
of magnet in Z-axis
Serial read-out of multiple interconnected
AS5040 devices using Daisy Chain mode
Wide temperature range: - 40°C to + 125°C
Fully automotive qualified to AEC-Q100,
grade 1
Small Pb-free package: SSOP 16 (5.3mm x
6.2mm)
3 Applications
Industrial applications:
- Contactless rotary position sensing
- Robotics
- Brushless DC motor commutation
- Power tools
Benefits
Complete system-on-chip
Flexible system solution provides absolute,
PWM and incremental outputs simultaneously
Ideal for applications in harsh environments
due to contactless position sensing
Tolerant to magnet misalignment and airgap
variations
No temperature compensation necessary
No calibration required
Automotive applications:
- Steering wheel position sensing
- Gas pedal position sensing
- Transmission gearbox encoder
- Headlight position control
- Power seat position indicator
Office equipment: printers, scanners, copiers
Replacement of optical encoders
Front panel rotary switches
Replacement of potentiometers
www.austriamicrosystems.com
Revision 2.10
1 - 33
AS5040
Data Sheet
4 Pin Configuration
Figure 2: Pin Configuration SSOP16
MagINCn
MagDECn
A_LSB_U
B_Dir_V
NC
Index_W
VSS
Prog
1
2
16
15
VDD5V
VDD3V3
NC
NC
PWM_LSB
CSn
CLK
DO
AS5040
3
4
5
6
7
8
14
13
12
11
10
9
Pin Description
Table 2 shows the description of each pin of the standard SSOP16 package (Shrink Small Outline Package, 16 leads,
body size: 5.3mm x 6.2mmm; see Figure 2).
Pins 7, 15 and 16 are supply pins, pins 5, 13 and 14 are for internal use and must not be connected.
Pins 1 and 2 are the magnetic field change indicators, MagINCn and MagDECn (magnetic field strength increase or
decrease through variation of the distance between the magnet and the device). These outputs can be used to detect
the valid magnetic field range. Furthermore those indicators can also be used for contact-less push-button
functionality.
Pins 3, 4 and 6 are the incremental pulse output pins. The functionality of these pins can be configured through
programming the one-time programmable (OTP) register.
Table 1: Pin Assignment for the Different Incremental Output Modes
Output Mode
1.x: quadrature
2.x:step/direction
3.x: commutation
Pin 3
A
LSB
U
Pin 4
B
Direction
V
Pin 6
Index
Index
W
Pin 12
PWM
PWM
LSB
Mode 1.x: Quadrature A/B Output
Represents the default quadrature A/B signal mode.
Mode 2.x: Step / Direction Output
Configures pin 3 to deliver up to 512 pulses (up to 1024 state changes) per revolution. It is equivalent to the LSB
(least significant bit) of the absolute position value. Pin 4 provides the information of the rotational direction.
Both modes (mode 1.x and mode 2.x) provide an index signal (1 pulse/revolution) with an adjustable width of one LSB
or three LSB’s.
www.austriamicrosystems.com
Revision 2.10
2 - 33
AS5040
Data Sheet
Table 2 Pin Description SSOP16
Pin
1
2
3
A_LSB_U
4
B_Dir_V
5
6
7
8
Prog
9
10
11
12
13
14
15
16
DO_OD
DO
DI_PD
DI_PU
DO
CLK
CSn
PWM_LSB
NC
NC
VDD3V3
VDD5V
digital
digital
digital
digital
DI_PD
DO_T
DI, ST
DI_PU, ST
DO
-
-
S
S
NC
Index_W
VSS
DO
-
DO
S
DO
Symbol
MagINCn
MagDECn
Type
DO_OD
DO_OD
Description
Magnet Field
Magnitude INCrease;
active low, indicates a distance
reduction between the magnet and the device surface.
Magnet Field
Magnitude DECrease;
active low, indicates a distance
increase between the device and the magnet.
Mode1.x:
Quadrature
A
channel
Mode2.x:
Least Significant Bit
Mode3.x:
U
signal (phase1)
Mode1.x:
Quadrature
B
channel quarter period shift to channel A.
Mode2.x:
Direction
of Rotation
Mode3.x:
V
signal (phase2)
Must be left unconnected
Mode1.x and Mode2.x
:
Index
signal indicates the absolute zero position
Mode3.x:
W
signal (phase3)
Negative Supply Voltage (GND)
OTP
Programming
Input and Data Input for Daisy Chain mode. Internal
pull-down resistor (~74kΩ).
May be connected to VSS if programming is not used
Data Output
of Synchronous Serial Interface
Clock
Input of Synchronous Serial Interface; Schmitt-Trigger input
Chip Select,
active low; Schmitt-Trigger input, internal pull-up resistor
(~50kΩ) connect to VSS in incremental mode (see 0)
Pulse Width Modulation
of approx. 1kHz;
LSB
in
Mode3.x
Must be left unconnected
Must be left unconnected
3V-Regulator Output (see Figure 19)
Positive Supply Voltage 5 V
S
DI
DO_T
ST
supply pin
digital input
digital output /tri-state
Schmitt-Trigger input
output open drain
output
input pull-down
input pull-up
Mode 3.x: Brushless DC Motor Commutation Mode
In addition to the absolute encoder output over the SSI interface, this mode provides commutation signals for
brushless DC motors with either one pole pair or two pole pair rotors. The commutation signals are usually provided
by 3 discrete Hall switches, which are no longer required, as the AS5040 can fulfill two tasks in parallel: absolute
encoder + BLDC motor commutation.
In this mode, pin 12 provides the LSB output instead of the PWM (Pulse-Width-Modulation) signal.
Pin 8 (Prog) is also used to program the different incremental interface modes, the incremental resolution and the
zero position into the OTP (see page 18).
This pin is also used as digital input to shift serial data through the device in Daisy Chain configuration,
(see page 11).
Pin 11 Chip Select (CSn; active low) selects a device within a network of AS5040 encoders and initiates serial data
transfer. A logic high at CSn puts the data output pin (DO) to tri-state and terminates serial data transfer. This pin is
also used for alignment mode (page 21) and programming mode (page 16).
www.austriamicrosystems.com
Revision 2.10
3 - 33
AS5040
Data Sheet
Pin 12 allows a single wire output of the 10-bit absolute position value. The value is encoded into a pulse width
modulated signal with 1µs pulse width per step (1µs to 1024µs over a full turn). By using an external low pass filter,
the digital PWM signal is converted into an analog voltage, allowing a direct replacement of potentiometers.
5 Electrical Characteristics
Absolute Maximum Ratings (non operating)
Stresses beyond those listed under “Absolute Maximum Ratings“ may cause permanent damage to the device. These are stress
ratings only. Functional operation of the device at these or any other conditions beyond those indicated under “Operating
Conditions” is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.
Parameter
DC supply voltage at pin VDD5V
DC supply voltage at pin VDD3V3
Input pin voltage
Input current (latchup immunity)
Electrostatic discharge
Storage temperature
Body temperature (Lead-free
package)
Humidity non-condensing
Symbol
VDD5V
VDD3V3
Vin
Iscr
ESD
Tstrg
TBody
H
Min
-0.3
-0.3
-0.3
-0.3
-100
Max
7
5
VDD5V +0.3
7.5
100
±2
Unit
V
V
V
mA
kV
°C
°C
%
Note
Pins MagIncn, MagDecn, CLK, CSn,
Pin Prog
Norm: JEDEC 78
Norm: MIL 883 E method 3015
Min – 67°F ; Max +257°F
t=20 to 40s, Norm: IPC/JEDEC J-
Std-020C
Lead finish 100% Sn “matte tin”
-55
125
260
5
85
Operating Conditions
Parameter
Ambient temperature
Supply current
External supply voltage at pin VDD5V
Internal regulator output voltage at pin
VDD3V3
External supply voltage at pin VDD5V,
VDD3V3
Symbol
T
amb
I
supp
VDD5V
VDD3V3
VDD5V
VDD3V3
4.5
3.0
3.0
3.0
Min
-40
16
5.0
3.3
3.3
3.3
Typ Max Unit
125
21
5.5
3.6
3.6
3.6
°C
mA
V
V
V
V
5V operation
3.3V operation (pins VDD5V and
VDD3V3 connected)
-40°F…+257°F
Note
DC Characteristics for Digital Inputs and Outputs
CMOS Schmitt-Trigger Inputs: CLK, CSn (CSn = internal Pull-up)
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation)
unless otherwise noted)
Parameter
High level input voltage
Low level input voltage
Schmitt Trigger hysteresis
Input leakage current
Pull-up low level input current
www.austriamicrosystems.com
Symbol
V
IH
V
IL
V
Ion-
V
Ioff
I
LEAK
I
iL
Min
0.7 * VDD5V
Max
Unit
V
Note
Normal operation
0.3 * VDD5V
1
-1
-30
Revision 2.10
V
V
CLK only
CSn only, VDD5V: 5.0V
4 - 33
1
-100
µA
µA
AS5040
Data Sheet
CMOS / Program Input: Prog
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation)
unless otherwise noted)
Parameter
High level input voltage
High level input voltage
Low level input voltage
Pull-down high level input current
Symbol
V
IH
V
PROG
V
IL
I
iL
Min
0.7 * VDD5V
Max
5
0.3 * VDD5V
100
Unit
V
V
V
µA
VDD5V: 5.5V
During programming
Note
See “programming conditions”
CMOS Output Open Drain: MagINCn, MagDECn
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation)
unless otherwise noted)
Parameter
Low level output voltage
Output current
Open drain leakage current
Symbol
V
OL
I
O
I
OZ
Min
Max
VSS+0.4
4
2
1
Unit
V
mA
µA
VDD5V: 4.5V
VDD5V: 3V
Note
CMOS Output: A, B, Index, PWM
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation)
unless otherwise noted)
Parameter
High level output voltage
Low level output voltage
Output current
Symbol
V
OH
V
OL
I
O
Min
VDD5V-0.5
VSS+0.4
4
2
Max
Unit
V
V
mA
VDD5V: 4.5V
VDD5V: 3V
Note
Tristate CMOS Output: DO
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation)
unless otherwise noted)
Parameter
High level output voltage
Low level output voltage
Output current
Tri-state leakage current
Symbol
V
OH
V
OL
I
O
I
OZ
Min
VDD5V –0.5
VSS+0.4
4
2
1
Max
Unit
V
V
mA
µA
VDD5V: 4.5V
VDD5V: 3V
Note
Magnetic Input Specification
(operating conditions: T
amb
= -40 to +125°C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation) unless otherwise
noted)
Two-pole cylindrical diametrically magnetised source:
Parameter
Diameter
Thickness
Magnetic input field
amplitude
Symbol
d
mag
t
mag
B
pk
Min
4
2.5
45
75
Typ
6
Max
Unit
mm
mm
mT
Note
Recommended magnet: Ø 6mm x 2.5mm for
cylindrical magnets
Required vertical component of the
magnetic field strength on the die’s surface,
measured along a concentric circle with a
radius of 1.1mm
www.austriamicrosystems.com
Revision 2.10
5 - 33