Share this

Encoder Component Working Principle and Application Circuit

2026-04-06 05:42:49 · · #1

Encoder Application Circuit (Part 1)

As shown in the figure.

Figure: Reference Application Circuit Diagram

Encoder Application Circuits (Part 2)

Software Design and Application of Encoder VD5026 Using a Microcontroller

Each group of serial data output waveforms of the VD5026-4 consists of a synchronization pulse, a 12-bit encrypted address (and control data), and a 1-bit stop bit. The output sequence of the encoded pulses is AO~A7, A8/DO~All/D3, and each group of serial data is output at least 4 times. After mastering the output format of the serial data, its data verification method, pulse period, pulse duty cycle, and their corresponding data relationships, write an application program according to the requirements of the encoded pulse output to enable the microcontroller to implement the encoder function. The flowchart of the analog encoder program is shown in the figure below.

The infrared remote control keyboard designed using this technology has been applied to a "color remote control monitoring system". The principle of the remote control keyboard is shown in the figure below.

This circuit uses the AT89C2051 microcontroller, a high-performance, cost-effective microcontroller. It utilizes the 80C31 core and is fully compatible with the MCS-51™ instruction set and pinout. It has 2KB of internal reprogrammable flash memory, capable of 1000 erase/write cycles and retaining data for 10 years.

The VD5027 decoder has 4-bit data output and can decode 16 states, meeting the requirements of a 3×4 keyboard.

When the microcontroller detects a key press, it generates an coded pulse corresponding to that key value. This coded pulse signal is modulated using a 38kHz pulse signal and transmitted through a transmitting diode (SE303A). The infrared receiving diode (PH302B) converts the received infrared signal into an electrical signal, which is then amplified and detected by the infrared remote control receiver CX20106, becoming a pulse electrical signal. This signal is then shaped and amplified to restore the coded pulse corresponding to the key value, and output to pin 14 (DIN input) of the decoder VD5027.

When the VD5027 receives the first string of encoded pulse signals, if it perfectly matches the address set by the VD5027, the four-bit data code DO-D3 is sent into the register (and converted from serial code to parallel code). When the second string of identical encoded pulse signals arrives, it is checked again. If the address is correct and the control data matches the first one, the logic control circuit in the VD5027 issues a control signal, latching the control data in the register into the latch and outputting it to the DO-D3 terminals of the VD5027. Simultaneously, the TV terminal changes from low to high, indicating that decoding is successful.

After receiving a valid decoding signal, the host reads the output data DO~D3 from VD5027, decodes the key value code, and executes the corresponding operation.

1. Classification of encoders

Based on product structure, encoders are divided into: encoder elements and encoder assemblies;

According to the method of use, they are divided into: rotary and linear;

Based on technical principles, they are divided into: contact type (mechanical contact with brushes) and non-contact type (including: optical type, photoelectric induction type, magnetic induction type, magnetoelectric induction type, etc.);

Based on their working principle, they are divided into: incremental type and absolute type.

2. Some encoder component products (Figure 1)

(Figure 1: Encoder components)

3. Working principle of encoder components

This article will introduce the working principles and applications of incremental encoders and absolute encoders.

The encoder body (pulse code disk) is pre-fabricated with metal conducting areas and plastic insulating areas according to different product requirements. The angle, shape and size of the conducting areas and insulating areas determine the final signal output form of the product.

3.1 Incremental Encoder

During rotation, it can output two or more sets of encoders that have periodic changes and phase timing differences.

(1) Product features:

a) It can rotate 360 ​​degrees;

b) During rotation, it can generate output signals that periodically change between high and low levels, without a fixed start and end point;

c) Able to stop or start at any position;

d) When using it, the result of stopping position is generally not emphasized, but only the signal changes during the process are stressed.

(2) Product structure:

This product mainly consists of a shaft, body, bracket, positioning plate, contact brush, etc.

(3) Output signal:

By rotating the shaft to drive the contact brush, the system generates on/off states and outputs two or more sets of periodically changing pulse signals with phase timing differences.

a) When outputting two sets of signals, they are generally divided into phase A and phase B. The phase difference between the phases is delayed by 1/4 pulse period. The rotation direction of the product is determined according to the order of switching on and off (signal increment or decrement), as shown in Figure 2.

Figure 2: Two sets of signal square waves

b) When outputting three sets of signals, they are generally divided into phase A, phase B, and phase C. The increase or decrease of the signal is determined by the order in which the three sets of signals are turned on and off (time difference). The three sets of signals do not intersect when they are in the conducting state, thus increasing the relative phase difference of the final product. Signal increases and decreases are easier to identify, more stable, and less prone to garbled characters, as shown in Figure 3.

Figure 3: Three sets of signal square waves

(4) How to determine the direction of rotation and count

Based on the characteristics of the pulse signal output, there are two commonly used methods for judgment (see Figure 4 for details):

a) Comparison method

Within one pulse cycle, phases A and B can be represented by four motion sequences: 11, 01, 00, 10 for forward rotation and 11, 10, 00, 01 for reverse rotation. This output value is saved and compared with the next output value of phases A and B to determine the direction of motion (if phases A and B output 11 followed by 01, it is clockwise; if they output 11 followed by 10, it is counterclockwise).

This method has high requirements for the product and is less prone to errors, but it must start from state 11 each time.

b) Edge Triggering

The instant of transition from a high level to a low level is called the falling edge, and the instant of transition from a low level to a high level is called the rising edge. If phase A outputs a falling edge and phase B shows a high level, the rotation is clockwise; if phase A outputs a falling edge and phase B shows a low level, the rotation is counterclockwise. (Length: 15cm; font size: switching, small five)

(Figure 4: Comparison method, edge triggering)

3.2 Absolute Encoder

An encoder that outputs a binary code corresponding to the location at each location.

(1) Product features:

a) The product has a fixed signal output mode for each gear position, which is a combination of 0 and 1. By using this code to output signals, various functions can be designed.

b) When rotating forward and reverse to the same gear, the output signal is consistent;

c) When using it, the intermediate motion process is generally not considered, and only the output signal of the stopping position is considered.

(2) Product structure:

It mainly consists of a shaft core, body, bracket, positioning plate, and contact brush. Its biggest difference from incremental rotary encoders is the shape of the contact plate in the body.

(3) Output signal:

The encoder's rotational motion generates a fixed, regularly corresponding encoded signal at the stopping position, as shown in Table 1:

Table 1: Absolute Encoded Signals

4. Encoder product applications and general application circuits

Encoder components are used in a wide range of applications, including power amplifiers, audio equipment, mixing consoles, car audio systems, walkie-talkies, radios, mice, keyboards, oscilloscopes, microwave ovens, induction cookers, washing machines, and air conditioners.

Read next

CATDOLL 128CM Luisa

Height: 128cm Weight: 19kg Shoulder Width: 30cm Bust/Waist/Hip: 57/52/63cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22