ETC AS5040

AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
AS5040
10 BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Key Features
-
-
-
General Description
Contact-less high resolution encoding over a full turn of
360 degrees
Flexible system due to user programmable incremental
output modes:
10, 9, 8 or 7 bit user programmable resolution
Quadrature A/B and index output signal
Single channel output and direction indication
U-V-W commutation signals for brush-less DC
motors
Absolute angular position mode:
10-bit resolution providing 1024 absolute positions
per 360 degrees (step size ~ 0.35 deg)
Synchronous serial interface (SSI) output for absolute
position data
-
Pulse width modulated (PWM) output, duty cycle
proportional to angle
-
User programmable zero / index position
-
Failure detection mode for magnet placement monitoring
-
Rotational speeds up to 10,000 rpm (incremental output)
-
Push button functionality detects movement of magnet
in Z-axis
-
Two supply voltages:
3.3 V or 5 V
-
Wide temperature range:
- 40°C to + 125°C
-
Small package:
The AS5040 is a system-on-chip, combining integrated Hall
elements, analog front end and digital signal processing in a
single device. It provides incremental output signals and the
absolute angular position of a magnet that is placed either
above or below the device.
The AS5040 can be configured to specific customer
requirements by programming the integrated OTP (one time
programmable) register. An internal voltage regulator allows
the AS5040 to operate at either 3.3 V or 5 V supplies.
SSOP 16 (5.3mm x 6.2mm)
Figure 1: Typical arrangement AS5040 and magnet
Applications
Benefits
-
World’s smallest multiple output magnetic rotary
encoder
-
Tolerant to magnetic source misalignment
-
Failure detection feature
-
Complete system-on-chip:
Flexible system solution provides absolute,
incremental and PWM digital outputs
simultaneously
minimum number of external components needed
Serial read-out of multiple AS5040 devices using daisy
chain mode
-
Industrial applications such as:
-
Motion control
Robotics
Brush-less DC motor commutation
Power tools
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
-
-
Ideal for applications in harsh environments due to
contact-less position sensing
Revision 1.1
DATA SHEET
-
Front panel rotary switches and potentiometers
www.austriamicrosystems.com
Page 1 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Pin Configuration
Pin
MagINCn
1
16
VDD5V
MagDECn
2
15
VDD3V3
A_LSB_U
3
14
NC
B_Dir_V
4
13
NC
NC
5
12
PWM_LSB
Index_W
6
11
CSn
VSS
7
10
CLK
Prog
8
9
DO
Symbol
Type
Description
MagINCn
DO_OD
2
MagDECn
DO_OD
Magnet Field Magnitude
DECrease; active low, indicates
a distance increase between the
device and the magnet.
3
A_LSB_U
DO
Mode1: Quadrature A channel
Mode2: Least Significant Bit
Mode3: U signal (phase1)
4
B_Dir_V
DO
Pin Description
Mode1: Quadrature B channel
quarter period shift to channel A.
Mode2: Direction of Rotation
Mode3: V signal (phase2)
5
NC
-
must be left unconnected
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).
6
Index_ W
DO
Mode1 and Mode2 : Index
signal indicates the absolute
zero position
Mode3: W signal (phase3)
7
VSS
S
Negative Supply Voltage (GND)
AS5040
1
Magnet Field Magnitude
INCrease; active low, indicates a
distance reduction between the
magnet and the device surface.
Figure 2: Pin configuration SSOP16
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:
8
Prog
DI_PD
Programming and Data Input for
Mode configuration, incremental
resolution setting, Zero-Position
Programming and Daisy Chain
mode configuration. Internal pulldown resistor (~74kΩ)
9
DO
DO_T
Data Output of
Synchronous Serial Interface
10
CLK
DI,
ST
Clock Input of
Synchronous Serial Interface;
Schmitt-Trigger input
11
CSn
DI_PU,
ST
Chip Select, active low; SchmittTrigger input, internal pull-up
resistor (~50kΩ)
Output mode
Pin3
Pin4
Pin6
Pin12
12
PWM_LSB
DO
Pulse Width Modulation of
approx. 1kHz; LSB in Mode3
01 quadrature
A
B
Index
PWM
13
NC
-
must be left unconnected
14
NC
-
must be left unconnected
02 single channel
LSB
direction
Index
PWM
03 commutation
U
V
W
LSB
15
VDD3V3
S
3V-Regulator Output
16
VDD5V
S
Positive Supply Voltage 5 V
Table 1: pin assignment for the different incremental output modes
Table 2: Pin description SSOP16
Mode1 - Quadrature A/B output:
DO_OD
DO
DI_PD
DI_PU
Represents the default quadrature A/B signal mode.
digital
digital
digital
digital
output open drain
output
input pull-down
input pull-up
S
DI
DO_T
ST
supply pin
digital input
digital output /tri-state
schmitt-trigger input
Mode2 – Single channel output:
Configures Pin 3 to deliver up to 512 pulses (up to 1024
state changes) per revolution. It is equivalent to the statechange of the LSB (least significant bit) of the absolute
position value. Pin 4 provides the information of the
rotational direction.
Both modes (mode 1 and mode 2) provide an index signal (1
pulse/revolution) with an adjustable width of one LSB or
three LSBs.
Revision 1.1
Mode3 – Brush-less DC motor commutation mode:
The alternative third mode provides commutation signals for
electrical motors with either one pole pair or two pole pairs.
In this mode Pin 12 provides the LSB output instead of the
PWM (Pulse-Width-Modulation) signal.
Pin 8 (Prog) can be used as digital input to shift serial data
through the device (Daisy Chain Configuration). This pin is
also necessary to program the different interface modes,
the incremental resolution and the zero-position into the
O(SSI) to readout the absolute position data of the magnet.
www.austriamicrosystems.com
Page 2 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Pin 11 Chip Select (CSn; active low) selects a device within
a network of AS5040 encoders. A “logic high” at CSn forces
the digital tri-state output into the high ohmic state. A “high”
pulse with a minimum duration of t CSn also initiates a
subsequent readout of the current angular value.
Pin 12 allows a single wire output of the 10bit absolute
position value. The value is encoded into a pulse width
modulated signal ((absolute position code + 1) µs). By
using an external low pass filter, the PWM angular position
output can be converted to an analog voltage, making a
direct replacement of potentiometers possible.
Functional Description
The AS5040 is manufactured in a CMOS standard process
and uses a spinning current Hall technology for sensing the
magnetic field distribution across the surface of the chip.
The integrated Hall elements are placed around the center
of the device and deliver a voltage representation of the
magnetic field at the surface of the IC.
Through Sigma-Delta Analog / Digital Conversion and
Digital Signal-Processing (DSP) algorithms, the AS5040
provides accurate high-resolution absolute angular position
information. For this purpose a Coordinate Rotation Digital
Computer (CORDIC) calculates the angle and the
magnitude of the Hall array signals.
The DSP is also used to provide digital information at the
outputs M a g I N C n and M a g D E C n that indicate movements
of the used magnet towards or away from the device’s
surface.
A small low cost diametrically magnetized (two-pole)
standard magnet provides the angular position information
(see Figure 15).
The AS5040 senses the orientation of the magnetic field
and calculates a 10-bit binary code. This code can be
accessed via a Synchronous Serial Interface (SSI). In
addition, an absolute angular representation is given by a
Pulse Width Modulated signal at pin 12 (PWM). This PWM
signal output also allows the generation of a direct
proportional analogue voltage, by using an external LowPass-Filter.
Besides the absolute angular position information the
device simultaneously provides incremental output signals.
The various incremental output modes can be selected by
programming the OTP mode register bits according to Table
7. As long as no programming voltage is applied at pin
PROG, the new setting can be overwritten at any time and
will be reset to default when power is turned off. To make
the setting permanent, the OTP register must be zapped
(see Figure 12). The default setting represents the
quadrature A/B mode including the Index signal with a pulse
width of 1 LSB. The Index signal is logic high at the user’s
programmed position.
The AS5040 is tolerant to magnet misalignment and
magnetic stray fields due to differential measurement
technique and Hall sensor conditioning circuitry.
MagINCn
MagDECn
Sin
Ang
DSP
Hall Array
&
Frontend
Amplifier
Cos
Mag
CSn
Absolute
Interface
(SSI)
DO
PWM_LSB
CLK
OTP
Register
A_LSB_U
Programming
Parameters
Incremental
Interface
B_Dir_V
Index_W
Prog
Revision 1.1
Figure 3
AS5040 Block Diagram
www.austriamicrosystems.com
Page 3 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
10 bit Absolute Angular Position Output
Synchronous Serial Interface SSI
CSn
t CLK FE
T CLK / 2
t CSn
1
CLK
DO
D9
t DO active
t DO valid
8
D8
D7
D6
D5
D4
D3
D2
t CLK FE
1
16
D1
D0
OCF
COF
LIN
M ag
IN C
Status bits
Angular position data
Ma g Even
DE C PAR
D9
t DO Tristate
Figure 4: ynchronous serial interface with absolute angular position data
If CSn changes to logic low, Data Out (DO) will change from
high impedance (tri-state) to logic high and the read-out will
be initiated.
MagINC, (Magnitude Increase) becomes HIGH, when
the magnet is pushed towards the IC, thus the magnetic
field strength is increasing.
1.
After a minimum time t CLK FE , data is latched into the
output shift register with the first falling edge of CLK.
MagDEC, (Magnitude Decrease) becomes HIGH, when
the magnet is pulled away from the IC, thus the
magnetic field strength is decreasing.
2.
Each subsequent rising CLK edge shifts out one bit of
data.
Both signals HIGH indicate a magnetic field that is out
of the allowed range (see Table 3).
3.
The serial word contains 16 bits, the first 10 bits are
the angular information D[9:0], the subsequent 6 bits
contain system information, about the validity of data
such as OCF, COF,LIN, Parity and Magnetic Field
status (increase/decrease) .
PAR Even Parity bit for transmission error detection of
bits 1…13 (D9…D0,OCF,COF,LIN)
4.
A subsequent measurement is initiated by a “high”
pulse at CSn with a minimum duration of t C Sn.
Ma g INC
MagDEC
Description
0
0
No distance change
Magnetic Input Field OK
0
1
Distance increase
(Push-Release)
1
0
Distance decrease
(Push-Fn)
1
Magnetic Input Field
invalid – out of range
too large, too small
(Missing magnet)
Data Content:
D9:D0 absolute angular position data (MSB is clocked
out first)
OCF (Offset Compensation Finished), logic high
indicates the finished Offset Compensation Algorithm
COF (Cordic Overflow), logic high indicates an out of
range error in the CORDIC part. When this bit is set, the
data at D9:D0 is invalid. The absolute output maintains
the
last
valid
angular
value.
This Alarm may be resolved by bringing the magnet
within the X-Y-Z tolerance limits.
LIN (Linearity Alarm), logic high indicates that the input
field
generates
a
critical
output
linearity.
When his bit is set, the data at D9:D0 may still be used,
but can contain invalid data. This Warning may be
resolved by bringing the magnet within the X-Y-Z
tolerance limits.
Revision 1.1
1
Table 3: Magnetic magnitude variation indicator
Note: Pin 1 (MagINCn) and Pin 2 (MagDECn) are active low
via open drain output.
The absolute angular output is always set to a resolution of
10 bit. Placing the magnet above the chip, angular values
increase in clockwise direction by default.
www.austriamicrosystems.com
Page 4 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Angle
Data D0:D0 is valid, when the status bits have the following
configurations:
OCF
COF
1
0
LIN
0
Mag
INC
Mag
DEC
0
0
0
1
1
0
PW MIN
0 deg
(Pos 0)
Parity
1µs
1025µs
PW MAX
even checksum of
bits 1:13
359,65 deg
(Pos 1023)
1024µs
Table 4: status bit outputs
The absolute angular position is sampled at a rate of 10
(0.1ms). This allows reading out all 1024 positions per
degrees within 0.1 seconds (9.76 Hz) without skipping
position. By multiplying 10Hz by 60, one obtains
corresponding maximum rotational speed of 585.9 rpm.
1/fPWM ± 5%
kHz
360
any
the
Figure 5: PWM output signal
P a r a m e te r
Symbol
Typ
Unit
Note
If skipping every second absolute angular position would be
acceptable for specific applications, one could increase the
rotational speed of the magnet source by a factor of two.
Thus speeds of 1200 rpm would be achievable.
PWM frequency
fPWM
0.9756
kHz
Signal period: 1025 µs
MIN pulse width
PWMIN
1
µs
Readout of every absolute angular position allows for
rotational speeds of up to 600rpm
MAX pulse width
PWMAX
1024
µs
Readout of every second angular position allows for
rotational speeds of up to 1200rpm
Consequently increasing the rotational speed diminishes the
number of absolute angular positions to be read out (see
Table 6). Regardless of the rotational speed or the number
of positions to be read out, the absolute angular value is
always given at the highest resolution of 10-bit.
The incremental outputs are not affected by rotational
speed restrictions due to the implemented interpolator. The
incremental output signals may be used for high-speed
applications with rotational speeds of up to 10,000rpm
without missing pulses.
10bit Pulse Width Modulation Output
The AS5040 provides a pulse width modulated output
(PWM), whose duty cycle is proportional to the measured
angle:
Position =
t on ⋅1025
(ton + toff ) − 1
The PWM frequency is internally trimmed to an accuracy of
±5%. This tolerance can be cancelled by measuring the
complete duty cycle as shown above.
Revision 1.1
- Position 0d
- Angle 0 deg
- Position 1023d
- Angle 359,65 deg
Table 5: PWM signal parameters
Generating an Analog Output
This can be achieved by averaging the PWM signal, using
an external active or passive low pass filter.
This method generates an analogue output signal that is
proportional to the measured angle. Thus the device can be
used as direct replacement of potentiometers with an
analogue voltage output.
Incremental Outputs
Three different incremental output modes are possible with
Quadrature A/B being the default mode.
Figure 6 shows the two-channel quadrature as well as the
single channel incremental signal (LSB) and the direction bit
in clockwise (CW) and counter-clockwise (CCW) direction.
Quadrature A / B Output (quad AB Mode)
The phase shift between channel A and B indicates the
direction of the magnet movement. Channel A leads channel
B at a clockwise rotation of the magnet (top view, magnet
placed above or below the device) with 90 electrical
degrees. Channel B leads channel A at a counter-clockwise
rotation.
www.austriamicrosystems.com
Page 5 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Single Channel Output (LSB / Dir Mode)
Output LSB reflects the LSB (least significant bit) of the
actual programmed incremental resolution (OTP Register Bit
Div0, Div1). Output Dir provides information about the
rotational direction of the magnet, which may be placed
above or below the device (1=clockwise; 0=counter
clockwise; top view). Dir is updated with every LSB change.
In both modes (quad A/B, single channel) the resolution and
the index output are user programmable. The index pulse
indicates the zero position and is by default one angular
step (1LSB) wide. However, it can be set to three LSBs by
programming the Index-bit of the OTP-Register accordingly
(see Table 7).
In practice, there is no upper speed limit. The only
restriction is that there will be fewer samples per revolution
as the speed increases.
Regardless of the rotational speed, the absolute angular
value is always sampled at the highest resolution of 10-bit.
Incremental mode:
Incremental encoders are usually required to produce
NO missing pulses up to several thousand rpm’s.
Therefore, the AS5040 has a built-in interpolator, which
ensures that there are no missing pulses at the incremental
outputs for rotational speeds of up to 10,000 rpm, even at
the highest resolution of 10bits (256 pulses per revolution).
High Speed Operation
Incremental Output
Mode
Absolute Output Mode
Absolute mode:
The AS5040 has an internal sampling rate of 10kHz.
Consequently, it will sample the angle of the magnet every
100µs. Given this value, for a magnet rotating at high
speed, the number of samples (n) per turn can be
calculated by
586 rpm = 1024 samples / turn
1172 rpm = 512 samples / turn
no missing pulses
@ 10bit resolution (256ppr):
2343 rpm = 256 samples / turn
etc…
max. speed = 10,000 rpm
Table 6: Speed performance
60
n=
rpm • 100 µs
Quad A/B-Mode
mechanical
zero position
Rotation Direction
Change
mechanical
zero position
A
B
Index=0
1LSB
Index
LSB / Dir-Mode
Hyst =
2 LSB
Index=1
3 LSB
LSB
Dir
counterclockwise ccw
clockwise cw
t Dir valid
CSn
t Incremental outputs valid
Figure 6: Incremental Output Modes
Revision 1.1
www.austriamicrosystems.com
Page 6 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Incremental output hysteresis
To avoid flickering incremental outputs at a stationary magnet position, a hysteresis is introduced.
Incremental
output
indication
X +4
Hysteresis:
2 LSB
X +3
X +2
X +1
X
X +1 X +2 X +3 X +4 X +5
X
Magnet position
Clockwise direction
Counter clockwise direction
Figure 7: Hysteresis window for incremental outputs
In case of any change of the rotational direction, the
incremental outputs have a hysteresis of 2 LSB (1LSB
upon request).
Daisy Chain Mode
It is possible to connect several AS5040’s in series,
while reading them by just one serial data line. This socalled “daisy-chain” mode is accomplished by connecting
the data output (DO; pin 9) to the data input (PROG; pin
8) of the subsequent device. The serial data of all
connected devices is read from the DO pin of the last
device in the chain. The length of the serial bit stream
increases with every connected device, it is
Regardless of the programmed incremental resolution,
the hysteresis of 2 LSB always corresponds to the
highest resolution of 10 bit. In absolute terms, the
hysteresis is set to 0.704 degrees.
For constant rotational directions, every magnet position
change is indicated at the incremental outputs (Figure 7).
If for example the magnet turns clockwise from position
„x+3“ to „x+4“, the incremental output would also indicate
this position accordingly.
n x (16+1) bits:
e.g 34bit for two devices, 51bit for three devices,etc…
The last data bit of the first device (Parity) is followed by
a logic "0" and the first data bit of the second device
(D9), etc..
A change of the magnet’s rotational direction back to
position „x+3“ means, that the incremental output still
remains unchanged for the duration of 2 LSB, until
position „x+2“ is reached. After this transition, the
incremental outputs directly indicate every new position,
while the rotational direction is constant.
µC
AS5040
Data IN
DO
CSn
PROG
CLK
AS5040
DO
CSn
PROG
CLK
AS5040
DO
CSn
PROG
CLK
CLK
CSn
Revision 1.1
Figure 8: Daisy Chain Mode configuration
www.austriamicrosystems.com
Page 7 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Brush-less DC Motor Commutation Mode
Mode 3.2 (3.3) is used for motors with two pole pairs
requiring a higher pulse count to ensure a proper current
commutation. In this case the pulse width is 256
positions, equal to 90 degrees.
Brush-less DC motors require angular information for
current commutation purposes. The AS5040 provides UV-W commutation signals for one and two pole pair
motors. In addition to the three-phase output signals the
single channel (LSB) output at pin 12 allows high
accuracy speed measurement. Two resolutions (9 or 10
bit) can be selected by programming Div0 according to
Table 7.
The precise physical angle at which the U, V and W
signals change state (“Angle” in Figure 9 and Figure 10)
is calculated by multiplying each transition position by
the angular value of 1 count:
Mode 3.0 (3.1) is used for brush-less DC motors with one
pole pair rotors. The three phases (U,V,W) are 120
degrees apart, each phase is 180 degrees on and 180
degrees off.
Commutation - Mode 3.0
Angle [deg] = Position x (360 degree / 1024)
(One-pole-pair)
Width: 512 Steps
Width: 512 Steps
U
V
W
CW direction
Position:
Angle:
0
171
341
512
683
853
0
0,0
60,12
119,88
180,0
240,12
299,88
360,0
Figure 9: U, V and W-signals for BLDC motor commutation (Div1 = 0; Div0 = 0)
Commutation - Mode 3.2
Width: 256 Steps
(Two-pole-pairs)
Width: 256 Steps
U
V
W
CW direction
Position:
Angle:
0
85
171
256
341
427
512
597
683
768
853
939
0
0,0
29,88
60,12
90,0
119,88
150,12
180,0
209,88
240,12
270,00
299,88
330,12
360,0
Figure 10: U, V and W-signals for 2 pole BLDC motor commutation (Div1=1; Div0 = 0)
Revision 1.1
www.austriamicrosystems.com
Page 8 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Programming the AS5040
OTP Register Content:
CCW=0 – angular value increases in clockwise direction
CCW=1 - angular value increases in counter clockwise
direction
After writing the data into the OTP register it can be
permanently programmed (“zapped”) by rising the Prog
pin to the programming voltage V PROG . 16 accurate CLK
pulses (t PROG ) must be applied to program the fuses
(Figure 12). The programmed data is available after the
next power-on.
CSn
Counter Clockwise Bit
CCW
After power-on, programming the AS5040 is enabled at
the rising edge of CSn with Prog = logic high. 16 bit
configuration data must be serially written into the OTP
register via the Prog-pin. The first “CCW” bit is followed
by the zero position data (MSB first) and the Incremental
Mode setting. Data must be valid at the rising edge of
CLK (Figure 11).
Z [9:0]
Programmable Zero / Index Position
Indx
Index Pulse Width Selection
Div1,Div0
Divider Setting of Incremental Output
Md1, Md0
Incremental Output Mode Selection
t Data in
CCW Z9
Prog
Z8
Z7
Z6
Z5
Z4
Z3
Z2
Z1
Z0 Indx Div1 Div0 Md1 Md0
1
CLKPROG
16
Incremental Modes
Zero / Index Position
t Prog enable
t Data in valid
Figure 11: Programming Access – Write Data
W r ite D a ta
P r o g r a m m in g M o d e
P o w e r O ff
CSn
V
D a ta
P ro g
t
CLK
PRO G
PROG
1
PRO G
t
16
t
Load P R O G
P R O G f i n is h e d
Figure 12: Programming Access – Zapp Data
Zero Position Programming
Any 10bit angular position can be defined as the
zero/index position. It may be used in several
applications in order to simplify assembly. For Zero
Position Programming, the magnet must be brought to
the mechanical zero position of the system (e.g. the “off”position of a rotary switch). The orientation (north/south
pole) of the magnet does not need to be considered.
Revision 1.1
The mechanical zero position can be read out via the SSI
and be assigned as new zero position Z[9:0] and
programmed into the OTP register.
This new absolute zero position at the same time also
represents the Index pulse position for incremental
output modes.
www.austriamicrosystems.com
Page 9 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Figure 11) allows for reversing the indicated direction,
e.g. when the magnet is placed underneath the IC.(CCW
= 0 - angular value increases clockwise; CCW = 1 –
angular value increases counter clockwise).
Incremental Mode Programming
Three different incremental output modes are available.
Mode: Md1=0 / Md0=1 sets the AS5040 in quadrature
mode.
By default, the zero / index position pulse is one LSB
wide. However, it can be increased to a three LSB wide
pulse by setting the Index-bit of the OTP Register. This
is especially useful for high speed operation, where the
index signal output may be just a small glitch otherwise.
Mode: Md1=1 / Md0=0 sets the AS5040 in single channel
mode with direction indicator (see Table 1 )
In both modes the incremental resolution can be reduced
from 10 bit down to 9, 8 or 7 bit using the divider OTP
bits Div1 and Div0. Md0 or Md1 must additionally set for
that purpose.
Especially for brush-less DC motor-control, further
programmable options are available (CommutationModes), are available. Md1 = Md0 = 1 changes the
incremental output pins 3,4 and 6 to a 3-phase
commutation signal. Div1 defines the number of pulses
per revolution for either a single-pole (Div1=0) or twopole pair (Div1=1) motor operation. In addition, the LSB
is available at pin 12 (the LSB signal replaces the PWMsignal), which allows for high rotational speed
measurement of up to 10,000 rpm.
Mode: Md1=1 / Md0=1 sets the AS5040 in brushless DC
motor commutation mode with an additional LSB
incremental signal at pin 12 (PWM_LSB).
To allow programming of all bits, the default facatory
setting is all bits = 0. This mode is equal to mode 1:0
(quadrature AB, 1LSB index width, 256ppr).
The absolute angular output value, by default, increases
if the magnet, placed either above or below the chip,
turns clockwise (top view). Setting the CCW-bit (see
OTP-Mode-Register-Bit
Pulses per Incremental
Revolution Resolution
PIN #
Div1
Div0
Inde
x
0
0*
0*
0*
1LSB
0
1
0
0
0
1LSB
quadAB-Mode1.1
0
1
0
0
1
3LSBs
quadAB-Mode1.2
0
1
0
1
0
1LSB
quadAB-Mode1.3
0
1
0
1
1
quadAB-Mode1.4
0
1
1
0
0
1LSB
quadAB-Mode1.5
0
1
1
0
1
3LSBs
quadAB-Mode1.6
0
1
1
1
0
1LSB
quadAB-Mode1.7
0
1
1
1
1
3LSBs
LSB/Dir-Mode2.0
1
0
0
0
0
1LSB
LSB/Dir-Mode2.1
1
0
0
0
1
3LSBs
LSB/Dir -Mode2.2
1
0
0
1
0
1LSB
LSB/Dir -Mode2.3
1
0
0
1
1
3LSBs
LSB/Dir -Mode2.4
1
0
1
0
0
LSB/Dir -Mode2.5
1
0
1
0
1
3LSBs
LSB/Dir -Mode2.6
1
0
1
1
0
1LSB
LSB/Dir -Mode2.7
1
0
1
1
1
3LSBs
Commutation-Mode3.0
1
1
0
0
0
Commutation-Mode3.1
1
1
0
1
0
Commutation-Mode3.2
1
1
1
0
0
Commutation-Mode3.3
1
1
1
1
0
Mode
Md1
Default (Mode0.0)
0
quadAB-Mode1.0
Md0
3
A
LSB
U(0º)
U’
(0º, 180º)
4
B
Dir
V(120º)
6
3LSBs
1LSB
W(240º)
V’
W’
(60º,240º) (120º,300º)
12
PWM
10bit
ppr
bit
2x256
10
2x128
9
2x64
8
2x32
7
512
10
256
9
128
8
64
7
PWM
10bit
LSB
LSB
3x1
2x3
10
9
10
9
Table 7: One Time Programmable (OTP) register options
.*Note: Div1,Div0 and Index cannot be programmed in Mode 0:0
Revision 1.1
www.austriamicrosystems.com
Page 10 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Alignment Mode
The alignment mode simplifies centering the magnet over
the center of the chip to gain maximum accuracy.
Alignment mode can be enabled with the falling edge of
CSn while PROG = logic high (Figure 13). The Data bits
D9-D0 of the SSI change to a 10bit displacement
amplitude output. The magnet is properly aligned, when
the reading is =< 32 at all rotation angles. The larger the
value, the further the magnet is off-center at that
particular angle.
The MagINCn and MagDECn indicators will be = 1 when
the alignment mode reading is > 32. A properly aligned
magnet will produce a MagINCn = MagDECn = 0 signal
throughout a full 360° turn of the magnet.
5V Operation
1...10µF
VDD3V3
100n
VDD5V
LDO
Internal
VDD
DO
I
N
T
E
R
F
A
C
E
4.5 - 5.5V
The Alignment mode can be reset to normal operation
mode by a power-on-reset (disconnect / re-connect
power supply).
PWM_LSB
CLK
CSn
A_LSB_U
B_Dir_V
Index_W
Prog
VSS
PROG
CSn
AlignMode Enable
Read-out
via SSI
3.3V Operation
VDD3V3
100n
VDD5V
2µs 2µs
min. min.
LDO
Internal
VDD
DO
3.0 - 3.6V
Figure 13: Enabling the alignment mode
3.3V / 5V Operation
The AS5040 operates either at 3.3V ±10% or at 5V
±10%. This is made possible by an internal 3.3V LowDropout (LDO) Voltage regulator. The internal supply
voltage is always taken from the output of the LDO,
meaning that the internal blocks are always operating at
3.3V.
For 3.3V operation, the LDO must be bypassed by
connecting VDD3V3 with VDD5V (see Figure 14).
VSS
I
N
T
E
R
F
A
C
E
PWM_LSB
CLK
CSn
A_LSB_U
B_Dir_V
Index_W
Prog
Figure 14: Connections for 5V / 3.3V supply voltages
A buffer capacitor of 100nF is recommended in both
cases close to pin VDD5V.
For 5V operation, the 5V supply is connected to pin
VDD5V, while VDD3V3 (LDO output) must be buffered by
a 1...10µF capacitor, which is supposed to be placed
close to the supply pin (see Figure 14).
The VDD3V3 output is intended for internal use only It
must not be loaded with an external load.
The output voltage of the digital interface I/O’s
corresponds to the voltage at pin VDD5V, as the I/O
buffers are supplied from this pin (see Figure 14).
Revision 1.1
www.austriamicrosystems.com
Page 11 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Physical Placement of the Magnet
Choosing the proper magnet
Typically the magnet should be 6mm in diameter and
3mm in height. Magnetic materials such as rare earth
AlNiCo/SmCo5 or NdFeB are recommended.
The best linearity can be achieved by placing the magnet
according to the drawing below.
3.9 mm
3.9 mm
1
The magnetic field strength perpendicular to the die
surface has to be in the range of ±45mT…±75mT (peak).
Defined center
2.433 mm
The magnet’s field strength should be verified using a
gauss-meter. The magnetic field Bv at a given distance,
along a concentric circle with a radius of 1.1mm (R1),
should be in the range of ±45mT…±75mT. (see Figure
15).
0.25 mm
2.433 mm
Rd
typ. 6mm diameter
Figure 16: Defined center and displacement radius Rd
N
S
Magnet placement:
The magnet’s axis should be aligned within a radius Rd
of 0.25mm (displacement radius Rd) with respect to the
defined center of the IC.
Magnet axis
R1
Magnet axis
The magnet may be placed below or above the device.
The distance should be chosen such that the magnetic
field on the die surface is within the specified limits (see
Figure 15). The typical distance “z” between the magnet
and the package surface is 0.5 mm to 1.5mm, provided
the use of the recommended magnet material and
dimensions (6mm x 3mm). Larger distances are possible,
as long as the required magnetic field strength stays
within the defined limits.
Vertical field
component
R1 concentric circle;
radius 1.1mm
However, a magnetic field outside the specified range
may still produce usable results, but the out-of-range
condition will be indicated by MagINCn (pin 1) and
MagDECn (pin 2), see Table 2.
Vertical field
component
Bv
(45…75mT)
0
N
360
S
360
Figure 15: Typical magnet (6x3mm) and magnetic field distribution
Die surface
Package surface
z
0.576mm ± 0.1mm
1.282mm ± 0.15mm
Figure 17: Vertical placement of the magnet
Revision 1.1
www.austriamicrosystems.com
Page 12 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Electrical Characteristic
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
Symbol
Min
Max
Unit
DC supply voltage at pin VDD5V
VDD5V
-0.3
7
V
DC supply voltage at pin VDD3V3
VDD3V3
5
V
Note
Input pin voltage
Vin
-0.3
VDD5V +0.3
V
Input current (latchup immunity)
Iscr
-100
100
mA
Norm: Jedec 17
Electrostatic discharge
ESD
±1
kV
Norm: MIL 883 E method 3015
Storage temperature
Tstrg
-55
125
°C
Min – 67°F ; Max +257°F
Body temperature (Lead-free package)
TBody
250
°C
85
%
Humidity non-condensing
H
5
t=20 to 40s, Norm: IPC/JEDEC J-Std-020B
Lead finish 100% Sn “matte tin”
Operating Conditions
Parameter
Symbol
Min
Typ Max
Unit
Ambient temperature
Tamb
-40
125
°C
Supply current
Isupp
16
25
mA
Supply voltage at pin VDD5V
VDD5V
4.5
5.0
5.5
V
Voltage regulator output voltage at pin VDD3V3
VDD3V3
3.0
3.3
3.6
V
Supply voltage at pin VDD5V
VDD5V
3.0
3.3
3.6
V
Supply voltage at pin VDD3V3
VDD3V3
3.0
3.3
3.6
V
Note
-40°F…+257°F
5V Operation
3.3V Operation
(pin VDD5V and VDD3V3 connected)
DC Characteristics for Digital Inputs and Outputs
CMOS Schmitt-Trigger Inputs: CLK, CSn. (CSn= internal Pull-up)
Parameter
Symbol
Min
High level input voltage
VIH
0.7 * VDD5V
Low level input voltage
VIL
Schmitt Trigger hysteresis
Input leakage current
Pullup low level input current
Max
Unit
0.3 * VDD5V
V
V
Note
normal operation
VIon- VIoff
1
ILEAK
-1
1
V
µA
CLK only
IiL
-30
-100
µA
CSn only, VDD5V: 5.0V
CMOS / Program Input: Prog
Parameter
Symbol
Min
Max
Unit
High level input voltage
VIH
0.7 * VDD5V
5
V
High level input voltage
VPROG
see “programming conditions”
V
Low level input voltage
VIL
0.3 * VDD5V
V
Pulldown high level input current
IiL
100
µA
Revision 1.1
www.austriamicrosystems.com
Note
during programming
VDD5V: 5.5V
Page 13 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
CMOS Output Open Drain: MagINCn, MagDECn
Parameter
Symbol
Low level output voltage
Min
VOL
Output current
IO
Open drain leakage current
IOZ
Max
Unit
VSS+0.4
V
4
2
mA
1
µA
Max
Unit
Note
VDD5V: 4.5V
VDD5V: 3V
CMOS Output: A, B, Index, PWM
Parameter
Symbol
Min
High level output voltage
VOH
VDD5V-0.5
Low level output voltage
VOL
Output current
IO
Note
V
VSS+0.4
V
4
mA
VDD5V: 4.5V
2
mA
VDD5V: 3V
Max
Unit
Tristate CMOS Output: DO
Parameter
Symbol
Min
High level output voltage
VOH
VDD5V –0.5
Low level output voltage
VOL
VSS+0.4
V
Output current
IO
4
mA
VDD5V: 4.5V
2
mA
VDD5V: 3V
1
µA
Tri-state leakage current
IOZ
Note
V
Magnetic Input Specification
Two-pole cylindrical diametrically magnetised source:
Parameter
Symbol
Min
Diameter
dmag
4
Magnetic input field amplitude
Bpk
45
Magnetic offset
Boff
Max
(rotational speed of magnet)
Magnetic field temperature drift
Displacement radius
Revision 1.1
Note
mm
Recommended diameter: 6mm
75
mT
Required vertical component of the magnetic field strength
on the die’s surface, measured along a concentric circle with
a radius of 1.1mm
±5
mT
Constant magnetic stray field
5
%
Including offset gradient
fmag_abs
10
Hz
fmag_inc
166
Hz
Incremental mode: no missing pulses at rotational speeds of
up to 10,000 rpm (see table 6)
%/K
Samarium Cobalt ReComa28
mm
Max. offset between defined device center and magnet axis
(see Figure 16)
Field non-linearity
Input frequency
Unit
Btc
Disp
typ.
– 0.035
0.25
Absolute mode: 600 rpm @ readout of 1024 positions
(see table 6)
www.austriamicrosystems.com
Page 14 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Electrical System Specifications
Parameter
Symbol
Resolution
Min
Typ
RES
7 bit
2.813
8 bit
1.406
9 bit
0.703
10 bit
0.352
Integral non-linearity (optimum)
Max
Unit
Note
10
bit
0.352 deg
deg
Adjustable resolution only available for incremental output
modes;
Least significant bit, minimum step
Maximum error with respect to the best line fit.
Verified at optimum magnet placement @ 25 °C.
INLopt
± 0.5
deg
Integral non-linearity
INL
± 1.4
deg
Over displacement tolerance and full operating temperature
range with 6mm diameter magnet
Differential non-linearity
DNL
± 0.176
deg
10bit no missing codes
0.12
Deg
RMS
RMS equivalent to 1 sigma
deg
0.352 deg (1 LSB) hysteresis available upon request
Best line fit = (Errmax – Errmin) / 2
Transition noise
TN
Hysteresis
Hyst
0.704
Power-on reset thresholds
On Voltage; 300mV typ. Hysteresis
Von
1,37
2.2
2.9
V
DC supply voltage 3.3V (VDD3V3)
Off Voltage; 300mV typ. Hysteresis
Voff
1.08
1.9
2.6
V
DC supply voltage 3.3V (VDD3V3)
Power-up time
tPwrUp
100
400 *
ms
*…Until offset compensation finished
System propagation delay
absolute output
tdelay
65
µs
Includes delay of ADC, DSP, absolute interface
200
µs
Calculation over two samples
10.5
kHz
Internal sampling rate
1
MHz
Max. clock frequency to read out serial data
System propagation delay
incremental output
Sampling rate for absolute output
fS
Read-out frequency
1023
α
9.5
10
CLK
10bit
1023
TN
DNL
2
actual curve
ideal curve
1
0
0.35 °
512
512
INL
0
180 °
0°
Figure 18:
360 °
α
Integral and differential Non-Linearity (example)
Integral Non-Linearity (INL) is the maximum deviation between actual position and indicated position
Differential Non-Linearity (DNL) is the maximum deviation of the step length from one position to the next
Transition Noise (TN) is the repeatability of an indicated position
Revision 1.1
www.austriamicrosystems.com
Page 15 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Timing Characteristics
Synchronous Serial Interface (SSI)
Parameter
Symbol
Min
Typ
Max
Unit
Note
100
ns
Time between falling edge of CSn and data output activated
ns
Time between falling edge of CSn and first falling edge of
CLK
Data output activated (logic high)
t DO active
First data shifted to output register
tCLK FE
500
Start of data output
T CLK / 2
500
ns
Rising edge of CLK shifts out one bit at a time
Data output valid
t DO valid
375
ns
Time between rising edge of CLK and data output valid
Data output tristate
t DO tristate
100
ns
After the last bit DO changes back to “tristate”
ns
CSn = high; To initiate read-out of next angular position
Pulse width of CSn
t CSn
500
Read-out frequency
fCLK
>0
Symbol
Min
1
MHz
Clock frequency to read out serial data
Typ
Max
Unit
Note
Pulse Width Modulation Output
Parameter
PWM frequency
f PWM
0.927
0.976
1.024
KHz
Signal period = 1025 µs ±5%
Minimum pulse width
PW MIN
0.95
1
1.05
µs
Position 0d; Angle 0 degree
Maximum pulse width
PW MAX
973
1024
1075
µs
Position 1023d; Angle 359.65 degree
Parameter
Symbol
Min
Typ
Max
Unit
Incremental outputs valid after
power-up
t Incremental
500
ns
Time between first falling edge of CSn after power-up and
valid incremental outputs
500
ns
Time between rising or falling edge of LSB output and valid
directional indication
Incremental Outputs
Directional indication valid
outputs valid
t Dir valid
Note
Programming Conditions
Parameter
Symbol
Min
Programming enable time
t Prog enable
2
µs
Write data start
t Data in
2
µs
Write data valid
t Data in valid
250
ns
Load Programming data
t Load PROG
2
µs
Write data – programming CLK PROG
CLK PROG
CLK pulse width
t PROG
1.8
t PROG finished
2
Programming voltage
V PROG
7.3
Programming current
I PROG
Hold time of Vprog after programming
Revision 1.1
Typ
Max
Unit
Note
Time between rising edge at Prog pin
and rising edge of CSn
Write data at the rising edge of
CLK PROG
250
kHz
2.2
µs
during programming; 16 clock cycles
µs
Programmed data is available after
next power-on
7.5
V
Must be switched off after zapping
130
mA
2
7.4
www.austriamicrosystems.com
during programming
Page 16 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Package Drawings and Markings
16-Lead Shrink Small Outline Package SSOP-16
AYWWIZZ
AS5040
Symbol
Marking: AYWWIZZ
Dimensions
mm
inch
A:Pb-Free Identifier
min.
typ.
max
min.
typ.
max.
Y:Last Digit of Manufacturing Year
A
1.73
1.86
1.99
.068
.073
.078
WW: Manufacturing Week
A1
0.05
0.13
0.21
.002
.005
.008
I: Plant Identifier
A2
1.68
1.73
1.78
.066
.068
.070
ZZ: Traceability Code
b
0.25
0.315
0.38
.010
.012
.015
c
0.09
-
0.20
.004
-
.008
D
6.07
6.20
6.33
.239
.244
.249
E
7.65
7.8
7.9
.301
.307
.311
E1
5.2
5.3
5.38
.205
.209
.212
e
0.65
.0256
K
0°
-
8°
0°
-
8°
L
0.63
0.75
0.95
.025
.030
.037
JEDEC Package Outline Standard:
MO - 150 AC
Thermal Resistance R th(j-a) :
151 K/W
IC's marked with a white dot or the
letters "ES" denote Engineering Samples
Ordering Information
Delivery:
Tape and Reel (1 reel = 2000 devices)
Tubes (1 box = 100 tubes á 77 devices)
Order # 12817-002 for delivery in tubes
Order # 12817-202 for delivery in tape and reel
Revision 1.1
www.austriamicrosystems.com
Page 17 of 20
AS5040 10-BIT PROGRAMMABLE MAGNETIC ROTARY ENCODER
Recommended PCB footprint:
recommended footprint data
A
B
C
D
E
mm
9.02
6.16
0.46
0.65
5.01
inch
0.355
0.242
0.018
0.025
0.197
Revision History
Revision
1.0
Date
April. 2, 2004
Description
updated Fig.7
added Fig.8 : Daísy Chain Mode
combine Vzapp = Vprog
add Fig.18: INL / DNL example
DC characteristics: remove absolute schmitt trigger input thresholds
1.1
Jun. 11, 2004
Timing characteristics: add Fclk min
change max. power-up time
change programming characteristics: tLoad PROG, CLK PROG
add package outlines and markings
add definition of parity bit
add description of high speed operation for absolute mode
change tDOvalid
Revision 1.1
www.austriamicrosystems.com
Page 18 of 20