CN213240849U - RS-485 signal polarity identification device - Google Patents
RS-485 signal polarity identification device Download PDFInfo
- Publication number
- CN213240849U CN213240849U CN202021530582.1U CN202021530582U CN213240849U CN 213240849 U CN213240849 U CN 213240849U CN 202021530582 U CN202021530582 U CN 202021530582U CN 213240849 U CN213240849 U CN 213240849U
- Authority
- CN
- China
- Prior art keywords
- signal
- mcu
- port
- polarity
- circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Dc Digital Transmission (AREA)
Abstract
The utility model relates to a recognition device of RS-485 signal polarity, the device are used for the signal polarity discernment of RS-485 transceiver, RS-485 transceiver include with RS-485 signal conversion to COMS or TTL level output the R port, be used for converting CMOS or TTL level to the D port of RS-485 signal input, the device including the MCU that is used for polarity analysis, MCU be connected with the R port and the D port of RS-485 transceiver respectively. Compared with the prior art, the utility model has the advantages of the wiring is swift, labour saving and time saving.
Description
Technical Field
The utility model relates to a RS-485 bus especially relates to an identification means of RS-485 signal polarity.
Background
The RS-485 bus is a common communication line and has wide application in the industries of instruments, illumination and the like. In general application, the RS-485 signal is converted with a CMOS signal or a TTL signal through a transceiver and then connected to the MCU. When an actual RS-485 control system is wired, if the two signal wires A and B are reversely connected, normal communication cannot be realized. However, the field is usually not electrified when the wiring is carried out, so that if the wiring is wrong, the correction is carried out after the power is cut off again, and the wiring is very troublesome. Therefore, how to effectively identify the polarity of the battery becomes a technical problem to be solved.
SUMMERY OF THE UTILITY MODEL
The present invention is directed to overcome the above-mentioned drawbacks of the prior art and to provide a device for identifying the polarity of RS-485 signals.
The purpose of the utility model can be realized through the following technical scheme:
the device is used for identifying the signal polarity of the RS-485 transceiver, the RS-485 transceiver comprises an R port for converting an RS-485 signal into COMS or TTL level to be output and a D port for converting the CMOS or TTL level into RS-485 signal to be input, the device comprises an MCU for analyzing the polarity, and the MCU is respectively connected with the R port and the D port of the RS-485 transceiver.
Preferably, the MCU is provided with a UART input port RXD connected with the R port.
Preferably, the MCU is provided with a UART output port TXD connected with the D port.
Preferably, the MCU is provided with an acquisition circuit for capturing signals of the UART receiving line.
Preferably, the MCU is provided with a signal polarity identification circuit connected with the acquisition circuit.
Preferably, the MCU is provided with a standard signal storage circuit connected with the signal polarity identification circuit.
Preferably, the signal polarity identification circuit adopts a signal judgment circuit.
Preferably, the signal polarity identification circuit adopts a level judgment circuit.
Preferably, the I/O port of the MCU is connected with the RE/DE port of the RS-485 transceiver.
Preferably, the device further comprises an isolation circuit arranged between the MCU and the RS-485 transceiver.
Compared with the prior art, the utility model has the advantages of it is following:
1) the utility model can accurately identify the RS-485 transceiver, and can receive data by arranging the polarity conversion circuit even if the RS-485 transceiver is reversely connected when the utility model is used, thereby well solving the problems;
2) when the cable is wired or maintained on site, two wires do not need to be distinguished, wiring is rapid, and time and labor are saved;
3) because two lines do not need to be distinguished, the requirements of color codes and the like on the wires are avoided, and the purchase, the storage and the management are convenient.
Drawings
FIG. 1 is a typical RS-485 transceiver;
FIG. 2 is a wiring diagram of the MCU and the RS-485 transceiver;
FIG. 3 is a wiring diagram of the MCU and RS-485 transceiver with isolation circuitry;
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by a person skilled in the art without creative efforts shall fall within the protection scope of the present invention.
In practical applications, the MCU is often used for RS-485 communication. Because the RS-485 uses differential signals for transmission, and the common MCU uses CMOS or TTL signals, the RS-485 transceiver is needed to be used for converting the signals. A typical RS-485 signal transceiver architecture is shown in fig. 1.
In the schematic diagram of the transceiver in fig. 1, A, B is connected to the RS-485 bus, and R, RE, DE, D are connected to the MCU. Since reception and transmission are not performed simultaneously, RE and DE are active at low level and active at high level respectively when the device is designed, so that in some cases, two signals can be connected together to realize switching input and output of one control signal. R is the output of the transceiver converting the RS-485 signal into the COMS or TTL level and is used for being connected with a UART input port (RXD) of the MCU, and D is the input of the transceiver converting the CMOS or TTL level into the RS-485 signal and is used for being connected with an output signal (TXD) of the UART in the MCU. The connection diagram of the MCU and the RS-485 transceiver is shown in FIG. 2.
In a specific application, to improve reliability or safety, an isolation circuit may be added to the circuit of fig. 2, as shown in fig. 3.
The MCU is provided with an acquisition circuit for capturing signals of the UART receiving circuit. The MCU is provided with a signal polarity identification circuit connected with the acquisition circuit.
One implementation is as follows: and the MCU is provided with a standard signal storage circuit connected with the signal polarity identification circuit. The signal polarity identification circuit adopts a signal judgment circuit, the signal judgment circuit can adopt a comparator, the signal acquired by the acquisition circuit is compared with the standard signal of the standard signal storage circuit, if the signal acquired by the acquisition circuit is consistent with the standard signal, the polarity is correct, otherwise, the polarity is wrong.
The other realization mode is as follows: the signal polarity identification circuit adopts a level judgment circuit, the level judgment circuit adopts a high-low level identification circuit, the polarity can be identified through the following judgment, and if the high level of the UART receiving port exceeds the set time, the polarity is considered to be correct; and if the low level of the receiving port exceeds the set time, the opposite polarity is considered.
The utility model describes a recognition device of RS-485 signal polarity supports RS-485 signal A and B to exchange, solves the trouble that connects the reverse to arouse. When the scheme is adopted, the two communication lines A, B of the RS-485 can be judged by the MCU without being distinguished. If the wiring is judged to be correct, normal communication is continued; if the connection is wrong, normal communication can be carried out after the polarity is switched. This patent may be used for DMX power supplies, DMX controllers, or other situations where RS-485 is used.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope of the present invention, and these modifications or replacements should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (7)
1. An identification device of RS-485 signal polarity is used for identifying the signal polarity of an RS-485 transceiver, wherein the RS-485 transceiver comprises an R port for converting an RS-485 signal into COMS or TTL level to be output and a D port for converting the CMOS or TTL level into RS-485 signal to be input, and the identification device is characterized by comprising an MCU for analyzing the polarity, wherein the MCU is respectively connected with the R port and the D port of the RS-485 transceiver;
the MCU is provided with a UART input port RXD connected with the R port; the MCU is provided with an acquisition circuit for capturing signals of the UART receiving circuit; the MCU is provided with a signal polarity identification circuit connected with the acquisition circuit.
2. The apparatus of claim 1, wherein the MCU is provided with a UART output port TXD connected to the D port.
3. The device for identifying the polarity of an RS-485 signal as claimed in claim 1, wherein the MCU is provided with a standard signal storage circuit connected with the signal polarity identification circuit.
4. The apparatus according to claim 3, wherein the signal polarity identification circuit employs a signal determination circuit.
5. The apparatus of claim 1, wherein the signal polarity identification circuit employs a level determination circuit.
6. The apparatus for identifying the polarity of an RS-485 signal according to claim 1, wherein the I/O port of the MCU is connected to the RE/DE port of the RS-485 transceiver.
7. The apparatus of claim 1, further comprising an isolation circuit disposed between the MCU and the RS-485 transceiver.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202021530582.1U CN213240849U (en) | 2020-07-29 | 2020-07-29 | RS-485 signal polarity identification device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202021530582.1U CN213240849U (en) | 2020-07-29 | 2020-07-29 | RS-485 signal polarity identification device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN213240849U true CN213240849U (en) | 2021-05-18 |
Family
ID=75891247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202021530582.1U Active CN213240849U (en) | 2020-07-29 | 2020-07-29 | RS-485 signal polarity identification device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN213240849U (en) |
-
2020
- 2020-07-29 CN CN202021530582.1U patent/CN213240849U/en active Active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10468896B2 (en) | Intelligent switch system and control method | |
CN210072603U (en) | USB2.0 changes multichannel serial ports output device | |
CN210405343U (en) | Air conditioner family bus test system | |
CN213240849U (en) | RS-485 signal polarity identification device | |
CN108768530B (en) | Data transmission control system and method of optical fiber transceiver | |
CN116074356B (en) | Energy storage battery parallel communication self-networking and terminal self-matching method | |
CN212953668U (en) | Intelligent device for detecting scene personnel of elevator car | |
CN203057159U (en) | Multifunctional photoelectric integrated converter | |
CN210924279U (en) | Matrix driving device | |
CN102255652A (en) | Method for distinguishing broken fiber from power failure of far-end optical transceiver | |
CN113900397A (en) | Device for realizing reverse connection self-adaptive switching of RS-485 signal line | |
CN212515784U (en) | RS-485 signal line polarity self-adaptation realization device based on double UARTs | |
CN218512635U (en) | TOF ranging sensor | |
CN219875776U (en) | SPI remote control transmission device | |
CN204576495U (en) | A kind of dual bus arbitration control device | |
CN201323585Y (en) | Modulation mode identifying module realized on the basis of digital signal processor | |
CN212160411U (en) | Device for realizing reverse connection self-adaptive switching of RS-485 signal line | |
CN210075230U (en) | RTU system | |
CN213094237U (en) | Conversion circuit equipment with multiple control protocols | |
CN203708240U (en) | RF-485 signal converter | |
CN209803317U (en) | Intelligent electric meter and control circuit and detection tool thereof | |
CN203859799U (en) | Line inspection machine used for detecting telecontrol signal | |
CN202649368U (en) | Network cable detection apparatus | |
CN203896349U (en) | Optical signal input state display used for optical receiver | |
CN208537976U (en) | Air compressor monitoring device in weather radar station |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |