Cover image for Encoders


Motor encoders are used in robotics to measure the position of a motor shaft.

Robot Tips pots Potentiometers How it works

15 January 2023 by Kevin McAleer | Share this article on

Motor encoders are used in robotics to measure the position of a motor shaft.

They are typically small, cylindrical devices that contain a series of magnets that interact with a sensor to produce an electrical signal. This signal is then used to calculate the amount of rotation of the motor, which in turn can be used to control the speed and position of the robot.

Encoders are very important in robotics and are used to ensure precise movement and control of robotic systems.

The different types of motor encoders

There are a variety of different types of motor encoders available. Common types of encoders include incremental encoders, absolute encoders, optical encoders, magnetic encoders, and hall effect encoders. Incremental encoders measure the amount of shaft rotation with pulses while absolute encoders measure the absolute position of the shaft. Optical encoders use light to measure the amount of rotation of a shaft. Magnetic encoders measure the rotational movement of a shaft using a magnet and hall effect encoders use a sensor to measure the rotation of a shaft. Each type of encoder has its own advantages and disadvantages that should be considered when selecting the appropriate encoder for a specific application.

Hall effect encoders

Hall effect encoders are sensors that use the Hall effect to detect the angular position of a rotating object. The Hall effect is a phenomenon in which a voltage is created when a magnetic field is exposed to a current carrying conductor. In a Hall effect encoder, a magnet is attached to the rotating object, and a Hall effect sensor is placed near it. As the object rotates, the magnetic field changes and the Hall effect sensor detects these changes. The output of the sensor is then used to measure the angular position of the object.

Optical encoders

Optical encoders are devices that use light and patterns to measure the position or rotational speed of a component. They do this by using an LED light that shines onto an encoder wheel, which is a wheel with lines, slits, or transparent and opaque sections on it. This wheel is connected to the component, so when the wheel moves, the patterns are detected by a photodetector. The photodetector then sends electrical signals to a digital output device which can convert the signals into digital data. This data can be used to measure the position and/or speed of the component.


This video shows how encoders work (you can skip too the chapter using the chapter markers).

Did you find this content useful?

If you found this high quality content useful please consider supporting my work, so I can continue to create more content for you.

I give away all my content for free: Weekly video content on YouTube, 3d Printable designs, Programs and Code, Reviews and Project write-ups, but 98% of visitors don't give back, they simply read/watch, download and go. If everyone who reads or watches my content, who likes it, helps fund it just a little, my future would be more secure for years to come. A price of a cup of coffee is all I ask.

There are a couple of ways you can support my work financially:

If you can't afford to provide any financial support, you can also help me grow my influence by doing the following:

Thank you again for your support and helping me grow my hobby into a business I can sustain.
- Kevin McAleer