• Save
Programmable Magnetic Rotary Encoders
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Programmable Magnetic Rotary Encoders



To introduce the magnetic rotary encoders for accurate angular measurement over a full turn of 360˚

To introduce the magnetic rotary encoders for accurate angular measurement over a full turn of 360˚



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Welcome to the training module on Austriamicrosystems Programmable Magnetic Rotary Encoders . This training module introduces the magnetic rotary encoders for accurate angular measurement over a full turn of 360 º.
  • Linear Hall sensors generate a DC output voltage proportional to the strength of an applied magnetic field and can be used for high-resolution angle sensors when placed near a diametrically magnetized magnet. The rotating magnet generates a sinusoidal waveform, one full wave per revolution. However, this type of setup can be used only for a limited angular range because the output voltage (in relation to the rotation angle) is ambiguous at angles >90° in both directions from the zero crossing point. In practice, only the "quasi-linear" range up to about ±45° can be used for accurate angle measurements. This setup—being very sensitive to the position of the sensor relative to the magnet and to unwanted external magnetic fields—requires tight mechanical tolerances and, in many cases, magnetic shielding.
  • Making angular measurements over a full revolution requires additional measures. Austriamicrosystems' approach uses four Hall elements, rather than one, and spaces them equally underneath a diametrically magnetized rotating magnet to generate four sinusoidal waveforms, each phase shifted by 90° from its neighbor, as shown in the equation. By using differential amplification of two opposite sensors (H1 - H3) and (H2 - H4) is to generate two 90 º phase shifted signals with double amplitude. These two analog signals are digitized by ADCs and processed further in the digital domain. A CORDIC (coordinate rotation digital computer) transforms sine and cosine information into angle and magnitude information.
  • The AS5040 is a contactless magnetic rotary encoder for accurate angular measurement over a full turn of 360°. It is a system-on-chip, combining integrated Hall elements, analog front end and digital signal processing in a single device. To measure the angle, only a simple two-pole magnet, rotating over the center of the chip, is required. The magnet may be placed above or below the IC. The absolute angle measurement provides instant indication of the magnet’s angular position. This digital data is available as a serial bit stream and as a PWM signal.
  • The encoders' robustness and contactless measurement principle make them a suitable choice for applications where electromechanical, inductive, optical, or other measurement principles are either too unreliable or too expensive. The sensors can be used for contactless rotary position sensing and brushless DC motor commutation in different industrial applications. For automotive applications, they can be used to sense steering wheel position and gas pedal position, or to control headlight position and power seat position. They also can replace traditional optical encoders or potentiometers.
  • Here is the block diagram of the AS504x encoder. The integrated Hall elements are placed around the center of the device and deliver a voltage representation of the magnetic field at the surface of the IC. The Sigma-Delta Analog / Digital Conversion and a Coordinate Rotation Digital Computer (CORDIC) provide the angle and the magnitude of the Hall array signals. The DSP is also used to provide digital information at the outputs MagINCn and MagDECn that indicate movements of the used magnet towards or away from the device’s surface. The AS504x senses the orientation of the magnetic field and calculates a binary code. This code can be accessed via a Synchronous Serial Interface (SSI). In addition, an absolute angular representation is given by a Pulse Width Modulated signal at PWM pin. The AS5040 has an internal 3.3V Low-Droput voltage regulator to allow the device to operate at either 3.3V or 5V supplies. In addition, the various incremental output modes can be selected by programming the OTP mode register bits in the AS5040. The AS5045 does not support these two functions.
  • There are two important parameters, resolution and accuracy, which are not necessarily related to each other. Resolution is the smallest angle step, given as the number of uniformly continuous steps per revolution. Resolution is mainly determined by the resolution of the ADC(s) and the calculation depth of the CORDIC. Accuracy is the deviation between the indicated angle and the actual angle. Several parameters affect the accuracy and eventually define the quality of an encoder, including phase error of the Hall signals, matching error of Hall sensors and amplifiers, nonlinearity of the ADC, and nonlinearity due to misalignment of the magnet. The AS504x encoder series is using ΔΣ ADCs, which have excellent ADC linearity. These magnetic Hall sensors also use parallel signal processing, which keeps the phase error negligible, even at high rotational speeds.
  • The Daisy Chain mode allows connection of several AS504x’s in series, while still keeping just one digital input for data transfer. This mode is accomplished by connecting the data output to the data input (PROG) of the subsequent device. An RC filter must be implemented between each PROG pin of device n and DO pin of device n+1, to prevent the encoders to enter the alignment mode, in case of ESD discharge, long cables, not conform signal levels or shape. Using the values R=100R and C=1nF allow a maximum CLK frequency of 1MHz on the whole chain. The serial data of all connected devices is read from the DO pin of the first device in the chain. The PROG pin of the last device in the chain should be connected to VSS. The length of the serial bit stream increases with every connected device.
  • The AS504x provides a pulse width modulated (PWM) output, whose duty cycle is proportional to the measured angle. The PWM frequency is internally trimmed to an accuracy of ±5% (±10% over full temperature range).
  • An analog output may be generated by averaging the PWM signal, using an external active or passive low pass filter. The analog output voltage is proportional to the angle: 0°= 0V; 360° = VDD5V. Using this method, the AS5040 can be used as direct replacement of potentiometers. This figure show an example of a simple passive low pass filter to generate the analog output. R1 should be ≥4.7k Ω to avoid loading of the PWM output. Larger values of Rx and Cx will provide better filtering and less ripple, but will also slow down the response time.
  • After power-on, programming the AS504x is enabled with the rising edge of CSn with PROG = high and CLK = low. 16 bit configuration data must be serially shifted into the OTP register via the PROG-pin. The first “CCW” bit is followed by the zero position data (MSB first) and the mode setting bits. Data must be valid at the rising edge of CLK. After writing data into the OTP register it can be permanently programmed by rising the PROG pin to the programming voltage VPROG. To exit the programming mode, the chip must be reset by a power-on-reset. The programmed data is available after the next power-up.
  • The alignment mode simplifies centering the magnet over the chip to gain maximum accuracy and XY-alignment tolerance. This electrical centering method allows a wider XY-alignment tolerance than mechanical centering as it eliminates the placement tolerance of the die within the IC package. Alignment mode can be enabled with the falling edge of CSn while Prog = logic high. The Data bits D9-D0 of the SSI change to a 10-bit (AS5040) or 12-bit (AS5045) displacement amplitude output. A high value indicates large X or Y displacement, but also higher absolute magnetic field strength. The magnet is properly aligned, when the difference between highest and lowest value over one full turn is at a minimum. The alignment mode can be reset to normal operation mode by a power-on-reset.
  • Typically the magnet should be 6mm in diameter and ≥2.5mm in height. Magnetic materials such as rare earth AlNiCo, SmCo5 or NdFeB are recommended. The magnet’s field strength perpendicular to the die surface should be verified using a gauss-meter. The magnetic field Bv at a given distance, along a concentric circle with a radius of 1.1mm (R1), should be in the range from ±45mT to s75mT. The best linearity can be achieved by placing the center of the magnet exactly over the defined center of the IC package. The magnet may be placed below or above the device. The vertical distance should be chosen such that the magnetic field on the die surface is within the specified limits. The typical distance “z” between the magnet and the package surface is 0.5mm to 1.8mm with the recommended magnet (6mm x 2.5mm).
  • Thank you for taking the time to view this presentation on “ Programmable Magnetic Rotary Encoders ” . If you would like to learn more or go on to purchase some of these devices, you may either click on the part list link, or simply call our sales hotline. For more technical information you may either visit the Austriamicrosystems site, or if you would prefer to speak to someone live, please call our hotline number, or even use our ‘live chat’ online facility.

