Sensor Times
ARTICLES
 

 

Encoder

 

 

An encoder is device used to change a signal or data into code. An encoder is circuit that converts binary information from 2n input lines to n output lines. It is used for compressing information for transmission or storage, encrypting or adding redundancies to the input code, or translating from one code to another.

 

 

Usually only one of the input is 1 and all others are zero. The output is binary codeword corresponding to the input that is 1. Since only one input is 1 at a time only n rows are needed in the truth table rather than 2n row. The remaining rows contribute don’t care condition. If more than one input is 1 at a time, encoder will not produce valid output. Only priority encoder allows more than one of their inputs to be active. Each input has a priority assigned to it. The code word produced as the output corresponds to that of the highest priority input among all the inputs that are active.

 

Single bit 4 to 2 Encoder

 

An encoder has 2n input lines and n output lines. The output lines generate a binary code corresponding to the input value. For example a single bit 4 to 2 encoder takes in 4 bits and outputs 2 bits. It is assumed that there are only 4 types of input signals these are: 0001, 0010, 0100, and 1000.

      

 

Priority Encoder

 

A priority encoder is a combinational circuit with m= 2n and n outputs. Each of the m inputs is assigned a priority. The most significant bit of the input has the highest priority while the least significant bit has the lowest priority. The n bits of the output are the binary index of the non-zero input bit with highest priority, all input bits with lower priority will be ignored. For example, when n=2 and m=4, the behavior of the priority encoder can be described as the following truth table:

 

 

Priority encoders are typically used when multiple components (e.g., processor, memory, I/O devices, etc.) are to share a common resource (e.g., a bus). Each component is assigned a certain priority according to its nature, so that whenever there is a conflict, the component with the highest priority will be granted the usage of the resource.
A binary decoder can be used to convert the n-bit output of a priority encoder to a set of m=2n bits each for one of the m.

 

Circuit Description

 

A 4-bit priority encoder converts the 4-bit input into a binary representation. If the input n is active, all lower inputs (n-1 ... 0) are ignored:
x3 x2 x1 x0 y1 y0
------------------
1 X X X 1 1
0 1 X X 1 0
0 0 1 X 0 1
0 0 0 X 0 0


The circuit operation is simple. Each output is driven by an OR-gate which is connected to the NAND-INV outputs of the corresponding input lines. The NAND gate of each stage receives its input bit, as well as the NAND gate outputs of all higher priority stages. This structure implies that an active input on stage n effectively disables all lower stages n-1... 0.
A common use of priority encoders is for interrupt controllers, to select the most critical out of multiple interrupt requests. Due to electrical reasons (open collector outputs), priority encoders with active-low inputs are also often used in practice.

 

Application:


• Driving LED displays
• Driving incandescent displays
• Driving fluorescent displays
• Driving LCD displays
• Driving gas discharge displays

 

Connecting Priority Encoders

 

Priority encoders can be easily connected in arrays to make larger encoders, such as a 16 to 4 encoder made from six 4 to 2 priority encoders (four encoders having the signal source connected to their inputs, and two encoders that take the output of the first four as input).

 

 

Rotary encoder

 

A rotary encoder, also called a shaft encoder, is an electro-mechanical device used to convert the angular position of a shaft or axle to an analog or digital code, making it an angle transducer. These devices are used in industrial controls, robotics, in top-of-the-line photographic lenses, in computer input devices (such as optomechanical mouse and trackballs), and in rotating radar platforms. A rotary encoder converts rotary position to an analog (e.g., analog quadrature) or digital (e.g., digital quadrature, 32-bit parallel, or USB) electronic signal. Rotary Encoders are ideal solutions for applications requiring measurement of speed, length, travel, direction of rotation etc. They are robustly constructed to withstand the conditions encountered in industry such as Printing, Packaging, Metal Processing, Textile and Machine Tool.
There are two main types: absolute and incremental (relative).

 

Absolute rotary encoder

Construction
The absolute digital type produces a unique digital code for each distinct angle of the shaft. They come in two basic types: optical and mechanical.


Mechanical Absolute Encoders

A metal disc containing a set of concentric rings of openings is affixed to an insulating disc, which is rigidly fixed to the shaft. A row of sliding contacts is fixed to a stationary object so that each contact wipes against the metal disc at a different distance from the shaft. As the disc rotates with the shaft, some of the contacts touch metal, while others fall in the gaps where the metal has been cut out. The metal sheet is connected to a source of electric current, and each contact is connected to a separate electrical sensor. The metal pattern is designed so that each possible position of the axle creates a unique binary code in which some of the contacts are connected to the current source (i.e. switched on) and others are not (i.e. switched off).


