CN114925006B - Semi-passive RS 232-to-RS 232 communication method - Google Patents
Semi-passive RS 232-to-RS 232 communication method Download PDFInfo
- Publication number
- CN114925006B CN114925006B CN202210489611.1A CN202210489611A CN114925006B CN 114925006 B CN114925006 B CN 114925006B CN 202210489611 A CN202210489611 A CN 202210489611A CN 114925006 B CN114925006 B CN 114925006B
- Authority
- CN
- China
- Prior art keywords
- head
- female head
- pin
- female
- male
- 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
- 238000004891 communication Methods 0.000 title claims abstract description 93
- 238000000034 method Methods 0.000 title claims abstract description 16
- 239000003990 capacitor Substances 0.000 claims abstract description 92
- 238000002955 isolation Methods 0.000 claims abstract description 49
- 238000004146 energy storage Methods 0.000 claims abstract description 30
- 230000003287 optical effect Effects 0.000 claims description 21
- 238000010586 diagram Methods 0.000 description 6
- 238000012360 testing method Methods 0.000 description 6
- 230000005856 abnormality Effects 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000013011 mating Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0002—Serial port, e.g. RS232C
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/38—Universal adapter
- G06F2213/3852—Converter 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, 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 three modes of communication are realized by using a DB9 female head-to-female head connecting line: (1) the female head of the isolation communication circuit is inserted into the male head of the upper computer, and the DB9 female head-to-female head connecting wire is connected with the isolation communication circuit and the lower computer; (2) the DB9 female-to-female connection line is connected with the isolation communication circuit and the upper computer, and the female of the isolation communication circuit is connected with the male of the lower computer; (3) no isolated communication circuit is used. The invention sets the +5V power supply to charge the positive voltage energy storage capacitor, realizes excellent communication performance, has lower cost than the prior art, and solves the problem of communication reliability.
Description
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 standard tester and the like under severe working conditions.
Background
The RS232 communication is negative logic communication, the logic '1' is-3V to-15V, the logic '0' is +3V to +15V, wherein the idle state of a data output pin of the RS232 interface chip is logic '1' which is longer than one bit (bit), and the common RS232 interface chip can identify +/-2.4V; the RS232 interface of the industrial control generally only uses Rx, tx, GND pins, and uses DB9 interface for communication, and a computer is used as an upper computer for controlling other instruments.
In most cases, RS232 to RS232 should perform isolated communication, especially in severe working environments with high voltage and high current, but direct communication situations without isolation need to be considered. When RS 232-to-RS 232 isolation communication is carried out, stable communication is required, and meanwhile, the production progress cannot be tired. The RS 232-to-RS 232 isolation communication comprises an active mode and a passive mode, wherein the active mode is that the two ends of the communication are respectively provided with an independent power supply, the passive mode is that the two ends of the communication are not provided with the independent power supply, and the semi-passive mode is that the lower computer (such as an safety rule tester) end of the communication is provided with the independent power supply (only 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 be problematic, but also occupies about half of layout board layout space, and meanwhile, the cost is high due to the large proportion of increase of cost. In the prior art, in order to save power, the schmitt trigger circuit is not used for shaping a communication waveform and preventing false triggering, but is only used for utilizing one-time instant shaking of voltage when the power is just on, a charge pump circuit charges a very small amount of power to a high-voltage energy storage capacitor group, and the power is too small to enable a lower computer (such as a tester) to be frequently unable to recognize when an upper computer sends an instruction, and the lower computer is required 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, so that the positive voltage energy storage capacitor set at the end of the tester discharges slowly due to leakage current of other elements, and if the discharge is excessive, communication abnormality is caused due to too low voltage.
In the prior art, the negative voltage energy storage capacitor group of the isolation circuit is charged by utilizing negative voltage under the normal state of a DTR (digital television) pin and an RTS (real time standard) pin, and the driving voltage of a sending pin of a 232 interface chip of a lower computer instrument is about + -5.4V which is close to about + -2.4V which can be identified by the 232 interface chip, but the lower computer in industrial control does not design the DTR pin and the RTS pin at all, so that the negative voltage energy storage capacitor group of the isolation circuit at the end of the lower computer instrument cannot be charged by utilizing the DTR pin and the RTS pin; the driving voltage of the upper computer is about +/-10.8V, so that the positive and negative voltage energy storage capacitor sets can store enough electric energy, and the negative voltage energy storage capacitor sets are not required to be charged by using a DTR/RTS pin at all; in the next step, the idle state of the output pin of the RS232 interface chip is logic '1' which is negative voltage for more than one bit, the electric energy of the TX pin for charging the negative voltage energy storage capacitor is enough in the idle state, when the circuit which is designed by the invention and does not use the DTR and the RTS pin to particularly charge the negative voltage energy storage capacitor group is used for carrying out the isolated communication test, when millions of times of commands from the shortest to the longest possible to use are sent by using the baud rate 38400, no error occurs, the energy stored by the negative voltage energy storage capacitor group is always enough, and only the energy stored by the positive voltage energy storage capacitor group may not be enough. Thus, it is a meaningless idea to steal negative voltage power from DTR, RTS pins in industrial control. In reality, the situation that the electrical components 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 impaired due to too frequent communication abnormality.
Disclosure of Invention
In order to solve the technical problems, the invention perfectly solves all the defects in the prior art, and has high flexibility and compatibility. The technical scheme adopted by the invention is as follows:
a semi-passive RS 232-to-RS 232 communication method comprises the following steps: DB9 female-to-female connection line, upper computer, lower computer and isolation communication circuit; the isolated communication circuit includes: the first DB9 male head XS1, the second DB9 female head XS2, a first isolation push-pull driving unit, a second isolation push-pull driving unit, a first electrolytic capacitor C1 and a 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 head 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 conducted in one direction to charge the first electrolytic capacitor C1 and the second electrolytic capacitor C2 through a diode in the isolation communication circuit after passing through a current limiting resistor; the upper computer is provided with a sixth DB9 male head, and three modes of communication are realized by using a DB9 female head-to-female head connecting line to connect and isolate a communication circuit, the lower computer and the upper computer:
the first DB9 female head XS2 of the isolation communication circuit is directly inserted into a sixth DB9 male head of the upper computer, the first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-to-female head connecting wire, the other DB9 female head of the DB9 female head-to-female head connecting wire is connected with a third DB9 male head XS3 of the lower computer, and a +5V power supply charges the first electrolytic capacitor C1;
in the second mode, any DB9 female head of a DB9 female head-to-female head connecting wire is directly inserted into a sixth DB9 male head of an upper computer, the other DB9 female head of the DB9 female head-to-female head connecting wire 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;
in the third mode, under the condition of direct communication without isolation, any DB9 female head of the DB9 female head-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 head-to-female head connecting line is inserted into a third DB9 male head XS3 of the lower computer without an isolation communication circuit.
The invention has the beneficial effects that:
the +5V power supply is arranged in the lower computer, and the +5V power supply is charged through a current limiting resistor and then a diode to conduct the first electrolytic capacitor C1 and the second electrolytic capacitor C2 in a unidirectional manner under the condition of partial communication; through the parameter optimization 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 a semi-passive RS 232-to-RS 232 isolation communication circuit and an isolation communication method which are extremely reliable in performance and environment-friendly are realized.
The invention has lower cost than the prior art, but really solves the problem of communication reliability, in the long-term test of various application scenes, the invention never causes abnormal communication, and as the theory guarantees, the invention never causes danger or potential danger to operators, equipment and environment, and the performance is not comparable with the prior art.
Drawings
FIG. 1 is a schematic diagram of an isolated communication circuit according to an embodiment of the present invention;
FIG. 2 is a schematic 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 line according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made apparent and complete in conjunction with the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the present invention.
Example 1
Referring to fig. 1, a schematic diagram of an isolated communication circuit according to an embodiment of the present invention is shown, where pins with the same names in fig. 1 are all connected to each other. The isolated communication circuit includes: the first DB9 male head XS1, the second DB9 female head XS2, the first optical coupler U1, the second optical coupler U2, the third optical coupler U3 and the fourth optical coupler U4, wherein the first isolated push-pull driving unit is formed by the first optical coupler U1, the second optical coupler U2 and the fourth resistor R4, the second isolated push-pull driving unit is formed by the third optical coupler U3, the fourth optical coupler U4 and the fifth resistor R5, and the fourth resistor R4 and the fifth resistor R5 are used for limiting current, so that the current is small enough to consume less energy and is large enough to turn on the optical couplers. The 2 nd pin of the first DB9 male head XS1 is reversely connected with the second diode D2 and then connected with the cathode of the third electrolytic capacitor C3, the cathode of the third electrolytic capacitor C3 is connected with the cathode of the second opto-coupler U2 receiving tube, the 2 nd pin, the 4 th pin and the 6 th pin of the first DB9 male head XS1 are respectively connected with the anode of the first electrolytic capacitor C1 through the fourth diode D4, the sixth diode D6 and the eighth diode D8, the anode of the first electrolytic capacitor C1 is connected with the anode of the first opto-coupler U1 receiving tube, the 3 rd pin of the first DB9 male head XS1 is connected with the cathode of the first opto-coupler U1 receiving tube and connected with the anode of the second opto-coupler U2 receiving tube, the 2 nd pin of the first DB9 male head XS1 is connected with the anode of the third opto-coupler U3 input end and connected with the cathode of the fourth opto-coupler U4 input end after passing through the fifth resistor R5, and the anode of the third opto-coupler U3 input end and the cathode of the third opto-coupler U3 input end of the third opto-coupler U3. The 3 rd pin of the second DB9 female head XS2 is reversely connected to the third diode D3 and then connected to the negative electrode of the fourth electrolytic capacitor C4, the negative electrode of the fourth electrolytic capacitor C4 is connected to the negative electrode of the fourth opto-coupler U4 receiving tube, the 3 rd pin, the 4 th pin and the 6 th pin of the second DB9 female head XS2 are respectively connected to the positive electrode of the second electrolytic capacitor C2 through the fifth diode D5, the seventh diode D7 and the ninth diode D9, the positive electrode of the second electrolytic capacitor C2 is connected to the positive electrode of the third opto-coupler U3 receiving tube, the 2 nd pin of the second DB9 female head XS2 is connected to the negative electrode of the third opto-coupler U3 receiving tube and is connected to the positive electrode of the fourth opto-coupler U4 receiving tube, the 3 rd pin of the second DB9 female head XS2 is connected to the positive electrode of the first opto-coupler U1 input terminal and is connected to the negative electrode of the second opto-coupler U2 input terminal after passing through the fourth resistor R4, and the positive electrode of the second DB9 female head XS2 is connected to the positive electrode of the second opto-coupler C2 input terminal, and the positive electrode of the second opto-coupler C2 input terminal of the second opto-coupler C2 is connected to the positive electrode of the fourth opto-coupler C2.
In fig. 1, the 4 th pin and the 6 th pin of the first DB9 male head XS1 are respectively connected to the positive electrode of the first electrolytic capacitor C1 through the sixth diode D6 and the eighth diode D8, so as to charge the positive voltage energy storage capacitor; the 4 th pin and the 6 th pin of the second DB9 mother head XS2 are respectively connected to the positive electrode of the second electrolytic capacitor C2 through a seventh diode D7 and a ninth diode D9 so as to charge the positive voltage energy storage capacitor at the other side. In fig. 1, the capacities of the first capacitor C1 and the second capacitor C2 need to take larger values; the capacities of the third capacitor C3 and the fourth capacitor C4 in fig. 1 can be smaller; namely: the capacity of the first capacitor C1 is larger than that of the third capacitor C3, and the capacity of the second capacitor C2 is larger than that of the fourth capacitor C4, so that the performance is improved as much as possible and the area of the PCB is reduced.
Fig. 2 is a schematic circuit diagram of a lower computer according to an embodiment of the present invention, and the lower computer is exemplified by 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 third DB9 male head XS3 through a first resistor R1; the ground of the RS232 interface chip and the 5 th pin of the third DB9 male head XS3 are the same ground; the 232 signal output pin T1OUT of the RS232 interface chip is connected with the 3 rd pin of the third DB9 male head XS3 through a second resistor R2, and the 2 nd pin of the third DB9 male head XS3 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 all used for current limiting; the selection of the resistance value of R1 is required to be compatible with the situation that the tester and the upper computer which do not use the isolation communication circuit of FIG. 1 are directly connected, and the current flowing through R1 cannot be larger than the rated value of the upper computer chip at the moment, and the resistance value is smaller on the basis; the selection of the R2 resistance requires that the supplied current cannot be larger than a specified value in the 232 interface chip datasheet, and the resistance is required to be as small as possible on the basis; the resistance value of R3 is equal to R2.
In fig. 2, the +5v power supply is further connected to the 6 th pin of the third DB9 male XS3 through the first resistor R1, and R1 needs to take a suitable value, for example, about 2.7 k. In fig. 2, the second resistor R2 needs to take a suitable value, such as 100 Ω, to ensure that in various application scenarios, no device is 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 connecting line is a DB9 female-to-female connecting line with full cross line sequence, wherein the fourth DB9 female XS4 and the fifth DB9 female XS5 are two side terminals of the connecting line respectively.
The invention discloses a semi-passive RS 232-RS 232 communication method, which has the following 3 application scenes in real application:
(1) the second DB9 female head XS2 of the isolation communication circuit (figure 1) is directly inserted into a COM port (the COM port is a sixth DB9 male head) of an upper computer (the computer), the first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-to-female head connecting wire (figure 3), the other DB9 female head of the DB9 female head-to-female head connecting wire 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 part of the lower computer;
in the application scenario (1), the +5v power supply in fig. 2 is connected to the 6 th pin of the third DB9 male head XS3 through the first resistor R1, then connected to the 4 th pin of the first DB9 male head XS 1in fig. 1 through one end of the DB9 female head-to-female head connecting wire in fig. 3, and then connected to the other end of the DB9 female head-to-female head connecting wire, and then charges the first electrolytic capacitor C1 (positive voltage energy storage capacitor) through the sixth diode D6 in fig. 1.
(2) Any DB9 female of a DB9 female-to-female connection line (figure 3) is directly inserted into a COM port (the COM port is a sixth DB9 male) of an upper computer (the computer), the other DB9 female of the DB9 female-to-female connection line (figure 3) is connected with a first DB9 male XS1 of an isolation communication circuit (figure 1), a second DB9 female XS2 of the isolation communication circuit (figure 1) is connected with a third DB9 male XS3 of a lower computer (figure 2), and a +5V power supply and the third DB9 male XS3 are part of the lower computer;
in the application scenario (2), the +5v power supply in fig. 2 is connected to the 6 th pin of the third DB9 male head 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 head XS2 and the ninth diode D9 in fig. 1.
(3) In the case of direct communication without isolation, any DB9 female of the DB9 female-to-female connection line (fig. 3) is directly inserted into the COM port (the COM port is the sixth DB9 male) of the upper computer (computer) without using the isolated communication circuit (fig. 1), and the other DB9 female of the DB9 female-to-female connection line (fig. 3) is inserted into the third DB9 male XS3, +5v power supply and the third DB9 male XS3 of the lower computer (fig. 2) to be part of the lower computer.
In the application scenario (3), the +5v power supply in fig. 2 is connected to the 6 th pin of the third DB9 male head XS3 through the first resistor R1, then connected to the 4 th pin of the COM port (the COM port is the sixth DB9 male head) of the upper computer (computer) through one end of the DB9 female head-to-female head connecting line in fig. 3 and the other end of the DB9 female head-to-female head connecting line, which corresponds to the non-isolated communication situation.
The 4 th pin of the COM port of the upper computer (computer) is DTR, the computer only serves as the upper computer in industrial control, and the DTR is a transmitting pin for the upper computer; in fig. 2, the resistance value of the first resistor R1 is selected to consider both the case of isolated communication and the case of non-isolated communication, for example, R1 selects 2.7k, so that isolation is not damaged when isolation is carried out, and the maximum current is about 5V/2.7k=1.85 mA, and the maximum current is about 16V/2.7k=5.93 mA when isolation is not carried out, so that the upper computer chip is not damaged. The energy storage capacitor is charged by the positive voltage, because the RS232 interface chip can always keep the negative voltage in an idle state, 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 reduced due to leakage current when an operator does not operate for a long time, the positive voltage energy storage capacitor does not store energy when the operator uses new equipment to start operating, the voltage of the positive voltage energy storage capacitor is lower than the identifiable voltage of a 232 interface chip due to overlong data transmission, and the like; if an extension line is needed, an operator selects a DB9 male-to-female line in the straight-through sequence, and application scenes beyond the 3 application scene frames cannot appear, so that the operator cannot endanger equipment, people and environment due to misoperation.
The seventh diode D7 and the eighth diode D8 in fig. 1 are standby diodes. The specification of the RS232 interface chip is queried to obtain the theoretical maximum instantaneous output current of the TX pin of the RS232 interface chip, a proper current limiting resistance value, namely the resistance value of the second resistor R2 in fig. 2, can be calculated according to the maximum current and the designed maximum differential pressure, for example, the calculated result is 100 omega, the current limiting resistance of the resistance value can not cause any damage to devices in a circuit in theory, the damage condition of the devices caused by the resistance value does not occur in a long-time test, the selection of the resistance value increases the driving current of the signal transmitting pin of the RS232 interface chip of a lower computer (tester) to the maximum extent, and energy is stored in the positive voltage and negative voltage energy storage capacitors C1/C2/C3/C4 as much as possible. In the abundant experiments, if the resistance value of R2 is increased, for example, 330 omega is changed, if the driving voltage of a signal output pin TX of an RS232 chip is +/-5.4V, when the baud rate 19200 is communicated, the maximum possible voltage of C1/C2/C3/C4 is only about +/-4V by using an oscilloscope for measuring communication data with a general length; while the other conditions are unchanged, the maximum possible voltage of C1/C2/C3/C4 is about + -5V when R2 is 100deg.C, and the voltage which can be identified by many RS232 interface chips is + -2.4V, so that the resistance value selection of R2 is important. In fig. 1, the capacities of the first capacitor C1 and the second capacitor C2 of the positive voltage energy storage capacitor need to take larger values; 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 capacity of the positive and negative voltage energy storage capacitors is different, the energy storage of the negative voltage is enough, and if the capacities of C1 and C2 are changed to be the same as the capacities of C3 and C4, communication abnormality is easily caused by the insufficient energy storage of the positive voltage when communication data are too long.
Example two
In fig. 2, "+5v power is additionally connected to the 6 th pin of the third DB9 male head XS3 through the first resistor R1, instead of" +5v being additionally connected to the 8 th pin of the third DB9 male head XS3 through the first resistor R1, the right side of the first resistor R1 is changed to the 8 th pin of the third DB9 male head in fig. 2, meanwhile, the positive electrode of the sixth diode D6 is changed to the 7 th pin of the first DB9 male head XS1, the positive electrode of the eighth diode D8 is changed to the 8 th pin of the first DB9 male head XS1, the positive electrode of the seventh diode D7 is changed to the 7 th pin of the second DB9 female head XS2, and the positive electrode of the ninth diode D9 is changed to the 8 th pin of the second DB9 female head XS2 in fig. 1.
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 level signal input pin corresponding to the spare 232 signal output pin is grounded.
The embodiment of the semi-passive RS 232-to-RS 232 communication method has the following advantages: (1) The Schmitt trigger in the prior art is removed, so that the PCB area 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 canceled, and the reason is that the background technology is adopted; (3) The +5V power supply set by the lower computer is conducted in a unidirectional way through the R1 with a proper value, and finally the positive voltage energy storage capacitor (C1 or C2) of the isolation communication circuit at the lower computer is charged, so that damage to any device can not be caused in theory and practice, and the problem of communication abnormality caused by the fact that the positive voltage energy storage capacitor cannot be charged before the lower computer sends information is solved; (4) FIGS. 1, 2 and 3 can be combined into all the desired effects of isolated and non-isolated communications, all combinations being extremely reliable in communication, the longest data that can be found by frequent transmission and reception in the test, using the worst environment, testing all situations once problematic in customer communications, and never once problematic in tens of millions of communications; (5) The capacitors with larger capacity are used for C1 and C2, the capacitors with smaller capacity are used for C3 and C4, so that the capacitance capacities of C1, C2 and C3 and C4 are different, the communication quality is obviously improved in practice, the PCB area corresponding to the circuit board is made to be small as much as possible, the universal small-volume die-opening shell is adapted, and the description of the capacitors is ambiguous in the prior art, so that the circuit board is an innovation point of the invention; (6) As described in (5), the area of the corresponding PCB in fig. 1 of the present invention is much smaller than that of the corresponding PCB in the prior art, and the present invention is adapted to a universal small-volume open-mold case, which reduces the cost of the mating case by more than about 90%, and does not cause the PCB to break under stress due to the non-use of the mating case; (7) The resistance values of R2 and R3 are limited, the driving current is improved to the greatest extent, and meanwhile, the theory and practice are met without damaging any device; (8) The four diodes D6, D7, D8 and D9 are used for realizing unidirectional conduction power supply under different scenes; (9) Although some principles use the prior art, the prior art is hardly preferred by customers, because the prior art has extremely frequent problems on the site of customers, seriously tired the production progress, the invention is a similar invention which can be truly popularized and used, and the cost is low.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. Those skilled in the art will appreciate that: any person skilled in the art may modify or easily conceive of changes to the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the 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 technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.
Claims (6)
1. A semi-passive RS 232-to-RS 232 communication method comprises the following steps: DB9 female-to-female connection line, upper computer, lower computer and isolation communication circuit; the isolation communication circuit is characterized by comprising: the first DB9 male head XS1, the second DB9 female head XS2, a first isolation push-pull driving unit, a second isolation push-pull driving unit, a first electrolytic capacitor C1 and a 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 head 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 conducted in one direction to charge the first electrolytic capacitor C1 and the second electrolytic capacitor C2 through a diode in the isolation communication circuit after passing through a current limiting resistor; the upper computer is provided with a sixth DB9 male head, and three modes of communication are realized by using a DB9 female head-to-female head connecting line to connect and isolate a communication circuit, the lower computer and the upper computer:
the first DB9 female head XS2 of the isolation communication circuit is directly inserted into a sixth DB9 male head of the upper computer, the first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-to-female head connecting wire, the other DB9 female head of the DB9 female head-to-female head connecting wire is connected with a third DB9 male head XS3 of the lower computer, and a +5V power supply charges the first electrolytic capacitor C1;
in the second mode, any DB9 female head of a DB9 female head-to-female head connecting wire is directly inserted into a sixth DB9 male head of an upper computer, the other DB9 female head of the DB9 female head-to-female head connecting wire 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;
in the third mode, under the condition of direct communication without isolation, any DB9 female head of the DB9 female head-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 head-to-female head connecting line is inserted into a third DB9 male head XS3 of the lower computer without an isolation communication circuit.
2. The method for converting half-passive RS232 to RS232 according to claim 1, wherein the first optical coupler U1, the second optical coupler U2 and the fourth resistor R4 form a first isolated push-pull driving unit, and the third optical coupler U3, the fourth optical coupler U4 and the fifth resistor R5 form a second isolated push-pull driving unit.
3. The method for converting half-passive RS232 to RS232 according to claim 2, wherein the 2 nd pin of the first DB9 male terminal XS1 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 photo-coupler U2 receiving tube, the 2 nd pin, the 4 th pin and the 6 th pin of the first DB9 male terminal XS1 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, the positive electrode of the first electrolytic capacitor C1 is connected to the positive electrode of the first photo-coupler U1 receiving tube, the 3 rd pin of the first DB9 male terminal XS1 is connected to the negative electrode of the first photo-coupler U1 receiving tube and to the positive electrode of the second photo-coupler U2 receiving tube, the 2 nd pin of the first DB9 male terminal XS1 is connected to the positive electrode of the third photo-coupler U3 input terminal and the positive electrode of the fourth photo-coupler U4 input terminal after passing through the fifth resistor R5, and the positive electrode of the fourth photo-coupler input terminal XS1 and the negative electrode of the fourth photo-coupler input terminal of the fourth DB9 male terminal XS1 are connected to the positive electrode of the fourth photo-coupler 3 input terminal of the third photo-2 input terminal and the third photo-coupler input terminal of the fourth input terminal of the first DB 1 and the fourth photo-2; the 3 rd pin of the second DB9 female head XS2 is reversely connected with the third diode D3 and then connected with the cathode of the fourth electrolytic capacitor C4, the cathode of the fourth electrolytic capacitor C4 is connected with the cathode of the fourth optical coupler U4 receiving tube, the 3 rd pin, the 4 th pin and the 6 th pin of the second DB9 female head XS2 are respectively connected with the anode of the second electrolytic capacitor C2 through the fifth diode D5, the seventh diode D7 and the ninth diode D9 together, the anode of the second electrolytic capacitor C2 is connected with the anode of the third optical coupler U3 receiving tube, the 2 nd pin of the second DB9 female head XS2 is connected with the cathode of the third optical coupler U3 receiving tube and connected with the anode of the fourth optical coupler U4 receiving tube, the 3 rd pin of the second DB9 female head XS2 is connected with the anode of the first optical coupler U1 input end and the cathode of the second optical coupler U2 input end after passing through the fourth resistor R4, and the anode of the second capacitor C2 input end of the second optical coupler U2 and the anode of the fourth optical coupler U2 input end of the fourth capacitor C2; the capacity of the first capacitor C1 is larger than that of the third capacitor C3, and the capacity of the second capacitor C2 is larger than that of the fourth capacitor C4;
the +5V power supply is connected with the 6 th pin of the third DB9 male head XS3 through a first resistor R1; the ground of the RS232 interface chip and the 5 th pin of the third DB9 male head XS3 are the same ground; the 232 signal output pin T1OUT of the RS232 interface chip is connected with the 3 rd pin of the third DB9 male head XS3 through a second resistor R2, and the 2 nd pin of the third DB9 male head XS3 is connected with the 232 signal input pin R1IN of the RS232 interface chip through a third resistor R3.
4. A semi-passive RS232 to RS232 communication method according to claim 3, wherein the following 3 application scenarios are common in real applications:
(1) the second DB9 female head XS2 of the isolation communication circuit is directly inserted into a sixth DB9 male head of the upper computer, the first DB9 male head XS1 is connected with any DB9 female head of a DB9 female head-to-female head connecting wire, the other DB9 female head of the DB9 female head-to-female head connecting wire is connected with a third DB9 male head XS3 of the 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 one end of the DB9 female head-to-female head connecting wire is connected with the other end of the DB9 female head-to-female head connecting wire, and then is connected with a 4 th pin of the first DB9 male head XS1 through a sixth diode D6 to charge a first electrolytic capacitor C1;
(2) any DB9 female head of a DB9 female head-to-female head connecting wire is directly inserted into a sixth DB9 male head of an upper computer, the other DB9 female head of the DB9 female head-to-female head connecting wire 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, a +5V power supply is connected with a 6 th pin of the third DB9 male head XS3 through a first resistor R1, and then charges a second electrolytic capacitor C2 through a 6 th pin of the second DB9 female head XS2 and a ninth diode D9;
(3) 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 wire is directly inserted into a sixth DB9 male head of an upper computer, another DB9 female head of the DB9 female head-to-female head connecting wire is inserted into 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 one end of the DB9 female head-to-female head connecting wire is connected with a 4 th pin of the sixth DB9 male head of the upper computer through the other end of the DB9 female head-to-female head connecting wire.
5. The method for converting half-passive RS232 to RS232 according to claim 2, wherein +5v is further connected to the 8 th pin of the third DB9 male head XS3 through a first resistor R1, the first resistor R1 is connected to the 8 th pin of the third DB9 male head XS1, the positive electrode of the sixth diode D6 is connected to the 7 th pin of the first DB9 male head XS1, the positive electrode of the eighth diode D8 is connected to the 8 th pin of the first DB9 male head XS1, the positive electrode of the seventh diode D7 is connected to the 7 th pin of the second DB9 female head XS2, and the positive electrode of the ninth diode D9 is connected to the 8 th pin of the second DB9 female head XS 2.
6. The method for converting semi-passive RS232 to RS232 according to claim 2, wherein the first resistor R1 is connected to a standby 232 signal output pin of the RS232 interface chip, and a TTL level signal input pin corresponding to the standby 232 signal output pin is grounded.
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 CN114925006A (en) | 2022-08-19 |
CN114925006B true 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)
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 |
-
2022
- 2022-05-06 CN CN202210489611.1A patent/CN114925006B/en active Active
Patent Citations (2)
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 |
---|---|
CN114925006A (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8179654B2 (en) | Surge preventing circuit, local area network connector, and network module | |
CN103576544A (en) | Terminal with OTG function | |
CN204810286U (en) | Discernment supply circuit and ethernet power supply unit, system | |
CN114925006B (en) | Semi-passive RS 232-to-RS 232 communication method | |
CN113690967A (en) | Bidirectional charging circuit and device | |
CN217335586U (en) | Semi-passive RS 232-RS 232 communication system | |
CN211908750U (en) | Isolated operational amplification circuit | |
CN214314637U (en) | One-to-two quick-charging data line adopting TYPE-C interface input | |
CN212277921U (en) | Multiport shared PSE interface lightning stroke protection circuit | |
CN202475283U (en) | Dual-semiwave dual-voltage voltage stabilizing power circuit | |
CN210839526U (en) | Switching value signal processing circuit and device | |
CN209731211U (en) | More level converters and converting system | |
CN210074981U (en) | Wireless earphone charging box and earphone assembly | |
CN208028617U (en) | The embedded power supply and electric furniture of electric furniture | |
CN213814659U (en) | Adapter for converting RS232 serial port into I2C interface | |
CN201397505Y (en) | Serial port insulating circuit | |
CN218183058U (en) | Single-interface compatible input and output power supply circuit and power supply system | |
CN113098543B (en) | Two-wire system multiplexing circuit | |
CN216530646U (en) | Battery with USB reading information | |
CN210155657U (en) | Serial port power supply circuit and electronic equipment | |
CN216565446U (en) | Circuit of switch | |
CN216901644U (en) | Vice circuit board and people's face payment equipment | |
CN217956959U (en) | Interface switching device and RS232 interface device | |
CN219394479U (en) | Power supply switching output circuit, power supply switching circuit board and image pickup device | |
US11877244B2 (en) | Communication device and system with ground potential difference compensation |
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 |