AMS AS5311 User manual

austriamicrosystems AG
is now
ams AG
The technical content of this austriamicrosystems application note is still valid.
Contact information:
Headquarters:
ams AG
Tobelbaderstrasse 30
8141 Unterpremstaetten, Austria
Tel: +43 (0) 3136 500 0
e-Mail: ams_sales@ams.com
Please visit our website at www.ams.com

AS5311 Demoboard
OPERATION MANUAL Application note
1General Overview
The AS5311 is a contactless high resolution magnetic linear encoder for accurate linear motion and off-axis rotary
sensing with a resolution down to <0.5µm. It is a system-on-chip, combining integrated Hall elements, analog front end
and digital signal processing on a single chip, packaged in a small 20-pin TSSOP package.and digital signal processing on a single chip, packaged in a small 20-pin TSSOP package.
A multipole magnetic strip or ring with a pole length of 1.0mm is required to sense the rotational or linear motion. The
magnetic strip is placed above the IC at a distance of typ. 0.3mm.
A multipole magnetic strip or ring with a pole length of 1.0mm is required to sense the rotational or linear motion. The
magnetic strip is placed above the IC at a distance of typ. 0.3mm.
The absolute measurement provides instant indication of the magnet position within one pole pair with a resolution of
488nm per step (12-bit over 2.0mm). This digital data is available as a serial bit stream and as a PWM signal.
The absolute measurement provides instant indication of the magnet position within one pole pair with a resolution of
488nm per step (12-bit over 2.0mm). This digital data is available as a serial bit stream and as a PWM signal.
Furthermore, an incremental output is available with a resolution of 1.95 µm per step. An index pulse is generated once
for every pole pair (once per 2.0mm).The travelling speed in incremental mode is up to 650mm/second.
Furthermore, an incremental output is available with a resolution of 1.95 µm per step. An index pulse is generated once
for every pole pair (once per 2.0mm).The travelling speed in incremental mode is up to 650mm/second.
An internal voltage regulator allows the AS5311 to operate at either 3.3 V or 5 V supplies.An internal voltage regulator allows the AS5311 to operate at either 3.3 V or 5 V supplies.
Depending on the application the AS5311 accepts multi-pole stripmagnets as well as multi-pole ring magnets, both
radial and axial magnetized.
Depending on the application the AS5311 accepts multi-pole strip magnets as well as multi-pole ring magnets, both
radial and axial magnetized.
2The AS5311 Demoboard2The AS5311 Demoboard
The AS5311 demoboard is a complete linear encoder system with built-in microcontroller, USB interface, graphical LCD
display, incremental indicators, incremental counter serial communication and PWM output LED.
The AS5311 demoboard is a complete linear encoder system with built-in microcontroller, USB interface, graphical LCD
display, incremental indicators, incremental counter serial communication and PWM output LED.
The board is USB powered or externally suppliedwith a 9V battery for standalone operation.The board is USB powered or externally supplied with a 9V battery for standalone operation.
J8: AS5311 status signals
connector and indicators
SW1: Encoder selection
- External (top)
- Onboard (bottom)
Slider with multipole
magnet (1mm pole length)
over AS5311
LCD display
9V battery connector
(standalone only)
USB plug
(power supply or PC communication)
Slider guide
J7: AS5311 inceremental
A/B and Index
connector and indicators
J6: External Encoder
SSI Connector
J4: PWM output
and indicator
S1: Incremental
counter reset switch
Figure 1: AS5311 Demoboard hardware with mounted magnet knob
Revision 1.0, 09 April 2009 Page 1 of 9
www.austriamicrosystems.com
ams AG
Technical content still valid