Optical Absolute Encoders

The optical encoder's disc is made of glass with transparent and opaque areas. A light source and photo detector array reads the optical pattern that results from the disc's position at any one time.
This code can be read by a controlling device, such as a microprocessor, to determine the angle of the shaft.
The absolute analog type produces a unique dual analog code that can be translated into an absolute angle of the shaft (by using a special algorithm).


Incremental rotary encoder

An incremental rotary encoder, also known as a quadrature encoder or a relative rotary encoder, has two outputs called quadrature outputs. They can be either mechanical or optical. In the optical type there are two gray coded tracks, while the mechanical type has two contacts that are actuated by cams on the rotating shaft. The mechanical types require debouncing and are typically used as digital potentiometers on equipment including consumer devices. Most modern home and car stereos use mechanical rotary encoders for volume. Due to the fact the mechanical switches require debouncing, the mechanical type are limited in the rotational speeds they can handle. The incremental rotary encoder is the most widely used of all rotary encoders due to its low cost.
Incremental encoders are used to track motion and can be used to determine position and velocity. This can be either linear or rotary motion. Because the direction can be determined, very accurate measurements can be made.
Rotary sensors with a single output are not encoders and cannot sense direction, but can sense RPM. They are thus called tachometer sensors.

 

Sine wave encoder
A variation on the Incremental encoder is the Sine wave Encoder. Instead of producing two quadrature square waves, the outputs are quadrature sine waves (a Sine and a Cosine). By performing the arctangent function, arbitrary levels of resolution can be achieved.

 

Linear encoder
A linear encoder is a sensor, paired with a scale that encodes position. The sensor reads the scale in order to convert the encoded position into an analog or digital signal, which can then be decoded into position by a digital readout (DRO). Motion can be determined by change in position over time. Linear encoder technologies include capacitive, inductive, eddy current, magnetic, and optical. Optical technologies include shadow, self imaging and interferometric. Linear encoders are used in metrology instruments and high precision machining tools ranging from digital calipers to coordinate measuring machines. A linear encoder similarly converts linear position to an electronic signal.

Resolutions

 

Resolutions is a measure of how many counts per unit distance encoder generates. With rotary encoder, resolution is expressed in either in unit of angle(degrees- minutes- second, decimal degrees, grad or radians) or number of measuring steps per resolutions.

 

Accuracy

 

Accuracy is measure of where the encoder says vs. where it actually is. It is expressed in unit of angle.

 

Encoder technologies

 

Encoders may be implemented using a variety of technologies:
• Conductive tracks: A series of copper pads etched onto a PCB is used to encode the information. Contact brushes sense the conductive areas. This form of encoder is now rarely seen.
• Optical: This uses a light shining onto a photodiode through slits in a metal or glass disc. Reflective versions also exist. This is one of the most common technologies.
• Magnetic: Strips of magnetised material are placed on the rotating disc and are sensed by a Hall-effect sensor or magnetoresistive sensor. Hall effect sensors are also used to sense gear teeth directly, without the need for a separate encoder disc.

 

Interface technology

 

Parallel Interface:

In Parallel Interface all bits of a position are transferred simultaneously using one line for each bit. Data transmission is done by two transistors in push pull circuit. The bit parallel interface is a very fast and for low resolutions cheap possibility of data transmission. For high resolutions or machines of bigger size installation costs can rise rapidly so that other methods of data transmission are more favorable.

 

SSI:

The position value is transmitted synchronously to the clock signal of the control system starting with the most significant bit (MSB). When non-operational the clock as well as the data line is high. As soon as the clock signal of a clock sequence changes for the first time from high (H) to low (L), the bit-parallel data on the parallel-serial-converter will be stored via an internal S Load-Signal in the input latch of the shift register. This ensures that the data cannot change during the transmission of a position value. With the following rising edge transition of the clock signal the transmission begins with the most significant bit (MSB). With each following rising edge transition of the clock signal, the next lower significant bit is set on the output of the data line. After the least significant bit was shifted out, the last rising edge transition of the clock signal switches the data line to low (transmission end).

 
 
E-mail info@sensortimes.com ---------- Telephone 216-916-6766