Incremental rotary encoders translate rotational movement into electrical signals for more precise control of automated systems. Unlike absolute encoders that measure angle, incremental encoders produce alternating high and low pulses as rotation occurs, which may indicate speed and direction of the rotating object.
Applications include computer mouse wheels, flow meters, knobs, wheel speed sensors, stepper motor feedback for detecting missed steps, and brushed DC motor sensors for automotive windows, sunroofs, seats, and mirrors.
When only one direction of rotation needs to be measured, use an encoder with a single toggling output similar to Single Output.
If clockwise versus counterclockwise movement must be distinguished, use two encoder outputs with a phase offset. Then the order of 2-bit states describes the direction turned. From 2-Bit Quadrature Output it can be observed that as each complete pole pair passes by the encoder that there are 4 unique output conditions.
Using a 90° phase offset (“quadrature”) maximizes the timing margin between each state, which prevents errors in the presence of mechanical tolerance, sensor mismatch, and signal jitter.
A variety of technologies are available to enable incremental encoding:
Magnetic encoders can be inexpensive, compact, and extremely reliable for these reasons:
Increments Per Revolution
Based on the pole count of the magnet selected for the encoder, it produces a different number of output states per revolution, and there are tradeoffs to consider.
Motor systems that use closed-loop speed control require sufficiently fast feedback depending on the allowable speed tolerance, the possible changes in load torque, and the inertia of the motor. Since each pole pair has 4 possible output states, the output data rate can be used to determine what is needed from the encoder. Rotational speed is usually stated in RPM (Revolutions Per Minute) and can be used as shown in Equation 1 to help determine the system requirements.
In slow-turning applications, the primary concern is usually the number of degrees between each increment. If, for example, an event every 10° is needed, an encoder with 36 output states per revolution would be suitable. Since each magnetic pole pair results with 4 states, the required magnet would have 18 poles, or 9 pairs.
The downside of higher encoder resolution is that it requires tighter mechanical and sensor tolerances. As the pole pitch reduces, the magnetization depth of the ring magnet also decreases. This limits the magnitude of the field observed by the sensor. Latches with a low operating threshold are ideal for this purpose as they are able to detect weaker magnets and help reduce quadrature misalignment. However, if a magnet with too many poles is used, then the Hall-effect latch may not have sufficient input to trigger properly. Placing the sensor closer to the magnet may resolve this issue, but mechanical tolerances could prohibit this adjustment.
An alternative approach is to turn the magnet at a higher speed than the object being tracked using a gear ratio. In this way, the accuracy and resolution can be increased without sacrificing magnetic field strength. For instance, where one transition state occupies 10° of rotation at a 1:1 ratio, a 2:1 gear ratio means the same pole transition could now represent 5°. In either case is important to consider that for the sensors to detect each pole during transit, the sensor sampling rate should be greater than 2 times the number of poles per second, and ideally at least 3 times higher. Additional information is found in the DRV5012 Ultra-Low-Power Digital-Latch Hall-Effect Sensor data sheet Application section.
Using Linear Hall Sensors
Linear Hall sensors, such as DRV5055, may also be used for incremental encoding. Unlike latched devices which toggle about a predefined magnetic threshold, linear Hall sensors produce an analog output voltage proportional to magnetic flux density.
Using two sensing elements 90° out of phase results in sine and cosine outputs which may be used for absolute angle encoding (using a 2-pole magnet). More information on this method is found in the resources in Related Technical Resources.
|This device is offered in SOT-23, X2SON, DSBGA, and TO-92 packages with a maximum operating threshold of 3.8 mT
|A high sensing bandwidth of 30 kHz allows this device to be versatile in most rotary applications. Package variations accommodate most applications. The device operates from a 2.5-V to 5.5-V supply.
|Low power consumption with pin-selectable bandwidth in a low-profile X2SON package. The maximum operating threshold is 3.3 mT.
|Higher sample frequency results with a higher average current. The device operates at 1.65-V to 5.5-V supply. Selectable sample rates are 20 Hz and 2500 Hz. This rate should be at least twice the expected input frequency.
|Wide supply range of 2.5 V to 38 mV simplifies inclusion of this device in most designs
|This device has a typical supply current of 3 mA and a sensing bandwidth of 20 kHz. Automotive and commercial grades are available.
|This device has a low 2-mT maximum threshold which helps improve overall quadrature accuracy
|Operating voltage is limited to 2.5 V–5.5 V with a typical ICC current of 2.3 mA. Typical sensing bandwidth is 30 kHz. Automotive and commercial grades are available.
|2D Hall-effect latch with dual outputs for direct monitoring of latch behavior with a low maximum threshold of 1.4 mT
|2D latches offer design flexibility with a minimal component count. With direct outputs, the microcontroller needs to calculate speed and direction.
|2D Hall effect latch with dual outputs converted to speed and direction with a low maximum threshold of 1.4 mT
|Similar to TMAG5110, but dual outputs are formatted for speed and direction. This is particularly useful for rotary encoding, but does not provide latch behavior which can be useful in correcting alignment for optimal quadrature alignment.
|Analog output linear Hall-effect sensor available in SOT-23 and TO-92 packages
|This device is best suited for absolute angle encoding. Multiple sensitivity options provide flexibility in sensor placement.
|Reducing Quadrature Error for Incremental Rotary Encoding Using Two-Dimension
|A design guide for 2D Hall latches which discusses incremental encoding and how to design for optimal quadrature alignment
|3 common design pitfalls when designing with Hall-effect sensors – and how to avoid them
|A discussion about common magnetic encoder problems and how possible solutions to improve performance.
|A hands-on demonstration of rotary encoding using both TMAG5110 and TMAG5111 using both 10 and 20 pole magnets.
|Small-Footprint Sunroof Motor Module Reference Design
|Automotive Hall Sensor Rotary Encoder
|Inductive Sensing 32-Position Encoder Knob Reference Design using the LDC0851
|Inductive Sensing 32-Position Encoder Knob Reference Design using the LDC1312 or LDC1314
|Absolute Angle Measurements for Rotational Motion Using Hall-Effect Sensors
|An application brief which discusses angle sensing further and provides links and details to other related content
|TI Precision Labs - Using Hall-effect position sensor for rotary encoding
|A helpful video covering rotary encoding with Hall-effect sensors.
|TI Precision Labs - Understanding 2D Hall Sensor Latches
|A helpful video covering 2D Hall-effect Latches.
|TI Precision Labs - Magnetic sensors: System calculation for precise angle measurements
|A helpful video covering angle measurement with linear Hall-effect sensors.