What is an incremental encoder ?

Incremental encoders are rotary automation components (angle sensors).
They are the first link in a chain of automation.
They exist in several technologies :

  • In optical technology (the most common)
  • In magnetic technology
  • In inductive technology

Whatever the technology used, they provide an incremental signal processed by a PLC or a computer (processing unit) by counting up/ counting down the pulses generated by the incremental encoder.
The incremental encoder is mechanically integral with the drive axis (motor; machine tool axes; cable sensors; robots, etc.).
The output signals are pulse trains generally on 6 channels for counting up/down and 12 (6 + 6) if they are also used for phase commutations (U; V; W) of electric motors.




Hollow shaft encoder



through shaft encoder


How does an incremental encoder work : technologies


Encoder section


Optical encoder

Optical incremental encoders, as the name suggests, work with optical technology. The centerpiece of the reading system is the glass or polycarbonate code disc. On the disc are engraved very precise and equidistant slots which define the number of pulses (resolution) per revolution of the encoder. A light emitting component, mostly an LED (Light Emitting Diode) emits light in the infrared i.e. with a wavelength of 850 nm and a sensitive receiver infrared light.
The receiver is an electro-optical component of very high integration. For example, there are photodiodes, op amps, Schmitt triggers, comparators, regulators, etc. on a 5 × 5 mm chip. The diaphragm, essential part which is often stuck on the, has a function of “guide of the light” to channel the photons towards the receiving photodiodes.

Magnetic incremental encoders

There are two well-known principles for magnetic reading:

  • Reading by central magnet
  • Reading by magnetic disc
Incremental encoders with a central magnet

A cylindrical samarium – cobalt (SmCo) or neodymium (NdFeB) magnet placed in the center of the incremental encoder drive axis is made up of 2 poles (north and south).
When the magnet turns, it causes a potential difference across the Hall cells. This signal (potential difference) is sinusoidal and is equivalent to one sinusoid per encoder revolution (0 to 360°).



Encoder with central magnet


Advantages of the magnetic reading :

  • The encoder can whitstand high temperatures (more than 120°C)
  • Simple conception
  • Easy assembly and adjustment
  • Lower requirement for precision
  • Possible miniaturization
  • operation in harsh environments (electric motors)
  • Low cost

Inconvenients of the magnetic reading :

  • Low precision
  • Low resolution (1024 points per revolution)
  • High jitter due to the interpolation of the single sinusoidal signal for an encoder turn
Incremental encoder with magnetic disc

This principle works like the optical encoder but the technology used is magnetic.




Magnetic disc


The magnetic disc is divided into several magnetic zones (64 north and south pole pairs).

  • Better accuracy on duty cycles and on phase shift. Less than the optical disc but significantly better than the principle with the central magnet
  • A single processing PCB instead of 2 on the optical reading
  • Possibility of high resolution (up to 65536 points per revolution)

Inductive incremental encoder

Inductive encoders are remarkable encoders for their robustness, their resistance to temperature, vibrations, accelerations and their precision.
The technology used to read a target (disc) is the induction.
The target made of ferromagnetic conductive materials (copper) is etched on a substrate (the most common is FR4).
Inductive technology has been known since 1833, stated by Heinrich Emil LENZ, Russian physicist. But the essential elements of this type of encoder are the differential coils traversed by a high frequency current which produce in the space surrounding its ends a variable electromagnetic field.
When the conductive track of the engraved disc enters this zone, it will be the seat of eddy currents, and according to the law of LENZ, these currents oppose the cause which gave them birth and therefore create an induction in the contrary direction to the induction of the coils, which leads to a reduction in its self-induction coefficient.


Standard inductive disc
Inductive differential disc



With regard to the 2 photos above, two reading principles are possible:

    1. Standard reading which functions as an inductive proximity switch
    1. Differential reading is best suited for inductive encoders, it guarantees better immunity to electromagnetic disturbances generated by inductive external loads such as motors, drives, solenoid valves etc. Differential reading works according to the well-known differential transformer principle, which has long proven itself with LVDT (Linear Variable Differential Transformer) sensors.
    1. A high frequency sine wave (1 – 2 MHz) travels through the primary coil of the transformer and generates an electromagnetic field. The two secondary coils are arranged in a perfectly symmetrical differential configuration with respect to the primary coil. The alternating electromagnetic field generated by the primary coil induces in each of the secondary coils a voltage according to the law of Michael Faraday (1791-1867 English physicist, chemist): (E = -dΦ / dt).

Each technology has its advantages and disadvantages

Characteristics and accuracy of output signals

