CN114925006A - Semi-passive RS 232-to-RS 232 communication method - Google Patents

Semi-passive RS 232-to-RS 232 communication method Download PDF

Info

Publication number
CN114925006A
CN114925006A CN202210489611.1A CN202210489611A CN114925006A CN 114925006 A CN114925006 A CN 114925006A CN 202210489611 A CN202210489611 A CN 202210489611A CN 114925006 A CN114925006 A CN 114925006A
Authority
CN
China
Prior art keywords
female
head
male
pin
female head
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.)
Granted
Application number
CN202210489611.1A
Other languages
Chinese (zh)
Other versions
CN114925006B (en
Inventor
王震
朱文营
李益
白洪超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Ainuo Instrument Co ltd
Original Assignee
Qingdao Ainuo Instrument Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Qingdao Ainuo Instrument Co ltd filed Critical Qingdao Ainuo Instrument Co ltd
Priority to CN202210489611.1A priority Critical patent/CN114925006B/en
Publication of CN114925006A publication Critical patent/CN114925006A/en
Application granted granted Critical
Publication of CN114925006B publication Critical patent/CN114925006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0002Serial port, e.g. RS232C
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3852Converter between protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention belongs to the technical field of electronic communication, and relates to a semi-passive RS 232-to-RS 232 communication method, wherein an isolation communication circuit comprises a DB9 male head, a DB9 female head, a first isolation push-pull driving unit, a second isolation push-pull driving unit, a first electrolytic capacitor and a second electrolytic capacitor, an RS232 interface chip and a DB9 male head are arranged in a lower computer, a +5V power supply is arranged in the lower computer, a sixth DB9 male head is arranged in an upper computer, and communication in three modes is realized by utilizing a DB9 female head-to-female head connecting line: firstly, a female head of an isolation communication circuit is inserted into a male head of an upper computer, and a DB9 female head-female head connecting line is connected with the isolation communication circuit and a lower computer; a DB9 female-to-female connecting line is connected with an isolation communication circuit and an upper computer, and the female of the isolation communication circuit is connected with the male of a lower computer; and thirdly, an isolation communication circuit is not used. The invention is provided with the +5V power supply to charge the positive voltage energy storage capacitor, thereby realizing excellent communication performance, having lower cost than the prior art and solving the problem of communication reliability.

Description

Semi-passive RS 232-to-RS 232 communication method
Technical Field
The invention belongs to the technical field of electronic communication in industrial control, and particularly relates to a semi-passive RS 232-to-RS 232 communication method which is particularly suitable for isolated communication between a lower computer and an upper computer of a safety tester and the like under severe working conditions.
Background
RS232 communication is negative logic communication, logic ' 1 ' is-3V- ' 15V, logic ' 0 ' is + 3V- +15V, wherein the idle state of a data output pin of the RS232 interface chip is logic ' 1 ' for more than one bit (bit), and a commonly used RS232 interface chip can identify +/-2.4V; in general, an RS232 interface of industrial control only uses 3 pins including Rx, Tx and GND, DB9 interfaces are used for communication, and a computer is used as an upper computer to control other instruments.
In most cases, the RS232 to RS232 should perform isolated communication, especially in a severe working environment with high voltage, large current, etc., but it is necessary to consider the situation of direct communication without isolation. When carrying out RS232 commentaries on classics RS232 isolation communication, require that the communication is stable, can not tired the production progress simultaneously. The RS 232-RS 232 isolation communication mode comprises an active mode and a passive mode, wherein the active mode refers to the mode that two ends of communication are both provided with independent power supplies, the passive mode refers to the mode that two ends of communication are both not provided with independent power supplies, and the semi-passive mode refers to the mode that a lower computer (such as a safety standard tester) end of communication is provided with an independent power supply (only a positive voltage power supply).
The existing passive RS 232-to-RS 232 isolation communication technology uses a complex Schmitt trigger circuit to try to stabilize communication, but not only consumes electricity stolen from a 232 interface chip, so that the communication is easy to go wrong, but also occupies about half of layout space, and simultaneously causes a large proportion of cost increase to cause higher cost. In the prior art, in order to save power, a schmitt trigger circuit is not used for shaping a communication waveform and preventing false triggering, but is only used for charging a very small amount of electricity into a high-voltage energy storage capacitor group by using one-time instant jitter of voltage when being powered on, and when the electric quantity is too small, a lower computer (such as a tester) cannot recognize the situation often when an upper computer sends an instruction, and the lower computer needs to actively send a lot of data to charge the positive-voltage energy storage capacitor group. In addition, the operator may not perform the test for several hours or even longer, which may cause the positive voltage energy storage capacitor bank at the tester end to discharge slowly due to the leakage current of other elements, and if the discharge is excessive, the communication may be abnormal due to too low voltage.
In the prior art, a negative voltage under a normal state of a DTR pin and an RTS pin is used for charging a negative voltage energy storage capacitor group of an isolation circuit, although a driving voltage of a sending pin of a 232 interface chip of a lower computer instrument is usually only about +/-5.4V and is close to about +/-2.4V which can be identified by the 232 interface chip, the DTR pin and the RTS pin are not designed by a lower computer in industrial control, so that the DTR pin and the RTS pin cannot be used for charging the negative voltage energy storage capacitor group of the isolation circuit at the lower computer instrument end; the driving voltage of the upper computer is about +/-10.8V, the positive and negative voltage energy storage capacitor bank can store enough electric energy, and the DTR/RTS pin is not needed to be used for charging the negative voltage energy storage capacitor bank; when the circuit which is designed by the invention and does not use DTR and RTS pins to particularly charge the negative voltage energy storage capacitor bank is used for carrying out an isolation communication test, when the longest command from the shortest to the possible is sent by using the baud rate 38400 for hundreds of thousands of times, an error does not occur, the energy stored by the negative voltage energy storage capacitor bank is always sufficient, and only the energy stored by the positive voltage energy storage capacitor bank may not be sufficient. Therefore, stealing negative voltage power from the DTR, RTS pin is a meaningless idea in industrial control. In reality, the situation that the electric elements are damaged due to non-isolated communication often occurs, but operators are mostly reluctant to use the passive 232 photoelectric isolation circuit in the prior art, because the production progress is seriously tired due to too frequent communication abnormity.
Disclosure of Invention
In order to solve the above technical problems, the present invention perfectly solves all the above disadvantages of the prior art, while having high flexibility and compatibility. The technical scheme adopted by the invention is as follows:
a semi-passive RS232 to RS232 communication method comprises the following steps: DB9 female-to-female connection line, an upper computer, a lower computer and an isolation communication circuit; the isolated communication circuit includes: the first DB9 male connector XS1, the second DB9 female connector XS2, the first isolation push-pull driving unit, the second isolation push-pull driving unit, the first electrolytic capacitor C1 and the second electrolytic capacitor C2, wherein the first electrolytic capacitor C1 and the second electrolytic capacitor C2 are positive voltage energy storage capacitors; the lower computer is provided with an RS232 interface chip and a third DB9 male XS3, a +5V power supply is arranged in the lower computer, the +5V power supply supplies power to the RS232 interface chip, and the +5V power supply is led to a first electrolytic capacitor C1 and a second electrolytic capacitor C2 through a diode in an isolation communication circuit in a single-way mode after passing through a current-limiting resistor; be provided with the public head of sixth DB9 in the host computer, utilize the female first connecting wire of DB9 to change and keep apart communication circuit, next machine and host computer and realize the communication of three kinds of modes:
in the first mode, a second DB9 female head XS2 of the isolation communication circuit is directly inserted into a sixth DB9 male head of an upper computer, a first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-female head connecting line, the other DB9 female head of the DB9 female head-female head connecting line is connected with a third DB9 male head XS3 of a lower computer, and a +5V power supply charges a first electrolytic capacitor C1;
in the second mode, any DB9 female head of a DB9 female-to-female head connecting line is directly inserted into a sixth DB9 male head of an upper computer, the other DB9 female head of the DB9 female-to-female head connecting line is connected with a first DB9 male head XS1 of an isolation communication circuit, a second DB9 female head XS2 of the isolation communication circuit is connected with a third DB9 male head XS3 of a lower computer, and a +5V power supply charges a second electrolytic capacitor C2;
and in the third mode, under the condition of direct communication without isolation, an isolation communication circuit is not used, any DB9 female head of the DB9 female-to-female head connecting line is directly inserted into a sixth DB9 male head of the upper computer, and the other DB9 female head of the DB9 female-to-female head connecting line is inserted into a third DB9 male head XS3 of the lower computer.
The invention has the beneficial effects that:
in the invention, a +5V power supply is arranged in a lower computer, and under partial communication situations, the +5V power supply is charged by unidirectionally conducting a first electrolytic capacitor C1 and a second electrolytic capacitor C2 through a current-limiting resistor and then a diode; by optimizing the parameters of the current-limiting resistor and the electrolytic capacitor, excellent communication performance is realized, no damage to any device or personnel environment is caused in theory and practice, and the semi-passive RS 232-to-RS 232 isolation communication circuit and the isolation communication method which have extremely reliable performance and are environment-friendly are realized.
The cost of the invention is lower than the prior art, but the problem of communication reliability is really solved, in the long-term test of various application scenes, the invention never causes communication abnormity, and never causes danger or potential danger to operators, equipment and environment as ensured by theory, and the performance is not comparable to the prior art.
Drawings
FIG. 1 is a schematic diagram of an isolated communication circuit of an embodiment of the present invention;
FIG. 2 is a schematic circuit diagram of a lower computer according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a DB9 female-to-female connection cable according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Example one
Fig. 1 is a schematic diagram of an isolated communication circuit according to an embodiment of the present invention, and pins of the same name in fig. 1 are all connected to each other. The isolated communication circuit includes: public head XS1 of first DB9, female first XS2 of second DB9, first opto-coupler U1, second opto-coupler U2, third opto-coupler U3 and fourth opto-coupler U4, first opto-coupler U1 and second opto-coupler U2 and fourth resistance R4 constitute first isolation push-pull drive unit, third opto-coupler U3 and fourth opto-coupler U4 and fifth resistance R5 constitute second isolation push-pull drive unit, fourth resistance R4 and fifth resistance R5 are used for the current-limiting, make the electric current both want minimum with the energy that consumes less, will be big enough to open the opto-coupler again. A 2 nd pin of a male connector XS1 of a first DB9 is reversely connected with a second diode D2 and then connected with a cathode of a third electrolytic capacitor C3, a cathode of the third electrolytic capacitor C3 is connected with a cathode of a second optocoupler U2 receiving tube, a 2 nd pin, a 4 th pin and a 6 th pin of a male connector XS1 of the first DB9 are respectively and commonly connected with an anode of a first electrolytic capacitor C1 through a fourth diode D4, a sixth diode D6 and an eighth diode D8, an anode of a first electrolytic capacitor C1 is connected with an anode of a first optocoupler U1 receiving tube, a 3 rd pin of a male connector XS1 of the first DB9 is connected with a cathode of a first optocoupler U1 receiving tube and with an anode of a second optocoupler U2 receiving tube, a 2 nd pin of a male connector XS1 of the first DB9 is connected with an anode of an input end of a third U3 and a cathode of a fourth optocoupler U4 after passing through a fifth resistor R5, the 5 th pin of the male connector XS1 of the first DB9 is connected with the negative electrode of the first capacitor C1, the positive electrode of the third capacitor C3, the negative electrode of the input end of the third optocoupler U3 and the positive electrode of the input end of the fourth optocoupler U4. A 3 rd pin of a second DB9 female head XS2 is reversely connected with a third diode D3 and then connected with a cathode of a fourth electrolytic capacitor C4, a cathode of the fourth electrolytic capacitor C4 is connected with a cathode of a fourth optical coupler U4 receiving tube, a 3 rd pin, a 4 th pin and a 6 th pin of a second DB9 female head XS2 are respectively and commonly connected with an anode of a second electrolytic capacitor C2 through a fifth diode D5, a seventh diode D7 and a ninth diode D9, an anode of the second electrolytic capacitor C2 is connected with an anode of a third optical coupler U3 receiving tube, a 2 nd pin of the second DB9 female head XS2 is connected with a cathode of a third optical coupler U3 receiving tube and is connected with an anode of a fourth optical coupler U4 receiving tube, a 3 rd pin of a second DB9 female head XS2 is connected with an anode of a first U1 input end and a cathode of a U2 through a fourth resistor R4, the 5 th pin of the female connector XS2 of the second DB9 is connected with the negative electrode of the second capacitor C2, the positive electrode of the fourth capacitor C4, the negative electrode of the input end of the first optical coupler U1 and the positive electrode of the input end of the second optical coupler U2.
In fig. 1, the 4 th pin and the 6 th pin of the male terminal XS1 of the first DB9 are commonly connected to the anode of the first electrolytic capacitor C1 through the sixth diode D6 and the eighth diode D8, respectively, for charging the positive voltage energy storage capacitor; the 4 th pin and the 6 th pin of the female terminal XS2 of the second DB9 are commonly connected to the anode of the second electrolytic capacitor C2 through a seventh diode D7 and a ninth diode D9, respectively, so as to charge the positive voltage energy storage capacitor on the other side. In fig. 1, the capacities of the first capacitor C1 and the second capacitor C2 need to be larger; the capacities of the third capacitor C3 and the fourth capacitor C4 in fig. 1 are smaller; namely: the capacity of the first capacitor C1 is greater than that of the third capacitor C3, and the capacity of the second capacitor C2 is greater than that of the fourth capacitor C4, so as to improve the performance and reduce the PCB area as much as possible.
Fig. 2 is a schematic diagram of a circuit principle of a lower computer according to an embodiment of the present invention, where the lower computer is a tester. A +5V power supply is arranged in the lower computer, and the RS232 interface chip is powered by the +5V power supply; the +5V power supply is connected with the 6 th pin of the male XS3 of the third DB9 through a first resistor R1; the ground of the RS232 interface chip is the same as the 5 th pin XS3 of the male connector of the third DB 9; the 232 signal output pin T1OUT of the RS232 interface chip is connected with the 3 rd pin of the male XS3 of the third DB9 through a second resistor R2, and the 2 nd pin of the male XS3 of the third DB9 is connected with the 232 signal input pin R1IN of the RS232 interface chip through a third resistor R3. The first resistor R1, the second resistor R2 and the third resistor R3 are used for limiting current; the selection requirement of the R1 resistance value is compatible with the condition that a tester which does not use the isolation communication circuit in the figure 1 is directly connected with an upper computer, at the moment, the current flowing through the R1 cannot exceed the rated value of an upper computer chip, and the resistance value is small on the basis; the R2 resistance value selection requires that the supplied current cannot be larger than a specified value in the 232 interface chip datasheet, and on the basis, the resistance value is as small as possible; the resistance of R3 matches equally to R2.
In FIG. 2, the +5V power supply is further connected to the 6 th pin of the third DB9 male XS3 through a first resistor R1, and R1 is preferably about 2.7 k. In fig. 2, the second resistor R2 should have a suitable value, such as 100 Ω, to ensure that in various application scenarios, any device is not damaged and sufficient driving current is provided.
Fig. 3 is a schematic diagram of a DB9 female-to-female connection line according to an embodiment of the present invention. The DB9 female-to-female connection line is a full-crossover DB9 female-to-female connection line, in which the fourth DB9 female XS4 and the fifth DB9 female XS5 are two terminals on two sides of the connection line, respectively.
The invention discloses a communication method for converting semi-passive RS232 to RS232, which has the following 3 application scenes in the practical application:
the second DB9 female head XS2 of the isolated communication circuit (figure 1) is directly inserted into a COM port (a sixth DB9 male head) of an upper computer (a computer), the first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-female head connecting line (figure 3), the other DB9 female head of the DB9 female head-female head connecting line is connected with a third DB9 male head XS3 of a lower computer (figure 2), and a +5V power supply and the third DB9 male head XS3 are parts of the lower computer;
in the application scenario, the +5V power supply in fig. 2 is connected to the 6 th pin of the third DB9 male XS3 through the first resistor R1, then passes through one end of the DB9 female-to-female connection line in fig. 3, then passes through the other end of the DB9 female-to-female connection line, is connected to the 4 th pin of the first DB9 male XS 1in fig. 1, and then passes through the sixth diode D6 in fig. 1 to charge the first electrolytic capacitor C1 (positive voltage energy storage capacitor).
Inserting any DB9 female head of a DB9 female-female head connecting line (figure 3) into a COM port (the COM port is a sixth DB9 male head) of an upper computer (a computer), connecting the other DB9 female head of the DB9 female-female head connecting line (figure 3) with a first DB9 male head XS1 of an isolation communication circuit (figure 1), connecting a second DB9 female head XS2 of the isolation communication circuit (figure 1) with a third DB9 male head XS3 of a lower computer (figure 2), wherein a +5V power supply and a third DB9 male head XS3 are part of the lower computer;
in the application scenario (C), the +5V power supply in fig. 2 is connected to the 6 th pin of the third DB9 male terminal XS3 through the first resistor R1, and then charges the second electrolytic capacitor C2 (positive voltage energy storage capacitor) in fig. 1 through the 6 th pin of the second DB9 female terminal XS2 in fig. 1 and the ninth diode D9.
In the case of direct communication without isolation, without using an isolation communication circuit (fig. 1), any DB9 female of the DB9 female-to-female connection line (fig. 3) is directly plugged into a COM port (the COM port is a sixth DB9 male) of an upper computer (a computer), another DB9 female of the DB9 female-to-female connection line (fig. 3) is plugged into a third DB9 male XS3 of a lower computer (fig. 2), and a +5V power supply and a third DB9 male XS3 are part of the lower computer.
In the application scenario (c), the +5V power supply in fig. 2 is connected to the 6 th pin of the third DB9 male XS3 through the first resistor R1, and then connected to the 4 th pin of the COM port (the COM port is the sixth DB9 male) of the upper computer (computer) through one end of the DB9 female-to-female connection line in fig. 3 and the other end of the DB9 female-to-female connection line, which corresponds to the case of non-isolated communication.
The 4 th pin of a COM port of an upper computer (computer) is DTR, the computer is only used as the upper computer in industrial control, and DTR is a sending pin for the upper computer; the resistance of the first resistor R1in fig. 2 is selected according to the situations of isolated communication and non-isolated communication, for example, 2.7k is selected as R1, so that the isolation is not damaged and the current is at most about 5V/2.7k to 1.85mA without isolation, and the upper computer chip is not damaged by the current of at most about 16V/2.7k to 5.93mA without isolation. The reason why only the positive voltage energy storage capacitor is charged is that the RS232 interface chip can keep the negative voltage all the time in the idle state, and the storage capacity of the negative voltage energy is enough; the method solves the problems that the voltage of the positive voltage energy storage capacitor is not stored when an operator uses new equipment to start operation because the voltage of the positive voltage energy storage capacitor is reduced due to leakage current after the operator does not operate for a long time, the voltage of the positive voltage energy storage capacitor is lower than the voltage recognizable by the 232 interface chip due to overlong data transmission, and the like; if the extension line is needed, the operator chooses to use the male-female head line of the DB9 in the through sequence, and the application scenes except the frames of the 3 application scenes can not appear, so that the equipment, people and environment can not be endangered by misoperation of the operator.
The seventh diode D7 and the eighth diode D8 in fig. 1 are spare diodes. The specification of the RS232 interface chip is inquired to obtain the theoretical maximum instantaneous output current of a TX pin of the RS232 interface chip, a proper current limiting resistance value can be calculated according to the maximum current and the designed maximum voltage difference, namely the resistance value of the second resistor R2 in fig. 2, for example, the calculation result can be 100 omega, theoretically, the current limiting resistance with the resistance value cannot cause any device damage in a circuit, the situation that the device damage is caused by the resistance value does not occur in a long-time test, the selection of the resistance value increases the driving current of a signal sending pin of the RS232 interface chip of a lower computer (tester) to the maximum extent, and energy is stored in a positive voltage energy storage capacitor C1/C2/C3/C4 as much as possible. In abundant experiments, if the resistance value of R2 is increased, for example, 330 Ω is changed, if the driving voltage of the signal output pin TX of the RS232 chip is +/-5.4V, when the baud rate 19200 communication is carried out, the voltage of C1/C2/C3/C4 measured by an oscilloscope is only about +/-4V at most; in other cases, the maximum possible voltage of C1/C2/C3/C4 is about ± 5V when R2 is 100 Ω, and the voltage that many RS232 interface chips can recognize is ± 2.4V, so the resistance of R2 is important to select. In fig. 1, the capacities of the first capacitor C1 and the second capacitor C2 of the positive voltage energy storage capacitor need to be larger; the capacities of the third capacitor C3 and the fourth capacitor C4 of the negative voltage energy storage capacitor in FIG. 1 can be smaller; the capacities of the positive and negative voltage energy storage capacitors are different, the energy storage of the negative voltage is enough, and if the capacities of the C1 and the C2 are changed to the capacities of the C3 and the C4, the communication abnormality is easily caused by the insufficient energy storage of the positive voltage when the communication data is too long.
Example two
In fig. 2, "+ 5V power supply is connected to the 6 th pin of the male terminal XS3 of the third DB9 through the first resistor R1, and is replaced with" +5V power supply connected to the 8 th pin of the male terminal XS3 of the third DB9 through the first resistor R1 ", and the right side of the first resistor R1in fig. 2 is connected to the 8 th pin of the male terminal third DB9, and meanwhile, the positive electrode of the sixth diode D6 in fig. 1 is connected to the 7 th pin of the male terminal XS1 of the first DB9, the positive electrode of the eighth diode D8 is connected to the 8 th pin XS1 of the male terminal XS 8 of the first DB9, the positive electrode of the seventh diode D7 is connected to the 7 th pin of the female terminal XS2 of the second DB9, and the positive electrode of the ninth diode D9 is connected to the 8 th pin XS 9 of the female terminal XS2 of the second DB 9.
EXAMPLE III
In fig. 2, the left side of the first resistor R1 is connected to the spare 232 signal output pin of the RS232 interface chip, and the TTL signal input pin corresponding to the spare 232 signal output pin is grounded.
The embodiment of the communication method for converting the semi-passive RS232 into the RS232 has the following advantages: (1) the Schmitt trigger in the prior art is removed, so that the area of a PCB (printed circuit board) is saved, the cost is saved, and the energy consumption is reduced; (2) the method of using DTR and RTS to steal negative voltage in the prior art is cancelled, for the reasons of 'background technology'; (3) the +5V power supply arranged by the lower computer is conducted in a single direction through the R1 with proper value, and finally the positive voltage energy storage capacitor (C1 or C2) of the isolation communication circuit at the lower computer end is charged, so that no damage can be caused to any device in theory and practice, and the problem of communication abnormity caused by the fact that the positive voltage energy storage capacitor cannot be charged before the lower computer sends information is solved; (4) fig. 1, fig. 2, and fig. 3 can combine all desired effects of isolated communication and non-isolated communication, all combinations are very reliable in communication, the longest data that can be found in a test is sent and received frequently, all situations where a problem has been found in a customer communication are tested using the worst environment, and a problem never occurs in millions of communications; (5) the capacitors with larger capacity are used for C1 and C2, and the capacitors with smaller capacity are used for C3 and C4, so that the capacitance capacities of C1 and C2 are different from those of C3 and C4, which obviously improves the communication quality in practice, and the area of the PCB corresponding to the figure 1 is small as much as possible, so that the universal small-volume mold-opening shell is adapted, and the description of the capacitors in the prior art is fuzzy, so that the invention is an innovative point; (6) as shown in (5), the area of fig. 1 of the invention is much smaller than that of the corresponding PCB in the prior art, and the invention is suitable for a general small-volume mold-opened shell, so that the cost of the matching shell is reduced by about 90% or more, and the PCB cannot be broken off under stress because the matching shell is not used; (7) the resistance values of R2 and R3 are limited, the driving current is improved to the maximum extent, and the requirements of theory and practice cannot be met, so that no damage is caused to any device; (8) the unidirectional conduction power supply under different scenes is realized by using four diodes D6, D7, D8 and D9; (9) although part of the principle uses the prior art, the prior art is hardly willing to be used by customers, because the problems are frequently generated on the site of the customers and the production progress is seriously tired, the invention is the same type of invention which can be really popularized and used, and the cost is low.
Finally, it is to be noted that: the above examples are only specific embodiments of the present invention, and are used to illustrate the technical solutions of the present invention, but not to limit the technical solutions, and the scope of the present invention is not limited thereto. Those skilled in the art will understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (6)

1. A semi-passive RS232 to RS232 communication method comprises the following steps: DB9 female-to-female connection line, an upper computer, a lower computer and an isolation communication circuit; characterized in that the isolated communication circuit comprises: the first DB9 male head XS1, the second DB9 female head XS2, the first isolation push-pull driving unit, the second isolation push-pull driving unit, the first electrolytic capacitor C1 and the second electrolytic capacitor C2, wherein the first electrolytic capacitor C1 and the second electrolytic capacitor C2 are positive voltage energy storage capacitors; the lower computer is provided with an RS232 interface chip and a third DB9 male connector XS3, a +5V power supply is arranged in the lower computer, the +5V power supply supplies power to the RS232 interface chip, and the +5V power supply is led to a first electrolytic capacitor C1 and a second electrolytic capacitor C2 through a diode single guide in an isolation communication circuit after passing through a current-limiting resistor; be provided with the public head of sixth DB9 in the host computer, utilize the female first connecting wire of DB9 to change and keep apart communication circuit, next machine and host computer and realize the communication of three kinds of modes:
in the first mode, a second DB9 female head XS2 of the isolation communication circuit is directly inserted into a sixth DB9 male head of an upper computer, a first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-female head connecting line, the other DB9 female head of the DB9 female head-female head connecting line is connected with a third DB9 male head XS3 of a lower computer, and a +5V power supply charges a first electrolytic capacitor C1;
in a second mode, any DB9 female head of a DB9 female-to-female head connecting line is directly inserted into a sixth DB9 male head of an upper computer, the other DB9 female head of the DB9 female-to-female head connecting line is connected with a first DB9 male head XS1 of an isolation communication circuit, a second DB9 female head XS2 of the isolation communication circuit is connected with a third DB9 male head XS3 of a lower computer, and a +5V power supply charges a second electrolytic capacitor C2;
and in the third mode, under the condition of direct communication without isolation, an isolation communication circuit is not used, any DB9 female head of the DB9 female-to-female head connecting line is directly inserted into a sixth DB9 male head of the upper computer, and the other DB9 female head of the DB9 female-to-female head connecting line is inserted into a third DB9 male head XS3 of the lower computer.
2. The method of claim 1, wherein a first isolation push-pull driving unit is composed of a first optical coupler U1, a second optical coupler U2 and a fourth resistor R4, and a second isolation push-pull driving unit is composed of a third optical coupler U3, a fourth optical coupler U4 and a fifth resistor R5.
3. A semi-passive RS232 to RS232 communication method according to claim 2, wherein the 2 nd pin of the male XS1 of the first DB9 is reversely connected to the second diode D2 and then to the negative electrode of the third electrolytic capacitor C3, the negative electrode of the third electrolytic capacitor C3 is connected to the negative electrode of the second optocoupler U2 receiving tube, the 2 nd, 4 th and 6 th pins of the male XS1 of the first DB9 are respectively connected to the positive electrode of the first electrolytic capacitor C1 through the fourth diode D4, the sixth diode D6 and the eighth diode D8 in common, the positive electrode of the first electrolytic capacitor C1 is connected to the positive electrode of the first optocoupler x 686u 9 receiving tube, the 3 rd pin of the male XS1 of the first DB9 is connected to the negative electrode of the first optocoupler U1 receiving tube and to the positive electrode of the second optocoupler U2 receiving tube, the male XS 874 2 nd pin of the first DB 86874 28 is connected to the negative electrode of the first optocoupler x 3R 3 through the negative electrode of the fifth optocoupler x 3R 3, and then to the negative electrode 3C 3, The positive electrode of the third capacitor C3, the negative electrode of the input end of the third optocoupler U3 and the positive electrode of the input end of the fourth optocoupler U4; a 3 rd pin of a second DB9 female head XS2 is reversely connected with a third diode D3 and then connected with a cathode of a fourth electrolytic capacitor C4, a cathode of the fourth electrolytic capacitor C4 is connected with a cathode of a fourth optical coupler U4 receiving tube, a 3 rd pin, a 4 th pin and a 6 th pin of a second DB9 female head XS2 are respectively and commonly connected with an anode of a second electrolytic capacitor C2 through a fifth diode D5, a seventh diode D7 and a ninth diode D9, an anode of the second electrolytic capacitor C2 is connected with an anode of a third optical coupler U3 receiving tube, a 2 nd pin of the second DB9 female head XS2 is connected with a cathode of a third optical coupler U3 receiving tube and is connected with an anode of a fourth optical coupler U4 receiving tube, a 3 rd pin of a second DB9 female head XS2 is connected with an anode of a first U1 input end and a cathode of a U2 through a fourth resistor R4, a 5 th pin of a second DB9 female connector XS2 is connected with a negative electrode of a second capacitor C2, a positive electrode of a fourth capacitor C4, a negative electrode of an input end of a first optocoupler U1 and a positive electrode of an input end of a second optocoupler U2; the capacity of the first capacitor C1 is greater than that of the third capacitor C3, and the capacity of the second capacitor C2 is greater than that of the fourth capacitor C4;
the +5V power supply is connected with the 6 th pin of the male XS3 of the third DB9 through a first resistor R1; the ground of the RS232 interface chip is the same as the 5 th pin XS3 of the male header of the third DB 9; the 232 signal output pin T1OUT of the RS232 interface chip is connected with the 3 rd pin of the male XS3 of the third DB9 through a second resistor R2, and the 2 nd pin of the male XS3 of the third DB9 is connected with the 232 signal input pin R1IN of the RS232 interface chip through a third resistor R3.
4. The method according to claim 3, wherein there are 3 application scenarios:
firstly, a second DB9 female head XS2 of an isolation communication circuit is directly inserted into a sixth DB9 male head of an upper computer, a first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-female head connecting line, the other DB9 female head of the DB9 female head-female head connecting line is connected with a third DB9 male head XS3 of a lower computer, a +5V power supply is connected with a 6 th pin of the third DB9 male head XS3 through a first resistor R1, then the power supply is connected with one end of the DB9 female head-female head connecting line, and then the power supply is connected with a 4 th pin of the first DB9 male head XS1 through the other end of the DB9 female head-female head connecting line, and then a sixth diode D6 is used for charging a first electrolytic capacitor C1;
inserting any DB9 female head of a DB9 female-to-female head connecting line into a sixth DB9 male head of an upper computer directly, connecting the other DB9 female head of the DB9 female-to-female head connecting line with a first DB9 male head XS1 of an isolation communication circuit, connecting a second DB9 female head XS2 of the isolation communication circuit with a third DB9 male head XS3 of a lower computer, connecting a +5V power supply with a 6 th pin of the third DB9 male head XS3 through a first resistor R1, and then charging a second electrolytic capacitor C2 through a 6 th pin of the second DB9 female head XS2 and a ninth diode D9;
and thirdly, under the condition of direct communication without isolation, an isolation communication circuit is not used, any DB9 female head of a DB9 female head-to-female head connecting line is directly inserted into a sixth DB9 male head of the upper computer, the other DB9 female head of the DB9 female head-to-female head connecting line is inserted into a third DB9 male head XS3 of the lower computer, and a +5V power supply is connected with a 6 th pin of a third DB9 male head XS3 through a first resistor R1, then is connected with a 4 th pin of the sixth DB9 male head of the upper computer through one end of the DB9 female head-to-female head connecting line and the other end of the DB9 female head-to-female head connecting line.
5. A semi-passive RS232 to RS232 communication method as claimed in claim 2, wherein +5V is further connected to the 8 th pin of the male XS3 of the third DB9 through the first resistor R1, the first resistor R1 is connected to the 8 th pin of the male XS 9 of the third DB, the positive electrode of the sixth diode D6 is connected to the 7 th pin of the male XS1 of the first DB9, the positive electrode of the eighth diode D8 is connected to the 8 th pin of the male XS1 of the first DB9, the positive electrode of the seventh diode D7 is connected to the 7 th pin of the female XS2 of the second DB9, and the positive electrode of the ninth diode D9 is connected to the 8 th pin of the female XS2 of the second DB 9.
6. The method of claim 2, wherein the first resistor R1 is connected to a spare 232 signal output pin of the RS232 interface chip, and connects a TTL level signal input pin corresponding to the spare 232 signal output pin to ground.
CN202210489611.1A 2022-05-06 2022-05-06 Semi-passive RS 232-to-RS 232 communication method Active CN114925006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210489611.1A CN114925006B (en) 2022-05-06 2022-05-06 Semi-passive RS 232-to-RS 232 communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210489611.1A CN114925006B (en) 2022-05-06 2022-05-06 Semi-passive RS 232-to-RS 232 communication method

Publications (2)

Publication Number Publication Date
CN114925006A true CN114925006A (en) 2022-08-19
CN114925006B CN114925006B (en) 2024-03-05

Family

ID=82807365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210489611.1A Active CN114925006B (en) 2022-05-06 2022-05-06 Semi-passive RS 232-to-RS 232 communication method

Country Status (1)

Country Link
CN (1) CN114925006B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0962869A1 (en) * 1998-06-02 1999-12-08 Abb Control Dual-standard interface circuit for serial link
CN106940685A (en) * 2017-03-14 2017-07-11 浙江南都电源动力股份有限公司 The power supply circuit of the passive transducers of RS232 485

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0962869A1 (en) * 1998-06-02 1999-12-08 Abb Control Dual-standard interface circuit for serial link
CN106940685A (en) * 2017-03-14 2017-07-11 浙江南都电源动力股份有限公司 The power supply circuit of the passive transducers of RS232 485

Also Published As

Publication number Publication date
CN114925006B (en) 2024-03-05

Similar Documents

Publication Publication Date Title
CN103576544B (en) A kind of terminal with OTG function
CN104953650A (en) Battery electric quantity display device
CN217335586U (en) Semi-passive RS 232-RS 232 communication system
CN114925006A (en) Semi-passive RS 232-to-RS 232 communication method
CN219458742U (en) DC-48V main and standby power supply automatic switching isolation power supply circuit
CN206389155U (en) Many mouthfuls of USB intelligent charges HUB of one kind
CN100454711C (en) Protecting method and apparatus for battery undervoltage
CN109765819A (en) A kind of FPGA and its interface conversion circuit
CN206759482U (en) CAN isolation circuit
CN214314637U (en) One-to-two quick-charging data line adopting TYPE-C interface input
CN212085849U (en) Double-control lock key station charging control circuit
CN208158115U (en) A kind of lightning protection circuit of POE interchanger
CN210155657U (en) Serial port power supply circuit and electronic equipment
CN206021057U (en) A kind of master & slave control system for using two connecting lines
CN213814659U (en) Adapter for converting RS232 serial port into I2C interface
CN216565446U (en) Circuit of switch
CN109907378A (en) Electronic cigarette power circuit and electronic cigarette
CN215068215U (en) Type-C interface auxiliary test and switching circuit
CN210347726U (en) BMS battery pack wrong connection prevention protection device
CN113098543B (en) Two-wire system multiplexing circuit
CN212012682U (en) RS-485 communication circuit
CN212541917U (en) SSD test carrier plate and SSD test system
CN216530611U (en) Sharing portable power source charging cabinet control circuit
CN215068132U (en) Main board
CN213183605U (en) Multifunctional test board

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240125

Address after: No.134, Zhuzhou Road, Laoshan District, Qingdao City, Shandong Province 266101

Applicant after: Qingdao Ainuo Instrument Co.,Ltd.

Country or region after: China

Address before: No.134, Zhuzhou Road, Laoshan District, Qingdao City, Shandong Province 266101

Applicant before: QINGDAO AINUO INSTRUMENT Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant