Incremental encoder signal output TTL level, 5V differential, long-line drive, RS422, etc. What are the differences
Incremental encoder signal output TTL level, 5V differential, long-line drive, RS422, etc. What are the differences
Incremental encoder signal output TTL level, 5V differential, long-line drive, RS422, etc. What are the differences
After talking about the sine-cosine analog signal output and subdivision of the incremental encoder, this time we will talk about the square wave pulse digital signal of the incremental encoder. Incremental square wave pulse digital signal may be simple, but it is still difficult for many people to define and distinguish clearly, and mistakes abound on such a simple problem. It actually determines whether the encoder signal reception can be well matched, and high-quality transmission and reading, and signal anti-interference ability.
The square wave of the incremental pulse signal changes in the form of a pulse at the high and low (switch) level of the voltage. Unlike the sine and cosine analog signal, the square wave pulse signal is a digital switch logic signal. The logic is 1 at high level and 0 at low level. This encoding method is called positive logic of encoding. On the contrary, the coding mode with high level being "0" and low level being "1" is negative logic. Most encoders default to positive logic, and some Japanese encoders (NPN) have negative logic.
There are many forms of square wave pulse output.
TTL (transistor transistor logic), TTL signal is the basis of digital signal, usually we use binary to represent data. TTL level signal stipulates that +5V is equivalent to logic "1", and 0V is equivalent to logic "0". Such a data communication and level regulation method is called a TTL (transistor-transistor logic level) signal system. This is a standard technology for communication between various parts of a device controlled by a computer processor. TTL is more used for circuit design. The input and output of various chip microcontrollers are TTL signals, which are the low level (5V) of the higher level HTL signal transmitted by the external cable, and the defined data 1 (5V) And 0 (0V) logic level signal.
5V differential signal: Differential is a concept in which the voltage difference between two signals is processed by mathematical comparison. In an incremental pulse signal, it indicates that there is a group of every two signals, each with a phase difference (180 degrees phase difference). The 5V differential signal is a group of two TTL signals, such as A+ to A-. When A+ is at 5V=1, A- is at 0V=0, which is logically equivalent to “1”; when A+ is reversed 180 degrees At 0V, A- is at 5V, which is logically equivalent to "0".
Only in the definition of differential signal, the two signals are equal and interchangeable, and the logic is reversed after the interchange. For example, the 5V differential signal A+ and A- of the encoder can be interchanged. After the exchange, the phase is reversed by 180 degrees, that is, the signal increment direction and the encoder rotation direction are reversed. This method can be used to change the encoder output direction.
The purpose of the differential signal is that the receiver can eliminate common mode interference on the transmission line through differential signal processing.
The transmission of differential signals on twisted-pair cables has strong anti-interference ability. The two differential signals alternate high and low signal changes, and are paired and transmitted on a pair of twisted pairs. The contribution to the external electromagnetic field is unchanged on average, and the electromagnetic field of external interference changes to its effect is minimized. The "twisting" function of the twisted pair is to simultaneously reverse the rotating magnetic field generated by the signal current flow to offset the magnetic field generated by the Faraday principle of the current flow; the other is the two pairs of twisted pairs The electromagnetic field balance between the signals prevents crosstalk between the two signals, especially when the signal frequency is high. Therefore, the data of the twisted pair is related to the main frequency band designed to transmit the signal.
Differential signal and paired twisted-pair shielded wire transmission is better for signal output and transmission, with electromagnetic compatibility EMI and anti-interference characteristics.
The form of the differential signal is not only 5V, not just a square wave signal. For example, it can also be a higher level 5--30V HTL signal with inverted difference, HTL-6; or it can be a sincosine analog SINCOS signal, which is also a differential type.
In the definition of 5V differential signal, there is a little more content than TTL, that is, two TTL signals that are a group of opposite signals.
Line driver: It refers to a pair of long-line drivers that have a pair of transmitter and receiver. They each have two pins, plus and minus. When the positive pin of the sender is high, the signal current is pushed out. The pin is low level to pull the signal current (push-pull type). At this time, the direction of the current is consistent with the direction of the signal flow, which is regarded as a logic 1.
When the positive pin of the transmitting end is low, the positive pin of the receiving end is high, and the transmitting end is equivalent to pulling current in, and the direction of the current is opposite to the direction of the signal flow, and it is regarded as logic 0 at this time. Send a 5VTTL signal in front of the sender, and send a 5VTTL signal after differential at the receiver.
The long-line drive signal is paired with a long-line driver at the transmitting end and the receiving end, and the signal is amplified and pushed at logic 1 and logic 0, and it is also differential. Signal input: unipolar TTL~ long-line drive (paired push-pull drive)~receiver differential~unipolar TTL output (into counter, etc.). Due to the push-pull driver paired with the receiving end, the long-line drive signal transmission distance is longer.
The typical long-line driver 26LS31 is paired with 26LS32. It is a 5V differential type.
The long-line drive is based on the description of a pair of paired long-line drivers that favors the description of electronic devices. This transmission method has strong anti-interference and long drive transmission distance. Generally, the description of the 5V differential long-line drive of the encoder can be transmitted 400 meters (with professional Encoder twisted-pair shielded cable).
The definition of the long-line drive signal often depends on the paired long-line drive device. Not limited to 5V.
The difference between long-line drive and 5V differential:
There are two possibilities for 5V differential:
Three-wire system, current loop to 0V
Two-wire system, current loop is wrong 0V
The long-line drive only has the second two-wire system, and the current loop is not correct to 0V.
RS422 signal: Electronic Industries Association (EIA) A broader signal standard defined by the International Electrotechnical Association (EIA). The full name of RS-422 standard is "Electrical Characteristics of Balanced Voltage Digital Interface Circuit". The receiver adopts high input impedance and the sending driver adopts differential mode transmission, twisted pair.
The difference between RS422 and TTL: not necessarily 5V, it can be 5 to 24V; RS422 defines the differential mode transmission mode of A+ and A-.
The difference between RS422 and 5V differential: the signal voltage range is wider, and the differential mathematical and physical interfaces, transmission cables and interface plugs are all defined. In the three-wire mode, A+ or A- can be greater than 0V even at low level. The base point voltage of RS422 signal is greater than 0V, and voltage attenuation due to impedance can be allowed on the transmission line, but it can still maintain a differential mode voltage greater than or equal to 5V after differential mode, so the transmission distance may be longer than that of long-line driving. The length of its transmission distance is related to the signal frequency, and it can transmit as far as 1000 meters at a lower signal frequency.
European and Japanese encoders are inconsistent in description
Due to historical reasons, first there is the TTL signal of the European encoder, and then there is the bipolar 5V differential, and the long-line drive signal based on the long-line drive device pairing. European encoder manufacturers still use TTL signals to express 5V differential signals (long-line drive) for their original customers. It should be noted that most of the European TTLs are currently driven by a 5V differential long-line drive by default, but a small part of the European TTLs are 5V differential and can be driven by a three-line 0V or a two-line long-line drive. If it is three-wire, it can also be connected to A+ alone, but it can be used as a unipolar TTL without connecting A- (A- floating). In some devices with simple design, the ABZ of 5VTTL level is the simplified wiring method of this three-wire differential (only AB signal is connected). For example, I participated in the increase of the European tower heat accumulation solar tracking reflector. The encoder, which is only connected to the two wires AB of this 5VTTL, has the same design requirements to achieve long-distance transmission and anti-interference ability.
If it is a two-wire system, not only must A+A- be connected, but also the product manual must be checked to find a matching receiving unit to pair with it.
There are three possibilities for the TTL description of the European encoder:
1. Bipolar 5V TTL, the receiving end is closed and matched, the selection of the receiving end unit needs to be matched with the sending end (check the product manual), and A+A- must be connected. This is the most possibility, or the almost default mode represented by the current encoder class in TTL. Currently, it is mainly provided for the equipment, and most of the motion controllers are matched with servo motor encoders.
2. Unipolar 5VTTL, direct circuit board computer processor interface, can only connect AB signal. It is mainly provided for equipment circuit designers and can directly enter the computer processor CPU or counter chip.
3. Bipolar 5V TTL, three-wire type to 0V 5V level, the receiving end is open; it can also be connected to the AB unipolar signal, directly connected to the computer processor without the signal receiving chip, compatible with the above 2 use. However, the original differential output mode is the same as using the differential signal pair to use the twisted pair for transmission on the twisted pair cable, and it also has the effect of anti-interference of some twisted pair transmission.
4. At present, 5V differential (European system is still expressed in TTL) is mostly used in motion controller servo motor encoders, and higher level HTL signals (non-differential) are used on automation PLCs. In the signal selection of the frequency converter, the better one should be HTL-6, that is, the HTL signal with inverted phase, and the higher level differential signal has better anti-interference characteristics of the frequency converter.
Japanese encoders are usually described directly by 5V line driver, and you need to check the manual and pair with the sender chip.
Japanese encoders have NPN unipolarity reverse logic signal output, and the receiving end must also be NPN polarity. Its signal voltage common end is at the high level of the power supply, and the signal flow switch is "Yes" at 0V. Or "no" "leakage" current, the "1" and "0" of the signal are inverted, and need to be reversed during logic processing. It is not recommended to use a pull-up resistor to temporarily take the voltage out of the standard connection.
HTL contains inverted signal-(abbreviation of High Threshold Logic) is a "high threshold logic circuit", its voltage threshold is 9-30V, which is greater than 5V TTL. At present, most of them are made of a pair of NPN+PNP transistors to make push-pull Open-collector amplifier NPN and PNP compatible. Among them, the PNP connection is positive logic, and the power supply 0V is the common end; the NPN connection is negative logic, and the power high level is the common end. HTL signal is more used for PLC interface, especially European PLC is the encoder standard interface.
The HTL signal can use the three-wire differential mode (the current loop is to 0V, and the voltage difference is compared to the differential reception). It is also possible to have HTL-6 with inverted channels to make differential reception (A+A-B+B-Z+Z-6 channel HTL). HTL-6 can be used in inverter reception. Because of its high level threshold and differential type, it can eliminate the common mode interference of inverter and motor, and it has stronger anti-interference ability when used in inverter reception.
Possible errors caused by encoder signal mismatch:
The encoder signal is not only corresponding to the voltage difference, but also A+A- inverted difference, so it is not that the voltage is right, or that A+A-B+B- contains inverted Only if ABZ is not inverted, it can be judged whether it matches and can be connected. If the voltage is right and ABZ is connected, even if there is a signal that can be read, it does not mean that there is a good match that can be used. Among them, there are many possible mismatches that may cause bad results:
1. The relationship to 0V is different. The three-wire differential signal current loop is to 0V, and the voltage difference is compared; the two-wire differential signal current loop has nothing to do with 0V, and only two differential signals form the positive and negative current loops of the current loop. When the device is started, 0V will fluctuate. If the signal does not match, it is easy to be interfered or even burn the device. For larger motors on site, or electromagnetic coils in large equipment, the unbalanced three-phase winding at the moment of starting is likely to fluctuate at the instant of 0V and this unexpected situation will occur.
2. The impedance matching is different. For the receiving end with closed pairing requirements, the impedance of the encoder pulse signal is related to the signal frequency. The impedance matching of the transmission and reception is predefined, especially in the high frequency band impedance mismatch. "Pulse loss" that will cause signal loss when the encoder pulse frequency is high, such as high-resolution encoders or high-speed encoders in high-speed rotation. For long-line drivers that require matching of the receiving end, please refer to the manual for matching the receiving unit.
3. The signal flow is consistent with the direction of current. If it does not match, the signal will not be read and the device will even be burned. If the encoder does not have reverse polarity protection and short-circuit protection, this kind of device burnt up will often happen.
4. The anti-interference performance is different. Only matched signals and twisted-pair shielded cables have better anti-interference characteristics, and the signal transmission distance can reach the nominal length. Twisted-pair cables are only beneficial for differentially matched signals. Unipolar signals or unmatched signals do not form a pair, and the twisted pair loses its purpose of design and use.
5. Japanese encoders also have NPN open-collector signals. The receiving end of such signals must also be NPN, and the logic of "1" and "0" are reversed, instead of using pull-up resistors for emergency use. I do not recommend using this type of signal. For the encoder signal output category, NPN signals can be eliminated.
6. At present, the most typical domestic encoder signal interface does not match. It is European PLC (such as Siemens PLC) and Japanese encoder (such as Omron encoder). It seems that the voltage and ABZ are correct, and the signal can be read even when connected. But in fact it is not matched. When the frequency is high, the anti-interference is poor, the pulse is easy to be lost, and even the device is easy to burn. This kind of connection should be avoided. Secondly, the signal reception of the frequency converter should be a differential signal with inverted phase. The 6-channel HTL-6 with inverted phase is more suitable for use in the frequency converter because of its higher voltage threshold. However, many of the signals received by domestic frequency converters do not match, especially the NPN open-collector output signal, because its common terminal is not 0V, and the motor ground is 0V, and the NPN connection is conflicting and mismatched.
In the incremental encoder signal, we have already talked about the sine and cosine analog signal and the subdivision signal, this time we talked about TTL, linedriver, RS422, HTL and HTL-6. In addition, there are other articles about NPN and PNP, as well as "source" signal and "drain" signal. With more and more electrical equipment, the problem of electromagnetic compatibility and anti-jamming becomes more and more important. Early encoder signal modes such as NPN have gradually no longer adapted to the existing application environment. Transmitting and receiving differential signals with good matching properties, with stronger anti-interference applicability.