We distinguish 2 signals called channel A (in yellow) and channel B (in green). For a clockwise rotation direction (clockwise with view on the axis of the encoder), we note that the 1st rising edge of signal B (green) rises before the 1st rising edge of A (yellow). It’s thanks to this order that the signal processing electronics can know the direction of rotation of the encoder. This is called the discrimination of rotation direction.[/vc_column_text][/vc_column]

A, B, Z signals on an oscilloscope

Output signals:

Encoder / Treatment
NPN output
Encoder / Treatment
PNP output
Encoder / treatment
Push-Pull output

The transistored output stages are very rarely used any more. They are replaced by specific integrated circuits with protections against reverse polarity; overvoltages; short circuits; excessive temperatures and allow very high output frequencies, on the order of MHz.

Output with integrated circuits :



Line driver output


Push-pull output


Frequently asked questions

What is a duty cycle ?

On the diagram below, the duty cycle corresponds to T. The duty cycle is expressed in %.
If T = 100% then T/2 = 50% and corresponds to twhi on the diagram.
The maximum tolerance is +/- 10%, i.e. twhimax = 60% and twhi mini = 40%. Or A Arel = 20%

What is a phase shift?

The phase shift is the position of channel A with respect to channel B. This corresponds to the value TAB on the diagram above. he theoretical value of T AB is 90 ° electrical. The tolerance for the TAB value is 25%. Then TAB max = 112.5 ° and T AB mini = 67.5 °


Incremental signals


What is jitter?

In theory, channels A and B should have exactly the same duty cycle. In reality, there is a gap, called “jitter”. The jitter comes from many factors: type of encoder (quality and placement of the disc or magnet), rotation speed, encoder resolution, etc.




Jitter on a oscilloscope


What is an output frequency?

