top of page

Motion Control: What is an encoder?

Imagine a robotic arm working on a product line. The arm is moving between positions with great accuracy. How is it work? How does the robot know where correspondent joints are, and what is the best solution for your mobile robot? In this article, I’ll answer these questions by introducing a basic, but extremely important robotics component — an encoder.

MAB Robotics MD80 V2.0 brushless motor controller with integrated absolute encoder (in the center of the board).


What is an encoder?

In the simplest words, an encoder is an electronic device that measures the position and/or velocity of a rotating shaft or linear motion and generates digital (or sometimes analog) signals to represent this information. Encoders are commonly used in applications such as robotics, automated manufacturing, and control systems to accurately track the motion of an actuator or joint and provide feedback to the control system. There are two main types of encoders: absolute encoders and incremental ones, which will be better explained later in the article. The main parameter of the encoder is resolution, which determines the smallest increment of motion it can detect.


How does an encoder work?

The design and construction of an encoder can vary depending on the specific requirements of the application, such as resolution, accuracy, speed, environmental conditions, and cost. However, an encoder is typically built using the following basic components:

  • Sensing element: This is the component that detects the motion of the shaft. The most common sensing elements are optical and magnetic sensors. Optical sensors use light-based techniques, such as reflection or transmission, to detect the motion of a pattern on a rotating disk or a coded strip. Magnetic sensors use magnetic fields to detect changes in the position of the shaft.

  • Encoder disk or coded strip: This is the component that contains the pattern or marks that the sensing element uses to determine the position and/or velocity of the shaft. The disk or strip is usually attached to the shaft and rotates or moves with it.

  • Electronics: These are the components that process the signals generated by the sensing element and convert them into digital signals that can be interpreted by the control system. The processing electronics may include amplifiers, filters, and digital signal processors. Moreover, the encoder has to communicate with the control system. The output (communication) interfaces provide this feature and send data through eg. an SSI, an RS-232, CAN-FD, or Ethernet interface.

An encoder works by measuring the position and/or velocity of a rotating shaft (an encoder disk) or linear motion (a coded strip) and generating digital signals to represent this information. The sensing element detects the motion of the shaft and generates signals based on the position of a pattern or marks on the encoder. The processing and signal conditioning electronics process these signals and the output interface communicates the digital signals to the control system, which uses the information to control the motion, eg. joint on a robotic manipulator. In the MAB robotics encoder, a magnetic sensing method is used. In that method, there is a diametrically magnetized permanent magnet on a shaft (or other rotating elements) and the encoder IC which measures and processes the magnetic field into position. This method allows absolute and high-accuracy positioning of the joint.

An example with ageared actuator, where output encoders play a crucial role in determining the position of the output shaft after start-up. This is because the motor encoder is not sufficient for this task, as the motor often rotates multiple times for a single output shaft rotation. Therefore, output encoders are needed to accurately track the position of the output shaft.

Absolute vs incremental encoders

Absolute and incremental encoders are two types of devices used to measure position and/or velocity. The main difference between the two types of encoders is how they generate and provide information about the position of the shaft.


Absolute encoders can directly provide the current position of the shaft without requiring any previous reference or counting. This is accomplished by using a unique pattern or code, such as a series of binary (or gray) code bits, or a unique magnetic field, that represents the absolute position of the shaft. The sensing element reads the information and converts it into a digital signal that represents the absolute position of the shaft. With that method, we know where a joint is even after the power supply restart. The MAB Robotics encoder is an example of an absolute encoder.


Incremental encoders, on the other hand, provide a relative position measurement by counting the number of pulses or increments generated by the encoder as the shaft rotates or moves. The sensing element generates a pulse for each mark or opening on the encoder disk or coded strip as it passes by. The control system then calculates the position and/or velocity of the shaft by counting the number of pulses. In that method, we have to calibrate an axis if we like to know the accurate position.