3Operating the AS5311 Demoboard
The AS5311 demoboard can be used in several ways:
•As standalone unit supplied by a 9V battery
Connect a 9V battery to the battery connector on the top right side of the board. No other connections are required.
•As standalone unit supplied by an USB port
Connect the demoboard to a PC using a USB/USB cable (included in demoboard shipment). The board is supplied by the 5V
supply of the USB port. No other connections are required.
3.1 Hardware Indicators and Connectors
3.1.1 Graphic LCD display
The LCD display shows the realtime absolute and relative position of the magnet:
- The absolute position is read from the AS5311 serial output. The resolution is 0.488µm = 4096 positions per pole pair
(2mm). To use this feature with the onboard encoder, switch SW1 must be on position INT.
- The relative position is read from the incremental counter connected on the AB outputs of the AS5311. The resolution is
1.95µm / step. To use this feature with the onboard encoder, jumpers P1 and P2 (Bottom side) must be CLOSED.
Moving the slider from right to left will increase the absolute value until 4095 (1999µm) with 0.488µm steps, then returns to
0.
The incremental counter will increment on the same way with 1.95µm steps. To reset the relative position, press the push
button S1.
The magnet status indicator (magnet OK), U(magnet too close or too far, reduced accuracy), ±(magnet too close or
too far , values not valid and display stopped) is related to the magnet position.
Figure 2: LCD display in standalone mode (9V battery or USB powered without GUI)
3.1.2 PWM LED
A
bsolute position in a pole pair (2mm)
12 bit value (0 ~ 4095)
1 step = 0.488µm
Relative position from
quadrature AB counter in µm
Relative position from
quadrature AB counter
1 step = 1.95µm
A
bsolute position in a pole pair
0 ~ 1999µm
RELATIVE POSITION
1.95
µ
m/ste
p
A
BSOLUTE POSITION
0.488
µ
m/ste
p
Magnetic field status:
Magnet OK
UMagnet too far or too close,
reduced accuracy
±Magnet too far or too close,
value not valid
A
bsolute position bargraph
0~100% in a pole pair
This LED is connected to the PWM output of the AS5311. The PWM output is a pulse width that is proportional to the
position of a pole-pair of the magnet
The pulse width varies from 1μs to 4096μs typ with a repetition rate of 244 Hz typ.. When the position of the pole-pair is 0,
the LED is almost dark, as it is 1μs on and 4095μs off. Moving the magnet to the left increases the brightness of the PWM
LED, since the ON-pulse becomes longer and the OFF-pulse becomes shorter. The brightness of the PWM LED follows the
absolute position bargraph.
Likewise, the PWM output can be used as an analog output proportional to the angle, when the PWM signal is filtered by a
RC (or active) lowpass filter.
The PWM signal (0 ~ 3V3) can be directly taken from the connector J4.
3.1.3 Incremental quadrature AB-Index LED
The phase shift between channel A and B indicates the direction of the magnet movement. Channel A leads channel B
during a right-to-left movement of the magnet by 90 electrical degrees. Channel B leads channel A during a left-to-right
movement.
One Index pulse (3V3) is generated at each pole pair changes (see AS5311 datasheet Figure 9).
The AB-Index LEDs are directly connected to the A B Index outputs of the AS5311. These quadrature signals (0 ~ 3V3) are
available on connector J7.
Revision 1.0, 09 April 2009 Page 2 of 9
www.austriamicrosystems.com
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
3.1.4 MagINCn and MagDECn
MagINCn and MagDECn are the magnetic field change indicators (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.
-LEDs MagINC and MagDEC OFF, the magnet is correctly positioned
LCD indicator
-LED MagINC ON and MagDEC OFF, magnet too close or too far, reduced accuracy
LCD indicator U
-LEDs MagINC and MagDEC ON, magnet too close or too far , values not valid and display stopped
LCD indicator ±
3.1.5 Encoder selection switch
The switch SW1 selects the encoder which communicates with the microcontroller through the SSI bus (Absolute position):
1. INT (Bottom position, default): Onboard AS5311
2. EXT (Top Position):
External AS5311 connected on J6
The signals of the synchronous serial interface (DO, CLK, CSn) and the power supply (3.3V, GND) of an
external device can be connected directly to J6. In this configuration, the data of the serial interface (absolute
position) are displayed on the GUI or the LCD.
If the incremental AB position of the external encoder is used, remove the jumpers P1 and P2 (bottom side of the board), and
connect the AB signals from the encoder to the jumpers as shown on figure 3 below.
Serial
Outputs
(absolute)
Demoboard switched to external
encoder mode
Demoboard TOP view
Incremental
Outputs
(Relative) Demoboard BOTTOM view
Figure 3: external AS5311 connection to the demoboard (top and bottom view)
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 3 of 9
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 4 of 9
4AS5311 Demoboard bloc diagram, schematics, layout
Battery
SPI
Figure 9: AS5311 bloc diagram
GND1
Vout 2
Vin
3
U4
AS1360-30
D2
BAT54
C19
1u
1
2
J5
Header 2
VBUS 1
D- 2
D+ 3
GND 4
SHLD 5
J3
440478-1
1
2
3
4
J2
Header 4
CS1n
1
RESn
2
A0
3
R/W
4
E
5
D0
6
D1
7
D2
8
D3
9
D4
10
D5
11
D6
12
D7
13
VDD
14
VSS
15
Vout
16
Cap3-
17
Cap1+
18
Cap1-
19
Cap2-
20
Cap2+
21
V1
22
V2
23
V3
24
V4
25
V5
26
VDD
27
C86
28
Shield
0
J1
DisplayTech32128a
GND
GND
C23
10u
Vbat 5V 3V
GND
GND
GND
3.3V
3.3V
GND
C2
10u
D0
D1
D2
D3
D4
D5
D6
D7
D0
D1
D2
D3
D4
D5
D6
D7
LCD_A0
LCD_RW
Int_CLK
Analog_in
CSn
Ext_CLK
DO
LCD_E
LCD_E
LCD_RW
LCD_A0
A
B
Index
3.3V
GND
MagINCn
MagDECn
A_out
B_out
Prog Int_DO
Int_CLK
PWM
Int_CSn
GND
DS3
LED_R
DS4
LED_R
DS5
LED_Y
DS6
LED_G
DS7
LED_G
R8
1k
R9
1k
R10
1k
R11
1k
R12
1k
1
2
3
4
J7
Header 4
GND
GND
R5
4.7k
R4
22k
C18
1u
GND GND
Analog_in
DS1
LED3
R6
1k
GND
J4
PWM
R1
10k
GND
C3
100n
GND
3V
3V
GND
3V
GND
C16
1u/16V
C15
1u/16V
C14
1u/16V
C13
1u/16V
C12
1u/16V
GND
C8
1u/16V
C10
1u/16V
C11
1u/16V
GND
C9
1u/16V R2
nc
C6
100n
C7
100n
3V
GND
C2CK
C2D
C1
100n
C5
1u
GND
P0.1 1
P0.0 2
P2.7 11
P2.6 12
P2.5 13
P2.4 14
P2.3 15
P2.2 16
P2.1 17
P2.0 18
P1.7 19
P1.6 20
P1.5 21
P1.4 22
P1.3 23
P1.2 24
P1.1 25
P1.0 26
P0.7 27
P0.6 28
P0.5 29
P0.4 30
P0.3 31
P0.2 32
GND
3
D+
4D-
5
VDD
6
RegIn
7
VBUS
8
RST/C2CK
9
P3.0/C2D
10
U1
C8051F320
C24
1u
5V
C22
22u
5V
R13
33R
BL_A
GND1
Vout 2
Vin
3
U3
AS1360-50
D1
LL4001
C21
1u
D3
BAS70-05
Vbat
R14
68R
LCD Backlight
ABInd
D7..0
C25
10n
GND
A
B
Index
MagINCn
MagDECn
Dec Inc
Prog
9V Battery
USB
ISP
R3
68k
3.3V
1
2
3
4
5
6
7
J6
Header 7
Prog
5V
3.3V
CSn
CLK
DO
GND
GND
3.3V
5V
Ext_CSn
Ext_CLK
Ext_DO
Prog
External encoder
SW1
MCLSS22_DPDT
Int_DO DO
CSn
INT_CSn
nc
1
MagINCn
2
MagDECn
3
A
4
B
5
nc
6
Index
7
VSS
8
Prog
9
nc
10 nc 11
DO 12
CLK 13
CSn 14
PWM 15
nc 16
nc 17
VDD3V3 18
VDD5V 19
nc 20
U2
AS5311
Fcko
1
Fcki
2
VSS
3
SS/
4
SCK
5
MISO
6
MOSI
7LFLAG/ 8
DFLAG/ 9
INDEX/ 10
B11
A12
CNT_EN 13
VDD 14
U5
LS7366
12
Y1
20MHz
C26
15p
C27
15p
GND
GND
C17
100n
3.3V
GND
SCK
MISO
MOSI
SS/
SCK
MISO
MOSI
SS/
A
B
Reset_CNT
1
2
J8
Header 2
P1 Jumper2
P2 Jumper2
S1
SW-PB GND
R15
47k
3.3V
R7
1M
J9
Reset_CNT
Figure 7: AS5311 Demoboard schematics
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Figure 4: AS5311 Demoboard PCB Layout
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 5 of 9
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Index
1General Overview.............................................................................................................................................................. 1
2The AS5311 Demoboard................................................................................................................................................... 1
3Operating the AS5311 Demoboard ................................................................................................................................... 2
3.1 Hardware Indicators and Connectors ....................................................................................................................... 2
3.1.1 Graphic LCD display ........................................................................................................................................ 2
3.1.2 PWM LED ........................................................................................................................................................ 2
3.1.3 Incremental quadrature AB-Index LED ............................................................................................................ 2
3.1.4 MagINCn and MagDECn ................................................................................................................................. 3
3.1.5 Encoder selection switch.................................................................................................................................. 3
4AS5311 Demoboard bloc diagram, schematics, layout..................................................................................................... 4
Index........................................................................................................................................................................................... 6
Revision History ......................................................................................................................................................................... 7
Contact....................................................................................................................................................................................... 8
Copyright.................................................................................................................................................................................... 9
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 6 of 9
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Revision History
Revision Date Description
R1.0 March.16, 2009 First version
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 7 of 9
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Contact
Headquarters
austriamicrosystems AG
A 8141 Schloss Premstätten, Austria
Phone: +43 3136 500 0
Fax: +43 3136 525 01
www.austriamicrosystems.com
Sales Offices
austriamicrosystems Germany GmbH
Tegernseer Landstrasse 85
D-81539 München, Germany
Phone: +49 89 69 36 43 0
Fax: +49 89 69 36 43 66
austriamicrosystems Italy S.r.l.
Via A. Volta, 18
I-20094 Corsico (MI), Italy
Phone: +39 02 4586 4364
Fax: +39 02 4585 773
austriamicrosystems France S.A.R.L.
124, Avenue de Paris
F-94300 Vincennes, France
Phone: +33 1 43 74 00 90
Fax: +33 1 43 74 20 98
austriamicrosystems Switzerland AG
Rietstrasse 4
CH 8640 Rapperswil, Switzerland
Phone: +41 55 220 9008
Fax: +41 55 220 9001
austriamicrosystems UK, Ltd.
88, Barkham Ride,
Finchampstead, Wokingham
Berkshire RG40 4ET, United Kingdom
Phone: +44 118 973 1797
Fax: +44 118 973 5117
austriamicrosystems AG
Klaavuntie 9 G 55
FI 00910 Helsinki, Finland
Phone: +358 9 72688 170
Fax: +358 9 72688 171
austriamicrosystems AG
Bivägen 3B
S 19163 Sollentuna, Sweden
Phone: +46 8 6231 710
austriamicrosystems USA, Inc.
8601 Six Forks Road
Suite 400
Raleigh, NC 27615, USA
Phone: +1 919 676 5292
Fax: +1 509 696 2713
austriamicrosystems USA, Inc.
4030 Moorpark Ave
Suite 116
San Jose, CA 95117, USA
Phone: +1 408 345 1790
Fax: +1 509 696 2713
austriamicrosystems AG
Suite 811, Tsimshatsui Centre
East Wing, 66 Mody Road
Tsim Sha Tsui East, Kowloon, Hong Kong
Phone: +852 2268 6899
Fax: +852 2268 6799
austriamicrosystems AG
AIOS Gotanda Annex 5th Fl., 1-7-11,
Higashi-Gotanda, Shinagawa-ku
Tokyo 141-0022, Japan
Phone: +81 3 5792 4975
Fax: +81 3 5792 4976
austriamicrosystems AG
#805, Dong Kyung Bldg.,
824-19, Yeok Sam Dong,
Kang Nam Gu, Seoul
Korea 135-080
Phone: +82 2 557 8776
Fax: +82 2 569 9823
austriamicrosystems AG
Singapore Representative Office
83 Clemenceau Avenue, #02-01 UE Square
239920, Singapore
Phone: +65 68 30 83 05
Fax: +65 62 34 31 20
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 8 of 9
ams AG
Technical content still valid

AS5311 Demoboard OPERATIONAL MANUAL
Copyright
Devices sold by austriamicrosystems are covered by the warranty and patent indemnification provisions appearing in its
Term of Sale. austriamicrosystems 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
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 for current information. This product is intended for
use in normal commercial applications.
Copyright © 2009 austriamicrosystems. 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. To the
best of its knowledge, austriamicrosystems asserts that the information contained in this publication is accurate and correct.
However, austriamicrosystems 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 rendering of
technical or other services.
Revision 1.0, 03 April 2009 www.austriamicrosystems.com Page 9 of 9
ams AG
Technical content still valid
Table of contents
Other AMS Media Converter manuals