The output frequency of an incremental encoder corresponds to the resolution multiplied by the speed of rotation of the encoder shaft.
F = R * RPM (F = frequency; R = Encoder resolution; RPM = encoder rotation in revolutions per minute
Example: for a resolution encoder of 5000 points per revolution and which rotates at a speed of 3000 rpm
5000×3000 = 15,000,000 points per minute i.e. 15,000,000 / 60 = 250,000 Hz = 250 kHz

How to check the good working condition of an encoder?

A minimum of equipment is required: everyone has at least one multimeter in their toolkit.
A very important value is the consumption without load of the encoder, and for most recent design encoders, this consumption is between 30 and 90mA.
If the incremental encoder consumes 0 mA, there is a good chance that the polarity reversal protection diode is defective but before that it must be checked whether the supply voltage (5 to 32 volts DC, see encoder characteristics) is present at the input of the encoder. On machine-tools, the encoder power cables are subjected to oil vapors and lubricants which are often the cause of cable hardening. It is this stiffening of the cable that causes it to break and very often flush with the connector.
If the encoder were to consume several amps, there is a good chance that a TVS has amorced and has short-circuited. In this case I advise to send it back to the factory for in-depth expertise. If a TVS has short-circuited, the cause must be investigated on the site.

This first test carried out (5 to 32 Vdc OK, consumption without load between 30 and 90 mA OK) and still no output signal, we strongly recommend looking directly at the encoder output to be sure to eliminate all the problems that could be linked to the transmission cable between encoder and PLC.
Check the output signals.
For this test we can use several types of instruments: The multimeter; the oscilloscope or simply an LED with a resistor in series.

What is an absolute encoder

Absolute encoders exist in different variants but there are two main families

  • Absolute single-turn encoders
  • Absolute multiturn encoders

General

Absolute encoders are, like incremental encoders, automation components whose main function is to provide a signal, or rather an absolute code, to a central unit (computer, programmable controller, etc.) in order to be able to position an angular or linear axis.

What is the difference between an incremental encoder and an absolute encoder?

In terms of the mechanical interface, there are practically none, apart from the dimensions for the absolute multiturn encoders (there are still a number of additional components to count the number of turns according to the technology used). All current manufacturers are striving to develop absolute encoders with the same dimensions as incremental encoders.

In terms of the electronic interface, everything changes. An absolute encoder generates a code on x bits according to its angular position and according to n turns for multiturns encoders.

The remarkable difference between an incremental encoder and an absolute encoder is in the process management of the machine automation. Unlike the incremental encoder, the absolute encoder does not require, during power-up, a cycle for referencing the different axes of a machine. When a machine equipped with absolute encoders is energized, it is immediately ready to produce whatever the mechanical position of its axes. This saves precious time when starting up a production unit.

Single-turn absolute encoders

As their name suggests, they only provide angular information on 360 mechanical degrees

  • In magnetic technology
  • In optical technology (the most common)
  • In inductive technology

Whatever the technology used, they provide an absolute code which will be processed by an automaton or a computer (processing unit).
The absolute encoder is mechanically integral with the drive axis (motor; machine tool axes; cable sensors; Robots etc.)
The output codes can be in parallel, in series, or in Fieldbus.

The parallel code

The GRAY code, also called Reflected Binary (RB) or Reflected Binary Code (RBC)

It is the most common code in parallel connection because it has an undeniable advantage over binary code and BCD.
In the late 1940s, the physicist Frank Gray, employed in BELL’s R&D department, was faced with a problem of coding reliability. On 03/17/1953, the company BELL TELEPHONE LABOR INC filed the patent US2632058A of which Frank Gray is designated as inventor.
The peculiarity of the GRAY code is that 1 single bit changes at each state regardless of the number of bits delivered by the encoder, unlike pure binary code where when the most significant bit changes state, n least significant bits change also state.
(See table below).

Binary code

On the diagram above we can clearly see this drawback. Passing from the decimal value 0 to the value 31 we see that 5 bits change state at the same time which is a very important problem with an angular encoder. Machine vibrations and more or less jitter can lead to very large reading errors. This is the main reason for the gradual abandonment of the Binary code in the manufacturing of absolute angular encoders with parallel output. To overcome this defect, the binary absolute encoders were often proposed with an additional signal called LATCH and which made it possible to read the code without ambiguity.

BCD code

This is the binary code encoded in decimal.

During the 1960s and 1970s, some encoder manufacturers manufactured made encoders with an output code in BCD. This code was very practical and especially used with position displays with NIXIES tubes on DIVISIONS (position control system) as for example in sawmills.
An example of BCD code below:

The serial code, also called Synchronous Serial Interface

The parallel codes are certainly very fast. But the lengths of cables between the sensor and the acquisition system are limited to around thirty meters.
But the SSI link has an undeniable cost advantage.
Regardless of the number of bits to be transmitted, a cable of 6 conductors (2 for the clock; 2 for the data and 2 for the power supply) is sufficient whereas for the parallel link, 26 conductors (typically 24 for the data and 2 for the power supply).
Unfortunately the SSI does not allow any dialogue between the encoder and the PLC. The transmission is unidirectional, ie only in the direction of the encoder towards the PLC. It is therefore not possible to monitor the correct functioning of the encoder, such as for example the temperature, the frequency, the logic levels of the signals, etc.
It is to overcome these drawbacks that we have developed fieldbuses.

Below is an example of a SSI frame, read on a screen :

Fieldbuses

Generalities

The bus is the abbreviation for “Binary Unit System”. This system is used within a network for the transmission of data between encoders (sensors) and actuators. This data exchange takes place via a common transmission path, but the individual data transmissions are clearly separated from each other.

Fieldbus systems created in the 1980s are essential in the industry today. As an integral part of complex machines and systems, they are mainly used in production automation. But the fieldbus is also used in building automation (home automation) as well as in automotive technology.

Using the field bus online and in series, sensors (encoders; proximity switches; photoelectric cells, etc.) and actuators (solenoid valves; relays; motor contactor, etc.) are connected to programmable logic controllers (API) or also Industrial Programmable Logic and control and processing computers. The fieldbus therefore supports the rapid exchange of data between the various components of the system, even over long distances. Since the fieldbus only communicates via a single cable, the wiring effort has been considerably reduced compared to the wiring of parallel sensors and encoders. A fieldbus operates in so-called “master-slave mode”. While the master is responsible for controlling the processes, the slave stations process the individual subtasks.

Advantages of the fieldbus

Efficiency: Thanks to reduced wiring (only one cable), the start-up times for installations and machines are shortened
Reliability: The reliability of communications between sensors and the central unit is increased thanks to a wiring reduced to the minimum. Short links increase both the availability and reliability of systems.
Immunity to electromagnetic noise: in particular with analog values, fieldbuses offer increased protection against electromagnetic noise.
Uniformity: Thanks to standardized bus protocols and standardized connection technology, encoders from different manufacturers can be used and interchanged more easily. This means that all the individual components do not necessarily have to come from the same manufacturer and it also facilitates the supply in case of urgent maintenance in a shutdown factory due to a faulty encoder.
Flexibility: Even system and machine extensions and modifications can be carried out quickly and easily with fieldbuses. In this way, systems can be variably adapted to new requirements and reused to improve the performance of machines and systems.

Disadvantages of the fieldbus

Complexity: As a fieldbus is a complex system, highly qualified personnel are necessary for the start-up and maintenance of the installations.
Cost: The individual automation components of the fieldbus are much more expensive
Danger: in the event of a bus failure, the control system may be cut off from the sensors, encoders and actuators. To avoid this, redundant bus systems can be installed if necessary.
Response time: longer compared to parallel interfaces.

Most used fieldbuses

There are currently a multitude of fieldbuses such as:
BISS Interface; CANopen; DeviceNet; EtherCAT; EtherNet; Interbus; Modbus; Profibus; Profinet are the most common in absolute encoders.
BiSS Interface: Developed and marketed by the IC HAUS company, it is an interface specially well adapted for the connection and communication between encoders; sensors and various processing systems including speed controls. It is a free protocol, compatible with the SSI (serial synchronous interface). This interface is the version with improvements in speed and line length. In addition to the position sensors, the BiSS interface is also used for drive controls and smart sensors.
CANopen: CANopen (Controller Area Network developed by Bosch) is a communication protocol used for embedded systems in process automation. It can therefore be used for networking within complex devices. This standard includes addressing, several small communication protocols, and an application layer, which is defined by a device. Communication protocols support network management, device monitoring, and communication between different nodes.
DeviceNet: is a network system used in industrial automation to connect different devices. The base is the CAN (Controller Area Network) bus. DeviceNet is generally used for security devices, in the exchange of information and for a large number of I / O. This network system is mainly used in the United States and Asia. In Europe, however, Profibus and CANopen prevailed.
EtherCAT: (Ethernet for Control Automation Technology), is an open Ethernet based fieldbus system. The goal of this development was to adapt Ethernet to automation applications that require short cycle times.
EtherNet: Put on the market in 1980 and standardized in 1985 as IEEE 802.3. The standard includes specifications for several types of cables and connectors as well as signal protocols for OSI (Open Systems Interconnection) models.
Interbus: Was developed by Phoenix Contact and marketed since 1987.
It is a serial data transmission system which transfers data between different systems, such as computers and controllers, and which is connected to actuators and encoders; sensors, for example to control the temperature or the absolute position of an axis on a machine.
Modbus: Put on the market in 1979 by Gould-Modicon company. The information protocol ensures that a master device (usually a computer) and one or more sensor slaves, encoders are connected to each other. For example, various measuring devices can be controlled by a computer or data can be transferred there.
Profibus (Process Field Bus): A fieldbus system which aims to impose itself in automation must be able to offer a very wide range of participants to connect to it. This requirement is perfectly satisfied by the Profibus.
Systems that allow communication and data exchange between participants (automation components) of a network topology via a fieldbus have been used in particular since the 1990s, since they are considered to be inexpensive and flexible and are highly compatible with devices from any manufacturer (interchangeability). In order to follow such a complex process, the use of protocols has proven to be useful, because it determines in a system at what point in time which participant receives or sends data. Of course, such a protocol exists in the well-known PROFIBUS fieldbus system.
RS422 and RS485: until the 1980s, the output stages of the incremental encoders were then either PNP or NPN. These were the UDN2980 manufactured by Allegro, gradually replaced by the L293 pushpull drivers in the 1990s. As the encoders evolved, the resolutions constantly increased as well as the rotation speeds which led to increasing frequencies (from a few tens of KHz in the 1980s to several Mhz currently).
The RS422 and RS485 interfaces have been developed and perfected for high speed serial data transmission over long distances (up to 1200 meters) and are becoming more and more popular in the industrial sector and in particular in the transfer of encoder data.

Schematic diagram of an RS422 connection

Comparison table between RS422 and RS485

PARAMETER RS422 RS485 Unit
Number of driver and receivers 1 Driver /10 Receivers In bus, 32 receivers
Theorical max. length of the connecting cable 1200 1200 Meters
Maximum transmission frequency 10 >10 Mbps
Maximum voltage in common mode ±7 –7 to +12 Volts
Differential driver output level 2 ≤ |VOD| ≤ 10 1.5 ≤ |VOD| ≤ 5 Volts
Ohmic load on 1 driver ≥100 ≥60 Ω
Max. short-circuit current 150 to GND 250 to –7 V or 12 V mA
Output off-voltage impedance 60 12
Driver input impedance 4 12
Receiver sensitivity (for a valid signal) ±200 ±200 mV

Screenshots


On the screenshot above we can see that for a power supply of 24 Volts and a cable length of one meter and a frequency of 10khz :

  • The signal rise time is 154 ns
  • The signal fall time is 350 ns
  • The voltage drop caused by the output stage and the cable impedance of 1 meter and of (V Max) 21.15 V for a 24 Volts supply


After 10 meters of cable (screenshot above)

  • The rise time (Rise Time) of the signal is 557 ns instead of 154 ns for 1 meter
  • The signal fall time is 460 ns instead of 350 ns for 1 meter