high performance needs great design. Datasheet: AS5161 12-Bit Magnetic Angle Position Sensor Please be patient while we update our brand image as austriamicrosystems and TAOS are now ams. www.ams.com AS5161 12-Bit Magnetic Angle Position Sensor 1 General Description 2 Key Features The AS5161 is a contactless magnetic angle position sensor for accurate angular measurement over a full turn of 360°. A sub range can be programmed to achieve the best resolution for the application. It is a system-on-chip, combining integrated Hall elements, analog front end, digital signal processing and best in class automotive protection features in a single device. 360º contactless high resolution angular position sensing 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. Digital PWM output The absolute angle measurement provides instant indication of the magnet’s angular position with a resolution of 0.022° = 16384 positions per revolution. According to this resolution the adjustment of the application specific mechanical positions are possible. The angular output data is available over a 12 bit pulse width modulated (PWM) output. The AS5161 operates at a supply voltage of 5V and the supply and output pins are protected against overvoltage up to +20V. In addition the supply pins are protected against reverse polarity up to –20V. Figure 1. Typical Arrangement of AS5161 and magnet User programmable start and end point of the application region + linearization. User programmable clamping levels and programming of the transition point. - Short circuit monitor - High driving capability for resistive and capacitive loads Wide temperature range: - 40°C to + 150°C Small Pb-free package: SOIC 8. Broken GND and VDD detection over a wide range of different load conditions. Saw tooth mode 1,2,3,4 slopes per revolution 3 Benefits Unique fully differential patented solution Best protections for automotive applications Easy to program Additional linearization points for output characteristic Ideal for applications in harsh environments due to contactless position sensing Robust system, tolerant to magnet misalignment, air gap variations, temperature variations and external magnetic fields High inherent accuracy Broken GND and VDD detection for all external load cases 4 Applications The AS5161 is ideal for automotive applications like throttle and valve position sensing, gearbox position sensor, tumble flap, chassis height level, pedal position sensing and contactless potentiometers. www.ams.com Revision 1.1 1 - 35 AS5161 Datasheet - A p p l i c a t i o n s Figure 2. AS5161 Block Diagram VDD3V3 VDD High Voltage/ Reverse Polarity Protection Hall Array Frontend Amplifier ADC AS5161 Sin Cos DSP CORDIC Controller 12 PWM OUT LS Driver Single Pin Interface (UART) OTP Register (Programming Parameters) GND www.ams.com Revision 1.1 2 - 35 AS5161 Datasheet - C o n t e n t s Contents 1 General Description .................................................................................................................................................................. 1 2 Key Features............................................................................................................................................................................. 1 3 Benefits..................................................................................................................................................................................... 1 4 Applications............................................................................................................................................................................... 1 5 Pin Assignments ....................................................................................................................................................................... 4 5.1 Pin Descriptions.................................................................................................................................................................................... 4 6 Absolute Maximum Ratings ...................................................................................................................................................... 5 7 Electrical Characteristics........................................................................................................................................................... 6 7.1 Operating Conditions............................................................................................................................................................................ 6 7.2 Magnetic Input Specification................................................................................................................................................................. 6 7.3 Electrical System Specifications........................................................................................................................................................... 7 7.4 Timing Characteristics .......................................................................................................................................................................... 8 7.5 Power Management - Supply Monitor .................................................................................................................................................. 8 8 Detailed Description.................................................................................................................................................................. 9 8.1 Operation.............................................................................................................................................................................................. 9 8.1.1 VDD Voltage Monitor ................................................................................................................................................................... 9 8.2 PWM Output ....................................................................................................................................................................................... 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 Programming Parameters.......................................................................................................................................................... Application Specific Angular Range Programming .................................................................................................................... Application Specific Programming of the Break Point ............................................................................................................... Multiple Slope Output ................................................................................................................................................................ Linearization of the Output......................................................................................................................................................... Resolution of Parameters .......................................................................................................................................................... 8.3 PWM Output Driver Parameters......................................................................................................................................................... 10 10 11 11 12 13 13 15 8.3.1 Noise Suppressor ...................................................................................................................................................................... 15 8.3.2 Hysteresis Function ................................................................................................................................................................... 15 9 Application Information ........................................................................................................................................................... 16 9.1 Recommended Application Schematic............................................................................................................................................... 9.2 Programming the AS5161 .................................................................................................................................................................. 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 UART Interface for Programming .............................................................................................................................................. Frame Organization ................................................................................................................................................................... WRITE (Command Description) ................................................................................................................................................ READ (Command Description).................................................................................................................................................. Baud-rate Automatic Detection.................................................................................................................................................. Baud-rate Manual Setting (optional) .......................................................................................................................................... 16 17 17 17 19 20 20 20 9.3 OTP Programming Data ..................................................................................................................................................................... 22 9.4 READ / WRITE Register Map............................................................................................................................................................. 26 9.5 READ Only Register Map................................................................................................................................................................... 27 9.6 Special Registers................................................................................................................................................................................ 29 9.7 Programming Procedure .................................................................................................................................................................... 30 10 Package Drawings and Markings ......................................................................................................................................... 31 11 Ordering Information ............................................................................................................................................................. 34 www.ams.com Revision 1.1 3 - 35 AS5161 Datasheet - P i n A s s i g n m e n t s 5 Pin Assignments VDD 1 TP1 2 VDD3V3 3 GND 4 AS5161 Figure 3. SOIC-8 Pin Configuration 8 OUT 7 S 6 TP3 5 TP2 5.1 Pin Descriptions Table 1. SOIC-8 Pin Descriptions Pin Number Pin Name Pin Type 1 VDD Supply pin 2 TP1 DIO/AIO multi purpose pin 3 VDD3V3 AIO 4 GND Supply pin 5 TP2 DIO/AIO multi purpose pin Test pin for fabrication. Connected to ground in the application board. 6 TP3 DIO/AIO multi purpose pin Test pin for fabrication. Open in the application. 7 S AIO 8 OUT DIO/AIO multi purpose pin www.ams.com Description Positive supply pin. This pin is over voltage protected. Test pin for fabrication. Connected to ground in the application board. Output of the internal voltage regulator Ground pin. Connected to ground in the application. Test pin for fabrication. Connected to OUT in the application board. Digital PWM output pin. Over this pin the programming is possible. Open drain configuration. Revision 1.1 4 - 35 AS5161 Datasheet - A b s o l u t e M a x i m u m R a t i n g s 6 Absolute Maximum Ratings Stresses beyond those listed in Table 2 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 6 is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Table 2. Absolute Maximum Ratings Symbol Parameter Min Max Units Comments VDD DC supply voltage at pin VDD Overvoltage -20 20 V No operation VOUT Output voltage OUT -0.3 20 V Permanent Vdiff Voltage difference at pin VDD and OUT -20 20 V VDD3V3 DC supply voltage at pin VDD3V3 -0.3 5 V Iscr Input current (latchup immunity) -100 100 mA Norm: AEC-Q100-004 ±2 kV Norm: AEC-Q100-002 +150 ºC Min -67ºF; Max +257ºF 260 ºC The reflow peak soldering temperature (body temperature) specified is in accordance with IPC/JEDEC J-STD-020 “Moisture/Reflow Sensitivity Classification for Non-Hermetic Solid State Surface Mount Devices”. The lead finish for Pb-free leaded packages is matte tin (100% Sn). 85 % Electrical Parameters Electrostatic Discharge ESD Electrostatic discharge Temperature Ranges and Storage Conditions Tstrg Storage temperature TBody Body temperature H Humidity non-condensing MSL Moisture Sensitive Level www.ams.com -55 5 3 Revision 1.1 Represents a maximum floor life time of 168h 5 - 35 AS5161 Datasheet - 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 7 Electrical Characteristics 7.1 Operating Conditions In this specification, all the defined tolerances for external components need to be assured over the whole operation conditions range and also over lifetime. Table 3. Operating Conditions Symbol Parameter TAMB Ambient temperature Isupp Supply current VDD Supply voltage at pin VDD Conditions Min Typ -40 Max Units +150 ºC 10 mA 4.5 5.0 5.5 V Typ Max Units 7.2 Magnetic Input Specification TAMB = -40 to +150ºC, VDD = 4.5 to 5.5V (5V operation), unless otherwise noted. Two-pole cylindrical diametrically magnetized source: Table 4. Magnetic Input Specification Symbol Parameter Conditions Min 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.25 mm 30 70 mT Bpkext Magnetic input field amplitude (extended) default setting Required vertical component of the magnetic field strength on the die’s surface, measured along a concentric circle with a radius of 1.25 mm. Increased sensor output noise. 10 90 mT Boff Magnetic offset Constant magnetic stray field ±5 mT Disp Displacement radius Offset between defined device center and magnet axis. Including Eccentricity.Dependent on the selected magnet. www.ams.com Revision 1.1 1 mm 6 - 35 AS5161 Datasheet - 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 7.3 Electrical System Specifications TAMB = -40 to +150ºC, VDD = 4.5 - 5.5V (5V operation), Magnetic Input Specification, unless otherwise noted. Table 5. Electrical System Specifications Symbol Parameter RES Resolution PWM Output INLopt Max Units Range > 90º 12 bit Integral non-linearity (optimum) Best aligned reference magnet at 25ºC over full turn 360º. 0.5 deg INLtemp Integral non-linearity (optimum) Best aligned reference magnet over temperature -40 -150º over full turn 360º. 0.9 deg INL Integral non-linearity Best aligned reference magnet over temperature -40 -150º over full turn 360º and displacement 1.4 deg DNL Differential non-linearity ON Output noise (360º segment) tPwrUp Power-up time 0-5V tdelay System propagation delay absolute output: delay of ADC, DSP and absolute interface Conditions Min Typ Monolitic 0.05 deg 1 LSB after filter peak/peak rms value 0.2 % DC See Figure 4 10 ms 10kOhm, 100 µF RC filter 300 µs Figure 4. Power-up timing Diagram VDD 4.5V OUT pin in HiZ First Valid Data on OUT pin tPwrUp www.ams.com Revision 1.1 7 - 35 AS5161 Datasheet - 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 7.4 Timing Characteristics Table 6. Timing Conditions Symbol Parameter TDETWD WachDog error detection time Conditions Min Typ Max Units 12 ms 7.5 Power Management - Supply Monitor Table 7. Power Management - Supply Monitor Conditions Symbol Parameter VDDUVTH Min Typ Max Units VDD undervoltage upper threshold 3.5 4.0 4.5 V VDDUVTL VDD undervoltage lower threshold 3.0 3.5 4.0 V VDDUVHYS VDD undervoltage hysteresis 300 500 900 mV VDDUVDET VDD undervoltage detection time 10 50 250 µs VDDUVREC VDD undervoltage recovery time 10 50 250 µs VDDOVTH VDD overvoltage upper threshold 6.0 6.5 7.0 V VDDOVTL VDD overvoltage lower threshold 5.5 6 6.5 V VDDOVHYS VDD overvoltage hysteresis 300 500 900 mV ANATOVDET VDD overvoltage detection time (analog path) 10 50 250 µs ANATOVREC VDD overvoltage recovery time (analog path) 10 50 250 µs www.ams.com Conditions Revision 1.1 8 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n 8 Detailed Description The AS5161 is manufactured in a CMOS 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 AS5161 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 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. The AS5161 senses the orientation of the magnetic field and calculates a 14-bit binary code. This code is mapped to a programmable output characteristic in a PWM duty cycle format. This signal is available at the pin (OUT). The application angular region can be programmed in a user friendly way. The start angle position T1 and the end point T2 can be set and programmed according the mechanical range of the application with a resolution of 14 bits. In addition the T1Y and T2Y parameter can be set and programmed according the application. The transition point 0 to 360 degree can be shifted using the break point parameter BP. The voltage for clamping level low CLL and clamping level high CLH can be programmed with a resolution of 9 bits. Both levels are individually adjustable. Two additional linearization points can be used to improve the system linearity. These points C1 and C2 are programmable. The output parameters can be programmed in an OTP register. No additional voltage is required to program the AS5161. The setting may be overwritten at any time and will be reset to default when power is cycled. To make the setting permanent, the OTP register must be programmed by using a lock bit the content could be frozen for ever. The AS5161 is tolerant to magnet misalignment and unwanted external magnetic fields due to differential measurement technique and Hall sensor conditioning circuitry. 8.1 Operation 8.1.1 VDD Voltage Monitor VDD Over Voltage Management. If the supply voltage at pin VDD exceeds the over-voltage upper threshold for longer than the detection time the output is turned off. When the over voltage event has passed and the voltage applied to pin VDD falls below the over-voltage lower threshold for longer than the recovery time the device enters the normal mode and the output is enabled. VDD Under Voltage Management. When the voltage applied to the VDD pin falls below the under-voltage lower threshold for longer than the detection time the output is turned off. When the voltage applied to the VDD pin exceeds the under-voltage upper threshold for longer than the detection time the device enters the normal mode and the output is enabled. www.ams.com Revision 1.1 9 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n 8.2 PWM Output By default (after programmed CUST_LOCK OTP bit) the PWM output mode is selected. The pin OUT provides a modulated signal that is proportional to the angle of the rotating magnet. Due to an intelligent approach a permanent short circuit will not damage the device. This is also feasible in a high voltage condition up to 20 V and at the highest specified ambient temperature. After the digital signal processing (DSP) a PWM engine provides the output signal. The DSP maps the application range to the output characteristic. An inversion of the slope is also programmable to allow inversion of the rotation direction. An on-chip diagnostic feature handles the error state at the output. Depending on the failure the output is in HiZ condition or indicates a PWM signal within the failure bands of 4 – 96 % duty cycle. (see Table 9) 8.2.1 Programming Parameters The PWM output characteristic is programmable by OTP. Depending on the application, the output can be adjusted. The user can program the following application specific parameters: T2 Mechanical angle start point Mechanical angle end point T1Y % duty cycle level at the T1 position T2Y % duty cycle level at the T2 position T1 CLL Clamping Level Low CLH Clamping Level High BP Break point (transition point 0 to 360º) C1 Calibration Point 1 C2 Calibration Point 2 C1Y Trim value for C1 C2Y Trim value for C2 These parameters are input parameters. Using the available programming software and programmer these parameters are converted and finally written into the AS5161 128 bit OTP memory. www.ams.com Revision 1.1 10 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n 8.2.2 Application Specific Angular Range Programming The application range can be selected by programming T1 with a related T1Y and T2 with a related T2Y into the AS5161. The clamping levels CLL and CLH can be programmed independent from the T1 and T2 position and both levels can be separately adjusted. Figure 5. Programming of an Individual Application Range Figure 5 shows a simple example of the selection of the range. The mechanical starting point T1 and the mechanical end point T2 are defining the mechanical range. A sub range of the internal Cordic output range is used and mapped to the needed output characteristic. The PWM output signal has 12 bit, hence the level T1Y and T2Y can be adjusted with this resolution. As a result of this level and the calculated slope the clamping region low is defined. The break point BP defines the transition between CLL and CLH. In this example the BP is set to 0 degree. The BP is also the end point of the clamping level high CLH. This range is defined by the level CLH and the calculated slope. Both clamping levels can be set independently form each other. 8.2.3 Application Specific Programming of the Break Point The break point BP can be programmed as well with 14 bits. This is important when the default transition point is inside the application range. In such a case the default transition point must be shifted out of the application range. The parameter BP defines the new position. Figure 6. Individual Programming of the Break Point BP www.ams.com Revision 1.1 11 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n 8.2.4 Multiple Slope Output The AS5161 can be programmed to multiple slopes. Where one programmed reference slope characteristic is copied to multiple slopes. Two, three and four slopes are selectable by the user OTP bits QUADEN (1:0). In addition to the steepness of the slope the clamping levels can be programmed as well. Figure 7. Two Slope Mode Duty Cycle 100 % DC 0 360 0 360 Figure 8. Four Slope Mode Duty Cycle 100 % DC www.ams.com Revision 1.1 12 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n 8.2.5 Linearization of the Output To improve the system linearity an additional 2 point linearization function is implemented in the AS5161. Figure 9. Linearization of the Output Characteristic 100 % DC CLH T2Y C2Y C1Y T1Y CLL 0 T1 8.2.6 C1 C2 T2 Resolution of Parameters The programming parameters have a wide resolution of up to 14 bits. Table 8. Resolution of the Programming Parameters Symbol Parameter Resolution T1 Mechanical angle start point 14 bits T2 Mechanical angle stop point 14 bits T1Y Mechanical start voltage level 12 bits T2Y Mechanical stop voltage level 12 bits CLL Clamping level low 9 bits CLH Clamping level high 9 bits BP Break point 14 bits C1 Calibration Point 1 4 bits C2 Calibration Point 2 4 bits C1Y Trim value C1 3 bits C2Y Trim value C2 3 bits www.ams.com Revision 1.1 Note 13 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n Figure 10. Overview of the Output Range 100 96 Failure Band High Clamping Region High Output Signal in % Duty Cycle CLH T2Y Application Region T1Y CLL Clamping Region Low 4 0 Failure Band Low Figure 10 gives an overview of the different ranges. The failure bands are used to indicate a wrong operation of the AS5161. This can be caused due to a broken supply line. By using the specified load resistors, the output level will remain in these bands during a fail. It is recommended to set the clamping level CLL above the lower failure band and the clamping level CLH below the higher failure band. www.ams.com Revision 1.1 14 - 35 AS5161 Datasheet - D e t a i l e d D e s c r i p t i o n Table 9. Different Failure Cases of AS5161 Type Internal alarms (failures) Application related failures Failure Mode Symbol Failure Band Note Out of magnetic range (too less or too high magnetic input) MAGRng High/Low Programmable by OTP bit DIAG_HIGH Cordic overflow COF High/Low Programmable by OTP bit DIAG_HIGH Offset compensation finished OCF High/Low Programmable by OTP bit DIAG_HIGH Watchdog fail WDF High/Low Programmable by OTP bit DIAG_HIGH Oscillator fail OF High/Low Programmable by OTP bit DIAG_HIGH Overvoltage condition OV Broken VDD BVDD Broken VSS BVSS Short circuit output SCO High Dependant on the load resistor Pull up → failure band high High Switch off → short circuit dependent For efficient use of diagnostics, it is recommended to program to clamping levels CLL and CLH. 8.3 PWM Output Driver Parameters The output stage is configured in a open drain output. The PWM duty cycle represents the angular output data. All programming features are available for the PWM mode as well. The PWM period is programmable in four steps and can be programmed by PWMF<2:0>. CLOAD≤ 33 nF, RPU= 1k…10kΩ Table 10. PWM Parameters Output Driver Symbol Parameter Conditions Min Typ Max Units PWMF1 PWM frequency 7 PWMF<2:0>=111 109.86 122 134.28 Hz PWMF2 PWM frequency 6 PWMF<2:0>=110 179.78 200 219.73 Hz PWMF3 PWM frequency 5 PWMF<2:0>=101 219.73 244 268.55 Hz PWMF4 PWM frequency 4 PWMF<2:0>=100 329.59 366 402.83 Hz PWMF5 PWM frequency 3 PWMF<2:0>=011 494.38 549 604.25 Hz PWMF6 PWM frequency 2 PWMF<2:0>=010 659.18 732 805.66 Hz PWMF7 PWM frequency 1 PWMF<2:0>=001 988.77 1100 1208.50 Hz PWMF8 PWM frequency 0 PWMF<2:0>=000 1977.54 2197 2416.2 Hz PWMDC PWM duty cycle range info parameter 4 96 % PWMVOL Output voltage low IOUT=5mA 0 0.4 V PWMSRF PWM slew rate (falling edge) Between 75% and 25% RPUOUT=4KΩ; CLOUT=1nF VDD=5V 1 4 V / µs 8.3.1 2 Noise Suppressor The noise suppressor is inserted after the angle calculation (first stage) and after range expansion (second stage). This function is capable to reduce the noise level down to 1 LSB peak to peak over different programing ranges. 4 possible configurations of the noise suppressor can be selected via the OTP bits FILTERCFG<1:0>. 8.3.2 Hysteresis Function AS5161 device includes a hysteresis function to avoid sudden jumps from CLH to CLL and vice versa caused by noise in the full turn configuration. The hysteresis amplitude can be selected via the OTP bits HYSTSEL<1:0>. www.ams.com Revision 1.1 15 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9 Application Information 9.1 Recommended Application Schematic Figure 11 shows the recommended schematic in the application. All components marked with (*) are optional and can be used to further increase the EMC. Figure 11. Recommended Schematic Pull-Up Configuration Sensor PCB Electric Control Unit VDD RLPU R1* VDD TP1 VDD3V3 OUT AS5161 GND C1 OUT S TP3 TP2 C3 C4* C2 CL GND Table 11. External Components Symbol Parameter Min Typ Max Unit Note C1 VDD buffer capacitor 0.8 1 1.2 µF Low ESR 0.3 Ω C2 VDD3V3 regulator capacitor 0.8 1 1.2 µF Low ESR 0.3 Ω C3 OUT load capacitor (sensor PCB) 0 4.7 nF * VDD capacitor (optional) 4.7 nF R1 * VDD serial resistor (optional) 10 Ω CL OUT load capacitor (ECU) 0 33 nF RLPU OUT pull-up resistance 1 10 kΩ C4 www.ams.com Revision 1.1 Do not increase due to programming over output. 16 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.2 Programming the AS5161 The AS5161 programming is a one-time-programming (OTP) method, based on polysilicon fuses. The advantage of this method is that no additional programming voltage is needed. The internal LDO provides the current for programming. The OTP consists of 128 bits; several bits are available for user programming. In addition factory settings are stored in the OTP memory. Both regions are independently lockable by build in lock bits. 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. This is possible only if the user lock bit is not programmed. Due to the programming over the output pin the device will initially start in the communication mode. In this mode the digital angle value can be read with a specific protocol format. It is a bidirectional communication possible. Parameters can be written into the device. A programming of the device is triggered by a specific command. With another command (pass2func) the device can be switched into operation mode. In case of a programmed user lock bit the AS5161 automatically starts up in the functional operation mode. No communication of the specific protocol is possible after this. A standard half duplex UART protocol is used to exchange data with the device in the communication mode. 9.2.1 UART Interface for Programming The AS5161 uses a standard UART interface with an address byte and two data bytes. The read or write mode is selected with bit R/Wn in the first byte. The timing (baudrate) is selected by the AS5161 over a synchronization frame. The baud rate register can be read and overwritten (optional). Every start bit is used for synchronisation. A time out function detects not complete commands and resets the AS5161 UART after the timeout period. 9.2.2 Frame Organization Each frame is composed by 24 bits. The first byte of the frame specifies the read/write operation with the register address. 16 data bits contains the communication data. There will be no operation in case of the usage of a not specified CMD. The UART programming interface block of the AS5161 can operate in slave communication or master communication mode. In the slave communication mode the AS5161 receives the data. The programming tool is the driver of the single communication line. In case of the master communication mode the AS5161 transmits data in the frame format. The single communication line can be pulled down by the AS5161. The UART frame consists of 1 start bit (low level), 8 data bit, 1 even-parity bit and 1 stop bit (high level). Data are transferred from LSB to MSB Figure 12. General UART Frame start D0 D1 D2 D3 D4 D5 D6 D7 par stop Table 12. Bit Timing Symbol Parameter START Start bit 1 TBIT Dx Data bit 1 TBIT PAR Parity bit 1 TBIT STOP Stop bit TSW Slave/Master Switch Time www.ams.com Min Typ 1 Max Unit Note TBIT 7 Revision 1.1 TBIT 17 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n Each communication starts with the reception of a request from the external controller. The request consists of two frames: one synchronization frame and the command frame. The synchronization frame contains the data 0x55 and allows the UART to measure the external controller baud rate: Figure 13. Synchronization Frame start D0 D1 D2 D3 D4 D5 D6 D7 par stop The second frame contains the command Read/ Write (1 bit) and the address (7 bits): Figure 14. Address and Command Frame start AD 0 AD 1 AD 2 AD 3 AD 4 AD 5 AD R/Wn 6 par stop Only two commands are possible. In case of read command the idle phase between the command and the answer is the time TSW. In case of parity error command is not executed. Table 13. Possible Commands Possible Interface Commands Description AS5X63 Communication Mode Command CMD WRITE Write data to the OTP memory or Registers SLAVE 0 READ Read data to the OTP memory or Registers SLAVE & MASTER 1 Notes: 1. In case of Write command the request is followed by the frames containing the data to write. 2. In case of Read command the communication direction will change and the AS5161 will answer with the frames containing the requested data. www.ams.com Revision 1.1 18 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.2.3 WRITE (Command Description) Figure 15. Full Write Command Synchronization frame start D0 D1 D2 D3 D4 D5 AD0 AD1 AD2 AD3 AD4 AD5 D6 D7 par stop par stop Write command frame start AD6 R/ Wn Data0 frame (data to write on address AD<6:0>) start D00 D01 D03 D04 D05 D06 D07 par stop D03 D04 D05 D06 D07 par stop D02 Data1 frame (data to write on address AD<6:0>+1) start D00 D01 D02 Writing the AS5161 KEY in the fuse register (address 0x41) triggers the transfer of the data from the OTP RAM into the Poly Fuse cell. Writing the AS5161 KEY in the Pass2Func Register (address 0x60) forces the device into normal mode. www.ams.com Revision 1.1 19 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.2.4 READ (Command Description) Figure 16. Full Read Command Synchronization frame: start D0 D1 D2 D3 D4 D5 D6 D7 par stop AD0 AD1 AD2 AD3 AD4 AD5 AD6 R/Wn par stop Read command frame: start Data0 frame (data read from address AD<6:0>) (MASTER): start D00 D01 D02 D03 D04 D05 D06 D07 par stop D04 D05 D06 D07 par stop Data1 frame (data read from address AD<6:0>+1) (MASTER): start 9.2.5 D00 D01 D02 D03 Baud-rate Automatic Detection The UART includes a built-in baud-rate monitor that uses the synchronization frame to detect the external controller baud-rate. This baud-rate is used after the synchronization byte to decode the following frame and to transmit the answer and it is stored in the BAUDREG register. 9.2.6 Baud-rate Manual Setting (optional) The BAUDREG register can be read and over-written for a possible manual setting of the baud-rate: in case the register is overwritten with a value different from 0, this value will be used for the following UART communications and the synchronization frame must be removed from the request. www.ams.com Revision 1.1 20 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n S 0 0 0 0 0 0 0 0 0 P IDLE Even Parity Stop Start High Byte MSB LSB Low Byte S 0 1 0 1 1 1 0 0 0 P IDLE Start P IDLE Even Parity Stop 0 R/n Even Parity Stop S MSB LSB MSB LSB WR BAUDREG Address Start R/n Even Parity Stop S 1 0 1 0 1 0 1 0 0 P IDLE Start IDLE synch frame MSB LSB Figure 17. Manual Baud-rate Setting AS5161 in Receiving Mode (Write Access) AS5161 in Receiving Mode www.ams.com MSB High Byte Even Parity IDLE Stop P Start S High Byte S P IDLE Stop IDLE Even Parity Even Parity Stop P MSB LSB Low Byte S Start LSB IDLE Start P Stop 1 IDLE AS5161 in Receiving Mode (Write Access) MSB Reg. Address R/Wn Even Parity LSB Start S LSB P Even Parity Stop S AS5161 in Receiving Mode IDLE Low Byte MSB LSB IDLE MSB R/n Even Parity P Start 0 Stop Reg. Address S Start IDLE MSB LSB Figure 18. Simple Read and Write AS5161 in transmitting mode (Read Access) Revision 1.1 21 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.3 OTP Programming Data Table 14. OTP Memory Map Data Byte DATA15 (0x0F) Bit Number 1 0 2 0 3 0 4 0 5 0 6 0 7 0 DATA11 (0x0B) www.ams.com 0 0 2 0 3 0 4 0 5 0 6 0 7 0 0 0 1 0 2 CUSTID<0> 0 3 CUSTID<1> 0 4 CUSTID<2> 0 5 CUSTID<3> 0 6 CUSTID<4> 0 7 CUSTID<5> 0 0 CUSTID<6> 0 1 X2LIN<0> 0 2 X2LIN<1> 0 3 X2LIN<2> 0 4 X2LIN<3> 0 5 X1LIN<0> 0 6 X1LIN<1> 0 7 X1LIN<2> 0 0 X1LIN<3> 0 1 Y1LIN<0> 0 Revision 1.1 AMS (reserved) Customer Identifier Second linearization point (X-axis) Customer Settings DATA12 (0x0C) Factory Settings Description Factory Settings 0 1 DATA13 (0x0D) Default 0 0 DATA14 (0x0E) Symbol First linearization point (X-axis) First linearization point (Y-axis) 22 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n Table 14. OTP Memory Map Data Byte DATA10 (0x0A) DATA8 (0x08) DATA7 (0x07) www.ams.com Symbol Default 2 Y1LIN<1> 0 3 Y1LIN<2> 0 4 Y2LIN<0> 0 5 Y2LIN<1> 0 6 Y2LIN<2> 0 7 CLH<0> 0 0 CLH<1> 0 1 CLH<2> 0 2 CLH<3> 0 3 CLH<4> 0 4 CLH<5> 0 5 CLH<6> 0 6 CLH<7> 0 7 CLH<8> 0 0 CLL<0> 0 1 CLL<1> 0 2 CLL<2> 0 3 CLL<3> 0 4 CLL<4> 0 5 CLL<5> 0 6 CLL<6> 0 7 CLL<7> 0 0 CLL<8> 0 1 OFFSET<0> 0 2 OFFSET<1> 0 3 OFFSET<2> 0 4 OFFSET<3> 0 5 OFFSET<4> 0 6 OFFSET<5> 0 7 OFFSET<6> 0 0 OFFSET<7> 0 1 OFFSET<8> 0 2 OFFSET<9> 0 3 OFFSET<10> 0 4 OFFSET<11> 0 5 OFFSET<12> 0 6 OFFSET<13> 0 7 OFFSET<14> 0 Revision 1.1 Description First linearization point (Y-axis) Second linearization point (Y-axis) Clamping Level High Clamping Level Low Customer Settings DATA9 (0x09) Bit Number Offset 23 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n Table 14. OTP Memory Map Data Byte DATA6 (0x06) DATA5 (0x05) DATA3 (0x003) Symbol Default 0 OFFSET<15> 0 1 OFFSET<16> 0 2 OFFSET<17> 0 3 OFFSET<18> 0 4 OFFSET<19> 0 5 GAIN<0> 0 6 GAIN<1> 0 7 GAIN<2> 0 0 GAIN<3> 0 1 GAIN<4> 0 2 GAIN<5> 0 3 GAIN<6> 0 4 GAIN<7> 0 5 GAIN<8> 0 6 GAIN<9> 0 7 GAIN<10> 0 0 GAIN<11> 0 1 GAIN<12> 0 2 GAIN<13> 0 3 GAIN<14> 0 4 GAIN<15> 0 5 GAIN<16> 0 6 BP<0> 0 7 BP<1> 0 0 BP<2> 0 1 BP<3> 0 2 BP<4> 0 3 BP<5> 0 4 BP<6> 0 5 BP<7> 0 6 BP<8> 0 7 BP<9> 0 0 BP<10> 0 1 BP<11> 0 2 BP<12> 0 3 BP<13> 0 4 ANGLERNG 0 Sector selection 0=Angular Sector≥22.5 degrees; 1=Angular Sector<22.5 degrees 5 DIAG_HIGH 0 Failure Band Selection 0=Failure Band Low 1=Failure Band High DATA2 (0x02) www.ams.com Revision 1.1 Description Offset Scale Factor Customer Settings DATA4 (0x04) Bit Number Break Point 24 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n Table 14. OTP Memory Map Data Byte DATA2 (0x02) DATA1 (0x01) www.ams.com Symbol Default Description 6 QUADEN<0> 0 7 QUADEN<1> 0 Quadrant Mode Enable 00=1quadrant;01=2quadrants; 10=3 quadrants;11=4 quadrants 0 AIRGAPSEL 0 1 HYSTSEL<0> 0 2 HYSTSEL<1> 0 3 FILTERCFG<0> 0 4 FILTERCFG<1> 0 5 Not used 0 6 Not used 0 7 Not used 0 0 RED_ADD<0> 0 1 RED_ADD<1> 0 2 RED_ADD<2> 0 3 RED_ADD<3> 0 4 RED_BIT<0> 0 5 RED_BIT<1> 0 6 RED_BIT<2> 0 Redundancy Bit Identify the position of the bit to be changed in the byte at the address RED_ADD<3:0> 7 CUST_LOCK 0 Lock bit for Customer Area Revision 1.1 Magnetic input range extension 0:extended range;1=normal range Hysteresis selection 00=no hysteresis; 01: 56LSB; 10=91LSB; 11=137LSB Filter Configuration 00=no filter; 01= fast; 10=moderate; 11=slow Customer Settings DATA0 (0x00) Bit Number Redundancy Address Identify the address of the byte containing the bit to be changed 25 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.4 READ / WRITE Register Map Table 15. Read / Write Registers Data Byte DATA0 (0x20) DATA2 (0x22) www.ams.com Symbol Default 0 BAUDREG<0> 0 1 BAUDREG<1> 0 2 BAUDREG<2> 0 3 BAUDREG<3> 0 4 BAUDREG<4> 0 5 BAUDREG<5> 0 6 BAUDREG<6> 0 7 BAUDREG<7> 0 0 BAUDREG<8> 0 1 Not used 0 2 Not used 0 3 Not used 0 4 Not used 0 5 Not used 0 6 Not used 0 7 Not used 0 0 Not used 0 1 Not used 0 2 Not used 0 3 Not used 0 4 Not used 0 5 R1K10K<0> 0 6 R1K10K<1> 0 Selection of the reference resistance used for OTP download 7 DSPRN 0 Resetn of the Digital Signal Processing circuit Revision 1.1 Description UART Baud Rate Register A read command returns all data bits at 0 Read/Write Area DATA1 (0x21) Bit Number 26 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.5 READ Only Register Map Table 16. Read Only Registers Data Byte Bit Number Symbol Default Description 0 Not used 0 A read command returns 0 1 OFFSETFINISHED 0 Offset compensation finished 2 AGCFINISHED 0 AGC loop compensation finished 3 CORDICOVF 0 Overflow of the Cordic 4 AGCALARML 0 AGC loop saturation because of B field too strong 5 AGCALARMH 0 AGC loop saturation because of B field too weak DATA0 (0x28) DATA1 (0x29) DATA3 (0x2B) www.ams.com OTP_RES 0 7 PARITY_ERR 0 UART parity error flag 0 CORDICOUT<0> 0 1 CORDICOUT<1> 0 2 CORDICOUT<2> 0 3 CORDICOUT<3> 0 4 CORDICOUT<4> 0 5 CORDICOUT<5> 0 6 CORDICOUT<6> 0 7 CORDICOUT<7> 0 0 CORDICOUT<8> 0 1 CORDICOUT<9> 0 2 CORDICOUT<10> 0 3 CORDICOUT<11> 0 4 CORDICOUT<12> 0 5 CORDICOUT<13> 0 6 Not used 0 7 Not used 0 0 DSPOUT<0> 0 1 DSPOUT<1> 0 2 DSPOUT<2> 0 3 DSPOUT<3> 0 4 DSPOUT<4> 0 5 DSPOUT<5> 0 6 DSPOUT<6> 0 7 DSPOUT<7> 0 Revision 1.1 Cordic Output Read Area DATA2 (0x2A) 6 0=1K resistance selected for OTP download; 1=10K resistance selected for OTP download A read command returns all data bits at 0 DSP Output 27 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n Table 16. Read Only Registers Data Byte DATA4 (0x2C) DATA5 (0x2D) DATA7 (0x2F) www.ams.com Symbol Default 0 DSPOUT<8> 0 1 DSPOUT<9> 0 2 DSPOUT<10> 0 3 DSPOUT<11> 0 4 Not used 0 5 Not used 0 6 Not used 0 7 Not used 0 0 AGCVALUE<0> 0 1 AGCVALUE<1> 0 2 AGCVALUE<2> 0 3 AGCVALUE<3> 0 4 AGCVALUE<4> 0 5 AGCVALUE<5> 0 6 AGCVALUE<6> 0 7 AGCVALUE<7> 0 0 MAG<0> 0 1 MAG<1> 0 2 MAG<2> 0 3 MAG<3> 0 4 MAG<4> 0 5 MAG<5> 0 6 MAG<6> 0 7 MAG<7> 0 0 Not used 0 1 Not used 0 2 Not used 0 3 Not used 0 4 Not used 0 5 Not used 0 6 Not used 0 7 Not used 0 Revision 1.1 Description DSP Output A read command returns all data bits at 0 AGC Value Read Area DATA6 (0x2E) Bit Number Magnitude of magnetic field A read command returns all data bits at 0 28 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.6 Special Registers Table 17. Special Registers Data Byte DATA0 (0x41) DATA1 (0x61) www.ams.com Default 0 AS5161KEY<0> 0 1 AS5161KEY<1> 0 2 AS5161KEY<2> 0 3 AS5161KEY<3> 0 4 AS5161KEY<4> 0 5 AS5161KEY<5> 0 6 AS5161KEY<6> 0 7 AS5161KEY<7> 0 0 AS5161KEY<8> 0 1 AS5161KEY<9> 0 2 AS5161KEY<10> 0 3 AS5161KEY<11> 0 4 AS5161KEY<12> 0 5 AS5161KEY<13> 0 6 AS5161KEY<14> 0 7 AS5161KEY<15> 0 0 AS5161KEY<0> 0 1 AS5161KEY<1> 0 2 AS5161KEY<2> 0 3 AS5161KEY<3> 0 4 AS5161KEY<4> 0 5 AS5161KEY<5> 0 6 AS5161KEY<6> 0 7 AS5161KEY<7> 0 0 AS5161KEY<8> 0 1 AS5161KEY<9> 0 2 AS5161KEY<10> 0 3 AS5161KEY<11> 0 4 AS5161KEY<12> 0 5 AS5161KEY<13> 0 6 AS5161KEY<14> 0 7 AS5161KEY<15> 0 Revision 1.1 Description AS5161 KEY<15:0>=0101 0001 0110 0010 A write command with data different from AS5161 KEY is not executed A read command returns all data bits at 0 AS5161 KEY<15:0>=0101 0001 0110 0010 A write command with data different from AS5161 KEY is not executed A read command returns all data bits at 0 Pass2Func Register DATA0 (0x60) Symbol Fuse Register DATA1 (0x42) Bit Number 29 - 35 AS5161 Datasheet - A p p l i c a t i o n I n f o r m a t i o n 9.7 Programming Procedure Pull-up on out pin VDD=5V Wait 10ms (after the startup time device enters communication mode) Write command: Trimming bits are written in the OTP RAM Read command: All the trimming bits are read back to check the correctness of the writing procedure. Write AS5161KEY in the Fuse register: The OTP RAM content is permanently transferred into the Poly Fuse cells. Wait 10 ms (fuse time) Write command, R1K_10K<1:0>=(11)b: Poly Fuse cells are downloaded into the RAM memory using a 10K resistance as reference. Wait 5 ms (download time) Read R1K_10K register, the expected value is 00b Write command, R1K_10K<1:0>=(11)b Read R1K_10K register, the expected value is (11)b. NB: Step11 and Step12 have to be consecutive. Read command: all the fused bits downloaded with 10K resistance are read back. Write command, R1K_10K=<1:0>=(10)b: Poly Fuse cells are downloaded into the RAM memory using a 1K resistance as reference. Wait 5 ms (download time) Read R1K_10K register, the expected value is (00)b Write command register, R1K_10K<1:0>=(10)b Read R1K_10K register, the expected value is (10)b NB: Step18 and Step19 have to be consecutive. Read command: All the fused bits downloaded with 1K resistance are read back. Check that read commands at Steps 5, 13 and 19 are matching Write AS5161KEY in the Pass2Func register: Device enters normal mode. www.ams.com Revision 1.1 30 - 35 AS5161 Datasheet - 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 10 Package Drawings and Markings The device is available in a SOIC 8 - Lead 150 MIL Package. Figure 19. Package Drawings and Dimensions Symbol A A1 A2 b c D E E1 e L L1 L2 Min 0.10 1.25 0.31 0.17 0.40 - Nom 4.90 BSC 6.00 BSC 3.90 BSC 1.27 BSC 1.04 REF 0.25 BSC Symbol R R1 h Θ Θ1 Θ2 aaa bbb ccc ddd eee fff N Max 1.75 0.25 0.51 0.25 1.27 - Min 0.07 0.07 0.25 0º 5º 0º - Typ 0.10 0.20 0.10 0.25 0.10 0.15 8 Max 0.50 8º 15º - Notes: 1. Dimensions and tolerancing confirm to ASME Y14.5M-1994. 2. All dimensions are in miilimeters. Angles are in degrees. Marking: YYWWMZZ. www.ams.com YY WW M ZZ Year Week Assembly plant identifier Assembly traceability code Revision 1.1 31 - 35 AS5161 Datasheet - 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 Figure 20. Vertical Cross Section of SOIC-8 Notes: 1. 2. 3. 4. 5. All dimensions in mm. Die thickness 356 μm nom. Adhesive thickness 20 ± 10 μm. Lead frame downest 200 ± 25 μm. Lead frame thickness 200 ± 8 μm. www.ams.com Revision 1.1 32 - 35 AS5161 Datasheet - R e v i s i o n H i s t o r y Revision History Revision Date 1.0 Oct 30, 2012 1.1 Oct 31, 2012 Owner mub Description Initial revision Updated Figure 3, Table 1, Table 2 and Figure 11 Note: Typos may not be explicitly mentioned under revision history. www.ams.com Revision 1.1 33 - 35 AS5161 Datasheet - O r d e r i n g I n f o r m a t i o n 11 Ordering Information The devices are available as the standard products shown in Table 18. Table 18. Ordering Information Ordering Code Description Delivery Form Package AS5161-HSOP 12-Bit Programmable Angle Position Sensor with PWM output Tape&Reel SOIC - 8 Note: All products are RoHS compliant and ams green. Buy our products or get free samples online at www.ams.com/ICdirect Technical Support is available at www.ams.com/Technical-Support For further information and requests, email us at [email protected] (or) find your local distributor at www.ams.com/distributor www.ams.com Revision 1.1 34 - 35 AS5161 Datasheet - C o p y r i g h t s Copyrights Copyright © 1997-2012, ams AG, Tobelbaderstrasse 30, 8141 Unterpremstaetten, Austria-Europe. Trademarks Registered ®. All rights reserved. The material herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. All products and companies mentioned are trademarks or registered trademarks of their respective companies. Disclaimer Devices sold by ams AG are covered by the warranty and patent indemnification provisions appearing in its Term of Sale. ams 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. ams 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 ams 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 ams 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 ams AG is believed to be correct and accurate. However, ams 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 ams AG rendering of technical or other services. Contact Information Headquarters ams AG Tobelbaderstrasse 30 A-8141 Unterpremstaetten, Austria Tel Fax : +43 (0) 3136 500 0 : +43 (0) 3136 525 01 For Sales Offices, Distributors and Representatives, please visit: http://www.ams.com/contact www.ams.com Revision 1.1 35 - 35