The MAB Robotics absolute encoder introduction

MAB absolute output encoder is an extension module to the MD80 V2.0 brushless motor controller. It can be used for position determination on geared motors (after startup), controlling the output shaft directly, or reporting position and velocity values. Works in both center and off-axis scenarios.


Key parameters:

  • Dimensions: 19x12x6mm — small dimensions allow to design of compact solutions.

  • Resolution: 14bit — the value determines the maximum measurement precision of the angular position. 14-bit means that there are 2¹⁴ unique positions per turn. In practice, the accuracy is lower due to noise and is respectively 0.3° for axial, and 1.0° for off-axis configuration.

The universal encoder with the MD80 driver and the CANdle device allows the designing of cost-efficient and compact in-size solutions which are easy to deploy in any mobile robotics application. Furthermore, there are c/c++/python libraries and ROS/ROS2 drivers available which make software development even simpler and faster.

MAB absolute output encoder with off-axis magnetic ring — the extension module to the MD80 V2.0 controller.


Applications for encoders

Encoders are widely used in a variety of applications that require precise control of motion. The MAB robotics solution is an excellent choice for any kind of mobile robot, where accurate feedback on the position and velocity of the joints is important. The possible utilization of the encoder is related to the type of magnet:

  • On-axis solution where we use a diametrically magnetized magnet is perfect for direct-drive motors, for applications where we can provide calibration after each start of the system, and for construction where we don’t care about the starting joint position. The first example is a wheeled platform (with a brushless motor with 1:100 planetary gears on each wheel) — if we can read starting position from GNSS and we use encoders to provide accurate SLAM, then the on-axis encoder is the perfect solution. The good (showing also disadvantages) example of this solution is a 12-DOF quadrupedal legged robot with a 1:6 gear ratio on each actuator — if we run the robot on flat ground then legs (and actuators) are in the same position each time, so we can use hardcoded offsets for encoders. But, what if the robot falls over on uneven terrain and it will be necessary to reboot the system? We have to move the robot to a flat area and reboot it then. This is problematic outside a laboratory, so we need an absolute encoder on the gearbox’s outputs.

An example of on-axis encoder implementation: MAB Robotics robot arms with direct-drive actuators, and haptic feedback.


  • Off-axis solution where we use a diametrically magnetized ring magnet is designed for actuators with a large gear ratio, for applications where we have to know the exact joint position during each start of the system, or for hollow-shaft systems. The perfect example is a cobot with a harmonic 1:50 reducer. In real-world scenarios, the robotic arm shouldn’t be calibrated (manually set on the starting point) for each start. Furthermore, it is good to have a trough hole in an actuator which allows more convenient cable routing — in a 6-DOF manipulator it is really useful. For this purpose we can simply mount the off-axis encoder on an actuator’s output, we know the true absolute position, and there is a field to route cables through the actuator. Similarly, the encoder will solve the quadruped’s starting issue. Of course each robot and actuated joint is different and there isn’t a universal solution. For each type of mobile robot eg. exoskeleton, humanoid, ROV, UGV, drone, or indoor mobile platform we should consider the best solution.

An example of off-axis encoder implementation: MAB Robotics 5dof ultra-light collaborative robotics arm.


Summary

Encoder is an essential component of most robotic applications. The sensor provides accurate information about position and/or velocity. The overall working principle of encoders is pretty clear, but there are a lot of different types of encoders, regarding the principle of operation (eg. optical, magnetic etc.) or output information (absolute and incremental), which makes the selection and implementation process more complicated. The encoder version also depends on an actuator type, if you like to know more about actuators used in legged robots read Legged Robots: Actuators Comparation. I believe that this article will help you understand what type of MAB Robotics encoder will be perfect for your application. Remember, that in case of any uncertainty with the selection or implementation, you can contact the MAB Robotics team.


Co-founder and CTO of MAB Robotics


Comentarios


bottom of page