Panel-Mount Encoders – Understanding the Basics
Contributed By DigiKey's North American Editors
2023-12-05
This article will dive into the electrical engineering realm of panel-mount rotary encoders. These devices are essentially transducers that convert rotational displacement into electrical signals for the host system. The encoder's mechanism involves generating pulses during rotation, allowing a control device to discern crucial information such as direction, position, count, or speed.
Panel-mount encoders are vital to a variety of industries. They can be found across industries such as defense and aerospace, medical, consumer goods, test/measurement, and more. The versatility of panel-mount encoders allows them to play a role in various applications like cockpit controls, studio mixers and audio equipment, electronic lab and instrumentation setups, motor drives, etc. Because of their versatility, panel-mount encoders are the leading choice for crafting precise control interfaces. This article will explore the fundamental workings of panel-mount rotary encoders, shedding light on key specifications and considerations.
Panel-Mount Encoder Basics
When it comes to rotary encoders, panel-mount encoders earn their name simply from the fact that they are physically affixed to panels. These devices primarily serve human interface functions, exemplified by the volume knob on a stereo. Their role is to empower users to manipulate various system parameters, acting as the conduit between the user and the system processor.
Comparing panel-mount rotary encoders to potentiometers, another panel-mounted component with a similar rotational-to-signal translation function, reveals distinct advantages. Panel-mount encoders boast tighter manufacturing tolerances, resulting in heightened accuracy and consistency. Additionally, their digital outputs align seamlessly with contemporary digital devices, eliminating the need for analog-to-digital converters, thereby reducing costs and potential errors. However, for those curious about potentiometers, Same Sky article, "The Complete Guide to Potentiometers," offers a comprehensive exploration of these similar, yet different components.
Panel-Mount Encoder Specs and Considerations
Several key specifications and considerations warrant further attention when delving into the specifics of panel-mount rotary encoders. PPR, or pulses per revolution, stands out as a defining metric, quantifying the encoder's resolution by indicating the number of square wave pulses generated per 360-degree rotation (Figure 1). Resolution can also be provided in CPR (counts per revolution), calculated as PPR multiplied by 4, representing the number of quadrature state changes per revolution. For a comprehensive understanding of these metrics, Same Sky article titled "What’s the Difference Between an Incremental Encoder’s PPR, CPR, and LPR?" is a valuable resource.
Figure 1: Pulses are measured as waveforms from one identical point to the next. (Image source: Same Sky)
Detents, an integral feature, contribute to user feedback by audibly "clicking" into place during shaft rotation. Specified in terms of clicks per 360-degree rotation, detents serve to prevent unintended rotations and provide a tactile indication at specific degrees of shaft movement.
Adding to the encoder's functionality, the push switch feature introduces an additional user input signal. By pressing down on the encoder shaft, a simple SPST switch is actuated. This feature is commonly employed to select functions to be manipulated by turning the encoder knob.
Rotary encoders leverage square waves with two channels offset by 90 electrical degrees to discern direction. The relative phase shift between these channels enables the detection of the leading channel, providing a reliable indicator of the rotational direction (Figure 2).
Figure 2: Detection of the leading signal allows for the monitoring of clockwise or counterclockwise rotation. (Image source: Same Sky)
In the pursuit of enhanced resolution, many applications opt for quadrature state changes, where one cycle encompasses a transition from low to high before going back to low on both channels. This approach effectively increases the counts per revolution, elevating the encoder's resolution and precision in tracking rotational movements. It is a clever strategy to extract more detailed information from each revolution, optimizing the encoder's performance in diverse applications.
| |||||||||||||||||||||||||||||||||||||||||
Figure 3: Quadrature truth table. (Image source: Same Sky)
Connecting panel-mount encoders to microcontrollers involves creating a circuit where the microcontroller sources current, offering a path to V+, while the encoder provides a path to ground. This collaboration forms a complete circuit, enabling seamless communication between the encoder and microcontroller. The term "open collector" is also used interchangeably with "sinks," indicating that the collector of the output transistor is external to the unit. It is all about establishing effective electrical pathways for data exchange.
It is also important to distinguish that microcontrollers use different methods for counting:
- Pulses on one channel: This straightforward method assigns 1 count per pulse, simplifying the counting process for applications where a basic count is sufficient.
- Pulses on two channels: Leveraging both channels effectively doubles the count, offering a more detailed and accurate representation of the encoder's movement.
- Quadrature state changes: Opting for quadrature state changes takes advantage of the four counts per cycle, providing even higher resolution and precision in tracking rotational shifts.
Mechanical vs. Optical
In general, panel-mount encoders operate using two primary technologies: mechanical and optical.
Operating as an array of switches, mechanical encoders rely on a code wheel with contacts evenly spaced along its outer edge. Concurrently, a stationary contact is affixed to the encoder chassis (Figure 4). As the code wheel rotates, it sequentially establishes and interrupts contact with the code wheel contacts, one at a time. This cyclic engagement and disengagement in the circuit produces voltage pulses, a mechanism fundamental to the conversion of rotational movement into electrical signals.
Figure 4: Internal workings of a mechanical encoder. (Image source: Same Sky)
It is crucial to highlight that mechanical encoders, essentially functioning as an array of mechanical switches, necessitate debounce circuitry and programming to ensure a usable output. While in an ideal scenario, a switch would exhibit clear on-off states, the real-world introduces complications. Switches can experience hover or bounce between these states, leading to a distorted signal. This bouncing phenomenon, known as switch bounce, can be erroneously interpreted as extra pulses, introducing inaccuracies into the system.
To mitigate switch bounce, debounce circuitry comes into play (Figure 5). This circuitry is designed to "square up" the output, ensuring that the signal accurately represents the intended on/off states without the interference of bouncing or hovering effects. This attention to signal integrity is critical for reliable and precise performance in the context of mechanical encoders.
Figure 5: Debounce circuitry helps to “square up” a mechanical encoder’s output. (Image source: Same Sky)
On the other hand, optical encoders consist of three fundamental components: a light source, a light detector, and a code wheel. The following is a breakdown of their operation:
- Light Source: This component emits light.
- Light Detector: Positioned opposite the light source, the detector senses the emitted light.
- Code Wheel: Placed between the light source and detector, the code wheel has evenly spaced slits. These slits alternately allow light to pass through or block it.
The operational cycle involves the light source shining through the slits in the code wheel. The detector registers changes in light intensity based on whether the slits permit or obstruct the light. Internal circuitry responds by enabling or disabling the output, contingent on the detection or blocking of light. This mechanism allows optical encoders to effectively translate positional information into electrical signals.
Figure 6: Internal workings of an optical encoder. (Image source: Same Sky)
To wrap up this comparison, mechanical encoders are cost-effective and versatile with a broad voltage range. Yet, they need debounce circuitry for a reliable signal and have a shorter life cycle. On the flip side, optical encoders are generally pricier but boast a longer life cycle. They deliver a cleaner output signal without requiring debounce circuitry. Moreover, in precision applications, optical encoders can offer higher resolutions.
Conclusion
Panel-mount encoders will continue to find a place in various user interface applications across a range of industries. A comprehensive grasp of available encoder technologies, essential specifications, and design considerations becomes pivotal for optimal device selection. Same Sky provides an array of both mechanical and optical panel-mount encoders, catering to virtually any design requirement. In addition to their panel-mount encoders, Same Sky capacitive-based AMT rotary encoders deliver accuracy and durability not found in other encoder technologies.
Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of DigiKey or official policies of DigiKey.