What is an Encoder?

In this video and article, you will learn about Encoders. An Encoder is a device that is used in many industries to provide feedback.

An encoder is a device that is used in many industries to provide feedback.

In the most basic terms, an encoder, regardless of the type, which we will cover later, senses “position”, “direction”, “speed”, or “counts”.

Encoders will use motion, under a variety of technologies, and translate it into an electrical signal.

That signal is then sent back to a controlling device, such as a PLC, and is interpreted, meaning scaled, to represent a value that will then be used within the program.

Encoder Types and Technologies

Some of the technologies involved in encoders are:

– Magnetic

– Mechanical

– Resistive

– Optical

“Optical” is the most widely used encoder motion translating technology.

There are different types of encoders such as “Absolute” and “Incremental”. We will describe those in greater detail in a future article.

Encoder Working Principle

For now, an example of an incremental, optical type encoder uses a beam of light that passes through a disk that has opaque lines in a specific pattern, somewhat like the spokes of a wheel.

On the other side of the disk is a photo sensing device that will interpret the light, based on the pattern on the disk, picture a shutter, blocking and unblocking the light.

The pulses of light are then converted to an electrical signal to be sent back to the processor, through the encoder’s output.

Encoders have a wide range of uses which include “closed-loop” applications such as “servo or VFD control”, “measuring”, and “counts”.

Here are some examples of processes that may use an encoder.

Encoders for Controlling the Speed of a VFD

For VFD control, you may be running a pump, on a VFD, to fill a tank full of a liquid. You are requesting a certain speed and want to verify that the pumps VFD is at the requested speed.

An “encoder” on the VFD may be used for feedback of speed.

Encoder in Measuring Processes

Next, let’s give an example for a “measuring” process.

In this application, you will need to cut some aluminum product to a particular size. You are passing a long roll, meaning hundreds of feet, of the aluminum sheet through a cutting mechanism.

You need to determine the amount of aluminum fed, so that you can cut the sheets to the proper size that will be used in a separate manufacturing process.

 An encoder, attached to the conveyor and reading the material that is feeding through your cutting assembly, will indicate the length of material that has been fed since the last cut. That feedback can then be used to adjust the cutting blade to sever the length required.

Encoder in Counting Applications

For an example of “counts”, consider this process. You have a conveyor line that has bottles running on a conveyor. They are counted by a photo-eye sensor when entering the assembly. They have a cap with an aluminum, tamper-proof foil on top that needs to adhere to the bottle.

Once the foil is sealed, the bottle will then move down the conveyor line and verified that it exited the cap sealing assembly via an exit photo-eye sensor.

Some of the requirements for this station are:

– The same number of bottles that enter the assembly must exit in a “predetermined time frame”.

– The bottle must not remain in front of an “entrance” or “exit” sensor.

– The bottle must not be exposed to the inductive sealer longer than a predetermined amount of time.

– You must make this assembly flexible enough to handle many types of bottles and entrance and exit sensor placement.

Consider a prescription bottle, easy right? No handles, just a bottle that is a standard size.

Now consider an antifreeze bottle with a somewhat small cap and a very large handle.

How in the world are you going to meet the requirements for the machine and remain flexible?

If you put a pill bottle in, yep, easy right? Bottle in, seal, bottle out, no sensors blocked. If any of the requirements fail, bottle in, seal, tips over and isn’t counted out, machine halts and alerts an operator of a malfunction.

How about the “antifreeze” bottle?

Bottle in, cap passes in front of an entrance sensor, bottle counted, then the handle; the system faults because it sees a blockage at the entrance. How do you tell the machine that this is expected behavior? “An encoder” of course, and a “selector switch” for a setup mode.

To set up, insert your product, in this case, the antifreeze bottle. You make sure to feed cap first and it must contain a foil.

Your program reads an entrance on the sensor and records “an encoder reading” as well as determines that this is a “cap” and records that fact. Your program then reads another entrance and determines that this is not “cap” and must be some other acceptable part of the bottle, possibly a handle.

The single bottle continues down the line where the exit sensor is triggered. At that point, you again record the encoder value. You now have an encoder count that registered at the entrance and exit.

In the code, you subtract the entrance from the exit and you have a bottle “count”. You now know precisely how long it will take that bottle to move through the system, meeting the “must enter and exit” in a predetermined timeframe, in this case, encoder counts.

You have also made the flexibility aspect of different types of bottles as well as being able to place the entrance and exit sensors any reasonable distance apart.

When back in run mode, the code knows that there’s a handle to ignore when it comes into the process and doesn’t fault the machine.

You register the encoder at each bottle entrance and predetermine when the bottle must exit.

If the bottle doesn’t exit the machine in a timely manner, which is based on your projection and the current encoder count, the machine faults.

This is a great use of an encoder that is fully configurable. Count in, count out, subtract, done. 

Don’t miss the next lesson where we are going to discuss incremental and absolute encoders.

Thank you so much for reading, watching and adding your voice to this automation conversation.

Do you have any questions or feedback? Let us know in the comments below. 

The RealPars Team
By Mondi Anderson

By Mondi Anderson

Automation Engineer

Posted on Mar 4, 2019

By Mondi Anderson

Automation Engineer

Posted on Mar 4, 2019

5 Actionable Tips for Getting a PLC Programming Job with NO Experience

5 Actionable Tips for Getting a PLC Programming Job with NO Experience

In this blog post, you’ll learn about the mindset that helped me getting a PLC programming job with NO experience. This is my personal experience as someone who searched for a job in this field and as an employer who reviews resumes and interviews candidates for a variety of projects. So let’s get started!

ABB PLC | An Introduction to ABB AC500 PLCs

ABB PLC | An Introduction to ABB AC500 PLCs

There are many manufacturers of Programmable Logic Controllers that are used in the Automation industry. One of the leading PLC manufacturers in the world is ABB PLC. ABB offers a full line of industrial PLC controllers and safety PLC controllers with a wide range of...

Transmitter Explained | Types of Transmitters

Transmitter Explained | Types of Transmitters

In this article, we’re going to introduce you to a very important device used in process control today – the Transmitter.First of all, let’s talk about the term transmitter because it has more than one definition. In the Telecommunications world, a Transmitter is a...

Learn how to program PLCs, install and wire industrial devices, and at the same time purchase them online.

Have questions? 

[email protected]

+31 10 316 6400

Mon - Fri  8:30 am to 5:30 pm (CET)

Rotterdam Science Tower, Marconistraat 16,
3029AK Rotterdam, Netherlands







PLC Certificate



Sign in



Contact Us

© 2020 RealPars B.V. All rights reserved.

Created with coffee and tea in Rotterdam.