Programmable Magnetic Rotary Encoders Presentation Transcript

  • 1. Programmable Magnetic Rotary Encoders
    • Source: Austriamicrosystems
  • 2. Introduction
    • Purpose
      • To introduce the magnetic rotary encoders for accurate angular measurement over a full turn of 360 º.
    • Outline
      • Hall Effect Rotary Encoders Basics
      • Overview of the AS504x Programmable Magnetic Rotary Encoder
      • Basic operations
    • Content
      • 15 pages
  • 3. Hall Effect Rotary Encoders
  • 4. Hall Sensor to Measure up to 360 º where α is peak amplitude α is magnet rotational angle relative to the sensor
  • 5. AS5040/5 Magnetic Rotary encoder
    • Contactless high resolution rotational position encoding over a full turn of 360 degrees
    • Complete system-on-chip
    • Flexible system solution provides absolute and PWM outputs simultaneously
    • User programmable zero position
    • Failure detection mode for magnet placement monitoring and loss of power supply
    • Serial read-out of multiple interconnected the devices using Daisy Chain mode
    • Ideal for applications in harsh environments due to contactless position sensing
    • No calibration required
  • 6. Applications
    • Industrial applications:
      • Contactless rotary position sensing
      • Robotics
      • Brushless DC motor commutation
      • Power tools
    • Automotive applications:
      • Steering wheel position sensing
      • Gas pedal position sensing
      • Transmission gearbox encoder
      • Headlight position control
      • Power seat position indicator
    • Office equipment: printers, scanners, copiers
    • Replacement of optical encoders
    • Front panel rotary switches
    • Replacement of potentiometers
  • 7. Block Diagram AS5040 only AS5040 only Mode AS5045 only
  • 8. Accuracy of the Encoders
    • Resolution
      • AS5040: 10bit (0.35 º = 1024 position)
      • AS5045: 12bit (0.0879º = 4096 position)
    AS5040 AS5045
  • 9. Daisy Chain Mode RC Filter
  • 10. Pulse Width Modulation (PWM) Output PWM Output signal of AS5040 PWM Output signal of AS5045
  • 11. Analog Output
  • 12. Programming the AS504x
    • Zero Position Programming
      • An OTP option that simplifies assembly of a system, as the magnet does not need to be manually adjusted to the mechanical zero position.
      • Once the assembly is completed, the mechanical and electrical zero positions can be matched by software.
    • Repeated OTP Programming
      • A single OTP register bit can be programmed only once (from 0 to 1).
      • Unprogrammed bits in subsequent programming cycles.
    • Non-permanent Programming
      • By overwriting the OTP register is to re-configure the device.
      • This procedure is essentially a “Write Data” sequence without a subsequent OTP programming cycle.
  • 13. Alignment Mode
    • Under normal conditions, a properly aligned magnet will result in a reading of less than 32 (AS5040) or 128 (AS5045) over a full turn.
    • Stronger magnets or short gaps between magnet and IC may show values larger than 32 (AS5040) or 128 (AS5045).
  • 14. Choosing the Proper Magnet
  • 15. Additional Resource
    • For ordering the AS504x rotary encoders, please click the part list or
    • Call our sales hotline
    • For additional inquires contact our technical service hotline
    • For more product information go to
      • http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5040
      • http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5045