EUR | USD

Motion Sensing Via Rotary Shaft Encoders Assures Safety and Control

Von Jon Gabay

Zur Verfügung gestellt von Electronic Products


Development of the motor was a huge milestone in civilization’s thrust forward, but it was not until the electronics era that position feedback, acceleration, stress, and velocity became fine-tunable and measurable thanks to electronic sensor technology.

An encoder is a device that senses motion and translates motor speed, direction, and shaft angle into electrical signals. Shaft encoders can be used for any sophisticated rotating machine where status and control are needed. This article discusses rotary shaft encoders and techniques of monitoring and controlling rotating machines. All parts, datasheets, development kits, and training modules referenced in this article can be found at the Digi-Key website.

Early mechanical solutions

Early automotive engine technology was gear synchronized and required little or no external sensing or control. For example, a mechanical distributor was geared to open and close the electrical contact points based on engine crankshaft position. The timing was fixed and more or less hard coded into the geared mechanism. This imposed tighter manufacturing tolerances in order to get more reliable timing and control.

Over time complex designs were tried to optimize that timing based on acceleration and engine RPM. It was only through brilliant solutions like centrifugal and vacuum advance mechanisms that engines were able to perform at higher levels with smoother performance. But while mechanical systems got us started, electronics takes us leaps ahead of what mechanical systems alone can do.

Systems with gears, chains, pulleys, or mechanical couples can still use position switch sensors to perform a vital function. Even with precise absolute or incremental encoding, a system should have re-synchronizing home or registration positions, creating a self-correcting reset that puts the system into a “known” state. If a micro misses some pulses, or if a gear slips somewhere along the way, each error becomes cumulative. In time, the error is so large, the system may become unusable or dangerous. A home or registration re-sync can detect and correct for this type of error.

Several techniques are available to create home and registration position feedback. Mechanical switches are the simplest. A large variety of rod, leaf, roller, spring pull, toggle arm, and other designs are made by a dozen manufacturers for limit detection and actuation verification. These tough and ruggedized mechanical switches are made specifically for pin, plunger, roller, rotary, wobble and other types of actuation (Figure 1).

Tough and rugged mechanical switches

Figure 1: For use as limit or registration indication, tough and rugged mechanical switches are made for pin, plunger, roller, rotary, wobble, and other types of actuation.

Discrete switches like the Omron SS-5GL2T, as well as industrially rugged parts such as the Honeywell GLCA01A1B, are examples of the range of options available here. Honeywell offers training on using rotary switches in industrial applications, available on the Digi-Key website.

Do not discount this technology, especially in the industrial space or if there are safety issues. Even if you use opto-electric, magnetic, or shaft encoders, electronics do occasionally fail. Routing the motor power lines through a mechanical fault detector will ensure the motor does not go into a runaway mode and destroy itself or cause a safety concern.

Optical slot detectors can also be used as registration indicators; with any gear, pulley, or clutch mechanism, all that is needed is a hole through which IR light may pass. Optical slot detectors can have logic outputs that feed directly into a microcontroller, or they can have transistor outputs as well. While typically not high power transistors, a possible advantage of the transistor output photo slot detector approach is that it can be used as part of a catastrophic fault safety interlock, since the up to 200 mA current capacity can control a safety relay which, in turn, can cut off power to a motor.

Absolute encoders

Regardless how you re-synchronize, the rotating plane is the place for the sensor that can indicate velocity, acceleration, and position. For precise status and control, a shaft encoder is coupled to the shaft. Shaft encoders come in a variety of technologies. The top level distinction is if they are absolute or incremental.

An absolute encoder outputs a parallel data bus value that indicates its exact location relative to a known starting point on the encoder. The encoder is keyed to the shaft, and the binary read of the digital value is the exact position of the shaft (Figure 2).

An 8-bit encoder

Figure 2: Absolute encoding is ideal for reading the exact position at any point in time. An 8-bit encoder yields 1.4° resolution.

Usually, a disadvantage of this type of encoder is that they are expensive and hard to interface to because the number of wire connections is directly proportional to the number of resolution bits. This means that larger parallel cables are needed and either a lot of I/O on a processor, or discrete logic (or both).

This issue can be solved through the use of serial interfaces like SPI. For example, consider the binary absolute encoder from Avago Technologies (Figure 3). The AEAT-60xx series of magnetic angular based rotary detectors uses a serial data stream and clock to be able to read out the absolute position in digital form. This simplifies the cabling and the interface since fewer I/O lines and less processor power (or logic) is needed to extract the desired information.

The Avago AEAT series

Figure 3: The Avago AEAT series magnetic encoders provide absolute position information via SPI interfacing. Resolutions up to 12 bits provide up to 0.0879° of resolution.

The AEAT-6012-A06, for example, can resolve 0.0879° in a 12-bit version. The AEAT-6010-A06 is a 10-bit version that has .35° resolution. Contactless sensing is another benefit of this family and the lack of any type of needed adjustment makes it ideally suited for a buried application where once employed, no adjustments can be made. The -40° to +125°C rating makes this ideal for rugged applications as well.

Another example of an absolute encoder comes from CUI Devices with its AMT203-V capacitive-based absolute encoder. With a capacitive sense encoder, an AC field transmitter sends a signal to the metal rotor as it turns. The metal pattern on the rotor causes a predictable and repetitive signal that can be converted to pulses.

