Low Power and Turns-Count Sensing with the A1339 Angle Sensor IC

Download PDF Version

By Trevor Buys and William Wilkinson,
Allegro MicroSystems, LLC


Numerous applications ranging from industrial automation and robotics to electronic power steering (EPS) and motor position sensing require monitoring the angle of a rotating target. The design of any successful angle measurement system for such applications needs to be based on the user’s requirements. This application note covers the use of the Allegro A1339 angle sensor IC for battery-powered applications (automotive or non-automotive) that require the sensor to operate in multiple mission modes.

Automotive Systems Requiring Sensor Operation Even in Key-Off Conditions

Certain automotive angle-sensing applications require the ability to track angular position even in key-off conditions. In the key-off state, most voltage regulators in the vehicle are not operational. Therefore, sensors that must operate in the key-off state are often powered directly from the car battery (12 V). Examples of such applications include, but are not limited to:

Often, these motor and seat-belt systems are geared down so that multiple angle sensor rotations need to be counted by the angle sensor IC. For this reason, the A1339 includes a circuit that counts the rotational turns of a magnet. When sensor ICs are connected to the car battery, they must also have low-power modes that enable efficient battery usage.Very often, a sensor IC must track the turns-count (TCs) of the magnet even when the vehicle is in the key-off state. The A1339 monitors and keeps track of TCs, even when set to Low Power Mode. This will ensure that the system can
accurately and consistently track steering wheel position or seat-belt extension when using the A1339 in a key-on or key-off mode. Traditionally, this key-off requirement is achieved by a combination of relatively complex mechanical and electronic components. The A1339 can reduce systemlevel complexity and eliminate many system components by performing both the absolute angle measurement and the tracking of TCs, while maintaining low battery power consumption (100 μA) at vehicle key-off.


Figure 1: Turns Counting Example
Figure 1: Turns Counting Example


Overview of A1339

The A1339 is Allegro’s fastest 360° angle sensor IC and provides contactless high-resolution angular position information based on magnetic Circular Vertical Hall (CVH) technology. It has a
system-on-chip (SoC) architecture that includes a CVH front end, digital signal processing, SPI, ABI/UVW, and PWM outputs. It also includes on-chip EEPROM technology for flexible end-ofline
programming of calibration parameters. The A1339 is ideal for automotive applications requiring 0° to 360° angle measurements, such as electronic power steering (EPS), rotary shifters (PRNDLs), seat-belt tensioners, and throttle systems.

The A1339 angle sensor IC device is designed to support a wide variety of applications and has multiple operating modes, organized by output format or by power consumption.

Via the SPI or Manchester interface, the A1339 has the ability to report either the direct angle output (12/15-bit digital angle output reported over the selected output interface) or a Turns Count
(TC) output, which is a quantized tracking count of the number of turns made by the magnetic target in either the clockwise or counter-clockwise direction.

Delineated by power consumption, the A1339 features a Normal Power Mode, a Low Power Mode, and an ultralow power Transport Mode.

The A1339 was designed for battery-powered applications where the task of tracking the target’s rotation can be delineated into one of two mission modes. The first mission mode can be described as an angle tracking mode, where the sensor IC tracks the output at full bandwidth and provides its measure of the angular output at full resolution (this is Normal Power Mode on the A1339 ).

The second mission mode (Low Power Mode) can be considered as a turns-tracking mode. In this mode, the sensor IC does not need to track the angle at full resolution—it is sufficient to track
the Turns Count value of the target. The size of one turns-count unit can be preselected via EEPROM setting in the A1339 to be either 180 or 45 degrees. The A1339 tracks –2048/+2047 turns
or –512/+511 when defining a turn as either 45° or 180° respectively. The turns count value is stored in a primary serial register which can be read at any time via SPI or Manchester protocol (outside
of LPM). The value is stored as a 12-bit 2’s complement signed value.

Normal Power Mode

In Normal Power Mode, the IC draws maximum current (nominally 12 mA—see Normal Mode Supply Current specification in the A1339 datasheet for more details) to operate its full feature set, and updates the angle output register at the fastest rate as selected by the internal averaging setting (ORATE) (see the A1339 datasheet for more details).

Low Power Mode

In Low Power Mode (LPM), the IC does not provide angle readings over the SPI, PWM, UVW/ABI, or Manchester interfaces, the majority of the analog and digital circuitry are powered down, and the sensor IC periodically cycles between two different states. Most of the time, the sensor IC is held in a lower power quiescent current “sleep” state (ICC < 100 μA). In this state, power is removed from the analog transducer and no angle measurements take place.

Periodically, the sensor IC will enter an “awake” state to monitor the magnet position via a reduced power signal path and update the turns count (ICC ≈ 7 mA). The sleep-time of the Low Power Mode operation can be adjusted by the user based on the application, by programming on-chip EEPROM memory. Figure 2 shows average ICC in μA versus the programmable sleep-time (tSLEEP).

The SPI inputs pins (MOSI, SCLK, CS) are used as the primary arbiter of LPM. When all three pins are brought low for at least 60 μs, the sensor IC will enter Low Power Mode (“awake” state). The ABI and PWM pins are tristated and a majority of the digital and analog circuitry is powered down. If conditions [BT1] are met, the sensor IC will enter the “sleep” state and periodically cycle between the “sleep” and “awake” states to monitor the position of the magnet and update turns tracking.

The WAKE pin is used to externally force the “awake” [BT2] state. When the WAKE pin is brought above a programmable threshold, the sensor IC will enter its turns tracking “awake” state and monitor position. Likewise, if an excessive RPM is observed, the sensor IC will enter its “awake” state to prevent missed magnetic rotations.

Transport Mode

Certain battery-powered applications require especially low power consumption from the IC during long-term storage and/or transportation (for example, when a new car is being transported from the assembly line to the dealer). To meet this need, the A1339 features an ultralow power mode called Transport Mode. Transport Mode is used to put the A1339 into a deep-sleep state for ultralow power consumption. When in this mode, the sensor IC does not track angle or turns counts. Typically, the IC consumes 60 μA of current per die when in Transport Mode.

Figure 2: A1339 Average ICC versus tSLEEP
Figure 2: A1339 Average ICC versus tSLEEP



The A1339 offers a WAKE input pin. This pin is intended to wake up the device from Low Power Mode sleep state. This WAKE pin can be used in special cases where the motor acceleration is too high, and the system cannot afford to wait for the entire Low Power Sleep time to expire. When the voltage threshold on the WAKE pin exceeds VWAKE(HI), the IC will wake up from its sleep state and begin to track turns continuously. This pin is usually connected to a filtered version of the back-EMF voltage signal from the motor being used. This allows fast feedback from the motor to the Turns-Count circuit, in the case of high acceleration events. A symbolic waveform representation of the back EMF for a Star 3-phase motor, as well as a sample filtering circuit, are shown below.

The A1339 will leave awake state from its sleep state when the WAKE pin voltage rises above VWAKE(HI) and return once the voltage drops below VWAKE(LOW).

Figure 3: Back EMF of Star, 3-Phase Motor
Figure 3: Back EMF of Star, 3-Phase Motor
Figure 4: SPICE Simulation Example for Filtered BEMF Signal
Figure 4: SPICE Simulation Example for Filtered BEMF Signal


The WAKE pin high threshold level, as well as the hysteresis between the Low and High values, are programmable via EEPROM. This allows the entrance and exit of LPM sleep to coincide with a specific RPM value, across a range of motor designs and rectification circuit implementations. The values are controlled through two EEPROM fields, the “wp_thres” which adjusts the threshold value of the VWAKE(HI) and “wp_hys” which controls the hysteresis between VWAKE(HI) and VWAKE(LOW).

When combined the hysteresis and threshold EEPROM fields allow the configurations shown in Table 1 to be selected.


Table 1: WAKE pin threshold and hysteresis control bits

 Field Name EEPROM (Shadow) Location Size (bits)  Default  Function
wp_hyst 0x1B (0x5B) [9:8] 2  012  Selects voltage difference between VWAKE(HI) and VWAKE(LOW). 50, 150, 300, 400 mV options.
wp_thres   0x1B (0x5B) [7:4]    3  0002   Selects VWAKE(HI) threshold. 


Table 2: WAKE Pin Threshold Settings

