Data Sheet AS5140H 10-Bit 360 Programmable Magnetic Rotary Encoder For High A m b i e n t Te m p e r a t u r e s 1 General Description 2 Key Features Contactless high resolution rotational position encoding over a full turn of 360 The AS5140H is a contactless magnetic rotary encoder for accurate angular measurement over a full turn of 360 and over an extended ambient temperature range of -40C to +150C. Two digital 10-bit absolute outputs: Serial interface and Pulse width modulated (PWM) output It is a system-on-chip, combining integrated Hall elements, analog front end and digital signal processing in a single device. Three incremental output modes: Quadrature A/B and Index output signal, Step / Direction and Index output signal, 3-phase commutation for brushless DC motors To measure the angle, only a simple two-pole magnet, rotating over the center of the chip, is required. The magnet may be placed above or below the IC. User programmable zero / index position The absolute angle measurement provides instant indication of the magnet's angular position with a resolution of 0.35 = 1024 positions per revolution. This digital data is available as a serial bit stream and as a PWM signal. Furthermore, a user-programmable incremental output is available. Failure detection mode for magnet placement monitoring and loss of power supply Rotational speeds up to 10.000 rpm Pushbutton functionality detects movement of magnet in Z-axis An internal voltage regulator allows the AS5140H to operate at either 3.3V or 5V supplies. Serial read-out of multiple interconnected AS5140H devices using Daisy Chain mode The AS5140H is pin-compatible to the AS5040; however it uses lowvoltage OTP programming cells with additional programming options. Fully automotive qualified to AEC-Q100, grade 0 Wide ambient temperature range: -40C to +150C 3 Applications The AS5140H is an ideal solution for automotive applications like engine compartment sensors, transmission gearbox encoder, throttle valve position control and for industrial applications like rotary sensors in high temperature environment. Figure 1. AS5140H IC Block Diagram VDDV3V VDD5V MagINCn MagDECn LDO 3.3V PWM Interface Sin Hall Array & Frontend Amplifier AS5140H Cos PWM_LSB Ang DSP Mag Absolute Interface (SSI) DO CSn CLK OTP Register Programming Parameters Incremental Interface A_LSB_U B_Dir_V Index_W Prog www.austriamicrosystems.com/AS5140H Revision 1.4 1 - 37 AS5140H Data Sheet - C o n t e n t s Contents 1 General Description .................................................................................................................................................................. 1 2 Key Features ............................................................................................................................................................................ 1 3 Applications .............................................................................................................................................................................. 1 4 Pin Assignments ....................................................................................................................................................................... 4 4.1 Pin Descriptions ................................................................................................................................................................................... 4 5 Absolute Maximum Ratings 6 Electrical Characteristics ...................................................................................................................................................... 6 .......................................................................................................................................................... 7 6.1 DC Characteristics for Digital Inputs and Outputs 6.2 Magnetic Input Specification 6.3 Electrical System Specifications 6.4 Programming Conditions 6.5 Timing Characteristics 7 Detailed Description ................................................................................................................................ 7 ................................................................................................................................................................ 8 .......................................................................................................................................................... 8 ...................................................................................................................................................................... 9 ........................................................................................................................................................................ 10 ............................................................................................................................................................... 12 7.1 10-bit Absolute Angular Position Output ............................................................................................................................................ 12 7.1.1 Synchronous Serial Interface (SSI) ........................................................................................................................................... 12 7.1.2 Daisy Chain Mode ..................................................................................................................................................................... 14 7.2 Incremental Outputs ........................................................................................................................................................................... 15 7.2.1 Quadrature A/B Output (Quad A/B Mode) ................................................................................................................................. 15 7.2.2 LSB Output (Step/Direction Mode) ............................................................................................................................................ 15 7.2.3 Incremental Output Hysteresis .................................................................................................................................................. 16 7.3 Pulse Width Modulation (PWM) Output 7.4 Analog Output 7.5 Brushless DC Motor Commutation Mode 7.6 Programming the AS5140H 7.6.1 7.6.2 7.6.3 7.6.4 7.6.5 7.6.6 7.6.7 ............................................................................................................................................. 16 .................................................................................................................................................................................... 17 ........................................................................................................................................... 18 ............................................................................................................................................................... 19 OTP Memory Assignment .......................................................................................................................................................... 19 User Selectable Settings ........................................................................................................................................................... 20 OTP Default Setting ................................................................................................................................................................... 20 Redundant Programming Option ............................................................................................................................................... 20 OTP Register Entry and Exit Condition ..................................................................................................................................... 20 Incremental Mode Programming ............................................................................................................................................... 21 Zero Position Programming ....................................................................................................................................................... 22 7.7 Alignment Mode ................................................................................................................................................................................. 22 7.8 3.3V / 5V Operation ............................................................................................................................................................................ 23 7.9 Choosing the Proper Magnet ............................................................................................................................................................. 24 7.9.1 Physical Placement of the Magnet ............................................................................................................................................ 24 7.10 Simulation Modeling ......................................................................................................................................................................... 26 7.11 Failure Diagnostics ........................................................................................................................................................................... 27 7.11.1 Magnetic Field Strength Diagnosis .......................................................................................................................................... 27 7.11.2 Power Supply Failure Detection .............................................................................................................................................. 27 7.12 Angular Output Tolerances 7.12.1 7.12.2 7.12.3 7.12.4 7.12.5 ............................................................................................................................................................... 27 Accuracy .................................................................................................................................................................................. 27 Transition Noise ....................................................................................................................................................................... 29 High Speed Operation ............................................................................................................................................................. 29 Propagation Delays ................................................................................................................................................................. 30 Internal Timing Tolerance ........................................................................................................................................................ 30 www.austriamicrosystems.com/AS5140H Revision 1.4 2 - 37 AS5140H Data Sheet - C o n t e n t s 7.12.6 Temperature ............................................................................................................................................................................ 31 8 Application Information ........................................................................................................................................................... 32 8.1 AS5140H Differences to AS5040 ....................................................................................................................................................... 32 9 Package Drawings and Markings ........................................................................................................................................... 33 9.1 Recommended PCB Footprint ........................................................................................................................................................... 34 10 Ordering Information ............................................................................................................................................................. 36 www.austriamicrosystems.com/AS5140H Revision 1.4 3 - 37 AS5140H Data Sheet - P i n A s s i g n m e n t s 4 Pin Assignments Figure 2. Pin Assignments (Top View) 1 16 VDD5V MagDECn 2 15 VDD3V3 A_LSB_U 3 14 NC B_Dir_V 4 13 NC 12 PWM_LSB 11 CSn NC Index_W 5 6 AS5140H MagINCn VSS 7 10 CLK Prog 8 9 DO 4.1 Pin Descriptions The following table 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). Table 1. Pin Descriptions Pin Name Pin Number Description MagINCn 1 Magnet Field Magnitude Increase. Active low. Indicates a distance reduction between the magnet and the device surface. MagDECn 2 Magnet Field Magnitude Decrease. Active low. Indicates a distance increase between the device and the magnet. A_LSB_U 3 Mode1.x: Quadrature A channel Mode2.x: Least Significant Bit Mode3.x: U signal (phase1) B_Dir_V 4 Mode1.x: Quadrature B channel quarter period shift to channel A Mode2.x: Direction of Rotation Mode3.x: V signal (phase2) NC 5 For internal use. Must be left unconnected. Index_ W 6 Mode1.x and Mode2.x: Index signal indicates the absolute zero position Mode3.x: W signal (phase3) VSS 7 Negative Supply Voltage (GND). Prog 8 OTP Programming Input and Data Input for Daisy Chain mode. Internal pull-down resistor (~74k). May be connected to VSS if programming is not used. DO 9 Data Output of Synchronous Serial Interface. CLK 10 SSI Clock Input. Schmitt-Trigger input. CSn 11 Chip Select. Active low; Schmitt-Trigger input, internal pull-up resistor (~50k) connect to VSS in incremental mode (see Incremental Power-up Lock Option on page 16) www.austriamicrosystems.com/AS5140H Revision 1.4 4 - 37 AS5140H Data Sheet - P i n A s s i g n m e n t s Table 1. Pin Descriptions Pin Name Pin Number Description PWM_LSB 12 Pulse Width Modulation of approx. 1kHz; LSB in Mode3.x NC 13 For internal use. Must be left unconnected. NC 14 For internal use. Must be left unconnected. VDD3V3 15 3V-Regulator Output (see Figure 17) VDD5V 16 Positive Supply Voltage 5V Pins 1 and 2 are the magnetic field change indicators, MagINCn and MagDECn (magnetic field strength increase or decrease through variation of the distance between the magnet and the device). These outputs can be used to detect the valid magnetic field range. Furthermore those indicators can also be used for contact-less push-button functionality. Pins 3, 4 and 6 are the incremental pulse output pins. The functionality of these pins can be configured through programming the one-time programmable (OTP) register: Table 2. Pin Assignment for Different Incremental Output Modes Output Mode Pin 3 Pin 4 Pin 6 Pin 12 1.x: Quadrature A B Index PWM 2.x: Step/direction LSB Direction Index PWM 3.x: Commutation U V W LSB Mode 1.x: Quadrature A/B Output Represents the default quadrature A/B signal mode. Mode 2.x: Step / Direction Output Configures pin 3 to deliver up to 512 pulses (up to 1024 state changes) per revolution. It is equivalent to the LSB (least significant bit) of the absolute position value. Pin 4 provides the information of the rotational direction. Note: Both modes (mode 1.x and mode 2.x) provide an index signal (1 pulse/revolution) with an adjustable width of one LSB or three LSB's. Mode 3.x: Brushless DC Motor Commutation Mode In addition to the absolute encoder output over the SSI interface, this mode provides commutation signals for brushless DC motors with either one pole pair or two pole pair rotors. The commutation signals are usually provided by 3 discrete Hall switches, which are no longer required, as the AS5140H can fulfill two tasks in parallel: absolute encoder + BLDC motor commutation. In this mode, - Pin 12 provides the LSB output instead of the PWM (Pulse-Width-Modulation) signal. - Pin 8 (Prog) is also used to program the different incremental interface modes, the incremental resolution and the zero position into the OTP (see page 21). This pin is also used as digital input to shift serial data through the device in Daisy Chain configuration, (see page 14). - Pin 11 Chip Select (CSn; active low) selects a device within a network of AS5140H encoders and initiates serial data transfer. A logic high at CSn puts the data output pin (DO) to tri-state and terminates serial data transfer. This pin is also used for alignment mode (see page 22) and programming mode (see page 19). - Pin 12 allows a single wire output of the 10-bit absolute position value. The value is encoded into a pulse width modulated signal with 1s pulse width per step (1s to 1024s over a full turn). By using an external low pass filter, the digital PWM signal is converted into an analog voltage, allowing a direct replacement of potentiometers. www.austriamicrosystems.com/AS5140H Revision 1.4 5 - 37 AS5140H Data Sheet - A b s o l u t e M a x i m u m R a t i n g s 5 Absolute Maximum Ratings Stresses beyond those listed in Table 3 may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in Electrical Characteristics on page 7 is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Table 3. Absolute Maximum Ratings Parameter Min Max Units DC supply voltage at pin VDD5V -0.3 7 V DC supply voltage at pin VDD3V3 -0.3 5 V Comments Input pin voltage -0.3 7 V Pins Prog, MagINCn, MagDECn, CLK, CSn Input current (latchup immunity) -100 100 mA Norm: JEDEC 78 2 kV Norm: MIL 883 E method 3015 +150 C 260 C Electrostatic discharge Storage temperature -55 Body temperature (Lead-free package) Humidity non-condensing 5 85 % Ambient temperature -40 150 C www.austriamicrosystems.com/AS5140H Revision 1.4 t=20 to 40s, Norm: IPC/JEDEC J-Std-020C Lead finish 100% Sn "matte tin" 6 - 37 AS5140H Data Sheet - E l e c t r i c a l C h a r a c t e r i s t i c s 6 Electrical Characteristics TAMB = -40 to 150C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation), unless otherwise noted. Table 4. Operating Conditions Symbol Parameter Isupp Supply current VDD5V External supply voltage at pin VDD5V Conditions Min Typ Max Units 16 21 mA 4.5 5.0 5.5 V 3.0 3.3 3.6 V VDD3V3 Internal regulator output voltage at pin VDD3V3 5V operation VDD5V 3.3V operation (pins VDD5V and VDD3V3 connected) 3.0 3.3 3.6 V VDD3V3 External supply voltage at pin VDD5V,VDD3V3 3.0 3.3 3.6 V tpwrup3 External VDD3V3 supply voltage rise time at power-up 10%-90% level in 3.3V mode (pins VDD5V and VDD3V3 connected) 1 150 s Max Units 6.1 DC Characteristics for Digital Inputs and Outputs Table 5. CMOS Schmitt-Trigger Inputs: CLK, CSn (CSn = Internal Pull-up) Symbol Parameter Conditions Min Typ VIH High level input voltage Normal operation 0.7 * VDD5V VIL Low level input voltage VIon - VIoff Schmitt Trigger hysteresis ILEAK Input leakage current CLK only -1 1 IiL Pull-up low level input current CSn only, VDD5V:5.0V -30 -100 Conditions Min V 0.3 * VDD5V 1 V V A Table 6. CMOS / Program Input: Prog Symbol Parameter VIH High level input voltage VPROG High level input voltage VIL Low level input voltage IiL Pull-down high level input current Typ Max Units 5 V Refer to Programming Conditions on page 9 V 0.7 * VDD5V During programming VDD5V:5.5V 0.3 * VDD5V V 100 A Max Units VSS+0.4 V Table 7. CMOS Output Open Drain: MagINCn, MagDECn Symbol Parameter VOL Low level output voltage IO Output current IOZ Open drain leakage current Conditions Min Typ VDD5V:4.5V 4 VDD5V:3V 2 mA 1 A Max Units Table 8. CMOS Output: A, B, Index, PWM Symbol VOH Parameter Conditions High level output voltage www.austriamicrosystems.com/AS5140H Min VDD5V0.5 Revision 1.4 Typ V 7 - 37 AS5140H Data Sheet - E l e c t r i c a l C h a r a c t e r i s t i c s Table 8. CMOS Output: A, B, Index, PWM (Continued) Symbol Parameter VOL Low level output voltage IO Output current Conditions Min Typ Max Units VSS+0.4 V VDD5V:4.5V 4 VDD5V:3V 2 mA Table 9. Tristate CMOS Output: DO Symbol Parameter VOH High level output voltage VOL Low level output voltage IO Output current IOZ Tri-state leakage current Conditions Min Typ Max VDD5V0.5 Units V VSS+0.4 VDD5V:4.5V 4 VDD5V:3V 2 V mA 1 A Max Units 6.2 Magnetic Input Specification Table 10. Electrical Characteristics Symbol Parameter Conditions Min Typ 4 6 Magnetic Input Specification (Two-pole cylindrical diametrically magnetized source) dmag Diameter tmag Thickness Bpk Magnetic input field amplitude Required vertical component of the magnetic field strength on the die's surface, measured along a concentric circle with a radius of 1.1mm Boff Magnetic offset Field non-linearity Disp mm 2.5 75 mT Constant magnetic stray field 10 mT Including offset gradient 5 % Absolute mode: 600 rpm @ readout of 1024 positions (see Table 19) 10 Hz Incremental mode: no missing pulses at rotational speeds of up to 10.000 rpm (see Table 19) 166 Hz Max. X-Y offset between defined IC package center and magnet axis (see Figure 19) 0.25 Max. X-Y offset between chip center and magnet axis 0.485 Chip placement tolerance Placement tolerance of chip within IC package (see Figure 21) 0.235 Recommended magnet material and temperature drift NdFeB (Neodymium Iron Boron) -0.12 SmCo (Samarium Cobalt) -0.035 fmag_abs fmag_inc Recommended magnet: O 6mm x 2.5mm for cylindrical magnets Input frequency (rotational speed of magnet) Displacement Radius 45 mm mm %/K 6.3 Electrical System Specifications Table 11. Electrical System Specifications Symbol Parameter RES Resolution 1 www.austriamicrosystems.com/AS5140H Conditions 0.352 deg Revision 1.4 Min Typ Max Units 10 bit 8 - 37 AS5140H Data Sheet - E l e c t r i c a l C h a r a c t e r i s t i c s Table 11. Electrical System Specifications (Continued) Symbol Parameter Conditions Min 7 bit LSB Max Units 2.813 Adjustable resolution only available for incremental output modes; Least significant bit, minimum step 8 bit 9 bit 1.406 deg 0.703 10 bit 0.352 2 Maximum error with respect to the best line fit. Verified at optimum magnet placement, TAMB =25C 0.5 deg Integral non-linearity (optimum) Maximum error with respect to the best line fit. Verified at optimum magnet placement, TAMB = -40 to +150C 0.9 deg INL Integral non-linearity Best line fit = (Errmax - Errmin) / 2 Over displacement tolerance with 6mm diameter magnet, TAMB = -40 to +150C (see Figure 3) 1.4 deg DNL Differential non-linearity 10bit, no missing codes 0.176 deg TN Transition noise RMS equivalent to 1 sigma 0.12 Deg RMS Hyst Hysteresis Von Power-on reset thresholds On voltage; 300mV typ. hysteresis Voff Power-on reset thresholds Off voltage; 300mV typ. hysteresis tPwrUp Power-up time Until offset compensation finished 50 ms tdelay System propagation delay absolute output Includes delay of ADC and DSP 48 s System propagation delay incremental output Calculation over two samples 192 s INLopt INLtemp 1. 2. 3. 4. Typ Integral non-linearity (optimum) 3 4 Incremental modes only 0.704 deg 1.37 2.2 2.9 1.08 1.9 2.6 DC supply voltage 3.3V (VDD3V3) V Internal sampling rate, TAMB = 25C 9.90 10.42 10.94 fS Sampling rate for absolute output Internal sampling rate, TAMB = -40 to +150C 9.38 10.42 11.46 CLK Read-out frequency Max. clock frequency to read out serial data kHz 1 MHz Digital Interface 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. 6.4 Programming Conditions TAMB = -40 to 150C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation), unless otherwise noted. Table 12. Programming Conditions Symbol Parameter Conditions Min Typ Max Units VPROG Programming voltage Voltage applied during programming 3.0 3.3 3.6 V VProgOff Programming voltage off level Line must be discharged to this level 0 1 V IPROG Programming current Current during programming 100 mA www.austriamicrosystems.com/AS5140H Revision 1.4 9 - 37 AS5140H Data Sheet - E l e c t r i c a l C h a r a c t e r i s t i c s Table 12. Programming Conditions (Continued) Symbol Parameter Conditions Min Rprogrammed Programmed fuse resistance (log 1) 10A max. current @ 100mV Max Units 100k 2mA max. current @ 100mV 50 100 Programming time per bit Time to prog. a singe fuse bit 10 20 s tCHARGE Refresh time per bit Time to charge the cap after tPROG 1 fLOAD LOAD frequency Data can be loaded at n*2s 500 kHz fREAD READ frequency Read the data from the latch 2.5 MHz fWRITE WRITE frequency Write the data to the latch 2.5 MHz Max Units 100 ns Runprogrammed Unprogrammed fuse resistance (log 0) tPROG Typ s 6.5 Timing Characteristics TAMB = -40 to +150C, VDD5V = 3.0-3.6V (3V operation) VDD5V = 4.5-5.5V (5V operation), unless otherwise noted. Table 13. Synchronous Serial Interface (SSI) Symbol Parameter Conditions Min Typ tDO active Data output activated (logic high) Time between falling edge of CSn and data output activated tCLK FE First data shifted to output register Time between falling edge of CSn and first falling edge of CLK 500 ns TCLK/2 Start of data output Rising edge of CLK shifts out one bit at a time 500 ns tDO valid Data output valid Time between rising edge of CLK and data output valid 413 ns tDO tristate Data output tristate After the last bit DO changes back to "tristate" 100 ns tCSn Pulse width of CSn CSn =high; To initiate read-out of next angular position 500 fCLK Read-out frequency Clock frequency to read out serial data >0 Conditions Min Signal period = 1025s 5% at Tamb = 25C ns 1 MHz Typ Max Units 0.927 0.976 1.024 Signal period =1025s 10% at Tamb = -40 to +150C 0.878 0.976 1.074 Table 14. Pulse Width Modulation Output Symbol fPWM Parameter PWM frequency kHz PWMIN Minimum pulse width Position 0d; angle 0 degree 0.90 1 1.10 s PWMAX Maximum pulse width Position 1023d; angle 359.65 degree 922 1024 1126 s Min Typ Max Units Table 15. Incremental Outputs Symbol Parameter Conditions tIncremental Incremental outputs valid after power-up Time between first falling edge of CSn after power-up and valid incremental outputs 500 ns tDir valid Directional indication valid Time between rising or falling edge of LSB output and valid directional indication 500 ns outputs valid www.austriamicrosystems.com/AS5140H Revision 1.4 10 - 37 AS5140H Data Sheet - E l e c t r i c a l C h a r a c t e r i s t i c s Figure 3. Integral and Differential Non-Linearity Example (exaggerated curve) 1023 10bit code 1023 Actual curve 2 TN DNL+1LSB 1 0 512 Ideal curve INL 0.35 512 0 0 www.austriamicrosystems.com/AS5140H 180 Revision 1.4 360 [degrees] 11 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n 7 Detailed Description The AS5140H 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 AS5140H 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 MagINCn and MagDECn 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 18). The AS5140H 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). Simultaneously, the device also provides incremental output signals. The various incremental output modes can be selected by programming the OTP mode register bits (see Table 20). As long as no programming voltage is applied to pin Prog, the new setting may 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 programmed. The default setting is a quadrature A/B mode including the Index signal with a pulse width of 1 LSB. The Index signal is logic high at the user programmable zero position. The AS5140H is tolerant to magnet misalignment and magnetic stray fields due to differential measurement technique and Hall sensor conditioning circuitry. Figure 4. Typical Arrangement of AS5140H and Magnet 7.1 10-bit Absolute Angular Position Output 7.1.1 Synchronous Serial Interface (SSI) 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. After a minimum time tCLK FE, data is latched into the output shift register with the first falling edge of CLK. Each subsequent rising CLK edge shifts out one bit of data. 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). A subsequent measurement is initiated by a log "high" pulse at CSn with a minimum duration of tCSn. www.austriamicrosystems.com/AS5140H Revision 1.4 12 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 5. Synchronous Serial Interface with Absolute Angular Position Data CSn tCLK FE tCSn TCLK/2 tCLK FE 8 1 CLK D9 DO tDO active D8 D7 tDO valid D5 D6 D4 D3 1 16 D2 D1 D0 OCF COF Angular Position Data LIN Mag Mag Even INC DEC PAR Status Bits D9 tDO Tristate 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. For fast startup, this bit may be polled by the external microcontroller. As soon as this bit is set, the AS5140H has completed the startup and the data is valid (see Table 17). 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 this 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. MagINCn - (Magnitude Increase) becomes HIGH, when the magnet is pushed towards the IC, thus increasing the magnetic field strength. MagDECn - (Magnitude Decrease) becomes HIGH, when the magnet is pulled away from the IC, thus decreasing the magnetic field strength. Signal "HIGH" for both MagINCn and MagDECn indicate a magnetic field that is out of the allowed range (see Table 16). Table 16. Magnetic Magnitude Variation Indicator MagINCn MagDECn Description 0 0 No distance change Magnetic Input Field OK (in range) 0 1 Distance increase: Pull-function. This state is dynamic, it is only active while the magnet is moving away from the chip in Z-axis. 1 0 Distance decrease: Push- function. This state is dynamic, it is only active while the magnet is moving towards the chip in Z.-axis. 1 1 Magnetic Input Field invalid - out of range: Too large, Too small (missing magnet). Note: Pins 1 and 2 (MagINCn, MagDECn) are open drain outputs and require external pull-up resistors. If the magnetic field is in range, both outputs are turned off. The two pins may also be combined with a single pull-up resistor. In this case, the signal is high when the magnetic field is in range. It is low in all other cases (see Table 16). Even Parity - A bit for transmission error detection of bits 1to 15 (D9 to D0, OCF, COF, LIN, MagINCn, MagDECn). 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. Data D9:D0 is valid, when the status bits have the following configurations: Table 17. Status Bit Outputs OCF 1 COF 0 www.austriamicrosystems.com/AS5140H LIN 0 MagINCn MagDECn 0 0 0 1 1 0 Revision 1.4 Parity even checksum of bits 1:15 13 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n The absolute angular position is sampled at a rate of 10kHz (0.1ms). This allows reading of all 1024 positions per 360 degrees within 0.1 seconds = 9.76Hz (~10Hz) without skipping any position. Multiplying 10Hz by 60, results the corresponding maximum rotational speed of 600 rpm. Readout of every second angular position allows for rotational speeds of up to 1200 rpm. Consequently, increasing the rotational speed reduces the number of absolute angular positions per revolution (see Table 21). 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.000 rpm without missing pulses. 7.1.2 Daisy Chain Mode The Daisy Chain mode allows connection of several AS5140H's in series, while still keeping just one digital input for data transfer (see "Data IN" in Figure 6 below). This 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 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. It is, n * (16+1) bits (EQ 1) For example, 34 bit for two devices, 51 bit for three devices, etc. The last data bit of the first device (Parity) is followed by a logic low bit and the first data bit of the second device (D9), etc. (see Figure 7). Figure 6. Daisy Chain Hardware Configuration AS5140H AS5140H C st 2 1 Device Data IN Prog DO DO AS5140H last Device Device Prog CSn CLK CSn nd DO CLK CSn Prog CLK CLK CSn Figure 7. Daisy Chain Mode Data Transfer CSn TCLK/2 tCLK FE 1 CLK D9 DO tDO active 8 D8 D7 tDO valid D6 D5 D4 D3 16 D2 D1 D0 OCF COF Angular Position Data Mag Mag Even INC DEC PAR Status Bits st 1 Device www.austriamicrosystems.com/AS5140H LIN Revision 1.4 D 1 D9 2 3 D8 D7 Angular Position Data nd 2 Device 14 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Programming Daisy Chained Devices. In Daisy Chain mode, the Prog pin is connected directly to the DO pin of the subsequent device in the chain (see Figure 6). During programming (see Programming the AS5140H on page 19), a programming voltage of 7.5V must be applied to pin Prog. This voltage level exceeds the limits for pin DO, so one of the following precautions must be made during programming: Open the connection DO Prog during programming, (or) Add a Schottky diode between DO and Prog (Anode = DO, Cathode = Prog) Due to the parallel connection of CLK and CSn, all connected devices may be programmed simultaneously. 7.2 Incremental Outputs Three different incremental output modes are possible with quadrature A/B being the default mode. Figure 8 shows the two-channel quadrature as well as the step / direction incremental signal (LSB) and the direction bit in clockwise (CW) and counter-clockwise (CCW) direction. 7.2.1 Quadrature A/B Output (Quad A/B 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) by 90 electrical degrees. Channel B leads channel A at a counter-clockwise rotation. Figure 8. Incremental Output Modes Mechanical Zero Position Quad A/B-Mode Mechanical Zero Position Rotation Direction Change A B Index=0 1 LSB Index Step / Dir-Mode Hyst= 2LSB Index=1 3 LSB LSB Clockwise cw Dir CSn Counterclockwise ccw tDir valid tIncremental outputs valid 7.2.2 LSB Output (Step/Direction Mode) Output LSB reflects the LSB (least significant bit) of the 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, step/direction), 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 20). www.austriamicrosystems.com/AS5140H Revision 1.4 15 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Incremental Power-up Lock Option. After power-up, the incremental outputs can optionally be locked or unlocked, depending on the status of the CSn pin: CSn = low at power-up: CSn has an internal pull-up resistor and must be externally pulled low ( R ext 5k ). If Csn is low at power-up, the incremental outputs (A, B, Index) will be high until the internal offset compensation is finished. This unique state (A=B=Index = high) may be used as an indicator for the external controller to shorten the waiting time at power-up. Instead of waiting for the specified maximum power up-time (0), the controller can start requesting data from the AS5140H as soon as the state (A=B=Index = high) is cleared. CSn = high or open at power-up: In this mode, the incremental outputs (A, B, Index) will remain at logic high state, until CSn goes low or a low pulse is applied at CSn. This mode allows intentional disabling of the incremental outputs until, for example the system microcontroller is ready to receive data. 7.2.3 Incremental Output Hysteresis To avoid flickering incremental outputs at a stationary magnet position, a hysteresis is introduced. In case of a rotational direction change, the incremental outputs have a hysteresis of 2 LSB. 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 all resolutions. For constant rotational directions, every magnet position change is indicated at the incremental outputs (see Figure 9). For example, if the magnet turns clockwise from position x+3" to x+4", the incremental output would also indicate this position accordingly. 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. Following this direction, the incremental outputs will again be updated with every change of the magnet position. Figure 9. Hysteresis Window for Incremental Outputs Incremental Output Indication Hysteresis: 0.7 X+4 X+3 X+2 X+1 X X X+1 X+2 X+3 X+4 X+5 Magnet Position Clockwise Direction Counterclockwise Direction 7.3 Pulse Width Modulation (PWM) Output The AS5140H provides a pulse width modulated output (PWM), whose duty cycle is proportional to the measured angle: t on 1025 Position = ------------------------- - 1 ( t on + t off ) (EQ 2) The PWM frequency is internally trimmed to an accuracy of 5% (10% over full temperature range). This tolerance can be cancelled by measuring the complete duty cycle as shown above. www.austriamicrosystems.com/AS5140H Revision 1.4 16 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 10. PWM Output Signal PWMIN Angle 0 deg (Pos 0) 1s 1025s PWMAX 359.65 deg (Pos 1023) 1024s 1/fPWM Table 18. PWM Signal Parameters Symbol Parameter Typ Unit Note fPWM PWM frequency 0.9756 kHz Signal period: 1025s PWMIN MIN pulse width 1 s - Position 0d - Angle 0 deg PWMAX MAX pulse width 1024 s - Position 1023d - Angle 359.65 deg 7.4 Analog Output An analog output may be generated by averaging the PWM signal, using an external active or passive lowpass filter. The analog output voltage is proportional to the angle: 0 = 0V; 360 = VDD5V. Using this method, the AS5140H can be used as direct replacement of potentiometers. nd Figure 11. Simple Passive 2 Order Lowpass Filter Pin12 R2 R1 analog out PWM VDD C1 C2 0V Pin7 0 360 VSS R1,R2 4k7 C1,C2 1F / 6V (EQ 3) R1 should be 4k7 to avoid loading of the PWM output. Larger values of Rx and Cx will provide better filtering and less ripple, but will also slow down the response time. www.austriamicrosystems.com/AS5140H Revision 1.4 17 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n 7.5 Brushless DC Motor Commutation Mode Brushless DC motors require angular information for stator commutation. The AS5140H provides U-V-W commutation signals for one and two pole pair motors. In addition to the three-phase output signals, the step (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 20. 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. 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. The precise physical angle at which the U, V and W signals change state ("Angle" in Figure 12 and Figure 13) is calculated by multiplying each transition position by the angular value of 1 count: Angle [deg] = Position x (360 degree / 1024) (EQ 4) Figure 12. U, V and V-Signals for BLDC Motor Commutation (Div1=0, Div0=0) (One-pole-pair) Commutation - Mode 3.0 Width : 512 Steps Width : 512 Steps U V W CW Direction Position: 0 171 341 512 683 853 0 Angle: 0.0 60.12 119.88 180.0 240.12 299.88 360.0 Figure 13. U, V and W-Signals for 2Pole BLDC Motor Commutation (Div1=1, Div0=0) (Two-pole-pairs) Commutation - Mode 3.2 Width : 256 Steps 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 www.austriamicrosystems.com/AS5140H Revision 1.4 18 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n 7.6 Programming the AS5140H Note: A detailed description of the austriamicrosystems low voltage polyfuse OTP programming method is given in Application Note AN514X10, which can be downloaded from the austriamicrosystems website. The OTP programming description in this datasheet is for general information only. After power-on, programming the AS5140H is enabled with the rising edge of CSn with Prog = high and CLK = low. The AS5140H programming is a one-time-programming (OTP) method, based on polysilicon fuses. The advantage of this method is that a programming voltage of only 3.3V is required for programming. The OTP consists of 52 bits, of which 21 bits are available for user programming. The remaining 31 bits contain factory settings and a unique chip identifier (Chip-ID). A single OTP cell can be programmed only once. Per default, the cell is "0"; a programmed cell will contain a "1". While it is not possible to reset a programmed bit from "1" to "0", multiple OTP writes are possible, as long as only unprogrammed "0"-bits are programmed to "1". Independent of the OTP programming, it is possible to overwrite the OTP register temporarily with an OTP write command at any time. This setting will be cleared and overwritten with the hard programmed OTP settings at each power-up sequence or by a LOAD operation. The OTP memory can be accessed in several ways: Load Operation: The Load operation reads the OTP fuses and loads the contents into the OTP register. Note that the Load operation is automatically executed after each power-on-reset. Write Operation: The Write operation allows a temporary modification of the OTP register. It does not program the OTP. This operation can be invoked multiple times, and will remain set while the chip is supplied with power and while the OTP register is not modified with another Write or Load operation. Read Operation: The Read operation reads the contents of the OTP register, for example to verify a Write command or to read the OTP memory after a Load command. Program Operation: The Program operation writes the contents of the OTP register permanently into the OTP ROM. Analog Readback Operation: The Analog Readback operation allows a quantifiable verification of the programming. For each programmed or unprogrammed bit, there is a representative analog value (in essence, a resistor value) that is read to verify whether a bit has been successfully programmed or not. 7.6.1 OTP Memory Assignment Table 19. OTP Bit Assignment Symbol Function mbit1 Factory Bit 51 Md0 50 Md1 49 Div0 48 Div1 47 Index 46 Z0 : : 37 Z9 36 CCW 35 RA0 : : 31 RA4 30 FS 0 Factory Bit : FS 1 Factory Bit 18 FS 12 Factory Bit www.austriamicrosystems.com/AS5140H 10 bit Zero Position Customer Section Incremental Output Mode Selection Direction Redundancy Address Revision 1.4 Factory Section Bit 19 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Table 19. OTP Bit Assignment Symbol 17 ChipID0 16 ChipID1 : : 0 ChipID17 Function 18 bit Chip ID mbit0 7.6.2 ID Section Bit Factory Bit User Selectable Settings The AS5140H allows programming of the following user selectable options: - Md1, Md0: Incremental Output Mode Selection. Div1, Div0: Divider Setting of Incremental Output. Index: Index Pulse Width Selection - 1LSB / 3LSB. Z [9:0]: Programmable Zero / Index Position. CCW: Counter Clockwise Bit. ccw=0 - angular value increases in clockwise direction. ccw=1 - angular value increases in counterclockwise direction. - RA [4:0]: Redundant Address. An OTP bit location addressed by this address is always set to "1" independent of the corresponding original OTP bit setting. 7.6.3 OTP Default Setting The AS5140H can also be operated without programming. The default, un-programmed setting is as listed below. - 7.6.4 Md0, MD1:00 = Incremental mode = quadrature. Div0, Div1:00 = Incremental resolution = 10bit. Index:0 = Index bit width = 1LSB. Z9 to Z0:00 = No programmed zero position. CCW:0 = Clockwise operation. RA4 to RA0:0 = No OTP bit is selected. Redundant Programming Option In addition to the regular programming, a redundant programming option is available. This option allows that one selectable OTP bit can be set to "1" (programmed state) by writing the location of that bit into a 5-bit address decoder. This address can be stored in bits RA5...0 in the OTP user settings. Example: Setting RA5...0 to "00001" will select bit 51 = MD0, "00010" selects bit 50 = MD1, "10000" selects bit 36 = CCW, etc. 7.6.5 OTP Register Entry and Exit Condition To avoid accidental modification of the OTP during normal operation, each OTP access (Load, Write, Read, Program) requires a defined entry and exit procedure, using the CSn, PROG and CLK signals as shown in Figure 14. www.austriamicrosystems.com/AS5140H Revision 1.4 20 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 14. OTP Access Timing Diagram OTP Access Setup Condition CSn PROG CLK Exit Condition Operation Mode Selection 7.6.6 Incremental Mode Programming The following three different incremental output modes are available: Mode: Md1=0 / Md0=1 sets the AS5140H in quadrature mode. Mode: Md1=1 / Md0=0 sets the AS5140H in step / direction mode (see Table 2). In both modes listed above, the incremental resolution may be reduced from 10 bit down to 9, 8 or 7 bit using the divider OTP bits Div1 and Div0 (see Table 20 below). Mode: Md1=1 / Md0=1 sets the AS5140H 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 factory setting is all bits = 0. This mode is equal to mode 1:0 (quadrature A/B, 1LSB index width, 256ppr). The absolute angular output value, by default, increases with clockwise rotation of the magnet (top view). Setting the CCW-bit (see Table 19) 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 counterclockwise. By default, the zero / index position pulse is one LSB wide. It can be increased to a three LSB wide pulse by setting the Index-bit of the OTP register. Further programming options (commutation modes) are available for brushless DC motor-control. 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 two-pole (Div1=0) or four-pole (Div1=1) rotor. In addition, the LSB is available at pin 12 (the LSB signal replaces the PWM-signal), which allows for high rotational speed measurement of up to 10.000 rpm. www.austriamicrosystems.com/AS5140H Revision 1.4 21 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Table 20. One Time Programmable (OTP) Register Options OTP-Mode-Register-Bit Mode Md1 Md0 0 0 0 0 0 1LSB quadAB-Mode1.0 0 1 0 0 0 1LSB quadAB-Mode1.1 0 1 0 0 1 3LSBs quadAB-Mode1.2 0 1 0 1 0 Default (Mode0.0) 1 Div1 Div0 Pin# Index 3 4 6 1LSB A B 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 Step/Dir-Mode2.0 1 0 0 0 0 1LSB Step/Dir-Mode2.1 1 0 0 0 1 3LSBs Step/Dir -Mode2.2 1 0 0 1 0 1LSB Step/Dir -Mode2.3 1 0 0 1 1 3LSBs Step/Dir -Mode2.4 1 0 1 0 0 Step/Dir -Mode2.5 1 0 1 0 1 3LSBs Step/Dir -Mode2.6 1 0 1 1 0 1LSB Step/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 LSB U(0) Dir V(120) 3LSBs 1LSB W(240) U' V' W' (0,18 (60,240 (120,300) 0) ) 12 PWM 10 bit Pulses per Revolution Incremental Resolution ppr bit 2 x 256 10 2 x 128 9 2 x 64 8 2 x 32 7 512 10 256 9 128 8 64 7 PWM 10 bit LSB 3x1 LSB 2x3 10 9 10 9 1. Div1, Div0 and Index cannot be programmed in Mode 0:0 7.6.7 Zero Position Programming Zero position programming is an OTP option that simplifies assembly of a system, as the magnet does not need to be manually adjusted to the mechanical zero position. Once the assembly is completed, the mechanical and electrical zero positions can be matched by software. Any position within a full turn can be defined as the permanent new zero/index position. For zero position programming, the magnet is turned to the mechanical zero position (e.g. the "off"-position of a rotary switch) and the actual angular value is read. 7.7 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 (see Figure 16). The Data bits D9-D0 of the SSI change to a 10-bit displacement amplitude output. A high value indicates large X or Y displacement, but also higher absolute magnetic field strength. The magnet is properly aligned, when the difference between highest and lowest value over one full turn is at a minimum. Under normal conditions, a properly aligned magnet will result in a reading of less than 128 over a full turn. The MagINCn and MagDECn indicators will be = 1 when the alignment mode reading is < 128. At the same time, both hardware pins MagINCn (#1) and MagDECn (#2) will be pulled to VSS. A properly aligned magnet will therefore produce a MagINCn = MagDECn = 1 signal throughout a full 360 turn of the magnet. Stronger magnets or short gaps between magnet and IC may show values larger than 128. These magnets are still properly aligned as long as the difference between highest and lowest value over one full turn is at a minimum. The Alignment mode can be reset to normal operation by a power-on-reset (disconnect / re-connect power supply) or by a falling edge on CSn with Prog = low. www.austriamicrosystems.com/AS5140H Revision 1.4 22 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 15. Enabling the Alignment Mode Prog CSn 2s min. AlignMode enable Read-out via SSI exit AlignMode Read-out via SSI 2s min. Figure 16. Exiting Alignment Mode Prog CSn 7.8 3.3V / 5V Operation The AS5140H operates either at 3.3V 10% or at 5V 10%. This is made possible by an internal 3.3V Low-Dropout (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 17). For 5V operation, the 5V supply is connected to pin VDD5V, while VDD3V3 (LDO output) must be buffered by a 2.2...10F capacitor, which is supposed to be placed close to the supply pin (see Figure 17). 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 17). A buffer capacitor of 100nF is recommended in both cases close to pin VDD5V. Note that pin VDD3V3 must always be buffered by a capacitor. It must not be left floating, as this may cause an instable internal 3.3V supply voltage, which may lead to larger than normal jitter of the measured angle. www.austriamicrosystems.com/AS5140H Revision 1.4 23 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 17. Connections for 5V / 3.3V Supply Voltages 5V Operation 3.3V Operation 2,2... 10F VDD3V3 VDD3V3 100n VDD5V 100n LDO Internal VDD VDD5V LDO Internal VDD DO DO 4.5 - 5.5V I N T E R F A C E VSS PWM_LSB - - + + CLK 3.0 - 3.6V CSn A_LSB_U B_Dir_V Index_W Prog VSS I N T E R F A C E PWM_LSB CLK CSn A_LSB_U B_Dir_V Index_W Prog 7.9 Choosing the Proper Magnet Typically the magnet should be 6mm in diameter and 2.5mm in height. Magnetic materials such as rare earth AlNiCo, SmCo5 or NdFeB are recommended. The magnet's field strength perpendicular to the die surface should be verified using a gaussmeter. 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 18). 7.9.1 Physical Placement of the Magnet The best linearity can be achieved by placing the center of the magnet exactly over the defined center of the IC package as shown in Figure 19. Magnet Placement. The magnet's center axis should be aligned within a displacement radius Rd of 0.25mm from the defined center of the IC with reference to the edge of pin #1 (see Figure 19). This radius includes the placement tolerance of the chip within the SSOP-16 package (+/0.235mm). The displacement radius Rd is 0.485mm with reference to the center of the chip (see Alignment Mode on page 22). The vertical distance should be chosen such that the magnetic field on the die surface is within the specified limits (see Figure 18). 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 usable results, but the out-of-range condition will be indicated by MagINCn (pin 1) and MagDECn (pin 2), (see Table 16). www.austriamicrosystems.com/AS5140H Revision 1.4 24 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 18. Typical Magnet and Magnetic Field Distribution typ. 6mm diameter N S Magnet axis Magnet axis R1 Vertical field component N S R1 concentric circle; radius 1.1mm Vertical field component Bv (45...75mT) 0 360 360 Figure 19. Defined IC Center and Magnet Displacement Radius 3.9mm 3.9mm 2.433mm 1 Defined center 2.433mm Rd www.austriamicrosystems.com/AS5140H Area of recommended maximum magnet misalignment Revision 1.4 25 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 20. Vertical Placement of the Magnet N S N Package surface Die surface Z 0.576mm 0.1mm 1.282mm 0.15mm 7.10 Simulation Modeling With reference to Figure 21, a diametrically magnetized permanent magnet is placed above or below the surface of the AS5140H. The chip uses an array of Hall sensors to sample the vertical vector of a magnetic field distributed across the device package surface. The area of magnetic sensitivity is a circular locus of 1.1mm radius with respect to the center of the die. The Hall sensors in the area of magnetic sensitivity are grouped and configured such that orthogonally related components of the magnetic fields are sampled differentially. The differential signal Y1-Y2 will give a sine vector of the magnetic field. The differential signal X1-X2 will give an orthogonally related cosine vector of the magnetic field. Figure 21. Arrangement of Hall Sensor Array on Chip (principle) 3.9mm0.235mm 1 2.433mm Y1 0.235mm X1 X2 Y2 Center of die AS5140H die Radius of circular Hall sensor www.austriamicrosystems.com/AS5140H Revision 1.4 26 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n The angular displacement () of the magnetic source with reference to the Hall sensor array may then be modelled by: ( Y1 - Y2 ) = arctan ------------------------ 0.5 ( X1 - X2 ) (EQ 5) The 0.5 angular error assumes a magnet optimally aligned over the center of the die and is a result of gain mismatch errors of the AS5140H. Placement tolerances of the die within the package are 0.235mm in X and Y direction, using a reference point of the edge of pin #1 (Figure 21). In order to neglect the influence of external disturbing magnetic fields, a robust differential sampling and ratiometric calculation algorithm has been implemented. The differential sampling of the sine and cosine vectors removes any common mode error due to DC components introduced by the magnetic source itself or external disturbing magnetic fields. A ratiometric division of the sine and cosine vectors removes the need for an accurate absolute magnitude of the magnetic field and thus accurate Z-axis alignment of the magnetic source. The recommended differential input range of the magnetic field strength (B(X1-X2),B(Y1-Y2)) is 75mT at the surface of the die. In addition to this range, an additional offset of 5mT, caused by unwanted external stray fields is allowed. The chip will continue to operate, but with degraded output linearity, if the signal field strength is outside the recommended range. Too strong magnetic fields will introduce errors due to saturation effects in the internal preamplifiers. Too weak magnetic fields will introduce errors due to noise becoming more dominant. 7.11 Failure Diagnostics The AS5140H also offers several diagnostic and failure detection features, which are discussed in detail further in the document. 7.11.1 Magnetic Field Strength Diagnosis By Software: The MagINCn and MagDECn status bits will both be high when the magnetic field is out of range. By Hardware: Pins #1 (MagINCn) and #2 (MagDECn) are open-drain outputs and will both be turned on (= low with external pull-up resistor) when the magnetic field is out of range. If only one of the outputs is low, the magnet is either moving towards the chip (MagINCn) or away from the chip (MagDECn). 7.11.2 Power Supply Failure Detection By Software: If the power supply to the AS5140H is interrupted, the digital data read by the SSI will be all "0"s. Data is only valid, when bit OCF is high, hence a data stream with all "0"s is invalid. To ensure adequate low levels in the failure case, a pull-down resistor (~10k) should be added between pin DO and VSS at the receiving side. By Hardware: The MagINCn and MagDECn pins are open drain outputs and require external pull-up resistors. In normal operation, these pins are high ohmic and the outputs are high (see Table 16). In a failure case, either when the magnetic field is out of range or the power supply is missing, these outputs will become low. To ensure adequate low levels in case of a broken power supply to the AS5140H, the pull-up resistors (>10k) from each pin must be connected to the positive supply at pin 16 (VDD5V). By Hardware - PWM Output: The PWM output is a constant stream of pulses with 1kHz repetition frequency. In case of power loss, these pulses are missing. By Hardware - Incremental Outputs: In normal operation, pins A(#3), B(#4) and Index (#6) will never be high at the same time, as Index is only high when A=B=low. However, after a power-on-reset, if VDD is powered up or restarts after a power supply interruption, all three outputs will remain in high state until pin CSn is pulled low. If CSn is already tied to VSS during power-up, the incremental outputs will all be high until the internal offset compensation is finished (within tPwrUp). 7.12 Angular Output Tolerances 7.12.1 Accuracy Accuracy is defined as the error between the measured angle and the actual angle. It is influenced by several factors: The non-linearity of the analog-digital converters Internal gain and mismatch errors Non-linearity due to misalignment of the magnet As a sum of all these errors, the accuracy with centered magnet = (Errmax - Errmin)/2 is specified as better than 0.5 degrees @ 25C (see Figure 23). Misalignment of the magnet further reduces the accuracy. Figure 22 shows an example of a 3D-graph displaying non-linearity over XY-misalignment. The center of the square XY-area corresponds to a centered magnet (see dot in the center of the graph). The X- and Y- axis extends to a misalignment of 1mm in both directions. The total misalignment area of the graph covers a square of 2x2 mm (79x79mil) with a step size of 100m. For each misalignment step, the measurement as shown in Figure 23 is repeated and the accuracy (Errmax - Errmin)/2 (e.g. 0.25 in Figure 23) is entered as the Z-axis in the 3D-graph. www.austriamicrosystems.com/AS5140H Revision 1.4 27 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 22. Example of Linearity Error Over XY Misalignment 6 5 4 3 800 500 2 200 1 -100 x -1000 -1000 -800 -600 -400 -200 y -700 0 200 400 -400 600 800 1000 0 The maximum non-linearity error on this example is better than 1 degree (inner circle) over a misalignment radius of ~0.7mm. For volume production, the placement tolerance of the IC within the package (0.235mm) must also be taken into account. The total nonlinearity error over process tolerances, temperature and a misalignment circle radius of 0.25mm is specified better than 1.4 degrees. Note: The magnet used for this measurement was a cylindrical NdFeB (Bomatec(R) BMN-35H) magnet with 6mm diameter and 2.5mm in height. www.austriamicrosystems.com/AS5140H Revision 1.4 28 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n Figure 23. Example of Linearity Error Over 360 0.5 0.4 0.3 0.2 transition noise 0.1 Err max 0 -0.1 1 55 109 163 217 271 325 379 433 487 541 595 649 703 757 811 865 919 973 Err min -0.2 -0.3 -0.4 -0.5 7.12.2 Transition Noise Transition noise is defined as the jitter in the transition between two steps. Due to the nature of the measurement principle (Hall sensors + Preamplifier + ADC), there is always a certain degree of noise involved. This transition noise voltage results in an angular transition noise at the 1 outputs. It is specified as 0.06 degrees rms (1 sigma) . This is the repeatability of an indicated angle at a given mechanical position. The transition noise has different implications on the type of output that is used: Absolute Output; SSI Interface: The transition noise of the absolute output can be reduced by the user by applying an averaging of readings. An averaging of 4 readings will reduce the transition noise by 50% = 0.03 rms (1 sigma). PWM Interface: If the PWM interface is used as an analog output by adding a low pass filter, the transition noise can be reduced by lowering the cutoff frequency of the filter. If the PWM interface is used as a digital interface with a counter at the receiving side, the transition noise may again be reduced by averaging of readings. Incremental Mode: In incremental mode, the transition noise influences the period, width and phase shift of the output signals A, B and Index. However, the algorithm used to generate the incremental outputs guarantees no missing or additional pulses even at high speeds (up to 10.000 rpm and higher). 7.12.3 High Speed Operation The AS5140H samples the angular value at a rate of 10.42k samples per second. Consequently, the incremental and the absolute outputs are updated each by 96s. At a stationary position of the magnet, this sampling rate creates no additional error. Absolute Mode. With the given sampling rate of 10.4 kHz, the number of samples (n) per turn for a magnet rotating at high speed can be calculated by: 60 n = --------------------------rpm 96s (EQ 6) 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. Likewise, for a given number of samples per revolution (n), the maximum speed can be calculated by: 60 rpm = -------------------n 96s (EQ 7) 1. Statistically, 1 sigma represents 68.27% of readings; 3 sigma represents 99.73% of readings. www.austriamicrosystems.com/AS5140H Revision 1.4 29 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n In absolute mode (serial interface and PWM output), 610 rpm is the maximum speed, where 1024 readings per revolution can be obtained. In incremental mode, the maximum error caused by the sampling rate of the ADCs is 0/+96s. It has a peak of 1LSB = 0.35 at 610 rpm. At higher speeds, this error is reduced again due to interpolation and the output delay remains at 192s as the DSP requires two sampling periods (2x96s) to synthesize and redistribute any missing pulses. Incremental Mode. Incremental encoders are usually required to produce no missing pulses up to several thousand rpm. Therefore, the AS5140H 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 10 bits (512 pulses per revolution). Table 21. Speed Performance Absolute Output Mode Incremental Output Mode 610rpm = 1024 samples / turn No missing pulses @ 10 bit resolution (512ppr): 122rpm = 512 samples / turn 2441rpm = 256 samples / turn max. speed = 10.000 rpm etc. 7.12.4 Propagation Delays The propagation delay is the delay between the time that a sample is taken until it is converted and available as angular data. This delay is 48s for the absolute interface and 192s for the incremental interface. Using the SSI interface for absolute data transmission, an additional delay must be considered, caused by the asynchronous sampling (t=0...1/fs) and the time it takes the external control unit to read and process the data. Angular Error Caused by Propagation Delay. A rotating magnet will therefore cause an angular error caused by the output delay. This error increases linearly with speed: esampling = rpm * 6 * prop.delay (EQ 8) Where: esampling = angular error [] rpm = rotating speed [rpm] prop.delay = propagation delay [seconds] Note: Since the propagation delay is known, it can be automatically compensated by the control unit that is processing the data from the AS5140H, thus reducing the angular error caused by speed. 7.12.5 Internal Timing Tolerance The AS5140H does not require an external ceramic resonator or quartz. All internal clock timings for the AS5140H are generated by an on-chip RC oscillator. This oscillator is factory trimmed to 5% accuracy at room temperature (10% over full temperature range). This tolerance influences the ADC sampling rate and the pulse width of the PWM output: Absolute output; SSI interface: A new angular value is updated every 100s (typ.) Incremental outputs: The incremental outputs are updated every 100s (typ.) PWM output: A new angular value is updated every 100s (typ.). The PWM pulse timings Ton and Toff also have the same tolerance as the internal oscillator. If only the PWM pulse width Ton is used to measure the angle, the resulting value also has this timing tolerance. However, this tolerance can be cancelled by measuring both Ton and Toff and calculating the angle from the duty cycle (see Pulse Width Modulation (PWM) Output on page 16): www.austriamicrosystems.com/AS5140H t on 1025 Position = ------------------------- - 1 ( t on + t off ) (EQ 9) Revision 1.4 30 - 37 AS5140H Data Sheet - D e t a i l e d D e s c r i p t i o n 7.12.6 Temperature Magnetic Temperature Coefficient. One of the major benefits of the AS5140H, in comparison to linear Hall sensors is that it is much less sensitive to temperature. While linear Hall sensors require a compensation of the magnet's temperature coefficient, the AS5140H automatically compensates for the varying magnetic field strength over temperature. The magnet's temperature drift does not need to be considered, as the AS5140H operates with magnetic field strengths from 45...75mT. Example: A NdFeB magnet has a field strength of 75mT @ -40C and a temperature coefficient of -0.12% per Kelvin. The temperature change is from -40 to +150 = 190K. The magnetic field change is: 190 x -0.12% = -22.8%, which corresponds to 75mT at -40C and 57.9mT at 150C. In the above described scenario, the AS5140H can automatically compensate for the change in temperature related field strength. No user adjustment is required. Accuracy Over Temperature. The influence of temperature in the absolute accuracy is very low. While the accuracy is 0.5 at room temperature, it may increase to 0.9 due to increasing noise at high temperatures. Timing Tolerance Over Temperature. The internal RC oscillator is factory trimmed to 5%. Over temperature, this tolerance may increase to 10%. Generally, the timing tolerance has no influence in the accuracy or resolution of the system, as it is used mainly for internal clock generation. The only concern to the user is the width of the PWM output pulse, which relates directly to the timing tolerance of the internal oscillator. This influence however can be cancelled by measuring the complete PWM duty cycle (see Internal Timing Tolerance on page 30). www.austriamicrosystems.com/AS5140H Revision 1.4 31 - 37 AS5140H Data Sheet - A p p l i c a t i o n I n f o r m a t i o n 8 Application Information The benefits of AS5140H are as follows: Complete system-on-chip Flexible system solution provides absolute, PWM and incremental outputs simultaneously Ideal for applications in harsh environments due to contactless position sensing Tolerant to magnet misalignment and airgap variations Tolerant to external magnetic fields Operates up to +150C ambient temperature No temperature compensation necessary No calibration required 10, 9, 8 or 7-bit user programmable resolution Small Pb-free package: SSOP 16 (5.3mm x 6.2mm) 8.1 AS5140H Differences to AS5040 The AS5140H and AS5040 differ in the following features: Table 22. Differences Between AS5140H and AS5040 Parameter AS5140H AS5040 Pin - assignment Pin - compatible Ambient temperature range -40C ...+150C Alignment mode Exit alignment mode by power-on-reset, Exit alignment mode by POR or with PROG=low @ falling Exit alignment mode by power-on-reset only. edge of CSn. OTP programming voltage 3.0 to 3.6V 7.3 to 7.5V OTP programming options Incremental modes (quad AB, step/dir, BLDC) Incremental resolution Incremental Index bit width 10-bit Zero position Direction bit (cw/ccw) Redundancy address (1 of 16) 18-bit Chip-Identifier Incremental modes (quad AB, step/dir, BLDC) Incremental resolution Incremental Index bit width 10-bit Zero position Direction bit (cw/ccw) OTP Programming protocol CSn, Prog and CLK; 52-bit serial data protocol CSn, Prog and CLK; 16-bit (32-bit) serial data protocol www.austriamicrosystems.com/AS5140H -40C...+125C Revision 1.4 32 - 37 AS5140H Data Sheet - P a c k a g e D r a w i n g s a n d M a r k i n g s 9 Package Drawings and Markings The device is available in a 16-Lead Shrink Small Outline Package. Figure 24. SSOP-16 Package Drawings AYWWIZZ AS5140H Table 23. SSOP-16 Package Dimensions Symbol mm inch Min Typ Max Min Typ Max A 1.73 1.86 1.99 0.068 0.073 0.078 A1 0.05 0.13 0.21 0.002 0.005 0.008 A2 1.68 1.73 1.78 0.066 0.068 0.070 b 0.25 0.315 0.38 0.010 0.012 0.015 c 0.09 - 0.20 0.004 - 0.008 D 6.07 6.20 6.33 0.239 0.244 0.249 E 7.65 7.8 7.9 0.301 0.307 0.311 E1 5.2 5.3 5.38 0.205 0.209 0.212 e 0.65 0.0256 K 0 - 8 0 - 8 L 0.63 0.75 0.95 0.025 0.030 0.037 www.austriamicrosystems.com/AS5140H Revision 1.4 33 - 37 AS5140H Data Sheet - P a c k a g e D r a w i n g s a n d M a r k i n g s 9.1 Recommended PCB Footprint Figure 25. PCB Footprint Table 24. Recommended Footprint Data Symbol mm inch A 9.02 0.355 B 6.16 0.242 C 0.46 0.018 D 0.65 0.025 E 5.01 0.197 www.austriamicrosystems.com/AS5140H Revision 1.4 34 - 37 AS5140H Data Sheet - R e v i s i o n H i s t o r y Revision History Revision Date 1.0 Oct 03, 2006 1.2 Mar 05, 2009 1.3 Mar 30, 2009 1.4 Sep 23, 2009 Owner Description Initial revision apg Updated parameter values for tDO valid (see Table 13) Application Note AN5000-30 changed to AN514X-10 (see Programming the AS5140H on page 19) Updated parameter values for PWMIN and PWMAX (see Table 14) rfu Updated Figure 14 Note: Typos may not be explicitly mentioned under revision history. www.austriamicrosystems.com/AS5140H Revision 1.4 35 - 37 AS5140H Data Sheet - O r d e r i n g I n f o r m a t i o n 10 Ordering Information The devices are available as the standard products shown in Table 25. Table 25. Ordering Information Ordering Code Description Delivery Form Package AS5140HASSU Tubes SSOP-16 AS5140HASST Tape & Reel SSOP-16 Note: All products are RoHS compliant and Pb-free. Buy our products or get free samples online at ICdirect: http://www.austriamicrosystems.com/ICdirect For further information and requests, please contact us mailto:sales@austriamicrosystems.com or find your local distributor at http://www.austriamicrosystems.com/distributor www.austriamicrosystems.com/AS5140H Revision 1.4 36 - 37 AS5140H Data Sheet - C o p y r i g h t s Copyrights Copyright (c) 1997-2009, austriamicrosystems AG, Tobelbaderstrasse 30, 8141 Unterpremstaetten, Austria-Europe. Trademarks Registered (R). 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 life-sustaining equipment are specifically not recommended without additional processing by austriamicrosystems AG for each application. For shipments of less than 100 parts the manufacturing flow might show deviations from the standard production flow, such as test flow or test location. 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 Tobelbaderstrasse 30 A-8141 Unterpremstaetten, 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/contact www.austriamicrosystems.com/AS5140H Revision 1.4 37 - 37