The ALS31313 three-axis linear Hall-effect sensor IC provides
a 12-bit digital value corresponding to the magnetic field
measured in each of the X, Y, and Z axes. The ALS31313 is
preconfigured for use in 3D sensing applications for head-on
linear motion, slide-by position sensing, and rotation angle
measurements. The ALS31313 is also offered in joystick mode,
including a low gain option for the Z axis channel. This feature
enables the use of a back-bias magnet to provide return-to-zero
force instead of traditional spring-based solutions.
Three different factory-programmed sensitivity ranges are
available: ±500 G, ±1000 G, and ±2000 G.
The I2C address of the ALS31313 can be set either by external
resistors (16 unique addresses) or programmed into EEPROM
via I2C (127 unique addresses), allowing for multiple devices
on the same bus. The ALS31313 also includes 78 bits of user
EEPROM.
Power management of the ALS31313 is highly configurable,
allowing for system-level optimization of supply current and
performance. Sleep mode consumes just 14 nA (typical),
making the ALS31313 well suited for portable, battery-operated
applications.
The ALS31313 is supplied in an 8-pin TSSOP. The package is
lead (Pb) free with 100% matte-tin leadframe plating.
ALS31313-DS, Rev. 3
MCO-0000394
AEC-Q100 automotive qualification pending
Senses magnetic fields in X, Y, and Z axes
Z-axis sensing of “crouch” or push button motion
Capable of operating with back-bias magnets
Ideal for battery-powered, low-voltage applications
2.65 to 3.5 V single supply operation
1 MHz I2C compatibility down to 1.8 V
14 nA (typ) Sleep ICC
12 µA to 2 mA ICC (typ) in low-power duty cycle mode
Industry standard I2C interface for easy system integration
Up to 1 MHz (Fast Mode+) I2C communication
16 selectable addresses via external resistor divider
127 available address configurable via EEPROM
On-chip EEPROM
Stores factory- and user-configured settings
78 bits of user EEPROM for additional storage
On-chip charge pump for easy programming
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
PACKAGE:
Figure 1: Functional Block Diagram
Not to scale
ALS31313
Continued on next page...
FEATURES AND BENEFITS DESCRIPTION
July 12, 2019
VCC SDA
SCL
ADR0
ADR1
INT
GND
ZY
X
MUX ADC
Power
Controller
Temp
Sensor
I2C Serial
Interface
Slave
Address
ADC
Digital
Controller
Charge
Pump
EEPROM
Memory
Hall
Elements
Z
X
Y
8-Pin TSSOP (LE)
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
2
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
SELECTION GUIDE
Part Number X/Y Channel Sensitivity
(LSB/G) [1]
Z Channel Sensitivity
(LSB/G) [1] Packing [2]
ALS31313KLEATR-500 4 4
4000 pieces per 13-inch reel
ALS31313KLEATR-1000 2 2
ALS31313KLEATR-2000 1 1
ALS31313KLEATR-JOY [3] 1 0.25
[1] 1 gauss (G) = 0.1 millitesla (mT).
[2] Contact Allegro™ for alternate packing options.
[3] Joystick devices have reduced gain on the Z axis to accommodate back bias magnets.
FEATURES AND BENEFITS (continued)
Flexible 12-bit ADC with 10-bit ENOB (Effective Number of Bits)
1% (typ) accurate factory-trimmed sensitivity options
(±500 G, ±1000 G, and ±2000 G full-scale input)
Integrated temperature sensor
Wide ambient temperature range: –40°C to 125°C
ALS31313KLEATR-500
Factory Configuration: 500 = 500 gauss
Packing Option: TR = 4000 pieces per 13-inch reel
Package Type: LEA = 8-lead TSSOP
Operating Temperature Range (TA): K = –40°C to 125°C
Allegro Linear Sensor 5-digit part number
NAMING SPECIFICATION
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
3
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ABSOLUTE MAXIMUM RATINGS
Characteristic Symbol Notes Rating Unit
Forward Supply Voltage VCC 5.5 V
Reverse Supply Voltage VRCC –0.1 V
All Other Pins Forward Voltage VIN 5.5 V
All Other Pins Reverse Voltage VR–0.1 V
Operating Ambient Temperature TARange K –40 to 125 °C
Maximum Junction Temperature TJ(MAX) 165 °C
Storage Temperature [1] Tstg –65 to 170 °C
EEPROM Write Count Number of times EEPROM can be written 1000 writes
[1] Stresses beyond the Absolute Maximum Ratings may result in permanent device damage. Exposure to absolute maximum rating conditions for
extended periods of time may affect device reliability.
THERMAL CHARACTERISTICS [2]
Characteristic Symbol Test Conditions Value Unit
Package Thermal Resistance [3] RθJA On 4-layer PCB based on JEDEC standard 145 °C/W
[2] Thermal characteristics may require derating at maximum conditions. See application section for more information.
[3] Additional thermal information available on the Allegro website.
SPECIFICATIONS
Figure 2: Typical Application
Customer
Microcontroller
ALS31313
VCC
SCL
SDA
ADR1
INT
GND
ADR0
VCC
10 kΩ
10 kΩ 10 kΩ
CBYPASS
0.1 µF
VCC
VCC
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
4
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
Terminal List Table
Number Name Function
1 VCC Power supply input. Bypass VCC to GND with a 0.1 µF capacitor.
2 ADR0 I2C Address Select 0. Connect a resistive divider to ADR0 to
select the device address. See Application Information section on
addressing for more information.
3 GND Ground signal terminal.
4INT Interrupt output. See Application Information section on interrupt
function for more information.
5 NC Not internally connected. Connect to GND.
6 ADR1 I2C Address Select 1. Connect a resistive divider to ADR1 to select
the device’s address. See Application Information section on
addressing for more information.
7 SDA I2C serial data input/output. Open-drain.
8 SCL I2C serial clock input
Package LE, 8-Pin TSSOP Pinout Digram
PINOUT DIAGRAM AND TERMINAL LIST TABLE
VCC
ADR0
GND
INT
SCL
SDA
ADR1
NC
1
2
3
4
8
7
6
5
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
5
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ELECTRICAL CHARACTERISTICS: Valid through full range of TA, VCC = 3.0 V, CBYPASS = 0.1 µF, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
ELECTRICAL CHARACTERISTICS
Supply Voltage VCC
Normal operation 2.65 3.0 3.5 V
EEPROM programming [2] 2.8 3.5 V
Supply Current [3]
ICC(ACTIVE) Sleep = 0, or active state when sleep = 2 3.4 3.9 mA
ICC(INACTIVE) Sleep = 2; inactive state 12 µA
ICC(LPDCM)
Average current in LPDCM; Sleep = 2,
LPM_CNT_MAX = 7, BW Select = 6 12 µA
Average current in LPDCM; Sleep = 2,
LPP_CNT_MAX = 0, BW Select = 0 2 mA
ICC(SLEEP) VCC = 3.0 V, Sleep mode = 1, TA = 25°C 14 nA
ICC(EE)
VCC = VCC(MAX), EEPROM programming
occurring [2] 6.2 6.7 mA
Power-On Delay Time [4] tPOD
TA = 25°C, after VCC reaches VCC(MIN),
BW Select = 0 600 µs
EEPROM Write Delay Time tEEP Wait after writing to EEPROM 50 ms
Linearity Sensitivity Error ELIN Through full range of BIN ±1.7 %
INT PIN CHARACTERISTICS
INT Output On Resistance RON 90 Ω
INT Input Current IINT(IN) VIN = 0 V to VCC –1 0 1 µA
INT Pull Up Resistance RINT(PU) 2.4 10
INT Pull Up Voltage VINT(PU) 3.0 3.5 V
ADDRESS PIN CHARACTERISTICS [5]
Address Value 0 Reference VADDR0 ADR0, ADR1 0 0.1 × VCC
Address Value 1 Reference VADDR1 ADR0, ADR1 0.23 0.33 0.43 × VCC
Address Value 2 Reference VADDR2 ADR0, ADR1 0.57 0.67 0.77 × VCC
Address Value 3 Reference VADDR3 ADR0, ADR1 0.9 1 × VCC
Address Pin Input Resistance RADD(IN) ADR0, ADR1 0.8 1 1.2
[1] Typical values with ± are mean ±3 sigma.
[2] Parameter is tested at wafer probe only.
[3] ICC will vary based on lower power duty cycle settings. See Application Information section on power modes.
[4] The device will not respond to I2C inputs until after the power-on delay time. tPOD will vary based on BW Select code, with code 0 being the slowest.
[5] Based on characterization data and guaranteed by design. Not verified at final test.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
6
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
I2C INTERFACE CHARACTERISTICS [1]: Valid through full range of TA, CBYPASS = 0.1 µF, RPU = 10 kΩ, and I2C Clock Speed
(FCLK) = 400 kHz, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
Bus Free Time Between Stop and Start tBF 1.3 µs
Hold Time Start Condition tSTA(H) 0.6 µs
Setup Time for Repeated Start Condition tSTA(S) 0.6 µs
SCL Low Time tLOW 1.3 µs
SCL High Time tHIGH 0.6 µs
Data Setup Time tDAT(S) 100 ns
Data Hold Time tDAT(H) 0 900 ns
Setup Time for Stop Condition tSTO(S) 0.6 µs
Logic Input Low Level (SDA, SCL Pins) VI(L)
I2C threshold = 0; 3.0 V Compatible Mode 0.9 V
I2C threshold = 1; 1.8 V Compatible Mode 0.54 V
Logic Input High Level (SDA, SCL Pins) VI(H)
I2C threshold = 0; 3.0 V Compatible Mode 2.1 V
I2C threshold = 1; 1.8 V Compatible Mode 1.26 V
Logic Input Current II2C(IN) VIN = 0 V to VCC, RPU = 2.4 kΩ –1 0 1 µA
Output Voltage (SDA Pin) VO(L) ILOAD = 1.5 mA 0.36 V
Clock Frequency (SCL Pin) fCLK 400 1000 kHz
Output Fall Time (SDA Pin) tfRPU = 2.4 kΩ, CBUS = 100 pF 250 ns
I2C Pull-Up Resistance RI2C(PU) 2.4 10
I2C Pull-Up Voltage VI2C(PU) 1.8 3.0 3.3 V
Total Capacitive Load for SDL and SDA
Buses CBUS 100 pF
[1] I2C Interface Characteristics are guaranteed by design and are not factory tested.
Figure 3: I2C Interface Timing Diagram
SDA
SCL
tLOW tHIGH
tSTA(S) tSTA(H) tDAT(S) tDAT(H) tSTO(S) tBF
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
7
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ALS31313KLEATR-500 PERFORMANCE CHARACTERISTICS: Valid through full range of TA, VCC = 3.0 V, and
CBYPASS = 0.1 µF, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
NOMINAL PERFORMANCE
Optimized Sensing Range BIN –500 500 G
Sensitivity SENS 4 LSB/G
Zero-Field Offset Code QVO 0 LSB
ACCURACY PERFORMANCE
Offset Error X/Y Axes EOFF(XY)
BIN = 0 G, TA = 25°C –24 24 LSB
BIN = 0 G, TA = 125°C –40 40 LSB
BIN = 0 G, TA = –40°C –40 40 LSB
Offset Error Z Axis EOFF(Z)
BIN = 0 G, TA = 25°C –24 24 LSB
BIN = 0 G, TA = 125°C –40 40 LSB
BIN = 0 G, TA = –40°C –40 40 LSB
Sensitivity Error X/Y Axes ESENS(XY) TA = 25°C –4 4 %
Sensitivity Error Z Axis ESENS(Z) TA = 25°C –4 4 %
Sensitivity Temperature Coefficient TCSENS
NdFeB Magnet, TA = 25°C to 125°C 0.08 0.12 0.16 %/°C
NdFeB Magnet, TA = 25°C to –40°C 0.04 0.12 0.2 %/°C
Sensitivity Mismatch Error
X Axis to Y Axis EMATCH(XY) –5 5 %
Sensitivity Mismatch Error
X/Y Axes to Z Axis EMATCH(XYZ) –5 5 %
RMS Noise X/Y Channels [2] NRMS(XY) BW Select = 0 3 LSB
RMS Noise Z Channel [2] NRMS(Z) BW Select = 0 1 LSB
LIFETIME DRIFT CHARACTERISTICS
Offset Error Lifetime Drift EOFF_DRIFT –10 10 LSB
Sensitivity Error Lifetime Drift ESENS_DRIFT –2.6 2.6 %
[1] Typical values with ± are 3 sigma values.
[2] RMS noise equivalent to 1 sigma distribution.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
8
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ALS31313KLEATR-1000 PERFORMANCE CHARACTERISTICS: Valid through full range of TA, VCC = 3.0 V, and
CBYPASS = 0.1 µF, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
NOMINAL PERFORMANCE
Optimized Sensing Range BIN –1000 1000 G
Sensitivity SENS 2 LSB/G
Zero-Field Offset Code QVO 0 LSB
ACCURACY PERFORMANCE
Offset Error X/Y Axes EOFF(XY)
BIN = 0 G, TA = 25°C –12 12 LSB
BIN = 0 G, TA = 125°C –24 24 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Offset Error Z Axis EOFF(Z)
BIN = 0 G, TA = 25°C –12 12 LSB
BIN = 0 G, TA = 125°C –24 24 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Sensitivity Error X/Y Axes ESENS(XY) TA = 25°C –4 4 %
Sensitivity Error Z Axis ESENS(Z) TA = 25°C –4 4 %
Sensitivity Temperature Coefficient TCSENS
NdFeB Magnet, TA = 25°C to 125°C 0.08 0.12 0.16 %/°C
NdFeB Magnet, TA = 25°C to –40°C 0.04 0.12 0.2 %/°C
Sensitivity Mismatch Error
X Axis to Y Axis EMATCH(XY) –5 5 %
Sensitivity Mismatch Error
X/Y Axes to Z Axis EMATCH(XYZ) –5 5 %
RMS Noise X/Y Channels [2] NRMS(XY) BW Select = 0 3 LSB
RMS Noise Z Channel [2] NRMS(Z) BW Select = 0 1 LSB
LIFETIME DRIFT CHARACTERISTICS
Offset Error Lifetime Drift EOFF_DRIFT –10 10 LSB
Sensitivity Error Lifetime Drift ESENS_DRIFT –2.6 2.6 %
[1] Typical values with ± are 3 sigma values.
[2] RMS noise equivalent to 1 sigma distribution.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
9
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ALS31313KLEATR-2000 PERFORMANCE CHARACTERISTICS: Valid through full range of TA, VCC = 3.0 V, and
CBYPASS = 0.1 µF, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
NOMINAL PERFORMANCE
Optimized Sensing Range BIN –2000 2000 G
Sensitivity SENS 1 LSB/G
Zero-Field Offset Code QVO 0 LSB
ACCURACY PERFORMANCE
Offset Error X/Y Axes EOFF(XY)
BIN = 0 G, TA = 25°C –10 10 LSB
BIN = 0 G, TA = 125°C –20 20 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Offset Error Z Axis EOFF(Z)
BIN = 0 G, TA = 25°C –10 10 LSB
BIN = 0 G, TA = 125°C –20 20 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Sensitivity Error X/Y Axes ESENS(XY) TA = 25°C –4 4 %
Sensitivity Error Z Axis ESENS(Z) TA = 25°C –4 4 %
Sensitivity Temperature Coefficient TCSENS
NdFeB Magnet, TA = 25°C to 125°C 0.08 0.12 0.16 %/°C
NdFeB Magnet, TA = 25°C to –40°C 0.04 0.12 0.2 %/°C
Sensitivity Mismatch Error
X Axis to Y Axis EMATCH(XY) –5 5 %
Sensitivity Mismatch Error
X/Y Axes to Z Axis EMATCH(XYZ) –5 5 %
RMS Noise X/Y Channels [2] NRMS(XY) BW Select = 0 3 LSB
RMS Noise Z Channel [2] NRMS(Z) BW Select = 0 1 LSB
LIFETIME DRIFT CHARACTERISTICS
Offset Error Lifetime Drift EOFF_DRIFT –10 10 LSB
Sensitivity Error Lifetime Drift ESENS_DRIFT –2.6 2.6 %
[1] Typical values with ± are 3 sigma values.
[2] RMS noise equivalent to 1 sigma distribution.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
10
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
ALS31313KLEATR-JOY PERFORMANCE CHARACTERISTICS: Valid through full range of TA, VCC = 3.0 V, and
CBYPASS = 0.1 µF, unless otherwise specified
Characteristics Symbol Test Conditions Min. Typ. [1] Max. Unit
NOMINAL PERFORMANCE
Optimized Sensing Range BIN
X and Y axes –2000 2000 G
Z axis –8000 8000 G
Sensitivity SENS 1 LSB/G
Zero-Field Offset Code QVO 0 LSB
ACCURACY PERFORMANCE
Offset Error X/Y Axes EOFF(XY)
BIN = 0 G, TA = 25°C –10 10 LSB
BIN = 0 G, TA = 125°C –20 20 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Offset Error Z Axis EOFF(Z)
BIN = 0 G, TA = 25°C –10 10 LSB
BIN = 0 G, TA = 125°C –20 20 LSB
BIN = 0 G, TA = –40°C –32 32 LSB
Sensitivity Error X/Y Axes ESENS(XY) TA = 25°C –4 4 %
Sensitivity Error Z Axis ESENS(Z) TA = 25°C –7.5 7.5 %
Sensitivity Temperature Coefficient TCSENS
NdFeB Magnet, TA = 25°C to 125°C 0.08 0.12 0.2 %/°C
NdFeB Magnet, TA = 25°C to –40°C 0.04 0.12 0.2 %/°C
Sensitivity Mismatch Error
X Axis to Y Axis EMATCH(XY) –5 5 %
RMS Noise X/Y Channels [2] NRMS(XY) BW Select = 0 3 LSB
RMS Noise Z Channel [2] NRMS(Z) BW Select = 0 1 LSB
LIFETIME DRIFT CHARACTERISTICS
Offset Error Lifetime Drift EOFF_DRIFT –10 10 LSB
Sensitivity Error Lifetime Drift ESENS_DRIFT –2.6 2.6 %
[1] Typical values with ± are 3 sigma values.
[2] RMS noise equivalent to 1 sigma distribution.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
11
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
MEMORY MAP
The memory map below lists the locations of accessible registers on the ALS31313. See the following sections on EEPROM and Primary
Registers for detailed information.
Reserved Read Only Read/Write Volatile Read/Write EEPROM Read/Write 1 to Clear Clear on Read
Table 1: Memory Map
Address
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0x02 RESERVED
BW Select
Hall Mode
I2C CRC Enable
Disable Slave ADC
Slave Address
I2C Threshold
Channel Z Enable
Channel Y Enable
Channel X Enable
INT Latch Enable
Customer EE
0x03 RESERVED
Signed INT Enable
INT Mode
INT EEPROM Status
INT EEPROM Enable
Z INT Enable
Y INT Enable
X INT Enable
Z INT
Threshold
Y INT
Threshold
X INT
Threshold
0x0D RESERVED Customer EEPROM
0x0E RESERVED Customer EEPROM
0x0F RESERVED Customer EEPROM
0x27 RESERVED
Low
Power
Counter
I2C
Loop Mode
Sleep
0x28 X_Axis_MSBs Y_Axis_MSBs Z_Axis_MSBs
New Data
INT
Temperature
MSBs
0x29 RESERVED
INT Write
X_Axis_LSBs Y_Axis_LSBs Z_Axis_LSBs
Hall Status
Temperature
LSBs
Address
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
12
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
EEPROM
The following EEPROM addresses are customer accessible and may be read at any time, with or without entering the customer access
code. Customer Access mode must be enabled to write to any of these registers.
Reserved Read Only Read/Write Volatile Read/Write EEPROM Write 1 to Clear Clear on Read
Table 2: EEPROM 0x02
Address Bits Default Name Description
0x02
31:24 0 Reserved Reserved
23:21 0 BW Select
Used to control the sample rate of the device. Resolution can be traded for
faster samples.
0 = Slowest sample rate, highest resolution
7 = Fastest sample rate, lowest resolution
See Bandwidth Selection section.
20:19
See
Selection
Guide
Hall Mode
Controls the operation mode of the Hall plates.
0 = Single-Ended Hall Mode
1 = Differential Hall Mode
2 = Common Hall Mode
3 = Alternating Hall mode (switches between Differential and Common Hall
Modes for each conversion per enabled axis.
See Hall Modes section.
18 0 I2C CRC Enable
I2C Cyclic Redundancy Check (CRC) output byte enabled. Enable CRC for
applications that require high data integrity.
0 = Disabled
1 = Enabled
See CRC section
17 0 Disable Slave ADC
Disable the external slave address pins. When set, the EEPROM setting in
Slave Address is used to determine the slave address. See I2C Addressing
section.
16:10 111 Slave Address
Used to set the slave address for the device when either Disable Slave ADC is
set, or the voltages on the slave address pins are set to VCC.
See I2C Addressing section.
9 1 I2C Threshold
Enables 1.8 V or 3 V compatible I2C.
0 = 3 V compatible mode (Increases threshold for logic input high level)
1 = 1.8 V compatible mode
8 1 Channel Z Enable Enables the Z channel. Disable for faster update rate if this axis is not needed.
7 1 Channel Y Enable Enables the Y channel. Disable for faster update rate if this axis is not needed.
6 1 Channel X Enable Enables the X channel. Disable for faster update rate if this axis is not needed.
5 0 INT Latch Enable
Enables volatile latching of the INT signal. When set, if an interrupt event
occurs, the INT status bit and INT output will both remain latched even after the
event goes away.
See Interrupt section.
4:0 0 Customer EEPROM Customer non-volatile EEPROM. Can be used to store any customer
information. Does not affect device operation.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
13
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
Reserved Read Only Read/Write Volatile Read/Write EEPROM Write 1 to Clear Clear on Read
Table 3: EEPROM 0x03
Address Bits Default Name Description
0x03
31:25 0 Reserved Reserved
24 0 Signed INT Enable
Controls if the interrupt threshold(s) are absolute or signed.
In absolute mode, an interrupt is triggered if the applied field crosses the
threshold in either the positive or negative direction. In signed mode, an
interrupt is only triggered if the applied field passes the threshold in a single
direction specified by the user.
0 = Absolute
1 = Signed
See Interrupt section.
23 0 INT Mode
Controls the behavior of INT.
0 = Threshold Mode. Compares the sensor’s most recent measurement to the
specified event conditions.
1 = Delta Mode. Used in combination with LPDCM. Compares the sensor’s
most recent measurement to the first measurement when the device entered
LPDCM and the specified event conditions.
See Interrupt section.
22 0 INT EEPROM Status Non-volatile EEPROM storage to indicate an interrupt event has occurred.
See Interrupt section.
21 0 INT EEPROM Enable
If set, INT EEPROM Status will be automatically written when an interrupt
event occurs.
See Interrupt section.
20 0 Z INT Enable INT enable for Z axis. See Interrupt section.
19 0 Y INT Enable INT enable for Y axis. See Interrupt section.
18 0 X INT Enable INT enable for X axis. See Interrupt section.
17:12 0 Z INT Threshold INT threshold for Z axis. Affected by Signed INT Enable. See Interrupt section.
11:6 0 Y INT Threshold INT threshold for Y axis. Affected by Signed INT Enable. See Interrupt section.
5:0 0 X INT Threshold INT threshold for X axis. Affected by Signed INT Enable. See Interrupt section.
Table 4: EEPROM 0x0D, 0x0E and 0x0F
Address Bits Default Name Description
0x0D 25:0 0 Customer EEPROM Customer non-volatile EEPROM space. Can be used to store any customer
information. Does not affect device operation.
0x0E 25:0 0 Customer EEPROM Customer non-volatile EEPROM space. Can be used to store any customer
information. Does not affect device operation.
0x0F 25:0 0 Customer EEPROM Customer non-volatile EEPROM space. Can be used to store any customer
information. Does not affect device operation.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
14
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
PRIMARY REGISTERS
The following registers are customer accessible and may be read at any time, with or without entering the customer access code. Customer
Access mode must be enabled to write to any of these registers, with the exception of sleep, which can be written to regardless of access
mode.
Reserved Read Only Read/Write Volatile Read/Write EEPROM Write 1 to Clear Clear on Read
Table 5: Volatile 0x27
Address Bits Name Description
0x27
31:7 Reserved Reserved
6:4 Low-Power Mode
Count Max
Sets max counter for inactive time during low-power duty cycle mode. ALS31313 offers 8 discrete
time frames for inactive time. See Application Information section on low-power modes.
3:2 I2C Loop-Mode Sets I2C readback mode to single read, fast loop, or full loop mode. See Application Information
section on readback modes.
1:0 Sleep Sets device operating mode to full active, ultralow power sleep mode, or low-power duty cycle
mode. See Application Information section on low-power modes.
Table 6: Volatile 0x28
Address Bits Name Description
0x28
31:24 X Axis MSBs MSBs of the register proportional to the field strength in the X direction.
23:16 Y Axis MSBs MSBs of the register proportional to the field strength in the Y direction.
15:8 Z Axis MSBs MSBs of the register proportional to the field strength in the Z direction.
7 New Data
New data update flag for XYZ. Cleared when read. Set when a new update is available. Use this
bit when sampling the device faster than the update rate to avoid averaging the same sample
twice. This bit clears when address 0x28 is read.
6 Interrupt Set when the interrupt thresholds are crossed. Latched if INT Latch Enable is set. In latched
mode, latch can be cleared by writing a 1 to this bit location.
5:0 Temperature MSBs MSBs of the temperature register proportional to the absolute temperature.
Table 7: Volatile 0x29
Address Bits Name Description
0x29
31:21 Reserved Reserved
20 Interrupt Write
Status bit to indicate if an interrupt write is in progress. Will be set if Interrupt EEPROM Enable
is set and an interrupt event has occurred. This field will be set while the device is writing the
Interrupt EEPROM Status bit in address 0x03. When the writing is complete, this bit will clear
automatically.
19:16 X Axis LSBs LSBs of the register proportional to the field-strength in the X direction.
15:12 Y Axis LSBs LSBs of the register proportional to the field-strength in the Y direction.
11:8 Z Axis LSBs LSBs of the register proportional to the field-strength in the Z direction.
7:6 Hall Mode Status
The Hall mode of the current readout. Will be primarily used if 0x02 Hall mode is set to
alternating mode. See Application Information section on Hall modes.
0 = Value measured in Single-Ended Hall Mode
1 = Value measured in Differential Hall Mode
2 = Value measured in Common Hall Mode
5:0 Temperature LSBs LSBs of the temperature register proportional to the absolute temperature.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
15
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
APPLICATION INFORMATION
Magnetic Sensor(s) Output
The ALS31313 provides a 12-bit digital output value that is pro-
portional to the magnetic field applied normally to any of the Hall
elements. The most and least significant bits for X, Y, and Z chan-
nels are separated across two primary registers: 0x28 and 0x29.
The process begins with a full 8-byte read of MSB and LSB reg-
isters to construct a 12-bit 2’s complement signed value. All data
must be read in a single 8-byte read when combining registers,
or the result will be the combination of two separate samples in
time. The 12 bits of data are combined per Table 8.
Table 8: Combined MSBs and LSBs for Magnetic Data
BIT 11 109876543210
DATA MSB Data LSB Data
Assume that a full 8-byte read returns the following binary data
for a single axis:
MSB = 1100_0000
LSB = 0110
The combined data {MSB;LSB} = 1100_0000_0110, or the
decimal equivalent = –1018. This value can then be converted to
gauss by dividing by the sensitivity of the ALS31313.
An ALS31313 with 500 gauss full-scale input range will have a
typical sensitivity of 4 LSB/gauss. The 12-bit magnetic data value
can be converted to gauss using the equation:
gauss = –1018 LSB ÷ 4 LSB G = –254 gauss
Example source code for combining MSB and LSB data is avail-
able in the 3D Linear and 2D Angle Sensing Application Note.
Temperature Sensor Output
The ALS31313 provides a 12-bit digital output that is propor-
tional to the junction temperature of the IC. Similar to magnetic
data, the most and least significant bits for temperature are sepa-
rated across two primary registers: 0x28 and 0x29. Temperature
is a 12-bit signed value where 25°C is expressed as 12’b0, with a
temperature slope ≈ 8 LSB/°C.
After power-on, the temperature sensor is stable within 8 ms and it
is updated every 8 ms after that. In low-power duty cycle mode, the
temperature sensor is updated once every 10 low power cycles.
Power Modes
Power management on the ALS31313 is user-selectable and
highly configurable, allowing for system-level optimization of
current consumption and performance. The ALS31313 supports
three different power modes: Active Mode, Sleep Mode, and
Low-Power Duty Cycle Mode (LPDCM). The operating mode of
the ALS31313 will be determined by the value in Sleep, Address
0x27, bits 1:0, described in Table 9.
Table 9: Sleep
Address Bits Value Operating Mode
0x27 1:0
0 Active Mode
1 Sleep Mode
2 Low-Power Duty Cycle Mode
SLEEP MODE
In Sleep Mode, the ALS31313 enters a near powered-off state
where it consumes the minimum amount of current (14 nA typical).
In this mode, the device will still respond to I2C commands, but
will not update magnetic or temperature data. Sleep mode is valu-
able in applications where the supply voltage cannot be disabled
but minimal power consumption is required. The time it takes to
exit sleep mode is equivalent to Power-On Delay Time (tPOD).
LOW-POWER DUTY CYCLE MODE (LPDCM)
In Low-Power Duty Cycle Mode (LPDCM), the ALS31313 tog-
gles between Active and Inactive states, reducing overall current
consumption. The average ICC for the ALS31313 during Low-
Power Duty Cycle Mode will vary based on the settings used, and
may range anywhere from 2 mA to 12 µA (typical).
The diagram in Figure 4 shows the profile of ICC as the
ALS31313 toggles between Active and Inactive states during
Low-Power Duty Cycle Mode.
4
3.5
3
2.5
2
1.5
1
0.5
0Time
VCC
ICC
tINACTIVE
tACTIVE
ICC(INACTIVE)
ICC (mA) VCC (V)
VCC / ICC
ALS31313 Low-Power Duty Cycle Mode
Figure 4: ICC in Low-Power Duty Cycle Mode
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
16
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
The inactive time will be determined by the value set in Low-
Power Mode Count Max, Address 0x27, bits 6:4. The ALS31313
offers eight discrete time frames, explained in Table 10. Typical
ICC consumed in the inactive state is 12 µA.
Table 10: LPDCM Inactive Time (tINACTIVE)
Address Bits Value tINACTIVE (typ) (ms)
0x27 6:4
0 0.5
1 1
2 5
3 10
4 50
5 100
6 500
7 1000
The active time will be determined by a combination of the
value in BW Select and the number of magnetic sensing chan-
nels enabled. For more information on LPDCM configuration,
refer to the Low-Power Management Application Note for the
ALS31313.
Bandwidth Selection
BW Select, address 0x02, bits 23:21, controls filtering modes on
the ALS31313 for the X, Y, and Z magnetic channels. This setting
will impact the resolution of sampled magnetic data, the device’s
update rate, and the overall bandwidth.
A lower value for BW Select offers increased measurement
resolution with a longer measurement duration. A higher value
for BW Select offers faster measurement time at the expense of
reduced resolution. This setting is valuable for controlling active
time during low-power duty cycle mode or increasing response
time. Typical noise versus BW Select are listed in Table 11.
Table 11: Bandwidth Select, Filtering Modes,
and Input Referred Noise
BW Select
Value FIR Enabled Z Channel
Noise (G)
X/Y Channel
Noise (G)
0 1 1.5 4
1125
2 1 2.2 7
3–––
4026
5 0 2.5 8
6 0 3.5 10
7–––
Update rate (typical) versus BW Select and active channels is
shown in Table 12. While the ALS31313 does update at high
bandwidths internally, throughput may be limited by the I2C
bus clocking frequency at the application level. This concept is
explained in the “Calculation Timing” section of the 3D Linear
and 2D Angle Sensing application note.
Table 12: Bandwidth Select and Update Rate
BW
Select
Value
1 Channel
Update Rate
2 Channel
Update Rate
3 Channel
Update Rate
–3 dB
Bandwidth
µs kHz µs kHz µs kHz kHz
0 160 6 330 3 495 2 3.5
1 80 13 170 6 255 4 7
2 40 25 90 11 135 7 14
3
4 64 16 138 7 207 5 10
5 32 31 74 14 111 9 20
6 16 63 42 24 63 16 40
7
Magnetic sensing channels on the ALS31313 may be enabled
independently with channel x en, channel y en, and channel z en
bits, listed in Table 13.
Table 13: Channel Enable Control
Address Bits Value Description
0x02
8 1 Enables Z sensing Channel
7 1 Enables Y Sensing Channel
6 1 Enables X Sensing Channel
Hall Modes
The ALS31313 offers multiple schemes to retrieve magnetic data
from the magnetic sensing elements. These settings are controlled
via Hall Mode, address 0x02, bits 20:19, described in Table 14.
Table 14: Hall Modes
Value Mode Description
0 Single Ended Reports magnetic data from Xi, Yi, and Zi
sensing elements.
1 Differential Mode Reports magnetic data from XOE – XOW,
YON – YOS, and Zi sensing elements.
2 Common Mode Reports magnetic data from XOE + XOW,
YON +YOS, and Zi sensing elements.
3Alternating Mode
Toggles between differential, and common
Hall modes. Use Hall status bits in register
0x29 to decipher origin of magnetic data
sample.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
17
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
It is not advised to switch a factory-trimmed, single-ended device
(0) into other modes (1, 2, or 3). Doing so may result in sen-
sor performance that is outside of the datasheet specifications.
Conversely, a device that is configured for mode 1 or 2 may be
switched into modes 1, 2, or 3 without issue. Switching a factory-
programmed device from mode 1 or 2 into mode 0 may result in
sensor performance that is outside of the datasheet specifications.
SINGLE-ENDED HALL MODE
Magnetic data in registers 0x28 and 0x29 will be proportional to the
magnetic field seen by the inner sensing elements Xi, Yi, and Zi.
DIFFERENTIAL HALL MODE
Magnetic data in registers 0x28 and 0x29 will be proportional to
the difference in field as seen by the outer sensing elements of the
X and Y axes.
Concatenated X axis data {x_axis_MSB:x_axis_LSB} will be the
result of XO(EAST) – XO(WEST) sensing elements, while concat-
enated Y axis data {y_axis_MSB:y_axis_LSB} will be the result
of YO(NORTH) – YO(SOUTH) sensing elements.
Z axis data will be the same as in single-ended mode.
COMMON HALL MODE
Magnetic data in registers 0x28 and 0x29 will be proportional to
the sum of the fields as seen by the outer sensing elements of the
X and Y axes.
Concatenated X axis data {x_axis_MSB:x_axis_LSB} will be the
result of XO(EAST) + XO(WEST) sensing elements, while concat-
enated Y axis data {y_axis_MSB:y_axis_LSB} will be the result
of YO(NORTH) + YO(SOUTH) sensing elements.
Z axis data will be the same as in single-ended mode.
ALTERNATING HALL MODE
The magnetic data in registers 0x28 and 0x29 will toggle between
Differential Mode data and Common Mode data. The value of Hall
status indicates from which mode the sampled data originated.
Interrupt
The Interrupt feature on the ALS31313 integrates detection and
reporting of large changes in applied magnetic field. An interrupt
event is initiated when the applied magnetic field forces the ADC
output to a value greater than or equal to the user-programmed
threshold. Interrupt detection may be independently enabled or
disabled for each of the three axes.
Interrupt Reporting
The ALS31313 will report the presence of an interrupt event by
asserting the INT pin and the INT bit in register 0x28 will be set.
Interrupt reporting may be latched or unlatched depending on the
value of INT Latch Enable, address 0x02, bit 5.
In a latched state, the INT pin will assert when an event is
detected, and the INT bit will be set. Should the event subside,
the INT pin and INT bit will remain set.
In an unlatched state, the INT pin will assert when an event is
detected, and the INT bit will be set. Should the event subside,
the ALS31313 will reset the INT pin and the INT bit will be
cleared.
The ALS31313 may also report an interrupt event in EEPROM.
This is feature enabled by setting INT EEPROM Enable, address
0x03, bit 21. If an interrupt event is detected, the device will
write to INT EEPROM Status, address 0x03, bit 22.
Interrupt Modes
The ALS31313 includes two different interrupt modes, where
the user may select a threshold value or a maximum change in
field to compare. This setting is controlled via INT Mode, address
0x03, bit 23, explained in Table 15.
Table 15: INT Modes
INT Mode
Value Mode Description
0Threshold
Mode
An interrupt event occurs when the magnetic
ADC Output data ≥ threshold.
1Delta
Mode
Recent magnetic data is compared to stored
value when entering LPDCM. An interrupt event
occurs when the change in magnetic ADC
Output data ≥ user-programmed delta value.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
18
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
THRESHOLD MODE
In Threshold Interrupt Mode, the most recent magnetic sample
data is compared to the user-selected threshold for each channel.
If the magnetic ADC value is greater than or equal to this thresh-
old, an interrupt event will occur.
DELTA MODE
Delta Interrupt Mode is used in combination with Low-Power
Duty Cycle Mode, where the ALS31313 toggles between an
Active and a Sleep state. In Delta Interrupt Mode, the ALS31313
will remember its last magnetic data sample when entering
LPDCM.
New magnetic data is compared to the original sample every time
the ALS31313 toggles into the active state. If the delta (change)
in magnetic data is larger than the user-selected delta, an interrupt
event will occur.
User-selectable values for threshold and delta share the registers
Z INT Threshold, Y INT Threshold, and X INT Threshold, address
0x03, bits 17:0.
In Threshold Mode, the value in these registers will be considered
a threshold, while in Delta Mode, the value in these registers will
be considered a delta. The ALS31313 may interpret these values
as signed or unsigned based on the Signed INT Enable bit.
SIGNED INTERRUPT THRESHOLD
By default, the value for Signed INT Enable is set to 0, and the
user-programmed value for threshold is unsigned. This will
trigger an interrupt event when applying a positive or negative
magnetic field, causing the absolute value of the magnetic data to
meet or exceed the user-selected threshold.
If Signed INT Enable is set to 1, the value for threshold becomes
signed. This may be used to trigger interrupts on only positive or
only negative magnetic fields that cause the value of the magnetic
data to meet or exceed the user-programmed threshold.
Interrupt threshold for each channel can be programmed indepen-
dently using registers Z INT Threshold, Y INT Threshold, and X
INT Threshold, address 0x03, bits 17:0. The following examples
set an interrupt threshold for the X axis, but the technique also
applies to Y and Z axes.
When Signed INT Enable = 0, the interrupt threshold will be
determined by the equation:
threshold = (INT Threshold + 1) × 25 – 1
When Signed INT Enable = 1, the interrupt threshold will be
determined by the equation:
if X INT Threshold ≥ 0
threshold = (INT Threshold + 1) × 26 – 1
if X INT Threshold < 0
threshold = (INT Threshold + 1) × 26
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
19
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
I2C Interface
I2C is a synchronous, 2-wire serial communication protocol
which provides a full-duplex interface between two or more
devices. The bus specifics two logic signals:
1. Serial Clock Line (SCL) output by the Master.
2. Serial Data Line (SDA) output by either the Master or the Slave.
The ALS31313 may only operate as a Slave device. Therefore, it
cannot initiate any transactions on the I2C bus.
Data Transmission and Timing Considerations
I2C communication is composed of several steps outlined in the
following sequence.
1. Start Condition: Dened by a negative edge of the SDA line,
initiated by the Master, while SCL is high.
2. Address Cycle: 7-bit Slave address, plus 1 bit to indicate
write (0) or read (1), followed by an Acknowledge bit.
3. Data Cycles: Reading or writing 8 bits of data, followed by
an Acknowledge bit. This cycle can be repeated for multiple
bytes of data transfer. The rst data byte on a write could be
the register address. See the following sections for further
information.
4. Stop Condition: Dened by a positive edge on the SDA line,
while SCL is high.
Except to indicate Start or Stop conditions, SDA must remain
stable while the clock signal is high. SDA may only change states
while SCL is low. It is acceptable for a Start or Stop condition to
occur at any time during the data transfer. The ALS31313 will
always respond to a Read or Write request by resetting the data
transfer sequence.
The state of the Read/Write bit is set to 0 to indicate a write cycle
and set to 1 to indicate a read cycle.
The Master monitors for an Acknowledge bit to confirm the
Slave device (ALS31313) is responding to the address byte.
When the ALS31313 decodes the 7-bit Slave address as valid, it
responds by pulling SDA low during the ninth clock cycle.
When a data write is requested by the Master, the ALS31313
pulls SDA low during the clock cycle following the data byte to
indicate that the data has been successfully received.
After sending either an address byte or a data byte, the Master
must release the SDA line before the ninth clock cycle, allowing
the handshake process to occur.
I2C Write Cycle Overview
The write cycle to access registers on the ALS31313 are outlined
in the sequence below.
1. Master initiates Start Condition
2. Master sends 7-bit Slave address and the write bit (0)
3. Master waits for ACK from ALS31313
4. Master sends 8-bit register address
5. Master waits for ACK from ALS31313
6. Master sends 31:24 bits of data
7. Master waits for ACK from ALS31313
8. Master sends 23:16 bits of data
9. Master waits for ACK from ALS31313
10. Master sends 15:8 bits of data
11. Master waits for ACK from ALS31313
12. Master sends 7:0 bits of data
13. Master waits for ACK from ALS31313
14. Master initiates Stop Condition
The I2C write sequence is further illustrated in the timing dia-
grams below in Figure 5.
D6 D5 D4 D3 D2 D1 D0 W AK D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
Device (Slave) Acknowledge Device (Slave) Acknowledge
Start Register Address Register Data0
AK AK
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
Device (Slave) Acknowledge
Register Data1
AK
Device (Slave) Acknowledge Device (Slave) Acknowledge
Register Data2 Register Data3 Stop
AK AK
SDA
SCL
SDA
SCL
Slave Address
Write bit
Device (Slave) Acknowledge
Figure 5: I2C Write Timing Diagram
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
20
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
Customer Write Access
An access code must be sent to the device prior to writing any of
the volatile registers or EEPROM in the ALS31313. If customer
access mode is not enabled, then no writes to the device are
allowed. The only exception to this rule is the sleep register,
which can be written regardless of the access mode. Furthermore,
any register or EEPROM location can be read at any time regard-
less of the access mode.
To enter customer access mode, an access command must be
sent via the I2C interface. The command consists of a serial write
operation with the address and data values shown in Table 16.
Once the customer access mode is entered, it is not possible to
change access modes without power-cycling the device. After
power up, there is no time limit to when the access code may be
entered.
Table 16: Customer Access Code
Access Mode Address Data
Customer Access 0x35 0x2C413534
Read Cycle Overview
The read cycle to access registers on ALS31313 is outlined in the
sequence below.
1. Master initiates Start Condition
2. Master sends 7-bit Slave address
and the write bit (0)
3. Master waits for ACK from ALS31313
4. Master sends 8-bit register address
5. Master waits for ACK from ALS31313
6. Initiate a Start Condition; this time it is
referred to as a Restart Condition
7. Master sends 7-bit Slave address
and the read bit (1)
8. Master waits for ACK from ALS31313
9. Master receives 31:24 bits of data
10. Master sends ACK to ALS31313
11. Master receives 23:16 bits of data
12. Master sends ACK to ALS31313
13. Master receives 15:8 bits of data
14. Master sends ACK to ALS31313
15. Master receives 7:0 bits of data
16. Master sends NACK to ALS31313
17. Master initiates Stop Condition
The I2C read sequence is further illustrated in the timing dia-
grams in Figure 6.
The timing diagram in Figure 6 shows the entire contents
(bits 31:0) of a single register location being transmitted. Option-
ally, the I2C Master may choose to replace the NACK with an
ACK instead, which allows the read sequence to continue. This
case will result in the transfer of contents (bits 31:24) from the
following register, address + 1. The master can then continue
acknowledging, issue the not-acknowledge (NACK), or stop after
any byte to stop receiving data.
Note that only the initial register address is required for reads,
allowing for faster data retrieval. However, this restricts data
retrieval to sequential registers when using a single read com-
mand. When the Master provides a non-acknowledge bit and stop
bit, the ALS31313 stops sending data. If nonsequential registers
are to be read, separate read commands must be sent.
D7 D6 D5 D4 D3 D2 D1 D0 AK D7 D6 D5 D4 D3 D2 D1 D0 AK
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
Slave Address
Read bit
Device (Slave) Acknowledge
Register Data
Device (Slave) Acknowledge
SDA
SCL
D7 D6 D5 D4 D3 D2 D1 D0 AK D7 D6 D5 D4 D3 D2 D1 D0 AK
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1
Slave Address
Write bit
Device (Slave) Acknowledge
Register Address
Device (Slave) Acknowledge
Master Restart
Start
SDA
SCL
1 2 3 4 5 6 7 8 9
D7 D6 D5 D4 D3 D2 D1 D0 NAK
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
Device (Slave) Acknowledge Device (Slave) Acknowledge
SDA
SCL
D7 D6 D5 D4 D3 D2 D1 D0 AK D7 D6 D5 D4 D3 D2 D1 D0 AK
Register Data1 Register Data2 Register Data3
Master Non-Acknowledge
Figure 6: I2C Read Timing Diagram
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
21
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
I2C CRC Byte
The ALS31313 CRC feature is enabled by setting the I2C CRC
Enable bit, Address 0x02, bit 18. When enabled, the ALS31313
read transaction returns one extra byte corresponding the CRC
calculation of that read. The bytes of the I2C read sequence used
for CRC calculation are:
1. 8-Bit Register Address
2. The 7-Bit Slave Address + Read bit (1’b1)
3. The four Data Bytes (32 Bits, MSB rst)
The code is 8 bits in length and will be generated using the
CRC8-ATM (0x83) polynomial:
p(x) = x8 + x2 + x + 1
Table 17: Example CRC Calculation Result
Slave Address Register
Address Data CRC
0xC3 0x28 0x282A2C80 0xEC
0xC3 0x28 0x282A2C00 0x65
I2C Readback Modes
The ALS31313 supports three different readback modes over the
I2C interface, including single, fast loop, and full loop modes.
These modes simplify the process of repeatedly polling the
ALS31313 for magnetic X, Y, Z, and Temperature data.
Readback modes on the ALS31313 are described in Table 18. The
desired readback mode may be entered by setting the appropriate
bits for I2C Loop Mode, address 0x27, bits 3:2.
Table 18: ALS31313 Looping Read Modes
Code
(Binary) Mode Description
‘00’ Single No Looping. Similar to Default I2C.
‘01’ Fast Loop
X, Y, Z, and Temperature fields are looped.
8 MSBs for X, Y, and Z, 6 MSBs for
Temperature are looped.
‘10’ Full Loop X, Y, Z, and Temperature fields are looped.
Full 12-bit resolution fields are looped.
‘11’ Single Same as code 0.
SINGLE MODE
A single write or read command to any register—this is the
default mode and is best suited for setting fields and reading
static registers. If desired, this mode can be used to read X, Y, Z,
and Temperature data in a typical serial fashion, but fast or full
loop read modes are recommended for high-speed data retrieval.
FAST LOOP MODE
Fast Loop Mode offers continuous reading of X, Y, Z, and tempera-
ture values, but is limited to the upper 8 bits of X, Y, and Z, and
upper 6 bits of Temperature. This mode is intended to be a time
efficient way of reading data from the IC at the expense of truncat-
ing resolution. The flow chart in Figure 7 depicts Fast Loop Mode.
Figure 7: Fast Loop Mode
FULL LOOP MODE
Full Loop Mode provides continuous reads of X, Y, Z, and Tem-
perature data with full 12-bit resolution. This is the recommended
mode for applications that require a higher data rate for X, Y, Z,
and Temperature with full resolution. The flow chart in Figure 8
depicts Full Loop Mode.
Figure 8: Full Loop Mode
ALS31313
ALS31313
ALS31313
ALS31313
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
22
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
I2C Addressing
The default I2C address for the ALS31313, in the case where V
A0 and V
A1 are set to VCC, is given by binary 110111[0/1], where the
last bit determines a read or write instruction. Note: Different values for the three MSBs of the address bits (A6, A5, and A4) are avail-
able for factory programming if a conflict with other units occurs in the application design.
Table 19: I2C Slave Address Decoding
Voltage on AD1,
VA1 (× VCC)
Voltage on AD0,
VA0 (× VCC)
4-Bit Code from ADR1
and ADR0 Voltages Slave Address Bits Slave Address
E3 E2 E1 E0 A6 A5 A4 A3 A2 A1 A0
0
0 00001100000 96
0.33 00011100001 97
0.67 00101100010 98
1 00111100011 99
0.33
0 01001100100 100
0.33 01011100101 101
0.67 01101100110 102
1 0111110011 1 103
0.67
0 10001101000 104
0.33 10011101001 105
0.67 10101101010 106
1 10111101011 107
1
0 11001101100 108
0.33 11011101101 109
0.67 11101101110 110
1 1 1 1 1 x x x x x x x
Programmable: 0-127, using
7-bit EEPROM field. Set to
111 at factory.
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
23
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
SENSING ELEMENT LOCATIONS AND NORMALS
Dimensions in Millimeters – Not to Scale
Figure 9: ALS31313 Sensing Element Locations and Normals
The locations of the sensing elements are indicated in Figure 9. The outer elements for the X and Y axes are also referred to as north,
south, east, and west elements. For example, the right-most sensing element on the X axis is defined as XOE.
The normal faces of each element are indicated with an arrow.
Z
X
O
W
XO
E
YON
Yi
Xi
YOS
0.08
0.68
0.68
0.68
0.13
0.68
1
2
3
4
8
7
6
5
2.20
1.50
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
24
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
PACKAGE OUTLINE DRAWING
Figure 10: TSSOP8 (LE) Package Drawing
For Reference Only –Not for Tooling Use
(Reference MO-153AA)
Dimensions in millimeters - NOTTO SCALE
Dimensions exclusive of mold flash, gate burrs, and dambar protrusions
Exact case and lead configuration at supplier discretion within limits shown
6.40 BSC
1.70
B
B
C
C
D
12
8
PCB Layout Reference View
Standard Branding Reference View
1
A06
Date Code
A
Line 1 = 3 characters
Line 2 = 6 characters
Line 1: Pin 1 dot, 3 digit Brand Assignment
Line 2: Logo A, 4 digit Date Code
Bottom Mark: Assembly Lot Number, first 10 digits
equally split into 2 rows
Terminal #1 mark area
Reference land pattern layout (reference IPC7351 SOP65P640X110-8M);
all pads minimum of 0.20 mm from all adjacent pads; adjust as necessary
to meet application process requirements and PCB layout tolerances; when
mounting on a multilayer PCB, thermal vias can improve thermal dissipation
(reference EIA/JEDEC Standard JESD51-5)
Branding scale and appearance at supplier discretion
ActiveArea Depth = 0.36 mm REF
3.00 ±0.10
6.40 BSC 4.40 ±0.10
D
12
8
Branded Face
8X
0.10 C
0.30
0.19
0.65 BSC
0.25 BSC
0.15
0.05
1.10 MAX
SEATING
PLANE
C
0.02
0.09
0.60 1.00 REF
+0.15
-0.10
SEATING PLANE
GAUGE PLANE
A
Automotive Grade, 3-D Linear Hall-Effect Sensor
with I2C Output and Advanced Low Power Management
ALS31313
25
Allegro MicroSystems
955 Perimeter Road
Manchester, NH 03103-3353 U.S.A.
www.allegromicro.com
For the latest version of this document, visit our website:
www.allegromicro.com
Revision History
Number Date Description
March 21, 2018 Initial release
1 April 26, 2018 Corrected address in Table 16 (page 20)
2 May 2, 2018 Editorial updates (page 1, 2, 12, 14, and 17)
3 July 12, 2019 Minor editorial updates
Copyright 2019, Allegro MicroSystems.
Allegro MicroSystems reserves the right to make, from time to time, such departures from the detail specifications as may be required to permit
improvements in the performance, reliability, or manufacturability of its products. Before placing an order, the user is cautioned to verify that the
information being relied upon is current.
Allegro’s products are not to be used in any devices or systems, including but not limited to life support devices or systems, in which a failure of
Allegro’s product can reasonably be expected to cause bodily harm.
The information included herein is believed to be accurate and reliable. However, Allegro MicroSystems assumes no responsibility for its use; nor
for any infringement of patents or other rights of third parties which may result from its use.
Copies of this document are considered uncontrolled documents.