Programmable Magnetic Rotary Encoder
Programmable Magnetic Rotary Encoder
AS5040/AS5045/AS5140/AS5145/AS5145-I10(-I12) AS5040-AB-v2.0
Adapterboard
Programmable Magnetic Rotary Encoder
OPERATION MANUAL
1 General Description
The AS5x40/AS5x45 series are contactless magnetic rotary Furthermore, a user-programmable incremental output is
encoders for accurate angular measurement over a full turn available, making the chip suitable for replacement of various
of 360°. They are system-on-chip, combining integrated Hall optical encoders.
elements, analog front end and digital signal processing in a The AS5145 is also available as 10bit or 12bit pre-
single device. programmed version AS5145-I10(-I12).
To measure the angle, only a simple two-pole magnet, An internal voltage regulator allows the AS5x40/AS5x45 to
rotating over the center of the chip, is required. The magnet operate at either 3.3 V or 5 V supplies.
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 (AS5x40 – 10bit ) or 0.0879° = 4096 (AS5x45 –
12bit) positions per revolution. This digital data is available as
a serial bit stream and as a PWM signal.
J1 connector
(Prg, power supply,
AS5x40/AS5x45 serial interface)
encoder
J2 connector
(PWM, incremental and
status outputs)
4 x 2.6mm mounting
holes
Bearing
M2~M2.5 Screw + nut
Casing
AS5040-AB PCB
A diametric magnet must be placed over on under the AS5x40/AS5x45 encoder, and should be centered on the middle of the
package with a tolerance of 0.5mm.
The airgap between the magnet and the encoder casing should be maintained in the range 0.5mm~2mm.
The magnet holder must not be ferromagnetic. Materials as brass, copper, aluminum, stainless steel are the best choices to make
this part.
J2
MagINCn 1 16 VDD5V
MagDECn 2 15 VDD3V3
J1
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
4.1 Standalone SSI output mode 4.2 Standalone PWM output mode
Figure 4: Using the analog output with the adapter board Figure 5: Using the PWM output with the adapter board
0 deg
(Pos 0)
PW M AX
359.65 deg
(Pos 1023)
102 4µ s
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
Three different incremental output modes are possible with quadrature A/B being the default mode (two-channel quadrature,
step / direction incremental signal (LSB) and the direction bit in clockwise (CW) and counter-clockwise (CCW) direction.
The pre-programmed version AS5145-I10 provides a 10bit and AS5145-I12 a 12bit incremental output.
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
By using more than one adapter board, a setup in daisy chain mode is possible.
In this mode capacitor C3 (refer to Fig.10) must be disconnected when using the 1nF capacitor shown in Fig.8. or
directly replaced by this capacitor.
The serial data of all connected devices is read from the DO pin of the first device in the chain. The Prog pin of the last
device in the chain should be connected to VSS. The length of the serial bit stream increases with every connected device
(board) by n * (16+1) bits.
Due to R = 100R and C = 1nF, the CLK is limited the maximum 1MHz.
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
After power-on, programming the AS5040 is enabled with the rising edge of CSn with Prog = high and CLK = low. 16 bit
configuration data must be serially shifted into the OTP register via the Prog-pin. The first “CCW” bit is followed by the zero
position data (MSB first / 10 bit for AS5x40 and 12 bit for AS5x45) and some mode settings (please refer to datasheet). Data
must be valid at the rising edge of CLK.
After writing data into the OTP register it can be permanently programmed by rising the Prog pin to the programming voltage
VPROG of 7.3-7.5V. 16 CLK pulses must be applied to program the fuses.
For exiting the programming mode, the chip must be reset by a power-on-reset. The programmed data is available after the
next power-up.
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
Table of contents
1 General Description........................................................................................................................................................... 1
2 The AS5040 Adapter board............................................................................................................................................... 1
2.1 Board description...................................................................................................................................................... 1
2.2 Mounting the AS5040 adapter board........................................................................................................................ 2
3 AS5x40/AS5x45 and adapter board pinout ....................................................................................................................... 3
4 Operation use cases.......................................................................................................................................................... 4
4.1 Standalone SSI output mode.................................................................................................................................... 4
4.2 Standalone PWM output mode................................................................................................................................. 4
4.3 Standalone incremental output ................................................................................................................................. 5
Figure 7: Using the Incremental output with the adapter board ............................................................................................. 5
4.4 Daisy chain mode ..................................................................................................................................................... 6
5 Programming the AS5040 ................................................................................................................................................. 7
6 AS5040 Differences to AS5045......................................................................................................................................... 8
7 AS5040 adapter board hardware ...................................................................................................................................... 9
7.1 AS5040-AB-2.0 schematics...................................................................................................................................... 9
7.2 AS5040-AB-2.0 PCB layout...................................................................................................................................... 9
Table of contents...................................................................................................................................................................... 10
Copyrights ................................................................................................................................................................................ 11
Disclaimer................................................................................................................................................................................. 11
Contact Information .................................................................................................................................................................. 11
www.austriamicrosystems.com
AS5040/AS5045/AS5140/AS5145/AS5145-Ix Programmable Magnetic Rotary Encoder
Adapterboard Operation Manual
Copyrights
Copyright © 1997-2009, austriamicrosystems AG, Schloss Premstaetten, 8141 Unterpremstaetten, Austria-Europe.
Trademarks Registered ®. All rights reserved. The material herein may not be reproduced, adapted, merged, translated,
stored, or used without the prior written consent of the copyright owner.
All products and companies mentioned are trademarks or registered trademarks of their respective companies.
Disclaimer
Devices sold by austriamicrosystems AG are covered by the warranty and patent indemnification provisions appearing in its
Term of Sale. austriamicrosystems AG makes no warranty, express, statutory, implied, or by description regarding the
information set forth herein or regarding the freedom of the described devices from patent infringement. austriamicrosystems
AG reserves the right to change specifications and prices at any time and without notice. Therefore, prior to designing this
product into a system, it is necessary to check with austriamicrosystems AG for current information. This product is intended
for use in normal commercial applications. Applications requiring extended temperature range, unusual environmental
requirements, or high reliability applications, such as military, medical life-support or lifesustaining equipment are specifically
not recommended without additional processing by austriamicrosystems AG for each application.
The information furnished here by austriamicrosystems AG is believed to be correct and accurate. However,
austriamicrosystems AG shall not be liable to recipient or any third party for any damages, including but not limited to
personal injury, property damage, loss of profits, loss of use, interruption of business or indirect, special, incidental or
consequential damages, of any kind, in connection with or arising out of the furnishing, performance or use of the technical
data herein. No obligation or liability to recipient or any third party shall arise or flow out of austriamicrosystems AG rendering
of technical or other services.
Contact Information
Headquarters
austriamicrosystems AG
A-8141 Schloss Premstaetten, Austria
Tel: +43 (0) 3136 500 0
Fax: +43 (0) 3136 525 01
www.austriamicrosystems.com
Mouser Electronics
Authorized Distributor
ams:
AS5145 AB AS5145-AB