AS5601 12-Bit Programmable Contactless Encoder General Description The AS5601 is an easy-to-program magnetic rotary position sensor with incremental quadrature (A/B) and 12-bit digital outputs. Additionally, the PUSH output indicates fast airgap changes between the AS5601 and magnet which can be used to implement a contactless pushbutton function in which the knob can be pressed to move the magnet toward the AS5601. This AS5601 is designed for contactless encoder applications, and its robust design rejects the influence of any homogenous external stray magnetic fields. Based on planar Hall sensor technology, this device measures the orthogonal component of the flux density (Bz) from an external magnet. The industry-standard I²C interface supports user programming of non-volatile parameters in the AS5601 without requiring a dedicated programmer. The AS5601 also provides a smart low-power mode which automatically reduces power consumption Ordering Information and Content Guide appear at end of datasheet. Key Benefits & Features The benefits and features of AS5601, 12-bit Programmable Contactless Encoder are listed below: Figure 1: Added Value of Using AS5601 Benefits Features • Highest reliability and durability • Contactless angle measurement insensitive to dust and dirt • Simple programming • Simple user-programmable zero position and device configuration • Flexible choice of the number of A/B pulses per revolution • Quadrature output configurable from 8 up to 2048 positions • Contactless pushbutton functionality • Pushbutton output by detecting sudden airgap changes • Low power consumption • Automatic entry into low-power mode • Easy setup • Automatic magnet detection • Small form factor • SOIC-8 package • Robust environmental tolerance • Wide temperature range: -40°C to 125°C ams Datasheet [v1-06] 2016-Apr-22 Page 1 Document Feedback AS5601 − General Description Applications The AS5601 is ideally suited for: • Encoder replacement • Contactless rotary knobs with push buttons • Other angular position measurement solutions Block Diagram The functional blocks of this device are shown below: Figure 2: AS5601 Block Diagram VDD3V3 SDA Register Setting I²C Low-Dropout (LDO) Regulator (internal load only) VDD5V Hall Sensors One-Time Programmable (OTP) Memory SCL Analog Front-End AFE 12-bit A/D ATAN (CORDIC) Automatic Gain Control (AGC) A B A/B Quadrature Output Encoder Dynamic Magnitude Monitoring PUSH Magnetic Core AS5601 GND Page 2 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Pin Assignments Pin Assignments Figure 3: SOIC-8 Pin-Out 1 8 A VDD3V3 2 7 SCL PUSH 3 6 SDA GND 4 5 B AS5601 VDD5V Pin Description Figure 4: Pin Description Pin Number Name 1 VDD5V Supply Positive voltage supply in 5V mode 2 VDD3V3 Supply Positive voltage supply in 3.3V mode (requires an external 1-μF decoupling capacitor in 5V mode) 3 PUSH Digital output Contactless pushbutton function output 4 GND Supply Ground 5 B Digital output Quadrature incremental signal B 6 SDA Digital input/output I²C Data 7 SCL Digital input I²C Clock 8 A Digital output Quadrature incremental signal A ams Datasheet [v1-06] 2016-Apr-22 Type Description Page 3 Document Feedback AS5601 − Absolute Maximum Ratings Absolute Maximum Ratings Stresses beyond those listed under Absolute Maximum Ratings may cause permanent damage to the device. These are stress ratings only. Functional operation of the device at these or any other conditions beyond those indicated under Operating Conditions is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. Figure 5: Absolute Maximum Ratings Symbol Parameter Min Max Units Comments Electrical Parameters VDD5V DC supply voltage at VDD5V pin -0.3 6.1 V 5.0V operation mode VDD3V3 DC supply voltage at VDD3V3 pin -0.3 4.0 V 3.3V operation mode VAIO Voltage at all digital or analog pins -0.3 VDD + 0.3 V ISCR Input current (latch-up immunity) -100 100 mA JESD78 Continuous Power Dissipation (TA = 70°C) PT Continuous power dissipation 50 mW Electrostatic Discharge ESDHBM Electrostatic discharge HBM (human body model) ±1 kV MIL 883 E method 3015.7 Temperature Ranges and Storage Conditions TSTRG Storage temperature range TBODY Package body temperature RHNC Relative humidity (non-condensing) MSL Moisture sensitivity level Page 4 Document Feedback -55 125 5 3 °C 260 °C 85 % ICP/JEDEC J-STD-020 The reflow peak soldering temperature (body temperature) is specified according to 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) ICP/JEDEC J-STD-033 ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Electrical Characteristics Electrical Characteristics All limits are guaranteed. The parameters with min and max values are guaranteed with production tests or SQC (Statistical Quality Control) methods. Operating Conditions Figure 6: System Electrical Characteristics and Temperature Range Symbol Parameter VDD5V Positive supply voltage in 5.0V mode VDD3V3 Positive supply voltage in 3.3V mode Conditions Min Typ Max Units 4.5 5.0 5.5 V 3.3V operation mode 3.0 3.3 3.6 V During OTP burn procedure(2) 3.3 3.4 3.5 V 5.0V operation mode During OTP burn procedure(2) IDD Supply current in NOM (1) PM = 00 Always on 6.5 mA lDD_LPM1 Supply current in LPM1 (1) PM = 01 Polling time = 5 ms 3.4 mA lDD_ LPM2 Supply current in LPM2 (1) PM = 10 Polling time = 20 ms 1.8 mA lDD_ LPM3 Supply current in LPM3 (1) PM = 11 Polling time = 100 ms 1.5 mA Supply current per bit for burn procedure Initial peak, 1 μs 100 mA IDD_BURN Steady burning, <30 μs 40 mA TA Operating temperature -40 125 °C TP Programming temperature 20 30 °C Note(s): 1. For typical magnetic field (60 mT) excluding current delivered to the external load and tolerance on polling times. 2. For OTP burn procedure the supply line source resistance should not exceed 1Ohm. ams Datasheet [v1-06] 2016-Apr-22 Page 5 Document Feedback AS5601 − Electrical Characteristics Digital Inputs and Outputs Figure 7: Digital Inputs and Outputs Symbol Parameter V_IH High-level input voltage V_IL Low-level input voltage V_OH High-level output voltage V_OL Low-level output voltage I_O Output current for A, B, and PUSH C_L I_LKG Conditions Min Typ Max 0.7 × VDD Units V 0.3 × VDD VDD - 0.5 V V 0.4 V 2 mA Capacitive load for A, B, and PUSH 50 pF Leakage current ±1 μA -2 Timing Characteristics Figure 8: Timing Conditions Symbol Parameter Conditions Min Typ Max Units T_DETWD Watchdog detection time WD = 1 57 60 63 seconds T_PU Power-up time 10 ms F_S Sampling rate 150 μs T_SETTL1 Settling time SF = 00 2.2 ms T_SETTL2 Settling time SF = 01 1.1 ms T_SETTL3 Settling time SF = 10 0.55 ms T_SETTL4 Settling time SF = 11 0.286 ms Page 6 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Electrical Characteristics Magnetic Characteristics Figure 9: Magnetic Characteristics Symbol Parameter Conditions Min Typ Max Units Bz Orthogonal magnetic field strength, regular output noise ON_SLOW and ON_FAST Required orthogonal component of the magnetic field strength measured at the die's surface along a circle of 1 mm 30 60 90 mT Bz_ERROR Minimum required orthogonal magnetic field strength, magnet detection level 8 mT System Characteristics Figure 10: System Characteristics Symbol RES RES_AB Parameter Conditions Min Core Resolution Typ Max 12 A/B output resolution 8 Units bit 2048 positions Maximum rotation speed for incremental output Continuous Rotation ≥ 360deg (1), (2) 456 rpm System INL Deviation from best line fit; 360° maximum angle, no magnet displacement, no zero-programming performed ±1 degree ON_SLOW RMS output noise (1 sigma) Orthogonal component for the magnetic field within the specified range Bz, after 2.2 ms; SF = 00 0.015 degree ON_FAST RMS output noise (1 sigma) Orthogonal component for the magnetic field within the specified range Bz, after 286 μs; SF = 11 0.043 degree VMAX_AB INL_BL Note(s): 1. An infinite fast change <180deg results in angle output with maximum configured update frequency. 2. An infinite fast change >= 180deg results in angle output to the shortest next absolute position with maximum configured update frequency. e.g. A change from 0 to 270deg will be indicated as angle output from 0 to -90deg. ams Datasheet [v1-06] 2016-Apr-22 Page 7 Document Feedback AS5601 − Detailed Description Detailed Description The AS5601 is a Hall-based rotary magnetic position encoder that converts the magnetic field component perpendicular to the surface of the chip into voltages which are used to produce incremental A/B outputs and absolute position indication in registers that can be read over an industry-standard I²C bus. The analog signals from the Hall sensors are first amplified and filtered before being converted by the analog-to-digital converter (ADC) into binary data. The output of the ADC is processed by the hardwired CORDIC block (Coordinate Rotation Digital Computer) to compute the angle and magnitude of the magnetic field vector. The intensity of the magnetic field is used by the automatic gain control (AGC) to adjust the amplification level to compensate for temperature and magnetic field variations. The angle value provided by the CORDIC algorithm is used by the internal logic to generate the incremental quadrature signals A and B. The magnitude and AGC value is dynamically monitored and generates the PUSH output for fast changes of the airgap between the magnet and the AS5601. Very slow changes are suppressed to provide a robust and reliable pushbutton output that tolerates temperature variation and magnet degradation. The AS5601 is programmed through an industry-standard I²C interface to write an on-chip one-time programmable (OTP) memory. This interface can be used to program a zero angle and to configure the chip. Power Management The AS5601 is powered from a 5.0V supply using the on-chip LDO regulator, or it can be powered directly from a 3.3V supply. The internal LDO is not intended to power other external ICs and needs a 1μF capacitor to ground, as shown in Figure 11. In 3.3V operation, the VDD5V and VDD3V3 pins must be tied together. VDD is the voltage level present at the VDD5V pin. Page 8 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Detailed Description Figure 11: 5.0V and 3.3V Power Supply Options 5.0V Operation 4.5 - 5.5V VDD5V 3.3V Operation VDD3V3 LDO 1µF 100nF GND 3.0 – 3.6V* VDD5V VDD3V3 LDO 10µF** 100nF GND AS5601 AS5601 * 3.3-3.5V for OTP programming ** Required for OTP programming only ams Datasheet [v1-06] 2016-Apr-22 Page 9 Document Feedback AS5601 − Detailed Description I²C Interface The AS5601 supports the 2-wire Fast-mode Plus I²C-slave protocol in device mode, in compliance with the NXP Semiconductors (formerly Philips Semiconductors) specification UM10204. A device that sends data onto the bus is a transmitter and a device receiving data is a receiver. The device that controls the message is called a master. The devices that are controlled by the master are called slaves. A master device generates the serial clock (SCL), controls the bus access, and generates the START and STOP conditions that control the bus. The AS5601 always operates as a slave on the I²C bus. Connections to the bus are made through the open-drain I/O lines SDA and the input SCL. Clock stretching is not included. The host MCU (master) initiates data transfers. The 7-bit slave address of the AS5601 is 0x36 (0110110 in binary). Supported Modes • Random/Sequential read • Byte/Page write • Automatic increment (ANGLE register) • Standard-mode • Fast-mode • Fast–mode Plus The SDA signal is the bidirectional data line. The SCL signal is the clock generated by the I²C bus master to synchronize sampling data from SDA. The maximum SCL frequency is 1 MHz. Data is sampled on the rising edge of SCL. I²C Interface Operation Figure 12: I²C Electrical Specifications SDA tbuf tLOW tR tHD.STA tF SCL tSU.DAT tHD.STA Stop Page 10 Document Feedback Start tHD.DAT tHIGH tSU.STA tSU.STO Repeated Start ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Detailed Description I²C Electrical Specification Figure 13: I²C Electrical Specifications Symbol Parameter Conditions Min Max Units VIL Logic low input voltage -0.3 0.3 x VDD V VIH Logic high input voltage 0.7 x VDD VDD + 0.3 V VHYS Hysteresis of Schmitt trigger inputs VDD > 2.5V VOL Logic low output voltage (open-drain or open-collector) at 3 mA sink current VDD > 2.5V IOL Logic low output current VOL = 0.4V tOF Output fall time from VIHmax to VILmax tSP Pulse width of spikes that must be suppressed by the input filter II Input current at each I/O Pin CB CI/O 0.05 x VDD V 0.4 V 20 mA 120 (1) ns 50 (2) ns +10 (3) μA Total capacitive load for each bus line 550 pF I/O capacitance (SDA, SCL) (4) 10 pF 10 Input voltage between 0.1 x VDD and 0.9 x VDD -10 Note(s): 1. In Fast-mode Plus, fall time is specified the same for both output stage and bus timing. If series resistors are used this has to be considered for bus timing. 2. Input filters on the SDA and SCL inputs suppress noise spikes of less than 50 ns. 3. I/O pins of Fast-mode and Fast-mode Plus devices must not load or drive the SDA and SCL lines if VDD is switched OFF. 4. Special-purpose devices such as multiplexers and switches may exceed this capacitance because they connect multiple paths together. ams Datasheet [v1-06] 2016-Apr-22 Page 11 Document Feedback AS5601 − Detailed Description I²C Timing Figure 14: I²C Timing Symbol Parameter Conditions Min Max Units 1.0 MHz fSCLK SCL clock frequency tBUF Bus free time (time between the STOP and START conditions) 0.5 μs tHD;STA Hold time; (Repeated) START condition (1) 0.26 μs tLOW Low phase of SCL clock 0.5 μs tHIGH High phase of SCL clock 0.26 μs tSU;STA Setup time for a Repeated START condition 0.26 μs tHD;DAT Data hold time (2) tSU;DAT Data setup time (3) tR Rise time of SDA and SCL signals tF Fall time of SDA and SCL signals tSU;STO Setup time for STOP condition 0.45 50 10 0.26 μs ns 120 ns 120 (4) ns μs Note(s): 1. After this time, the first clock is generated. 2. A device must internally provide a minimum hold time of 120 ns (Fast-mode Plus) for the SDA signal (referred to the VIH min of SCL) to bridge the undefined region of the falling edge of SCL. 3. A Fast-mode device can be used in a standard-mode system, but the requirement t SU;DAT = 250 ns must be met. This is automatic if the device does not stretch the low phase of SCL. If such a device does stretch the low phase of SCL, it must drive the next data bit on SDA (t Rmax + tSU;DAT = 1000 + 250 = 1250 ns) before SCL is released. 4. In Fast-mode Plus, fall time is specified the same for both output stage and bus timing. If series resistors are used, this has to be considered for bus timing. Page 12 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Detailed Description I²C Modes Invalid Addresses There are two addresses used to access an AS5601 register. The first is the slave address used to select the AS5601. All I²C bus transactions include a slave address. The slave address of the AS5601 is 0x36 (0110110 in binary). The second address is a word address sent in the first byte transferred in a write transaction. The word address selects a register on the AS5601. The word address is loaded into the address pointer on the AS5601. During subsequent read transactions and subsequent bytes in the write transaction, the address pointer provides the address of the selected register. The address pointer is incremented after each byte is transferred, except for certain read transactions to special registers. If the user sets the address pointer to an invalid word address, the address byte is not acknowledged (the A bit is high). Nevertheless, a read or write cycle is possible. The address pointer is increased after each byte. Reading When reading from an invalid address, the AS5601 returns all zeros in the data bytes. The address pointer is incremented after each byte. Sequential reads over the whole address range are possible including address overflow. Automatic increment of the address pointer for ANGLE, RAW ANGLE, and MAGNITUDE registers: These are special registers which suppress the automatic increment of the address pointer on reads, so a re-read of these registers requires no I²C write command to reload the address pointer. This special treatment of the pointer is effective only if the address pointer is set to the high byte of the register. Writing A write to an invalid address is not acknowledged by the AS5601, although the address pointer is incremented. When the address pointer points to a valid address again, a successful write accessed is acknowledged. Page write over the whole address range is possible including address overflow. Supported Bus Protocol Data transfer may be initiated only when the bus is not busy. During data transfer, the data line must remain stable whenever SCL is high. Changes in the data line while SCL is high are interpreted as START or STOP conditions. ams Datasheet [v1-06] 2016-Apr-22 Page 13 Document Feedback AS5601 − Detailed Description Accordingly, the following bus conditions have been defined: Bus Not Busy Both SDA and SCL remain high. Start Data Transfer A change in the state of SDA from high to low while SCL is high defines the START condition. Stop Data Transfer A change in the state of SDA from low to high while SCL is high defines the STOP condition. Data Valid The state of the data line represents valid data when, after a START condition, SDA is stable for the duration of the high phase of SCL. The data on SDA must only be changed during the low phase of SCL. There is one clock period per bit of data. Each I²C bus transaction is initiated with a START condition and terminated with a STOP condition. The number of data bytes transferred between START and STOP conditions is not limited, and is determined by the I²C bus master. The information is transferred byte-wise and each receiver acknowledges with a ninth bit. Acknowledge Each I²C slave device, when addressed, is obliged to generate an acknowledge after the reception of each byte. The I²C bus master device must generate an extra clock period for this acknowledge bit. A slave that acknowledges must pull down SDA during the acknowledge clock period in such a way that SDA is stable low during the high phase of the acknowledge clock period. Of course, setup and hold times must be taken into account. A master must signal an end of a read transaction by not generating an acknowledge bit on the last byte that has been clocked out of the slave. In this case, the slave must leave SDA high to enable the master to generate the STOP condition. Page 14 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Detailed Description Figure 15: Data Read Slave Address Repeated if more Bytes are transferred MSB SDA SCL 1 Start Condition LSB 2 ... 6 7 R/W 8 ACK 9 ACK 1 ... 7 8 9 Stop Condition or Repeated Start Condition Depending on the state of the R/W bit, two types of data transfer are possible: Data Transfer from a Master Transmitter to a Slave Receiver The first byte transmitted by the master is the slave address, followed by R/W = 0. Next follows a number of data bytes. The slave returns an acknowledge bit after each received byte. If the slave does not understand the command or data it sends a not acknowledge (NACK). Data is transferred with the most significant bit (MSB) first. Data Transfer from a Slave Transmitter to a Master Receiver The master transmits the first byte (the slave address). The slave then returns an acknowledge bit, followed by the slave transmitting a number of data bytes. The master returns an acknowledge bit after all received bytes other than the last byte. At the end of the last received byte, a NACK is returned. The master generates all of the SCL clock periods and the START and STOP conditions. A transfer is ended with a STOP condition or with a repeated START condition. Because a repeated START condition is also the beginning of the next serial transfer, the bus is not released. Data is transferred with the most significant bit (MSB) first. ams Datasheet [v1-06] 2016-Apr-22 Page 15 Document Feedback AS5601 − Detailed Description AS5601 Slave Modes Slave Receiver Mode (Write Mode) Serial data and clock are received through SDA and SCL. Each byte is followed by an acknowledge bit or by a NACK depending on whether the address pointer selects a valid address. START and STOP conditions are recognized as the beginning and end of a bus transaction. The slave address byte is in the first byte received after the START condition. The 7-bit AS5601 address is 0x36 (0110110 in binary). The 7-bit slave address is followed by the direction bit (R/W), which, for a write, is 0 (low). After receiving and decoding the slave address byte, the slave device drives an acknowledge on SDA. After the AS5601 acknowledges the slave address and write bit, the master transmits a register address (word address) to the AS5601. This is loaded into the address pointer on the AS5601. If the address is a valid readable address, the AS5601 answers by sending an acknowledge (A bit low). If the address pointer selects an invalid address, a NACK is sent (A bit high). The master may then transmit zero or more bytes of data. If the address pointer selects an invalid address, the received data are not stored. The address pointer will increment after each byte transferred whether or not the address is valid. If the address pointer reaches a valid position again, the AS5601 answers with an acknowledge and stores the data. The master generates a STOP condition to terminate the write transaction. S <Slave address> <RW> Figure 16: Data Write (Slave Receiver Mode) 0110110 0 <Word address (n)> A S – Start A – Acknowledge (ACK) P – Stop Page 16 Document Feedback XXXXXXXX <Data(n)> A <Data(n+1)> XXXXXXXX A XXXXXXXX <Data(n+X)> A XXXXXXXX A P Data transferred: X+1 Bytes + Acknowledge ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Detailed Description Slave Transmitter Mode (Read Mode) The first byte is received and handled as in the slave receiver mode. However, in this mode, the direction bit indicates that the AS5601 will drive data on SDA. START and STOP conditions are recognized as the beginning and end of a bus transaction. The slave address byte is the first byte received after the master generates a START condition. The slave address byte contains the 7-bit AS5601 address. The 7-bit slave address is followed by the direction bit (R/W), which, for a read, is 1 (high). After receiving and decoding the slave address byte, the slave device drives an acknowledge on the SDA line. The AS5601 then begins to transmit data starting with the register address pointed to by the address pointer. If the address pointer is not written before the initiation of a read transaction, the first address that is read is the last one stored in the address pointer. The AS5601 must receive a not acknowledge (NACK) to end a read transaction. S <Slave address> <RW> Figure 17: Data Read (Slave Transmitter Mode) 0110110 1 <Data(n)> A XXXXXXXX S – Start A – Acknowledge (ACK) NA – Not Acknowledge (NACK) P – Stop ams Datasheet [v1-06] 2016-Apr-22 <Data(n+1)> A <Data(n+2)> XXXXXXXX A XXXXXXXX <Data(n+X)> A XXXXXXXX NA P Data transferred: X+1 Bytes + Acknowledge Note: Last data byte is followed by NACK Page 17 Document Feedback AS5601 − Detailed Description 0110110 0 <Word Address (n)> A XXXXXXXX S – Start Sr – Repeated Start A – Acknowledge (ACK) NA – Not Acknowledge (NACK) P – Stop A Sr <Slave Address> <RW> S <Slave address> <RW> Figure 18: Data Read with Address Pointer Reload (Slave Transmitter Mode) 0110110 1 <Data(n+1)> <Data(n)> A XXXXXXXX A XXXXXXXX <Data(n+X)> A XXXXXXXX NA P Data transferred: X+1 Bytes + Acknowledge Note: Last data byte is followed by NACK SDA and SCL Input Filters Input filters for SDA and SCL inputs are included to suppress noise spikes of less than 50 ns. Page 18 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Register Description The following registers are accessible over the serial I²C interface. The 7-bit device address of the AS5601 is 0x36 (0110110 in binary). To permanently program a configuration, a non-volatile memory (OTP) is provided. Figure 19: Register Map Address Name R/W Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Configuration Registers (1), (2) 0x00 ZMCO R ZPOS R/W/P ZMCO(1:0) 0x01 ZPOS(11:8) 0x02 ZPOS(7:0) 0x07 WD CONF FTH(2:0) SF(1:0) R/W/P 0x08 HYST(1:0) 0x09 ABN R/W/P 0x0A PUSHTHR R/W/P PM(1:0) ABN(3:0) PUSHTHR(7:0) Output Registers 0x0C R RAW ANGLE(11:8) RAW ANGLE 0x0D R 0x0E RAW ANGLE(7:0) R ANGLE(11:8) ANGLE 0x0F R ANGLE(7:0) Status Registers 0x0B STATUS R 0x1A AGC R 0x1B MD ML MH AGC(7:0) R MAGNITUDE (11:8) MAGNITUDE 0x1C R MAGNITUDE(7:0) Burn Command 0xFF BURN W Burn_Angle = 0x80; Burn_Setting = 0x40 Note(s): 1. To change a configuration, read out the register, modify only the desired bits and write the new configuration. Blank fields may contain factory settings. 2. During power-up, configuration registers are reset to the permanently programmed value. Not programmed bits are zero. ams Datasheet [v1-06] 2016-Apr-22 Page 19 Document Feedback AS5601 − Register Description ZPOS Registers These registers are used to configure the zero position (ZPOS). This register is used to align the electric grid of the incremental output with the mechanical grid of an encoder switch. CONF Register The CONF register supports customizing the AS5601. Figure 20 shows the mapping of the CONF register. PUSHTHR Register This register is used to set-up the contactless pushbutton function. This register must be adjusted according to the airgap and magnet configuration. The swing of the pushbutton function can be found by subtracting the AGC value of the pressed button from the AGC value of the released button. The threshold value for the contactless pushbutton should be half of the swing. Figure 20: CONF and ABN Mapping Name Bit Position Description CONF Mapping PM(1:0) 1:0 Power Mode 00 = NOM, 01 = LPM1, 10 = LPM2, 11 = LPM3 HYST(1:0) 3:2 Hysteresis 00 = OFF, 01 = 1 LSB, 10 = 2 LSBs, 11 = 3 LSBs SF(1:0) 9:8 Slow Filter 00 = 16x (1); 01 = 8x; 10 = 4x; 11 = 2x FTH(2:0) 12:10 Fast Filter Threshold 000 = slow filter only, 001 = 6 LSBs, 010 = 7 LSBs, 011 = 9 LSBs,100 = 18 LSBs, 101 = 21 LSBs, 110 = 24 LSBs, 111 = 10 LSBs WD 13 Watchdog Timer 0 = OFF, 1 = ON (automatic entry into LPM3 low-power mode enabled) ABN Mapping ABN(3:0) 3:0 Output Positions and Update Rate 0000 : 8 (61 Hz) 0001 : 16 (122 Hz) 0010 : 32 (244 Hz) 0011 : 64 (488 Hz) 0100 : 128 (976 Hz) 0101 : 256 (1.9 kHz) 0110 : 512 (3.9 kHz) 0111 : 1024 (7.8 kHz) others : 2048 (15.6 kHz)) Note(s): 1. Forced in Low Power Mode (LPM) Page 20 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description ANGLE/RAW ANGLE Register The RAW ANGLE register contains the unmodified angle. The zero adjusted and filtered output value is available in the ANGLE register. STATUS Register The STATUS register provides bits that indicate the current state of the AS5601. Figure 21: STATUS Register Name State When Bit Is High MH AGC minimum gain overflow, magnet too strong ML AGC maximum gain overflow, magnet too weak MD Magnet was detected AGC Register The AS5601 uses automatic gain control (AGC) in a closed loop to compensate for variations of the magnetic field strength due to changes of temperature, airgap between IC and magnet, and magnet degradation. The AGC register indicates the gain. For the most robust performance, the gain value should be in the center of its range. The airgap of the physical system can be adjusted to achieve this value. In 5V operation, the AGC range is 0-255 counts. The AGC range is reduced to 0-128 counts in 3.3V mode. MAGNITUDE Register The MAGNITUDE register indicates the magnitude value of the internal CORDIC output. Non-Volatile Memory (OTP) The non-volatile memory is used to permanently program the configuration. To program the non-volatile memory, the I²C interface is used. The programming can be either performed in the 5V supply mode or in the 3.3V operation mode but using a minimum supply voltage of 3.3V and a 10 μF capacitor at the VDD3V3 pin to ground. This 10 μF capacitor is needed only during the programming of the device. Two different commands are used to permanently program the device: ams Datasheet [v1-06] 2016-Apr-22 Page 21 Document Feedback AS5601 − Register Description Burn_Angle Command (ZPOS) The host microcontroller can perform a permanent programming of ZPOS with a BURN_ANGLE command. To perform a BURN_ANGLE command, write the value 0x80 into register 0xFF. The BURN_ANGLE command can be executed up to 3 times. ZMCO shows how many times ZPOS have been permanently written. This command may only be executed if the presence of the magnet is detected (MD = 1). Burn_Setting Command (CONF) The host microcontroller can perform a permanent writing of CONFIG with a BURN_SETTING command. To perform a BURN_SETTING command, write the value 0x40 into register 0xFF. The BURN_ SETTING command can be performed only one time. Zero Position and Resolution Programming A fundamental feature is to program the zero position (ZPOS) of the magnetic position encoder. This is required to adjust the A/B outputs to the mechanical pattern (grid) of a contactless encoder by setting the count transitions (transition of A and or B) between two adjacent mechanical positions. An example of a 3-bit contactless encoder is shown in Figure 22. The electrical positions represent the positions where an A or B transition occurs. The zero position can be placed in correspondence of one of the electrical positions (yellow). A BURN_ANGLE command can be executed up to 3 times to permanently program the zero position. It can only be executed if the presence of the magnet is detected (MD = 1). Page 22 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Figure 22: Zero Position Setting of 3-Bit Encoder Mechanical position 1 Mechanical position 8 Electrical position 1 Electrical position 2 Electrical position 8 Mechanical position 2 Electrical position 3 Mechanical position 7 Mechanical position 3 Electrical position 7 Electrical position 4 Electrical position 6 Mechanical position 6 Electrical position 5 Mechanical position 4 Mechanical position 5 ams Datasheet [v1-06] 2016-Apr-22 Page 23 Document Feedback AS5601 − Register Description The configuration procedure for a rotary encoder is shown below in Figure 23. Figure 23: Zero Position and Resolution Programming Procedure Use the correct hardware configuration as shown in Figure 34 Step 1 Power up the AS5601. Step 2 Configure the desired number of positions using ABN(3:0). Step 3 The mechanical configuration snapped into the grid. Read out the actual RAW ANGLE. Calculate the compensation value to adjust the mechanical grid and the encoder angle. Refer to Figure 22 and Figure 24. Write the compensation value into ZPOS. Wait at least 1ms. Step 4 Write the required setting into the configuration register CONF and PUSHTHR. Wait at least 1 ms. Proceed with Step 5 to permanently program the configuration. Step 5 Perform a BURN_ANGLE command to permanently program the zero position. Wait at least 1 ms. Step 6 Perform a Burn_Setting command to permanently program the configuration. Wait at least 1 ms. Step 7 Verify the BURN commands: Write the commands 0x01, 0x11 and 0x10 sequentially into the register 0xFF to load the actual OTP content. Read and verify the permanently programmed registers to verify that the BURN_SETTINGS and BURN_ANGLE command was successful. Step 8 Read and verify the permanently programmed registers again after a new power-up cycle. Note(s): 1. After each register command, the new setting is effective at the output at least 1 ms later. 2. It is highly recommended to perform a functional test after this procedure. 3. At least 1 ms after each register command the new setting is effective at the output. 4. The BURN_ANGLE command can be executed up to 3 times and only if the presence of the magnet is detected (MD = 1). Page 24 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Quadrature Encoder Output With the setting ABN(3:0) it is possible to configure the number of positions of the quadrature output. An example for a configuration with 8 positions is shown below. Figure 24: Example Quadrature Output for 8 Positions N/4-1 N/4 1 2 Period A B Position ams Datasheet [v1-06] 2016-Apr-22 N-3 N-2 N-1 N 0 1 2 3 4 5 6 7 8 Page 25 Document Feedback AS5601 − Register Description Absolute Position Feature for Quadrature Output The absolute angular position of the magnet is transmitted on the quadrature output of the position sensor after startup. By counting these pulses after startup, the absolute position within one turn of an encoder knob is known without separate initialization as shown in Figure 25. Figure 25: Example Quadrature Output for Position 8dec After Startup ? Position NO Rotation Absolut position known 0 1 2 3 4 5 6 7 8 Faster Rotation Slower Rotation 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 A B time Transmitting absolute position „8 dec“ after startup Slower movement to position „16 dec“ Faster movement to position „32 dec“ Startup Position Page 26 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Pushbutton Detection The AS5601 implements a pushbutton detection function through a dynamic and relative measurement of the orthogonal magnetic field strength. This pushbutton detection function drives the PUSH output pin high when the AS5601 detects a fast increase of the magnetic field (decrease of the airgap between the magnet and the AS5601). After a fast decrease of the magnetic field, the PUSH output is driven low. Figure 26: Pushbutton Detection Function Specifications Symbol Parameter PUSHTHR Magnetic field threshold tpu_slope Push slope time tpu_dur tpu_relax Min Max Unit 0 255 LSB 500 ms Push duration time NOM, LPM1 PM = 0X 10 10000 ms Push duration time LPM2 PM = 10 40 10000 ms Push duration time LPM3 PM = 11 150 10000 ms Time gap between two consecutive pushes in NOM, LPM1 PM = 0X 40 ms Time gap between two consecutive pushes in LPM2 PM = 10 40 ms Time gap between two consecutive pushes in LPM3 PM = 11 150 ms tpu_min_pulse Minimum duration of the PUSH pulse tpu_recovery Recovery time after a very long pushbutton event BTH_VAR Push amplitude variation ams Datasheet [v1-06] 2016-Apr-22 Conditions 40 -20 50 ms 5000 ms +20 % Page 27 Document Feedback AS5601 − Register Description Figure 27: Pushbutton Detection Function Measured magnetic field Present measured magnetic field (button pressed) Push detection treshold (long time averaged) PUSHTHR Present measured magnetic field (button released) tpu_slope tpu_dur tpu_slope tpu_relax time PUSH time The AS5601 continuously measures the magnetic field intensity. The programmable threshold (PUSHTHR) is applied to a long time average of the magnetic field. A crossing of the current magnetic field and the threshold within a specified time (tpu_slope) drives the PUSH output high. Slow changes of the magnetic field, due for example to temperature variations, magnet drift mechanical tolerances, etc. do not generate any pushbutton detection events. The push detection threshold follows the drifts over the time as shown in Figure 28. Page 28 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Figure 28: Magnetic Field Threshold Over Time Long time averaged magnetic field Push detection treshold PUSHTHR Long time averaged magnetic field time Step Response and Filter Settings The AS5601 has a digital post-processing programmable filter which can be set in fast or slow modes. The fast filter mode can be enabled by setting a fast filter threshold in the FTH bits of the CONF register. If the fast filter is OFF, the step output response is controlled by the slow linear filter as shown in Figure 30. The step response of the slow filter is programmable with the SF bits in the CONF register. Figure 29 shows the tradeoff between delay and noise for the different SF bit settings. Figure 29: Step Response Delay vs. Noise Band ams Datasheet [v1-06] 2016-Apr-22 SF Step Response Delay (ms) Max. RMS Output Noise (1 Sigma) (Degree) 00 2.2 0.015 01 1.1 0.021 10 0.55 0.030 11 0.286 0.043 Page 29 Document Feedback AS5601 − Register Description Figure 30: Step Response (fast filter OFF) Noise Input Output response Sampling Frequency Settling Time according slow filter setting For a fast step response and low noise after settling, the fast filter can be enabled. The fast filter works only if the input variation is greater than the fast filter threshold, otherwise the output response is determined only by the slow filter. The fast filter threshold is programmed with the FTH bits in the CONF register. As shown in Figure 32, the fast filter (corresponds with SF=11) kicks in and takes care of a fast settling. The larger noise band of the fast filter is reduced again after the slow filter (depicted is setting SF=00) has taken over. The different noise bands are shown in Figure 29. Figure 31: Fast Filter Threshold Fast Filter Threshold (LSB) FTH Slow-to-Fast Filter 000 Page 30 Document Feedback Fast-to-Slow Filter Slow Filter Only 001 6 1 010 7 1 011 9 1 100 18 2 101 21 2 110 24 2 111 10 4 ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Register Description Figure 32: Step Response (fast filter ON) Noise Fast Filter Noise slow filter Input Output response Threshold Sampling Frequency Fast filter step response Settling Time according slow filter setting Hysteresis To suppress spurious toggling of the output when the magnet is not moving, a 1 to 3 LSB hysteresis of the 12-bit resolution can be enabled with the HYST bits in the CONF register. Magnet Detection As a safety and diagnostic feature, the AS5601 indicates the absence of the magnet. If the measured magnet field strength goes below the minimum specified level (Bz_ERROR), quadrature output is not updated and the MD bit in the STATUS register is 0. ams Datasheet [v1-06] 2016-Apr-22 Page 31 Document Feedback AS5601 − Register Description Low Power Modes A digital state machine automatically manages the low power modes to reduce the average current consumption. Three low-power modes are available and can be enabled with the PM bits in the CONF register. In a low-power mode, the fast filter is automatically disabled, because there is no need for a fast settling time if the output refresh is as fast as the polling cycles. Watchdog Timer The watchdog timer allows saving power by switching into LMP3 if the angle stays within the watchdog threshold of 4 LSB for at least one minute, as shown in Figure 33. The watchdog function can be enabled by setting the WD bit in the CONF register. Figure 33: Watchdog Timer Function Output Value 1 minute Watchdog threshold 4 LSB NOM,LPM1, LPM2 Page 32 Document Feedback LPM3 NOM,LPM1, LPM2 ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Application Information Application Information Schematic All required external components are shown below for the reference application diagram. To improve EMC and for remote applications, consider additional protection circuitry. Figure 34: Application Diagram for Angle Readout and Programming 5V Operation 3.3V Operation 4.5-5.5V 3-3.6V* RPU A8 1 VDD5V 2 VDD3V3 PUSH RPU C1 A 2 VDD3V3 PUSH SDA 6 3 PUSH C1 4 GND B5 SCL 7 To MCU SDA 6 C** B 4 GND GND A AS5601 To MCU C2 RPU A8 1 VDD5V SCL 7 AS5601 3 PUSH RPU B B5 GND * Supply voltage for permanent programming is 3.3–3.5V ** 10µF Capacitor required during permanent programming Figure 35: Recommended External Components Component Symbol Value Units VDD5V buffer capacitor C1 100 nF 20% LDO regulator capacitor C2 1 μF 20%; < 100 mΩ; Low ESR ceramic capacitor RPU 4.7 kΩ refer to UM10204 for pull-up sizing Optional pull-up for I²C bus Notes Note(s): 1. Given parameter characteristics have to be fulfilled over operation temperature and product lifetime ams Datasheet [v1-06] 2016-Apr-22 Page 33 Document Feedback AS5601 − Application Information Magnet Requirements The AS5601 requires a minimum magnetic field component Bz perpendicular to the sensitive area on the chip. The center of the sensitive area is in the center of the package. Along the circumference of the Hall element circle the magnetic field Bz should be sine-shaped. The magnetic field gradient of Bz along the radius of the circle should be in the linear range of the magnet to eliminate displacement error by the differential measurement principle. 0.5mm - 3mm typ. Figure 36: Magnetic Field Bz and Typical Airgap The typical airgap is between 0.5 mm and 3 mm, and it depends on the selected magnet. A larger and stronger magnet allows a larger airgap. Using the AGC value as a guide, the optimal airgap can be found by adjusting the distance between the magnet and the AS5601 so that the AGC value is in the center of its range. The maximum allowed displacement of the rotational axis of the reference magnet from the center of the package is 0.25 mm when using a magnet with a diameter of 6mm. Page 34 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Application Information Mechanical Data The internal Hall elements are located in the center of the package on a circle with a radius of 1 mm. Figure 37: Hall Element Positions Note(s): 1. All dimensions in mm. 2. Die thickness 356μm nom. ams Datasheet [v1-06] 2016-Apr-22 Page 35 Document Feedback AS5601 − Package Drawings & Mark ings Package Drawings & Markings Figure 38: SOIC8 Package Outline Drawing RoHS Symbol Min Nom Max A - - 1.75 A1 0.10 - 0.25 A2 1.25 - - b 0.31 - 0.51 c 0.17 - 0.25 D - 4.90 BSC - E - 6.00 BSC - E1 - 3.90 BSC - e - 1.27 BSC - L 0.40 - 1.27 L1 - 1.04 REF - L2 - 0.25 BSC - R 0.07 - - R1 0.07 - - h 0.25 - 0.50 Q 0º - 8º Q1 5º - 15º Q2 0º - - aaa - 0.10 - bbb - 0.20 - ccc - 0.10 - ddd - 0.25 - eee - 0.10 - fff - 0.15 - ggg - 0.15 - Green Note(s): 1. Dimensions & tolerancing confirm to ASME Y14.5M-1994. 2. All dimensions are in millimeters. Angles are in degrees. Page 36 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Package Drawings & Markings Figure 39: Package Marking AS5601 YYWWRZZ @ Figure 40: Packaging Code YY WW R ZZ @ Last two digits of the manufacturing year Manufacturing week Plant identifier Free choice/traceability code Sublot identifier ams Datasheet [v1-06] 2016-Apr-22 Page 37 Document Feedback AS5601 − Ordering & Contact Information Ordering & Contact Information Figure 41: Ordering Information Ordering Code Package Marking Delivery Form Delivery Quantity AS5601-ASOT SOIC-8 AS5601 13” Tape & Reel in dry pack 2500 pcs AS5601-ASOM SOIC-8 AS5601 7” Tape & Reel in dry pack 500 pcs Buy our products or get free samples online at: www.ams.com/ICdirect Technical Support is available at: www.ams.com/Technical-Support Provide feedback about this document at: www.ams.com/Document-Feedback For further information and requests, e-mail us at: [email protected] For sales offices, distributors and representatives, please visit: www.ams.com/contact Headquarters ams AG Tobelbaderstrasse 30 8141 Premstaetten Austria, Europe Tel: +43 (0) 3136 500 0 Website: www.ams.com Page 38 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − RoHS Compliant & ams Green Statement RoHS Compliant & ams Green Statement RoHS: The term RoHS compliant means that ams AG products fully comply with current RoHS directives. Our semiconductor products do not contain any chemicals for all 6 substance categories, including the requirement that lead not exceed 0.1% by weight in homogeneous materials. Where designed to be soldered at high temperatures, RoHS compliant products are suitable for use in specified lead-free processes. ams Green (RoHS compliant and no Sb/Br): ams Green defines that in addition to RoHS compliance, our products are free of Bromine (Br) and Antimony (Sb) based flame retardants (Br or Sb do not exceed 0.1% by weight in homogeneous material). Important Information: The information provided in this statement represents ams AG knowledge and belief as of the date that it is provided. ams AG bases its knowledge and belief on information provided by third parties, and makes no representation or warranty as to the accuracy of such information. Efforts are underway to better integrate information from third parties. ams AG has taken and continues to take reasonable steps to provide representative and accurate information but may not have conducted destructive testing or chemical analysis on incoming materials and chemicals. ams AG and ams AG suppliers consider certain information to be proprietary, and thus CAS numbers and other limited information may not be available for release. ams Datasheet [v1-06] 2016-Apr-22 Page 39 Document Feedback AS5601 − Copyrights & Disclaimer Copyrights & Disclaimer Copyright ams AG, Tobelbader Strasse 30, 8141 Premstaetten, 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. Devices sold by ams AG are covered by the warranty and patent indemnification provisions appearing in its General Terms of Trade. ams AG makes no warranty, express, statutory, implied, or by description regarding the information set forth herein. 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 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. This product is provided by ams AG “AS IS” and any express or implied warranties, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. 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. Page 40 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Document Status Document Status Document Status Product Preview Preliminary Datasheet Datasheet Datasheet (discontinued) ams Datasheet [v1-06] 2016-Apr-22 Product Status Definition Pre-Development Information in this datasheet is based on product ideas in the planning phase of development. All specifications are design goals without any warranty and are subject to change without notice Pre-Production Information in this datasheet is based on products in the design, validation or qualification phase of development. The performance and parameters shown in this document are preliminary without any warranty and are subject to change without notice Production Information in this datasheet is based on products in ramp-up to full production or full production which conform to specifications in accordance with the terms of ams AG standard warranty as given in the General Terms of Trade Discontinued Information in this datasheet is based on products which conform to specifications in accordance with the terms of ams AG standard warranty as given in the General Terms of Trade, but these products have been superseded and should not be used for new designs Page 41 Document Feedback AS5601 − Revision Information Revision Information Changes from 1-05 (2016-Feb-11) to current revision 1-06 (2016-Apr-22) Page Updated Power Management 8 Note(s): 1. Page and figure numbers for the previous version may differ from page and figure numbers in the current revision. 2. Correction of typographical errors is not explicitly mentioned. Page 42 Document Feedback ams Datasheet [v1-06] 2016-Apr-22 AS5601 − Content Guide Content Guide ams Datasheet [v1-06] 2016-Apr-22 1 1 2 2 General Description Key Benefits & Features Applications Block Diagram 3 3 Pin Assignments Pin Description 4 Absolute Maximum Ratings 5 5 6 6 7 7 Electrical Characteristics Operating Conditions Digital Inputs and Outputs Timing Characteristics Magnetic Characteristics System Characteristics 8 8 10 10 11 12 13 13 13 13 13 14 14 14 14 14 16 16 17 18 Detailed Description Power Management I²C Interface I²C Interface Operation I²C Electrical Specification I²C Timing I²C Modes Invalid Addresses Reading Writing Supported Bus Protocol Bus Not Busy Start Data Transfer Stop Data Transfer Data Valid Acknowledge AS5601 Slave Modes Slave Receiver Mode (Write Mode) Slave Transmitter Mode (Read Mode) SDA and SCL Input Filters 19 20 20 20 21 21 21 21 21 22 22 22 25 26 27 29 Register Description ZPOS Registers CONF Register PUSHTHR Register ANGLE/RAW ANGLE Register STATUS Register AGC Register MAGNITUDE Register Non-Volatile Memory (OTP) Burn_Angle Command (ZPOS) Burn_Setting Command (CONF) Zero Position and Resolution Programming Quadrature Encoder Output Absolute Position Feature for Quadrature Output Pushbutton Detection Step Response and Filter Settings Page 43 Document Feedback AS5601 − Content Guide Page 44 Document Feedback 31 31 32 32 Hysteresis Magnet Detection Low Power Modes Watchdog Timer 33 33 34 35 Application Information Schematic Magnet Requirements Mechanical Data 36 38 39 40 41 42 Package Drawings & Markings Ordering & Contact Information RoHS Compliant & ams Green Statement Copyrights & Disclaimer Document Status Revision Information ams Datasheet [v1-06] 2016-Apr-22