Wake Threshold Wake Hysteresis Threshold (rising)
Hysteresis Voltage
Bit2 Bit1 Bit0 Bit1 Bit0
0 0 0 0 300 50 250
0 0 0 0 1 300 150 150
0 0 0 1 0 300 300 100
0 0 0 1 1 300 400 100
0 0 1 0 0 350 50 300
0 0 1 0 1 350 150 200
0 0 1 1 0 350 300 100
0 0 1 1 1 350 400 100
0 1 0 0 0 400 50 350
0 1 0 0 1 400 150 250
0 1 0 1 0 400 300 100
0 1 0 1 1 400 400 100
0 1 1 0 0 450 50 400
0 1 1 0 1 450 150 300
0 1 1 1 0 450 300 150
0 1 1 1 1 450 400 100
1 0 0 0 0 500 50 450
1 0 0 0 1 500 150 350
1 0 0 1 0 500 300 200
1 0 0 1 1 500 400 100
1 0 1 0 0 550 50 500
1 0 1 0 1 550 150 400
1 0 1 1 0 550 300 250
1 0 1 1 1 550 400 150
1 1 0 0 0 600 50 550
1 1 0 0 1 600 150 450
1 1 0 1 0 600 300 300
1 1 0 1 1 600 400 200
1 1 1 0 0 650 50 600
1 1 1 0 1 650 150 500
1 1 1 1 0 650 300 350
1 1 1 1 1 650 400 250


Transitioning Between Modes

The A1339 is designed so that it can transition between Normal Power Mode (NPM), Low Power Mode (LPM), and Transport Mode (TM) based on various system parameters. Similarly, the sensor IC will transition between the two different operating states of LPM based on magnetic rotation rate, or exceeding the WAKE pin threshold (VWAKE(HI)). This ensures that valuable TC information is not lost due to the target rotating too quickly while the sensor IC is in Low Power Mode.

To better understand this, consider a few scenarios based on the state diagram shown in Figure 5, as well as the information shown in Table 3. Assume that the sensor IC is powered up and in NPM. It would therefore be able to provide all the functionality as described under NPM in Table 3. Now, if the controller decided to save power and enter LPM, then it would have to satisfy the conditions outlined in branch A of Figure 5.

The sensor IC first enters LPM in the awake state, if the conditions outlined in branch B are met, then the sensor IC will enter its sleep state and automatically alternate between awake and
sleep based on the programmed tSLEEP. Conversely, the sensor IC can be externally forced to its awake state by meeting the prerequisites of branch C.

At any time during LPM (in awake or sleep state), NPM may be reentered by bringing any of the SPI input lines above VIL.

In a similar manner, the system can navigate between NPM, LPM, and TM, by meeting the appropriate conditions as specified by branches A, B, C, D, or E of the state diagram.

Figure 5: Operating Mode State Diagram
Figure 5: Operating Mode State Diagram


Table 3: Mode States

Normal Power Mode
Low Power Mode
Transport Mode
Angle Sensor

Available Communication

  • SPI 4-wire
  • PWM
  • Manchester Code 

Available Communication

  • Not Applicable

Available Communication

  • Not Applicable

Available Angle Output Data:

  • 12-bit absolute angle value
  •  Turns-Count (TC) 

Available Angle Output Data:

  • Turns-Count (TC)*

*TC values are tracked in LPM, but available for read-only upon exiting LPM. 

Available Angle Output Data:

  • Not Applicable 
 14 mA nominal per die

100 μA nominal per die*

*ICC varies based on programmable
sleep time. 

 ≈60 μA nominal per die

Enabling Transport Mode

Transport Mode is similar to LPM but without a periodic wake-up to track turns. This allows the sensor IC to remain connected to a live voltage source while consuming the least possible current.

Transport Mode must be enabled prior to bringing the SPI lines low. This is accomplished by writing a 6 to the “special” operation field within the CTRL serial register (0x1E).

Once enabled, the next time the sensor IC detects a LPM request (indicated by the SPI lines being brought low), it will enter Transport Mode.

Table 4: A1339 Control Serial Register

Addressed Byte (MSB)  Addressed Byte (LSB)  LSB Address 
15 14  13 12 11 10 9 8 7 6 5 4 3 2 1 0
 0x1E ctrl  special   0 cls   slw   cle   initiate_special   0x1F  


User-Programmable Features for Low Power Mode and Turns Counting

The A1339 allows significant programmability of its LPM functionality, such as the size of a turn, the sleep time during LPM, and maximum angle delta between turns. The EEPROM fields controlling this are shown in Table 5.

The “lpm_wake_threshold” specifies the maximum angle delta between “wake” states. In conjunction with “lpm_cycle_time”, these fields specify a maximum RPM for which the sensor IC will enter its “sleep” state (SAWAKE(TH)). By default this is set to ≈100 RPM.