Advantages of this type of encoder include lower cost, since they are easier to assemble. The capacitive sensors do not get corrupted by airborne particulate matter and there is less mass, thus backlash is minimized and moment of inertia is reduced. There are also no LEDs to fail. They can also use less power since you do not need to light up multiple LEDs and detectors.

An advantage of absolute encoders is that they can achieve higher resolution. It is not uncommon to find 10-, 12-, and even 16-bit encoders providing a finer 65535 resolution count per revolution.

CUI Devices’ MT203 Absolute Rotary Encoders are featured in a training module and in a video that illustrates how they are used and how they work. A particularly nice feature is that there is a zero point that can be set via an SPI interface. This eliminates the need for mechanical setpoint assemblies.

Incremental encoders

The most common forms of rotary shaft encoders are incremental. Instead of parallel data points representing absolute position, a series of pulses lets you count a relative angular displacement from a referenced start position. These are less complicated and often less expensive than most absolute rotary shaft encoders, and can typically run at much higher speeds.

Like absolute rotary shaft encoders, the incremental units need to couple to a physical shaft, either mechanically, optically, magnetically, or capacitively. Unlike most absolute encoders, incremental encoders will use bi-phase encoding (also called quadrature encoding).

With quadrature encoding, two digital lines overlap at 90° offset (Figure 4). This provides four counts per pulse in an inherent gray code format. A simple logic circuit can be used to control either discrete counter blocks or top interface to a microcontroller timer/counter peripheral.

Another advantage of quadrature encoders is that they automatically can tell you direction. If Signal A leads Signal B, you are in clockwise rotation. If Signal B leads Signal A, you are rotating counter-clockwise.

A nice example of an incremental capacitive shaft encoder solution comes from CUI Devices with its AMT100 series modular encoders. The AMT10X-V KIT shows how a low cost, fairly high resolution system can be implemented using capacitive sense technology. Using a high-frequency reference signal, capacitive changes can be sensed.

The quadrature waveform

Figure 4: The quadrature waveform can be decoded directly by a microcontroller’s I/O, or drive counter logic directly to indicate incremental movements.

 The capacitive technology has some benefits compared to optical shaft encoders. First it can be made smaller, as an optical disk is not needed. This can be important since many rotating mechanical systems are very space constrained.

A nice feature of the AM102 and AM103 series is that they have selectable resolutions. A 4-bit DIP switch on the assembly allows setting up to 16 different programmable step resolutions, which makes a single part able to work in multiple locations and applications.

A CUI Devices training module on the characteristics and uses of the capacitive incremental rotary shaft encoders and video showing how the electromechanical assembly can mount to standard motor shaft can be found on the Digi-Key website.

Optical incremental

The most common and competitive rotary shaft encoders are optical incremental, with many manufacturers offering a diverse portfolio of devices. With optical incremental rotary shaft encoders, a position reference disk blocks or passes IR light. A two-channel overlapping pattern is created by offsetting the emitter/detector pairs (Figure 5).

A single detector ring with offset emitter/detector

Figure 5: A single detector ring with offset emitter/detector pairs can generate the quadrature waveform directly. Note the “I” channel registration indicator.

 A nice low-cost PCB mountable optical shaft encoder is the 62P22-H4 from Grayhill, which provides 16 positions per revolution and a switch in a single package. A training module on the Grayhill optical encoding devices, uses, and interfaces can be found on the Digi-Key website.

It should be noted that not every rotary shaft encoder application is a big, heavy machine. A volume control for a car stereo, for example, can take advantage of a part like this to provide stepped up and stepped down volume control without the static and noise that a trim pot can experience as it ages or gets dusty.

A mechanical rotary encoder like the Panasonic EVE-GA1F1724B is a good choice for the example above. Ideally suited for audio and video applications, the mechanical switches are easy to interface and well-matched for low cost, occasional use direction-sensed quadrature encoding.

For heavy machinery and ruggedized high-end applications, well-engineered optical rotary shaft encoders like the Bourns ENS1J-B28-L00256L may be a good choice. This part has 256 steps per revolution on a vertical through-hole-based, PCB-mounted assembly. It has a ball-bearing option that supports up to 3,000 RPM and is made for long life and endurance (up to 200 million revolutions). It is also available with wire leads for remote mounting inside mechanical assemblies.

Summary

From microscopically implemented gyros to giant telescope turrets, the ability to monitor and control the speed, direction, and shaft angle of rotating machines is of vital importance to their use. This article has discussed the characteristics, implementation, and performance of rotatory shaft encoders and has presented examples of absolute, incremental, and optical incremental parts. For more information on the products discussed here, use the links provided to access product pages on the Digi-Key website.

Haftungsausschluss: Die Meinungen, Überzeugungen und Standpunkte der verschiedenen Autoren und/oder Forumsteilnehmer dieser Website spiegeln nicht notwendigerweise die Meinungen, Überzeugungen und Standpunkte der Digi-Key Electronics oder offiziellen Politik der Digi-Key Electronics wider.

Über den Autor

Jon Gabay

Über den Verlag

Electronic Products

Das Magazin "Electronic Products" und "ElectronicProducts.com" dienen Ingenieuren und technischen Führungskräften, die für die Entwicklung elektronischer Geräte und Systeme verantwortlich sind.