AS5030 8 BIT PROGRAMMABLE HIGH SPEED MAGNETIC ROTARY ENCODER
D ATA SHEET
1 .2
• •
1
G eneral Description
K ey Features
3 60°contactless angular position encoding T wo digital 8-bit absolute outputs: - Serial interface and - Pulse width modulated (PWM) output U ser programmable zero position H igh speed: up to 30,000 rpm D irect measurement of magnetic field strength allows exact determination of vertical magnet distance S erial read-out of multiple interconnected AS5030 devices using daisy chain mode W ide magnetic field input range: 20 ~ 80mT W ide temperature range: - 40°C to + 125°C S mall Pb-free package: TSSOP 16
T he AS5030 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 absolute angle measurement provides instant indication of the magnet’s angular position with a resolution of 8 bit = 256 positions per revolution. This digital data is available as a serial bit stream and as a PWM signal. In addition to the angle information, the strength of the magnetic field is also available as a 6-bit code. Data transmission can be configured for 1-wire (PWM), 2wires (CLK, DIO) or 3-wires (CLK, DIO, CS). A software programmable (OTP) zero position simplifies assembly as the zero position of the magnet does not need to be mechanically aligned. A Power Down Mode together with fast startup- and measurement cycles allows for very low average power consumption and makes the AS5030 also suitable for battery operated equipment.
• • •
• • • •
1 .3
• • • • •
A pplications
C ontactless rotary position sensing R otary switches (human machine interface) A C/DC motor position control R obotics E ncoder for battery operated equipment
1 .4
B lock Diagram
Sin / Sinn / Cos / Cosn PWM Decoder
PWM DX
F igure 1: Typical arrangement of AS5030 and magnet
Sin
Angle
1 .1
• • • • •
B enefits
C omplete system-on-chip, no calibration required F lexible system solution provides absolute serial and PWM output I deal for applications in harsh environments due to magnetic sensing principle H igh reliability due to non-contact sensing R obust system, tolerant to horizontal misalignment, airgap variations, temperature variations and external magnetic fields
Cos
Hall Array & Frontend Amplifier
tracking ADC & Angle decoder
Zero Pos.
Mag
AGC
Absolute Serial Interface (SSI)
DIO CS CLK C2 MagRngn
AGC power management OTP
PROG
F igure 2: AS5030 block diagram
R ev. 1.8
www.austriamicrosystems.com
Page 1 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
2
P ackage and Pinout
T he AS5030 is available in a TSSOP16 package
F igure 3: TSSOP-16 package and pin-out
P in# T SSOP
S ymbol
T ype
D escription
1 2 3 4 5 6 7 8 9 10 11 12 13 14
M agRngn P rog_DI V SS T 3_SINn T 2_SIN T 1_COSn T 0_COS TC DX C LK CS D IO V DD C1
D O_T S S DO D I_ST D I_ST D IO S DI
P ush-Pull output. Is HIGH when the magnetic field strength is too weak, e.g. due t o missing magnet O TP P rog ramming voltage supply pin. Leave open or connect to VDD if not used S upply ground T his pin is used for factory testing. For normal operation it must be left u nconnected. Inverse SIN (Sinn) output in SIN/COS output mode T his pin is used for factory testing. For normal operation it must be left u nconnected. SIN output in SIN/COS mode T his pin is used for factory testing. For normal operation it must be left u nconnected. Inverse COS (Cosn) output in SIN/COS mode T his pin is used for factory testing. For normal operation it must be left u nconnected. COS output in SIN/COS mode T est pin. Connect to VSS or leave unconnected D igital output for 2-wire operation and Daisy Chain mode C lock Input of Synchronous Serial Interface; Schmitt-Trigger input C hip Select for serial data transmission, active high; Schmitt-Trigger input, e xternal pull-down resistor (~50k Ω ) required in read-only mode D ata output / command input for digital serial interface P ositive supply voltage, 4.5V to 5.5V C onfiguration input: connect to VSS for normal operation, c onnect to VDD to enable SIN-COS outputs. This pin is scanned at power-on-reset a nd at wakeup from one of the Ultra Low Power Modes C onfiguration input: connect to VSS for 3-wire operation, c onnect to VDD for 2-wire operation. This pin is scanned at power-on-reset and at w akeup from one of the Ultra Low Power Modes P ulse Width Modulation output, 2µs pulse width per step (2µs ~ 512µs)
T able 1: Pin description
15 16
C2 P WM
DI DO
P in types: S: DI_ST: DIO:
supply pin digital input / Schmitt-Trigger bi-directional digital pin
DO: DO_T: DI:
digital output digital output / tri-state digital input (standard CMOS; no pull-up or pull-down)
R ev. 1.8
www.austriamicrosystems.com
Page 2 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
3
A S5030 Parameter and Features List
D escription 5V ± 10% Low Power Mode, non-operational: typ. 1.4mA Ultra Low Power Mode, non-operational: typ. 30µA Normal operating mode: typ. 14mA. 21-bit Synchronous Serial Interface (SSI): 5 command bits, 2 data valid bits, 6 data bits for magnetic field strength, 8 data bits for angle. Configurable for 2-wire (Clock, Data) or 3-wire (Chip Select, Clock, Data) operation Daisy Chain mode for reading multiple encoders through a 2- or 3-wire interface. Zero Position Programming (OTP) ≤ 6 M Hz data clock rate, 250 ~ 500kHz during programming DIO and CLK signals. 0.1 ~ 6MHz clock rate. Synchronization through time-out of CLK signal. Activated and deactivated by software commands. Low Power Mode: power down current = 1.4mA typ.; power up time =1µF
14 15
VSS
3
F igure 14: Data transmission with pulse width modulated (PWM) output
F igure 15: Relation of PWM/Analog output with angle
4 .20 A nalog Sin/Cos outputs with external interpolator
+5V VDD 14 VDD DA 5 4 7 C1 Sin Sinn 13 VDD
micro controller
VSS
DA
Cos 6 Cosn
AS5030
100n
B y connecting C1 to VDD, the AS5030 provides analog Sine and Cosine outputs (Sin, Cos) of the Hall array front-end for test purposes. These outputs allow the user to perform the angle calculation by an external ADC + µC, e.g. to compute the angle with a high resolution. In addition, the inverted Sine and Cosine signals (Sinn, Cosn; see dotted lines) are available for differential signal transmission. The input resistance of the receiving amplifier or ADC should be greater than 100k Ω . The signal lines should be kept as short as possible, longer lines should be shielded in order to achieve best noise performance.
F igure 16: Sine and Cosine outputs for external angle calculation
C2 VSS 15 3
VSS
T he SIN / COS / SINn / COSn signals are amplitude controlled to ~1.3Vp (differential) by the internal AGC controller. The DC bias voltage is 2.25 V. If the SIN(n)- and COS(n)- outputs cannot be sampled simultaneously, it is recommended to disable the automatic gain control (see 5.2.2) as the signal amplitudes may be changing between two readings of the external ADC. This may lead to less accurate results.
R ev. 1.8
www.austriamicrosystems.com
Page 13 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
4 .21 3 -Wire Daisy Chain Mode
T he Daisy Chain mode allows connection of more than one AS5030 to the same controller interface. Independent of the number of connected devices, the interface to the controller remains the same with only three signals: CSn, CLK and DO. In Daisy Chain mode, the data from the second and subsequent devices is appended to the data of the first device.
+5V VDD
13
VDD VDD
13
VDD
13
VDD
The 100nF buffer cap at the supply (shown only for the last device) is recommended for all devices. The total number of serial bits is: n*21, where n is the number of connected devices: e.g. for 2 devices, the serial bit stream is 42bits . For three devices it is 63 bits.
Micro Controller
Output Output I/O
11 10 12
AS5030 #1
CS CLK DIO C1 C2 VSS DX
11 10 12
AS5030 #2
CS CLK DIO C1 C2 VSS DX
AS5030 11 10 12
(last device) CS CLK DIO C1 C2 VSS DX 100n
VSS
14 15
VSS
3
14 15
3
14 15
3
F igure 17: Connection of devices in 3-wire Daisy Chain mode
CLK CS DIO
1
2
3
4
5
6
7
8
20
21
22
23
24
25
26
27
28
29
41
42
43
44
CMD4 CMD3 CMD2 CMD1 CMD0
D15
D14
D13
D0
CMD4 CMD3 CMD2 CMD1 CMD0
D15
D14
D13
D0
CMD4 CMD3 CMD2
AS5030 #1
F igure 18: Timing diagram in 3-wire Daisy Chain mode
AS5030 #2
AS5030 #3
4 .22 2 -Wire Daisy Chain Mode
+5V VDD
13
VDD VDD
13
VDD
13
VDD
15
C2
Micro Controller
11 10 12
CS
AS5030 #1
DX
11 10 12
AS5030 #2
CS CLK DIO C1 C2 VSS DX
AS5030 11 10 12
(last device) CS CLK DIO C1 DX 100n
Output I/O
CLK DIO C1 C2 VSS
VSS
VSS
14 15
VSS
3
14 15
3
14
3
F igure 19: 2-wire Daisy Chain mode
T he AS5030 can also be connected in 2-wire Daisy Chain mode, requiring only two signals (Clock and Data) for any given number of daisy-chained devices. Note that the connection of all devices except the last device is the same as for the 3-wire connection (see F igure 17). The last device must have pin C2 (#15) set to high and feeds the DX signal to CS of the first device. Again, each device should be buffered with a 100nF cap (shown only for the last device).
R ev. 1.8
www.austriamicrosystems.com
Page 14 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
T he total number of serial bits is: n*21, where n is the number of connected devices. Note that this configuration requires one extra clock (#1) to initiate the generation of the CS signal for the first device. After reading the last device, the communication must be reset back to the first device by introducing a timeout of CLK (no rising edge for >24µs)
F igure 20: Timing diagram in 2-wire Daisy Chain mode
5
5 .1
A S5030 Programming
P rogramming Options
T he AS5030 has an integrated 18 Bit OTP ROM for configuration purposes. 5 .1.1 O TP Programming options
T he OTP programming options can be set permanently by programming or temporarily by overwriting. Both methods are carried out over the serial interface, but with different commands (WRITE OTP, PROG OTP, see 5.2.4). Note: During the 18bit OTP programming, each bit needs 4 clock pulses to be validated. • Z ero Position Programming T his programming option allows the user to program any rotation angle of the magnet as the new zero position. This useful feature simplifies the assembly process as the magnet does not need to be mechanically adjusted to the electrical zero position. It can be assembled in any rotation angle and later matched to the mechanical zero position by zero position programming. The 8-bit user programmable zero position can be applied both temporarily (command WRITE OTP, #1F H ) or permanently (command PROG OTP, #19 H ) M agnetic Field Optimization T his programming option allows the user to match the vertical distance of the magnet with the optimum magnetic field range of the AS5030 by setting the sensitivity level. The 2-bit user programmable sensitivity setting can be applied both temporarily (command WRITE OTP, #1F H ) or permanently (command PROG OTP, #19 H ) R educed Power mode programming options
•
5 .1.2
T hese temporary programming options are also carried out over the serial interface. See 5.2.2. • L ow Power Mode L ow Power Mode is a power saving mode with fast start-up. In Low Power Mode, all internal digital registers are frozen and the power consumption is reduced to max. 1.5mA. The serial interface remains active. Start-up from this mode to normal operation can be accomplished within 150µs. This mode is recommended for applications, where low power, but fast start-up and short reading cycle intervals are required. U ltra Low Power Mode U ltra Low Power Mode is a power saving mode with even reduced power-down current consumption. In this mode, all chip functions are frozen and the power consumption is reduced to max. 50µA. The serial interface remains active. Start-up from this mode to normal operation can be accomplished within 500µs. This mode is recommended for applications, where very low average power consumption is required, e.g. for battery operated equipment. For example, in a cycled operation with 10 readings per second, the average power consumption of the AS5030 can be reduced to only 120µA.
•
R ev. 1.8
www.austriamicrosystems.com
Page 15 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
5 .2
A S5030 Read / Write Commands
D ata transmission with the AS5030 is handled over the 2-wire or 3-wire interface. The transmission protocol begins with sending a 5-bit command to the AS5030, followed by reading or writing 16 or 18 bits of data: 5 .2.1
C ommand
1 6-bit Read Command
B in H ex D 15 D 14 D 13 D 12 D 11 D 10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
RD ANGLE
00000
00
C2
lock
AGC 5:0
Angle 7:0
C2 Lock AGC
Angle 5 .2.2
displays status of hardware pin C2 (pin #15) indicates that the AGC is locked. Data is invalid when this bit is 0 6-bit AGC register. Indicates the strength of the magnet (e.g. for pushbutton applications) 000000 b i ndicates a strong magnetic field 111111 b i ndicates a weak magnetic field ideally, the vertical distance of the magnet should be chosen such that the AGC value is in the middle (around 100000b) 8-bit Angle value; represents the rotation angle of the magnet. One step = 360°/256 = 1.4° 1 6-bit Write Command
T hese settings are temporary; they cannot be programmed permanently. The settings will be lost when the power supply is removed.
C ommand B in H ex D 15 D 14 D 13 D 12 D 11 D 10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
E N PROG S ET PWR MODE D IS HYST D IS AGC
10000 10001 10011 10101
10 11 13 15
1 0 ULP/ PSM LPn HYS 0 0
0
0
1
1
0
0
1 0 0 0
0
1
0
1
1
1
0
0
0
0
rst
0
0
AGC 5:0
FA
E N PROG ULP/LPn PSM HYS DIS AGC rst FA
this command must be sent with a fixed 16-bit code (8CAE H ) to enable subsequent OTP access. selects the Ultra Low Power Mode, when bit PSM is set: 0 = Low Power Mode, 1 = Ultra Low Power Mode enables power saving modes: 0 = normal operation, 1 = reduced power mode selected by bit ULP/LPn disables the hysteresis of the digital serial and PWM outputs: 0 (default) = 1-bit hysteresis, 1 = no hysteresis disables the automatic gain control. The AGC will be frozen to a gain setting written in bits AGC 5:0 (D6:D1), bit FA must be set. General Reset: 0 = normal operation, 1 = perform general reset (required after return from reduced power modes) Freeze AGC; 0 = normal operation, 1= freeze AGC with the values stored in bits AGC 5:0. The PWM output will be invalid when bit FA is set.
5 .2.3
1 8-bit OTP Read Commands
N ote: to prohibit unintentional access to the OTP register, OTP PROG/write access is only enabled after the EN PROG command (see 5.2.2) has been sent. OTP access is locked again by sending a RD ANGLE or SET PWR MODE command. EN PROG has not to be sent before a READ OTP. D uring the 18bit OTP read/write transfer, each bit needs 4 clock pulses to be validated.
C ommand R EAD OTP A NALOG OTP RD B in 01111 01001 H ex D 17 0F 09
D 16 D 15 D 14 D 13 D 12 D 11 D 10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
reserved for factory settings reserved for factory settings
sens 1:0 sens 1:0
zero position 7:0 zero position 7:0
R EAD OTP reads the ANALOG OTP RD reads the sens reads the zero position reads the
contents of the OTP register in digital form. The reserved area may contain any value contents of the OTP register as an analog voltage at pin PROG (see 5.4) sensitivity setting of the Hall elements : 00 = high sensitivity, 11 = low sensitivity programmed zero position; the actual angle of the magnet which is displayed as 000
R ev. 1.8
www.austriamicrosystems.com
Page 16 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
5 .2.4
1 8-bit OTP Write Commands
During the 18bit OTP read/write transfer, each bit needs 4 clock pulses to be validated.
C ommand B in H ex D 17 D 16 D 15 D 14 D 13 D 12 D 11 D 10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
W RITE OTP P ROG OTP
11111 11001
1F 19
copy factory settings obtained from READ OTP command 00000000 reserved for factory settings,
sens 1:0 sens 1:0
zero position 7:0 zero position 7:0
W RITE OTP:
non-permanent (“soft write”) modification of the OTP register. To set the reserved factory settings area properly, a preceding READ OTP command must be made to receive the correct setting for bits D17:D10. The WRITE OTP command must then set these bits in exactly the same way. Improper setting of the factory settings by a WRITE OTP command may cause malfunction of the chip. The OTP register, including the factory settings can be restored to default by a power-up cycle. For non-permanent writing, a programming voltage at pin PROG (#2) is not required. permanent modification of the OTP register. An unprogrammed OTP bit contains a ‘0, programmed bits are 1’s. It is possible to program the OTP in several sequences. However, only a 0 can be programmed to 1. Once programmed, an OTP bit cannot be set back to 0. For subsequent programming, bits that are already programmed should be set to 0 to avoid double programming. During permanent programming, the factory settings D17:D10 should always be set to zero to avoid modification of the factory settings. Modifying the factory settings may cause irreversible malfunction of the chip. For permanent programming, a static programming voltage of 8.0-8.5V must be applied at pin PROG (#2) sets the sensitivity setting of the Hall elements : 00: gain factor = 1.65 (low sensitivity) 01: gain factor = 1.75 10: gain factor = 1.86 11: gain factor = 2.00 (high sensitivity) sets the user programmable zero position; the actual angle of the magnet which is displayed as 000
PROG OTP:
sens
zero position
F igure 21: Timing diagram in OTP 18bit read/write mode
5 .3
+5V VDD
O TP Programming Connection
P rogramming of the AS5030 OTP memory does not require a dedicated programming hardware. The programming can be simply accomplished over the serial 3-wire interface (shown in Figure 22) or the optional 2-wire interface (shown in Figure 8). For permanent programming (command PROG OTP, #19 H ), a constant DC voltage of 8.0V ~ 8.5V ( ≥ 100mA) must be connected to pin #2 (PROG). For temporary OTP write (“soft write”; command WRITE OTP, #1F H ), the programming voltage is not required. To secure unintentional programming, any modification of the OTP memory is only enabled after a special password (command #10 H ) has been sent to the AS5030.
13
VDD
Output Output I/O 8.0 – 8.5V
11 10 12
VDD CS CLK DIO
Micro Controller
AS5030
100n
2 PROG
10µF 100n
VSS
C1 C2 VSS
14 15
VSS
F igure 22: OTP programming connection
3
R ev. 1.8
www.austriamicrosystems.com
Page 17 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
P rogramming in Daisy Chain mode P rogramming in Daisy chain mode is possible for both 3-wire and 2-wire mode (see Figure 17 and Figure 19). For temporary programming (soft write), no additional connections are required. Programming is executed with the respective programming commands (see 5.2). For permanent programming, the programming voltage must be applied on pin#2 (PROG) of the device to be programmed. It is also possible to apply the programming voltage simultaneously to all devices, as the actual programming is only executed by a software command. A parallel connection of all PROG-pins allows digital programming verification but does not allow analog programming verification (see 5.4). If analog programming verification is required, each PROG pin must be selected individually for verification.
5 .4
P rogramming Verification
+5V VDD
13
VDD
Output Output I/O
11 10 12
VDD CS CLK DIO AS5030 100n
A fter programming, the programmed OTP bits may be verified in two ways: - B y digital verification: t his is simply done by sending a READ OTP command (#0F H s ee 5.2.3). The structure of this register is the same as for the OTP PROG or OTP WRITE commands. - B y analog verification: B y sending an ANALOG OTP READ command (#09 H ), pin PROG becomes an output, sending an analog voltage with each clock, representing a sequence of the bits in the OTP register. A voltage of 00 H a nd < 2F H N ote that the angle signal may also be valid (Lock = 1), when the AGC is out of range (00 H o r 2F H ), but the accuracy of the AS5030 may be reduced due to the out of range condition of the magnetic field strength.
6 .3
M agnetic Field Strength Indicators
T he AS5030 is not only able to sense the angle of a rotating magnet, it can also measure the magnetic field strength (and hence the vertical distance) of the magnet. This extra feature can be used for several purposes: • a s a safety feature by constantly monitoring the presence and proper vertical distance of the magnet • a s a state-of-health indicator, e.g. for a power-up self test • a s a pushbutton feature for rotate-and-push types of manual input devices
R ev. 1.8
www.austriamicrosystems.com
Page 18 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
T he magnetic field strength information is available in two forms: 6 .3.1 M agnetic Field Strength Hardware Indicator:
P in MagRngn (#1) will be low, when the magnetic field is too weak. The switching limit is determined by the value of the AGC. If the AGC value is 00H will reduce the sensitivity (see 5.2.4).
6 .4
+5V VDD
“ Pushbutton” Feature
U sing the magnetic field strength software and hardware indicators described above, the AS5030 provides a useful method of detecting both rotation and vertical distance simultaneously. This is especially useful in applications implementing a rotate-and-push type of human interface (e.g. in panel knobs and switches). The MagRngn output is low, when the magnetic field is below the low limit (weak or no magnet) and high when the magnetic field is above the low limit (in-range or strong magnet). A finer detection of a vertical distance change, for example when only short vertical strokes are made by the pushbutton, is achieved by memorizing the AGC value in normal operation and triggering on a change from that nominal the AGC value to detect a vertical movement.
F igure 24: Magnetic field strength indicator
1k VDD LED1
13
VDD
1 Micro Controller Output
I/O Output
11 CS 10 CLK 12
DIO
MagRngn
AS5030 100n
VSS
C1 C2 VSS
14 15
VSS
3
R ev. 1.8
www.austriamicrosystems.com
Page 19 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
7
H igh Speed Operation
T he AS5030 is using a fast tracking ADC (TADC) to determine the angle of the magnet. The TADC has a tracking rate of 1.15µs (typ). Once the TADC is synchronized with the angle, it sets the LOCK bit in the status register (see 5.2.1). In worst case, usually at start-up, the TADC requires a maximum of 127 steps (127 * 1.15µS = 146.05µs) to lock. Once it is locked, it requires only one cycle (1.15µs) to track the moving magnet. The AS5030 can operate in locked mode at rotational speeds up to 30,000 rpm. In Low Power Mode or Ultra Low Power Mode, the position of the TADC is frozen. It will continue from the frozen position once it is powered up again. If the magnet has moved during the power down phase, several cycles will be required before the TADC is locked again. The tracking time to lock in with the new magnet angle can be roughly calculated as:
t LOCK = 1.15μs ∗ NewPos − OldPos
t LOCK = OldPos = NewPos = t ime required to acquire the new angle after power up from one of the reduced power modes [µs] Angle position when one of the reduced power modes is activated [°] Angle position after resuming from reduced power mode [°]
7 .1
P ropagation Delay
T he Propagation delay is the time required from reading the magnetic field by the Hall sensors to calculating the angle and making it available on the serial or PWM interface. While the propagation delay is usually negligible on low speeds it is an important parameter at high speeds. The longer the propagation delay, the larger becomes the angle error for a rotating magnet as the magnet is moving while the angle is calculated. The position error increases linearly with speed. The main factors contributing to the propagation delay are: 7 .1.1 A DC Sampling Rate F or high speed applications, fast ADC’s are essential. The ADC sampling rate directly influences the propagation delay. The fast tracking ADC used in the AS5030 with a tracking rate of only 1.15µs (typ.) is a perfect fit for both high speed and high performance. 7 .1.2 C hip internal lowpass filtering A c ommonplace practice for systems using analog-to-digital converters is to filter the input signal by an anti-aliasing filter. The filter characteristic must be chosen carefully to balance propagation delay and noise. The lowpass filter in the AS5030 has a cut-off frequency of typ. 23.8kHz and the overall propagation delay in the analog signal path is typ. 15.6µs. 7 .1.3 D igital readout rate
A side from the chip-internal propagation delay, the time required to read and process the angle data must also be considered. Due to its nature, a PWM signal is not very usable at high speeds, as you get only one reading per PWM period. Increasing the PWM frequency may improve the situation but causes problems for the receiving controller to resolve the PWM steps. The frequency on the AS5030 PWM output is typ. 1.95kHz with a resolution of 2µs/step. A more suitable approach for high speed absolute angle measurement is using the serial interface. With a clock rate of up to 6MHz, a complete set of data (21bits) can be read in >3.5µs
7 .2
T otal propagation delay of the AS5030
T he total propagation delay of the AS5030 is the delay in the analog signal path and the tracking rate of the ADC: 15.6µs + 1.15µs = 16.75µs. If only the SIN-/COS-outputs are used, the propagation delay is the analog signal path delay only (typ. 15.6µs). P osition Error over speed T he angle error over speed caused by the propagation delay is calculated as: Δ φ pd = r pm * 6 * 16.75E -6 i n degrees.
In addition, the anti-aliasing filter causes an angle error calculated as: Δ φ lpf = A rcTan [ rpm / ( 60*f 0 )]
R ev. 1.8
www.austriamicrosystems.com
Page 20 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
E xamples of the overall position error caused by speed, including both propagation delay and filter delay: S peed (rpm) 1 00 1 000 1 0000 T otal Position error ( Δφ pd + Δ φ lpf ) 0.0175° 0.175° 1.75°
8
R educed Power Modes
T he AS5030 can be operated in 3 reduced power modes. All 3 modes have in common that they switch off or freeze parts of the chip during intervals between measurements. In Low Power Mode or Ultra Low Power Mode, the AS5030 is not operational, but due to the fast start-up, an angle measurement can be accomplished very quickly and the chip can be switched to reduced power immediately after a valid measurement has been taken. Depending on the intervals between measurements, very low average power consumption can be achieved using such a strobed measurement mode. • L ow Power Mode: reduced current consumption, very fast start-up. Ideal for short sampling intervals (1µF on/off
VDD
100n
S
N
CS CLK DIO
Micro Controller
T he power cycling method shown in Figure 26 cycles the AS5030 by switching it on and off, using an external PNP transistor high side switch. This mode provides the least power consumption of all three modes; when the sampling interval is more than 400ms, as the current consumption in offmode is zero. It also has the longest start-up time of all modes, as the chip must always perform a “cold start“ from zero, which takes about 1.9 ms (see 8.1). The optional filter R1/C1 may again be added to reduce peak currents in the 5V power supply line.
AS5030
VSS C1 C2 VSS VSS
F igure 26: Application example III: ultra-low power encoder
F igure 27 shows an overview of the average supply currents in the three reduced power modes, depending on the sampling interval. The graphs shows that the Low Power Mode is the best option for sampling intervals 400ms, the power cycling mode is the best method to minimize the average current consumption. The curves are based on the figures given in 8.1.
AS5030 average current consumption 5,0 4,5 4,0
avg. current consumption [mA]
3,5 3,0 2,5 2,0 Low Power Mode 1,5 1,0 0,5 0,0 1 10
sampling interval [ms]
F igure 27: Average current consumption of reduced power modes
Power Cycling Mode Ultra Low Power Mode 100 1000
9
A ccuracy of the Encoder system
T his chapter describes which individual factors influence the accuracy of the encoder system and how to improve them. Accuracy is defined as the difference between measured angle and actual angle. This is not to be confused with resolution, which is the smallest step that the system can resolve. The two parameters are not necessarily linked together. A high resolution encoder may not necessarily be highly accurate as well.
9 .1
Q uantization error
T here is however a direct link between resolution and accuracy, which is the quantization error:
F igure 28: Quantization error of a low resolution and a high resolution system
R ev. 1.8
www.austriamicrosystems.com
Page 23 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
T he resolution of the encoder determines the smallest step size. The angle error caused by quantization cannot get better than ± ½ LSB. As shown in Figure 28, a higher resolution system (right picture) has a smaller quantization error, as the step size is smaller. For the AS5030, the quantization error is ± ½ LSB = ± 0.7°
INL including quantization error
1,5 1 0,5 INL [°] 0 -0,5 -1 -1,5 0 45 90 135 180 Angle steps INL Average (16x) 225 270 315 360
F igure 29: Typical INL error over 360°
F igure 29 shows a typical example of an error curve over a full turn of 360° at a given X-Y displacement. The curve includes the quantization error, transition noise and the system error. The total error is ~2.2° peak/peak (± 1.1°). The sawtooth-like quantization error (see also Figure 28) can be reduced by averaging, provided that the magnet is in constant motion and there are an adequate number of samples available. The solid bold line in Figure 29 shows the moving average of 16 samples. The INL (intrinsic non-linearity) is reduced to from ~± 1.1° down to ~± 0.3°. The averaging however, also increases the total propagation delay, therefore it may be considered for low speeds only or adaptive; depending on speed (see also: 0, Position Error over speed ).
R ev. 1.8
www.austriamicrosystems.com
Page 24 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
9 .2
V ertical distance of the magnet
T he chip-internal automatic gain control (AGC) regulates the input signal amplitude for the tracking-ADC to a constant value. This improves the accuracy of the encoder and enhances the tolerance for the vertical distance of the magnet.
Linearity and AGC vs Airgap
64 56 48 Linearity [°] AGC value 40 32 24 16 8 0 0 500 1000 1500 2000 Airgap [mm] [ µm] sample#1 sample#2 sample#3 sample#4 Linearity [°] 1,2 1,0 2500 1,8 1,6 1,4 2,2 2,0
F igure 30: Typical curves for vertical distance versus ACG value on several untrimmed samples
A s shown in Figure 30, the AGC value (left Y-axis) increases with vertical distance of the magnet. Consequently, it is a good indicator for determining the vertical position of the magnet, for example as a pushbutton feature, as an indicator for a defective magnet or as a preventive warning (e.g. for wear on a ball bearing etc.) when the nominal AGC value drifts away. If the magnet is too close or the magnetic field is too strong, the AGC will be reading 0, If the magnet is too far away (or missing) or if the magnetic field is too weak, the AGC will be reading 63 (3F H ). The AS5030 will still operate outside the AGC range, but the accuracy may be reduced as the signal amplitude can no longer be kept at a constant level. The linearity curve in Figure 30 (right Y-axis) shows that the accuracy of theAS5030 is best within the AGC range, even slightly better at small airgaps (0.4mm ~ 0.8mm). At very short distances (0mm ~ 0.1mm) the accuracy is reduced, mainly due to nonlinearities in the magnetic field. At larger distances, outside the AGC range (~2.0mm ~ 2.5mm and more) the accuracy is still very good, only slightly decreased from the nominal accuracy. Since the field strength of a magnet changes with temperature, the AGC will also change when the temperature of the magnet changes. At low temperatures, the magnetic field will be stronger and the AGC value will decrease. At elevated temperatures, the magnetic field will be weaker and the AGC value will increase. S ensitivity trimming A s the curves for the 4 samples in Figure 30 show, the AGC value will not show exactly the same value at a given airgap on each part. For example, at 1mm vertical distance, the AGC may read a value between ~11 ~ 24. This is because for normal operation an exact trimming is not required since the AGC is part of a closed loop system. However, the AS5030 offers an optional user trimming in the OTP (see 5.2.4) to allow an even tighter AGC tolerance for applications where the information about magnetic field strength is also utilized, e.g. for rotate-and-push types of knobs, etc…
R ev. 1.8
www.austriamicrosystems.com
Page 25 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
1 0 C hoosing the proper magnet
typ. 6mm diameter
N
S
Magnet axis R1
T here is no strict requirement on the type or shape of the magnet to be used with the AS5030. It can be cylindrical as well as square in shape. The key parameter is that the vertical magnetic field B z , measured at a radius of 1mm from the rotation axis is sinusoidal with a peak amplitude of 20 ~ 80mT (see Figure 31).
1 0.1 M agnet Placement:
I deally, the center of the magnet, the diagonal center of the IC and the rotation axis of the magnet should be in one vertical line. The lateral displacement of the magnet should be within ± 0.25mm from the IC package center or ± 0.5mm from the IC center, including the placement of the chip within the IC package. The vertical distance should be chosen such that the magnetic field on the die surface is within the specified limits. The typical distance “z” between the magnet and the package surface is 0.5mm to 1.8mm with the recommended magnet (6mm x 2.5mm). Larger gaps are possible, as long as the required magnetic field strength stays within the defined limits. A magnetic field outside the specified range may still produce acceptable results, but with reduced accuracy. The out-of-range condition will be indicated, when the AGC is at the limits (AGC= 0 : field too strong; AGC=63=(3F H ): field too weak or missing magnet.
Magnet axis
Vertical field component
N
S
R1 concentric circle; radius 1.0 mm Vertical field component Bz (20…80mT)
0
360
360
F igure 31: Vertical magnetic fields of a rotating magnet
B z; 6mm magnet @y=0; z=1mm
N
1 50
S
1 00
50
0
-50
-1 00
Hall elements (side view)
-1 50 3,5 2,5 1 ,5 0,5 -0,5 -1 ,5 -2,5 -3,5 X - dis pla c e m e nt [ m m ]
F igure 32: B z f ield distribution along the x-axis of a 6mmØ diametric magnetized magnet
R ev. 1.8
www.austriamicrosystems.com
Page 26 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
F igure 32 shows a cross sectional view of the vertical magnetic field component Bz between the north and south pole of a 6mm diameter magnet, measured at a vertical distance of 1mm. The poles of the magnet (maximum level) are about 2.8mm from the magnet center, which is almost at the outer magnet edges. The magnetic field reaches a peak amplitude of ~± 106mT at the poles. The Hall elements are located at a radius of 1mm (indicated as squares at the bottom of the graph). Due to the side view, the two Hall elements at the Y-axis are overlapping at X = 0mm, therefore only 3 Hall elements are shown. At 1mm radius, the peak amplitude is ~± 46mT, respectively a differential amplitude of 92mT. The vertical magnetic field B z f ollows a fairly linear pattern up to about 1.5mm radius. Consequently, even if the magnet is not perfectly centered, the differential amplitude will be the same as for a centered magnet. For example, if the magnet is misaligned in X-axis by -0.5mm, the two X-Hall sensors will measure 70mT (@x = -1.5mm) and -22mt (@x = -0.5mm). Again, the differential amplitude is 92mT. At larger displacements however, the B z a mplitude becomes nonlinear, which results in larger errors that mainly affect the accuracy of the system (see also Figure 34)
BZ; 6mm magnet @ Z=1mm
N
125 100 75 50 25
Bz [mT]
area of X-Y-misalignment from center: +/- 0.5mm
circle of Hall elements on chip: 1mm radius
0 -25 -50 -75 -100 -125
4 3 2 2 1 0 -3 -1 -2 -3 -4 -2
4 3 2
S
-1
1 0
Y-displacement [mm]
X-displacement [mm]
F igure 33: Vertical magnetic field distribution of a cylindrical 6mm Ø diametric magnetized magnet at 1mm gap
F igure 33 shows the same vertical field component as Figure 32, but in a 3-dimensional view over an area of ± 4mm from the rotational axis.
1 0.2 L ateral displacement of the magnet
A s shown in the magnet specifications (4.4), the recommended horizontal position of the magnet axis with respect to the IC package center is within a circle of 0.25mm radius. This includes the placement tolerance of the IC within the package. Figure 34 shows a typical error curve at a medium vertical distance of the magnet around 1.2mm (AGC = 24). The X- and Y- axis of the graph indicate the lateral displacement of the magnet center with respect to the IC center. At X = Y = 0, the magnet is perfectly centered over the IC. The total displacement plotted on the graph is for ± 1mm in both directions. The Z-axis displays the worst case INL error over a full turn at each given X-and Y- displacement. The error includes the quantization error of ± 0.7° (see 0). For example, the accuracy for a centered magnet is between 1.0 ~ 1.5° (spec = 2° over full temperature range). Within a radius of 0.5mm, the accuracy is better than 2.0° (spec = 3° over temperature).
R ev. 1.8
www.austriamicrosystems.com
Page 27 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
INL vs. Displacement: AS5030 for AGC24
4,500-5,000 4,000-4,500 5,000 4,500 4,000 3,500 3,000 2,500 INL [°] 2,000 1,500 1,000 0,500 0,000 - 1000 -750 -500 -250 0 250 X Displacem ent [µm ] 500 750 1000 3,500-4,000 3,000-3,500 2,500-3,000 1000 750 500 250 0 -250 -500 -750 -1000 Y Displacem ent [µm ] 2,000-2,500 1,500-2,000 1,000-1,500 0,500-1,000 0,000-0,500
F igure 34: Typical error curve of INL error over lateral displacement (including quantization error)
1 0.3 M agnet size
F igure 32 to Figure 34 in this chapter describe a cylindrical magnet with a diameter of 6mm. Smaller magnets may also be used, but since the poles are closer together, the linear range will also be smaller and consequently the tolerance for lateral misalignment will also be smaller. If the ± 0.25mm lateral misalignment radius (rotation axis to IC package center) is too tight, a larger magnet can be used. Larger magnets have a larger linear range and allow more misalignment. However at the same time the slope of the magnet is more flat which results in a lower differential amplitude. This requires either a stronger magnet or a smaller gap between IC and magnet in order to operate in the amplitude-controlled area (AGC > 0 and AGC < 63). In any case, if a magnet other than the recommended 6mm diameter magnet is used, two parameters should be verified: • V erify that the magnetic field produces a sinusoidal wave, when the magnet is rotated. Note: this can be done with the SIN-/COS- outputs of the AS5030, e.g. rotate the magnet at constant speed and analyze the SIN- (or COS-) output with an FFT-analyzer. It is recommended to disable the AGC for this test (see 4.20). V erify that the B z -Curve between the poles is as linear as possible (see Figure 32). This curve may be available from the magnet supplier(s). Alternatively, the SIN- or COS- output of the AS5030 may also be used together with an X-Y- table to get a B z -scan of the magnet (as in Figure 32 or Figure 33) Furthermore; the sinewave tests described above may be re-run at defined X-and Y- misplacements of the magnet to determine the maximum acceptable lateral displacement range. It is recommended to disable the AGC for both these tests (see 4.20).
•
N ote: for preferred magnet suppliers, please refer to the austriamicrosystems website (Rotary Encoder section).
R ev. 1.8
www.austriamicrosystems.com
Page 28 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
1 1 P ackage Drawings and Markings
1 6-Lead Thin Shrink Small Outline Package TSSOP-16
A YWWIZZ AS5030
D imensions
S ymbol A A1 A2 b c D E E1 e K L 0° 0 .45 0.05 0.8 0 .19 0 .09 4 .9 6 .2 4.3 5 6.4 4.4 0 .65 0.60 0.10 1 mm M in T yp M ax 1 .2 0.15 1.05 0.30 0.20 5.1 6.6 4.48 8° 0.75 .002 0.031 0.007 .004 0.193 0.244 0.169 0° .018 0.197 0.252 0.173 .0256 .024 8° .030 .004 0.039 M in i nch T yp M ax .047 .006 0.041 0.012 .008 0.201 0.260 0.176
M arking: AYWWIZZ A : Pb-Free Identifier Y: Last Digit of Manufacturing Year WW: Manufacturing Week I: Plant Identifier ZZ: Traceability Code JEDEC Package Outline Standard: M O - 153 T hermal Resistance R th(j-a) : 89 K/W in still air, soldered on PCB IC's marked with a white dot or the letters "ES" denote Engineering Samples
R ev. 1.8
www.austriamicrosystems.com
Page 29 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
1 2 O rdering Information
D elivery: Tape and Reel (1 reel = 4500 devices) Tubes (1 box = 100 tubes á 96 devices) for delivery in tubes for delivery in tape and reel
Order # AS5030ATSU Order # AS5030ATST
1 3 R ecommended PCB Footprint
R ecommended Footprint Data A B C D E mm 7 .26 4 .93 0 .36 0 .65 4 .91 inch 0.286 0.194 0.014 0.0256 0.193
R ev. 1.8
www.austriamicrosystems.com
Page 30 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
Table of contents
1 G eneral Description ....................................................................................................................................................... 1 1 .1 1 .2 1 .3 1 .4 2 3 4 B enefits.................................................................................................................................................................. 1 K ey Features .......................................................................................................................................................... 1 A pplications............................................................................................................................................................ 1 B lock Diagram ........................................................................................................................................................ 1
P ackage and Pinout ....................................................................................................................................................... 2 A S5030 Parameter and Features List .............................................................................................................................. 3 G eneral Device Specifications ........................................................................................................................................ 4 4 .1 4 .2 4 .3 4 .4 4 .5 4 .6 4 .7 4 .8 4 .9 4 .10 4 .11 4 .12 4 .13 4 .14 4 .15 4 .16 4 .17 4 .18 4 .19 4 .20 4 .21 4 .22 A bsolute Maximum Ratings (non operating) ............................................................................................................. 4 O perating Conditions .............................................................................................................................................. 4 S ystem Parameters................................................................................................................................................. 5 M agnet Specifications ............................................................................................................................................. 6 M agnetic Field Alarm Limits .................................................................................................................................... 6 H all Element sensitivity options ............................................................................................................................... 6 P rogramming parameters ........................................................................................................................................ 7 D C Characteristics of Digital Inputs and Outputs ...................................................................................................... 7 8 -bit PWM Output ................................................................................................................................................... 7 S erial 8-bit Output ............................................................................................................................................... 8 G eneral Data Transmission Timings ..................................................................................................................... 8 C onnecting the AS5030 ....................................................................................................................................... 9 S erial 3-Wire R/W Connection.............................................................................................................................. 9 S erial 3-Wire Read-only Connection ..................................................................................................................... 9 S erial 2-Wire Connection (R/W Mode) ................................................................................................................ 10 S erial 2-wire Continuous Readout ...................................................................................................................... 11 S erial 2-Wire Differential SSI Connection ........................................................................................................... 11 1 -Wire PWM Connection .................................................................................................................................... 12 A nalog Output ................................................................................................................................................... 13 A nalog Sin/Cos outputs with external interpolator ............................................................................................... 13 3 -Wire Daisy Chain Mode .................................................................................................................................. 14 2 -Wire Daisy Chain Mode .................................................................................................................................. 14
5
A S5030 Programming .................................................................................................................................................. 15 5 .1 5 .2 5 .3 5 .4 P rogramming Options ........................................................................................................................................... 15 A S5030 Read / Write Commands ........................................................................................................................... 16 O TP Programming Connection............................................................................................................................... 17 P rogramming Verification ...................................................................................................................................... 18
6
A S5030 Status Indicators ............................................................................................................................................. 18 6 .1 6 .2 6 .3 6 .4 C 2 Status Bit ........................................................................................................................................................ 18 L ock Status Bit ..................................................................................................................................................... 18 M agnetic Field Strength Indicators......................................................................................................................... 18 “ Pushbutton” Feature ............................................................................................................................................ 19
R ev. 1.8
www.austriamicrosystems.com
Page 31 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
7
H igh Speed Operation .................................................................................................................................................. 20 7 .1 7 .2 P ropagation Delay ................................................................................................................................................ 20 T otal propagation delay of the AS5030 .................................................................................................................. 20
8
R educed Power Modes ................................................................................................................................................. 21 8 .1 8 .2 L ow Power Mode and Ultra Low Power Mode ......................................................................................................... 21 P ower Cycling Mode ............................................................................................................................................. 22
9
A ccuracy of the Encoder system ................................................................................................................................... 23 9 .1 9 .2 Q uantization error ................................................................................................................................................. 23 V ertical distance of the magnet ............................................................................................................................. 25 C hoosing the proper magnet ..................................................................................................................................... 26 1 0.1 1 0.2 1 0.3 M agnet Placement:............................................................................................................................................ 26 L ateral displacement of the magnet.................................................................................................................... 27 M agnet size ...................................................................................................................................................... 28 P ackage Drawings and Markings ............................................................................................................................... 29 O rdering Information ................................................................................................................................................ 30 R ecommended PCB Footprint ................................................................................................................................... 30
10
11 12 13
T able of contents ................................................................................................................................................................ 31 C opyrights .......................................................................................................................................................................... 33 D isclaimer .......................................................................................................................................................................... 33 C ontact Information ............................................................................................................................................................. 33
R ev. 1.8
www.austriamicrosystems.com
Page 32 of 33
A S5030 8-bit Programmable Magnetic Rotary Encoder
C opyrights
C opyright © 1997-2007, 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. This product is protected by U.S. Patent No. 7,095,228.
D isclaimer
D evices 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.
C ontact Information
H eadquarters a ustriamicrosystems AG A-8141 Schloss Premstaetten, Austria Tel: +43 (0) 3136 500 0 Fax: +43 (0) 3136 525 01 For Sales Offices, Distributors and Representatives, please visit: http://www.austriamicrosystems.com
R ev. 1.8
www.austriamicrosystems.com
Page 33 of 33