If the measured RPM exceeds this value, the A1339 will not reenter its “sleep” state and will instead continuously monitor turns, until the RPM drops below the threshold with default values.


Table 5: User-Programmable Features for Low Power Mode and Turns Counting

Field  EEPROM Address [bits]
Default  Value Function 

 0x1D (0x5D) [23]  (1) Turns are incremented/decremented every 180 degrees 
Turns are incremented/decremented every 45 degrees 
 tpmd   0x1D (0x5D) [21]  0  Allows Transport Mode to be used (still must be envoked via the CTRL register) 
Disables Transport Mode 
 lpmd  0x1D (0x5D) [20]
 0  0 Enables LPM 
 1  Disables LPM 
lpm_cycle_time   0x1D (0x5D) [17:12]   (001011)2
–  Low power cycle (sleep) time in 8.192 ms increments. Follows the equation [(n+1) × 8 ms]. Default is 98.3 ms. 
lpm_wake_threshold   0x1D (0x5D) [10:0]   (01010011111)2
–  Angle difference equating to wake velocity
threshold. Also used in Normal Power Mode to decide entry to LPM. 12-bit angle resolution. 0-180 degrees. Default of 59°. 


Maximum RPM for a Given Sleep Time

In LPM, the A1339 periodically exits sleep mode to monitor the magnetic positon and update the turns count. This sleep period determines the final LPM current consumption, as well as the maximum RPM for which turns can be safely tracked.

Determining the angular distance traveled by a magnet while the sensor IC sleeps is governed by a kinematic equation, shown in Equation 1.

θ = 6ν × t + ½ × αt2 (1)

where θ is maximum desired angular travel, set via the “lpm_wake_threshold” field,

ν is speed in RPM,

t is sleep time in seconds, and

α is maximum acceleration expected at a given ν (in °/s2).

Figure 6 shows the maximum RPM for a given sleep time, assuming the default 59° maximum angle deflection per sleep period (lpm_wake_threshold). This default angle deflection was chosen such that the A1339 will exit sleep mode at 100 RPM when the default sleep times are used. Since this value is EEPROM programmable, it may be adjusted to a slightly less conservative value. When adjusting this value, Allegro recommends setting it no larger than 90° (the TCW warning flag will assert if greater than 135° of magnet deflection is detected over one sleep period). This provides a safety margin to 180 degrees, after which relative directional changes are ambiguous.

From Figure 6, it can be seen that the maximum expected acceleration places a limit on the length of sleep time which may be used. This is due to the α term within Equation 1 becoming the
dominant factor at high acceleration rates. Even with an initial velocity of 0 RPM, a constant acceleration rate of 6000°/s2 for 150 ms will result in greater than 59° of angular deflection. Therefore, it is not just the maximum RPM, but also the maximum acceleration which determines the length of sleep time, and thus the final LPM ICC value.

Figure 6: Maximum RPM versus Sleep Time
Figure 6: Maximum RPM versus Sleep Time


When designing a system, it is often more useful to think in terms of RPM and current instead of RPM versus Sleep time. When plotted in this manner, the maximum RPM has a relatively linear relationship with LPM current consumption. This is shown in Figure 7 and numerically in Table 6.


Figure 7: Maximum RPM versus LPM Current
Figure 7: Maximum RPM versus LPM Current


Table 6: Max RPM and Approximate Average ICC Values. 6000 °/s2 acceleration

Max RPM Average ICC (μA)
1200 220
600 140
400 110
220 90
100 75



In addition to offering all of the standard benefits of non-contact magnetic angle sensing, the A1339 also offers the ability to operate in stringent battery-powered (including automotive) systems that require low power consumption. Lastly, with its ability to track Turns Counts in both normal and low-power mode, the A1339 is ideally suited to simplify complex mechanical designs for tracking magnetic target position under key-off conditions without compromising the overall robustness and reliability of the system.




Copyright ©2018, Allegro MicroSystems, LLC
The information contained in this document does not constitute any representation, warranty, assurance, guaranty, or inducement by Allegro to the customer with respect to the subject matter of this document. The information being provided does not guarantee that a process based on this information will be reliable, or that Allegro has explored all of the possible failure modes. It is the customer’s responsibility to do sufficient qualification testing of the final product to insure that it is reliable and meets all design requirements.