[go: up one dir, main page]

CN119025457A - PLC universal switching circuit, PLC universal programming circuit and system - Google Patents

PLC universal switching circuit, PLC universal programming circuit and system Download PDF

Info

Publication number
CN119025457A
CN119025457A CN202411103147.3A CN202411103147A CN119025457A CN 119025457 A CN119025457 A CN 119025457A CN 202411103147 A CN202411103147 A CN 202411103147A CN 119025457 A CN119025457 A CN 119025457A
Authority
CN
China
Prior art keywords
chip
pin
plc
capacitor
sp232een
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.)
Pending
Application number
CN202411103147.3A
Other languages
Chinese (zh)
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.)
Yezhan Electronics Huizhou Co ltd
Original Assignee
Yezhan Electronics Huizhou 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 Yezhan Electronics Huizhou Co ltd filed Critical Yezhan Electronics Huizhou Co ltd
Priority to CN202411103147.3A priority Critical patent/CN119025457A/en
Publication of CN119025457A publication Critical patent/CN119025457A/en
Pending legal-status Critical Current

Links

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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • 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/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention relates to a PLC universal switching circuit, a PLC universal programming circuit and a system, which can realize the function of a programming line by adopting the PLC universal switching circuit and matching with a mobile phone charging line and a conversion output line, wherein the communication between a terminal and various types of PLC equipment can be realized only by means of the mobile phone charging line with one end being a Type-C port and the conversion output line with one end being an RS232 interface due to the level conversion function of the PLC universal switching circuit, wherein the mobile phone charging line is quite common and is convenient for taking materials anytime and anywhere, and therefore, only the conversion output line with one end being the RS232 interface and the other end being matched with the PLC equipment is also required, so that the problems of high space occupation rate and high cost caused by carrying a large number of types of programming lines are avoided.

Description

PLC universal switching circuit, PLC universal programming circuit and system
Technical Field
The invention relates to the technical field of PLC communication, in particular to a universal switching circuit of a PLC, a universal programming circuit of the PLC and a system.
Background
The existing PLC programming lines cannot be used universally or are compatible due to different factors such as programming software of each brand of PLC, interface types of PLC hardware and interface definition, and therefore, when equipment engineering personnel debug equipment on business trips, a plurality of programming lines are required to be carried on when equipment brands are unknown, the length of each programming line is 2-3 meters, the programming lines are put together, and the programming lines occupy the space of a tool bag or a back bag; in addition, the cost is high to match programming lines of various brands.
Disclosure of Invention
Based on this, it is necessary to provide a PLC universal switching circuit, a PLC universal programming circuit, and a system that have a low space occupation rate and a low cost.
A PLC universal switching circuit, comprising:
The Type-C input interface circuit is connected with one end of the mobile phone charging wire and is used for receiving a data signal from the terminal through the mobile phone charging wire;
A level shifter circuit comprising:
The first conversion module is connected with the Type-C input interface circuit and is used for converting the level of the data signal into TTL level;
The second conversion module is connected with the first conversion module and is used for converting the level of the data signal from TTL level to RS232 level;
the PLC universal switching circuit further comprises an RS232 output interface circuit, wherein the RS232 output interface circuit is respectively connected with one end of a conversion output line and the second conversion module and is used for outputting the data signals subjected to level conversion to the PLC equipment through the conversion output line.
In one embodiment, the first conversion module includes a CH340C chip, a capacitor C1, a resistor R2, a resistor R3, a light emitting diode LED1, a light emitting diode LED2, and a light emitting diode LED3;
The D+ pin and the D-pin of the CH340C chip are respectively connected with the Type-C input interface circuit; the V3 pin of the CH340C chip is connected to the ground terminal through the capacitor C1; the GND pin of the CH340C chip is connected with the ground terminal; VCC pin of the CH340C chip; the positive electrode of the light emitting diode LED1, the positive electrode of the light emitting diode LED2 and the positive electrode of the light emitting diode LED3 are commonly connected and are used for commonly receiving a power supply voltage; the negative electrode of the light-emitting diode LED1 is connected with the ground end through the resistor R1; the RXD pin of the CH340C chip is connected with the second conversion module and is connected with the cathode of the light emitting diode LED2 through a resistor R2; the TXD pin of the CH340C chip is connected with the second conversion module and is connected with the cathode of the light-emitting diode LED3 through a resistor R3; the RTS# pin of the CH340C chip is used for sending a request signal to the second conversion module; and a CTS# pin of the CH340C chip is used for receiving a clear signal from the second conversion module, and the CH340C chip is used for outputting the data signal according to the clear signal.
In one embodiment, the second conversion module includes an SP232EEN chip, a capacitor C2, a capacitor C3, a capacitor C4, and a capacitor C5;
The R2IN pin and the T2OUT pin of the SP232EEN chip are connected with the RS232 output interface circuit; the T2IN pin of the SP232EEN chip is connected with the TXD pin of the CH340C chip; the R2OUT pin of the SP232EEN chip is connected with the RXD pin of the CH340C chip; the V-pin of the SP232EEN chip is connected with the ground end through the capacitor C2; the C2-pin of the SP232EEN chip is connected to the C2+ pin of the SP232EEN chip through the capacitor C3; the C1-pin of the SP232EEN chip is connected to the C1+ pin of the SP232EEN chip through the capacitor C4; the V+ pin of the SP232EEN chip receives the power supply voltage through the capacitor C5; the R1IN pin of the SP232EEN chip is used for receiving the power supply voltage; the GND pin of the SP232EEN chip is connected with the ground terminal; the T1IN pin of the SP232EEN chip is connected with the RTS# pin of the CH340C chip and is used for receiving the sending request signal; the R1OUT pin of the SP232EEN chip is connected with the CTS# pin of the CH340C chip and is used for sending the clearing signal.
In one embodiment, the second conversion module further comprises a resistor R4 and a resistor R5; one end of the resistor R4 is connected with an R2IN pin of the SP232EEN chip, and the other end of the resistor R4 is connected with the RS232 output interface circuit; one end of the resistor R5 is connected with the T2OUT pin of the SP232EEN chip, and the other end of the resistor R5 is connected with the RS232 output interface circuit.
In one embodiment, the Type-C input interface circuit includes a USB interface chip; each GND pin of the USB interface chip is connected with the ground terminal; the EH pin and each VBUS pin of the USB interface chip are respectively used for receiving the power supply voltage; the D+ pin of the USB interface chip is connected with the D+ pin of the CH340C chip; and the D-pin of the USB interface chip is connected with the D-pin of the CH340C chip.
In one embodiment, the Type-C input interface circuit further comprises an over-current protection element, a capacitor C6, and a capacitor C7; one end of the overcurrent protection element is connected with each VBUS pin, and the other end of the overcurrent protection element, the first end of the capacitor C6 and the first end of the capacitor C7 are commonly connected and used for commonly receiving the power supply voltage; the second end of the capacitor C6 and the second end of the capacitor C7 are respectively connected with the ground terminal.
A PLC universal programming circuit comprising a cell phone charging cord, a conversion output cord, and the PLC universal switching circuit of any one of claims 1 to 6.
In one embodiment, the other end of the charging cord of the mobile phone includes at least one of a Type-A interface and a Type-C interface.
In one embodiment, the other end of the conversion output line includes at least one of a MINI interface and an RS232 interface.
A PLC universal programming system comprising a terminal, a PLC device and a PLC universal programming circuit as claimed in any one of claims 7 to 9.
According to the PLC universal switching circuit, the PLC universal programming circuit and the system, the function of a programming line can be achieved by adopting the PLC universal switching circuit and matching with a mobile phone charging line and a conversion output line, wherein the communication between a terminal and various types of PLC equipment can be achieved only by means of the mobile phone charging line with one end being a Type-C port and the conversion output line with one end being an RS232 interface due to the level conversion effect of the PLC universal switching circuit, the mobile phone charging line is quite common and is convenient to draw materials anytime and anywhere, therefore, only one end being the RS232 interface is required to be configured, and the other end can be matched with the PLC equipment through the conversion output line, and the problems of high space occupation rate and high cost caused by carrying a large number of types of programming lines are avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments or the conventional techniques of the present application, the drawings required for the descriptions of the embodiments or the conventional techniques will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a block diagram of a general switching circuit for a PLC according to an embodiment;
FIG. 2 is a circuit diagram of a general-purpose switching circuit for a PLC according to another embodiment;
FIG. 3 is a circuit diagram of a general purpose switching circuit for a PLC according to another embodiment;
fig. 4 is a circuit configuration diagram of a Type-C input interface circuit according to an embodiment.
Detailed Description
In order that the application may be readily understood, a more complete description of the application will be rendered by reference to the appended drawings. Embodiments of the application are illustrated in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
It will be understood that the terms first, second, etc. as used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first resistance may be referred to as a second resistance, and similarly, a second resistance may be referred to as a first resistance, without departing from the scope of the application. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
It is to be understood that in the following embodiments, "connected" is understood to mean "electrically connected", "communicatively connected", etc., if the connected circuits, modules, units, etc., have electrical or data transfer between them.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," and/or the like, specify the presence of stated features, integers, steps, operations, elements, components, or groups thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. Also, the term "and/or" as used in this specification includes any and all combinations of the associated listed items.
FIG. 1 is a block diagram of a general purpose switching circuit for PLC in an embodiment, as shown in FIG. 1, the general purpose switching circuit for PLC includes a Type-C input interface circuit 110, a level shifter circuit 120 and an RS232 output interface circuit 130; the Type-C input interface circuit 110 is connected to one end of the mobile phone charging wire, and is configured to receive a data signal from the terminal through the mobile phone charging wire; the level conversion circuit 120 includes a first conversion module 121 and a second conversion module 122, where the first conversion module 121 is connected to the Type-C input interface circuit 110 and is used for converting the level of the data signal into a TTL level; the second conversion module 122 is connected to the first conversion module 121, and is configured to convert the level of the data signal from the TTL level to the RS232 level; the RS232 output interface circuit 130 is connected to one end of the conversion output line and the second conversion module 122, respectively, and is configured to output the level-converted data signal to the PLC device via the conversion output line.
It can be appreciated that the connection between the PLC universal switching circuit and the terminal can be implemented through a mobile phone charging wire, where one end of the mobile phone charging wire is connected to the terminal, and the other end is connected to the Type-C input interface circuit 110, so as to implement data signal transmission. One end of the charging wire of the mobile phone is a Type-C interface, and the specific Type of the charging wire can be determined according to the interface of the terminal to be connected. Wherein the terminal may be a PC terminal.
The level conversion circuit 120 sequentially adopts the first conversion module 121 and the second conversion module 122, so that the data signals are sequentially converted into TTL level and RS232 level to meet the communication requirement of the PLC system. One end of the conversion output line is adapted to the RS232 output interface circuit 130, and the other end is adapted to the PLC device, so that for any PLC device adopting RS232 communication, only the other end of the conversion output line is adapted to the PLC device, and the conversion output line is easy to manufacture, and the number of the conversion output lines is the same as the number of interface types of the PLC device at most.
The RS232 output interface circuit 130 may include a D-DMR009PM-D002 male connector, as shown with reference to fig. 3.
The application can realize the function of programming lines by adopting the PLC universal switching circuit and matching with the mobile phone charging line and the switching output line, wherein the communication between the terminal and various types of PLC equipment can be realized only by means of the mobile phone charging line with one end being a Type-C port and the switching output line with one end being an RS232 interface due to the level switching function of the PLC universal switching circuit, the mobile phone charging line is more common and is convenient for taking materials at any time and any place, and therefore, only the switching output line with one end being the RS232 interface and the other end being matched with the PLC equipment is required to be configured, thereby avoiding the problems of high space occupation rate and high cost caused by carrying a large number of types of programming lines.
In one embodiment, as shown in fig. 2, the first conversion module 121 includes a CH340C chip, a capacitor C1, a resistor R2, a resistor R3, a light emitting diode LED1, a light emitting diode LED2, and a light emitting diode LED3; the D+ pin and the D-pin of the CH340C chip are respectively connected with the Type-C input interface circuit 110; the V3 pin of the CH340C chip is connected to the ground end through a capacitor C1; the GND pin of the CH340C chip is connected with the ground terminal; VCC pin of CH340C chip; the anode of the light emitting diode LED1, the anode of the light emitting diode LED2 and the anode of the light emitting diode LED3 are commonly connected and are used for commonly receiving a power supply voltage; the cathode of the light-emitting diode LED1 is connected with the ground end through a resistor R1; the RXD pin of the CH340C chip is connected with the second conversion module 122 and is connected with the cathode of the light emitting diode LED2 through a resistor R2; the TXD pin of the CH340C chip is connected with the second conversion module 122 and is connected with the cathode of the light-emitting diode LED3 through a resistor R3; the rts# pin of the CH340C chip is configured to send a request signal to the second conversion module 122; the CTS # pin of the CH340C chip is configured to receive the clear signal from the second conversion module 122, and the CH340C chip is configured to respond to the clear signal.
Wherein, the power supply voltage can be 5V; the light emitting diode LED1 may be used to indicate that the CH340C chip has been connected to the power supply, and the light emitting diode LED2 is used to indicate that the CH340C chip is in the receiving mode, where the CH340C chip receives, through the second conversion module 122, a debug signal from the PLC device, so that the CH340C chip; the light emitting diode LED3 is used for indicating that the CH340C chip is in the transmitting mode, and the CH340C chip transmits the data signal to the second conversion module 122.
The CTS # pin of the CH340C chip may receive the clear signal from the second conversion module 122, and when the CTS # pin receives the clear signal, determine whether the second conversion module 122 is ready for reception according to the clear signal, and when it is determined that the second conversion module is ready for reception, the CH340C chip transmits the data signal, and when it is determined that the second conversion module is not ready for reception, the CH340C chip stops transmitting the data signal; the rts# pin of the CH340C chip sends a request signal to the second conversion module 122 to inform the second conversion module 122 whether it is ready for reception, and when the second conversion module 122 receives the request signal, it determines whether the first conversion module 121 is ready for reception according to the request signal, when it determines that it is ready for reception, the second conversion module 122 sends a debug signal from the PLC device, and when it determines that it is not ready for reception, the second conversion module 122 stops sending the debug signal.
The first conversion module 121 formed by the CH340C chip can realize level conversion, and since the rts# pin and the cts# pin are connected with the second conversion module 122, accurate transmission and reception of data can be realized, and reliability and stability of data transmission are ensured. In addition, various programming lines are adopted to install various different driving programs at the computer end, and the application adopts the CH340C chip to be connected with the terminal, and only needs to install the CH341 driving program at the terminal, thereby improving convenience.
In one embodiment, as shown in FIG. 3, second conversion module 122 includes SP232EEN chip, capacitor C2, capacitor C3, capacitor C4, and capacitor C5; the R2IN pin and the T2OUT pin of the SP232EEN chip are connected with the RS232 output interface circuit 130; the T2IN pin of the SP232EEN chip is connected with the TXD pin of the CH340C chip; the R2OUT pin of the SP232EEN chip is connected with the RXD pin of the CH340C chip; the V-pin of the SP232EEN chip is connected with the ground end through a capacitor C2; the C2-pin of the SP232EEN chip is connected to the C2+ pin of the SP232EEN chip through a capacitor C3; the C1-pin of the SP232EEN chip is connected to the C1+ pin of the SP232EEN chip through a capacitor C4; the V+ pin of the SP232EEN chip receives the power supply voltage through a capacitor C5; the R1IN pin of the SP232EEN chip is used for receiving the power supply voltage; the GND pin of the SP232EEN chip is connected with the ground terminal; the T1IN pin of the SP232EEN chip is connected with the RTS# pin of the CH340C chip and is used for receiving a sending request signal; the R1OUT pin of the SP232EEN chip is connected to the CTS# pin of the CH340C chip for sending a clear signal.
It will be appreciated that the R2IN pin of the SP232EEN chip is used to receive debug signals from the terminal for forwarding to the CH340C chip; the T2OUT pin is used to output a data signal converted to an RS232 level. After receiving the power supply voltage, the R1IN pin of the SP232EEN chip becomes low level after passing through an internal inverter of the SP232EEN chip, so that the power supply voltage is output as a clear signal through the R1OUT pin and is further transmitted to the CTS of the CH340 chip to instruct the CH340 chip to output a data signal.
In one embodiment, with continued reference to FIG. 3, the second conversion module 122 further includes a resistor R4 and a resistor R5; one end of a resistor R4 is connected with an R2IN pin of the SP232EEN chip, and the other end of the resistor R4 is connected with the RS232 output interface circuit 130; one end of the resistor R5 is connected with the T2OUT pin of the SP232EEN chip, and the other end of the resistor R5 is connected with the RS232 output interface circuit 130.
It will be appreciated that resistors R4 and R5 may be used to reduce signal reflections of the debug and data signals during transmission, thereby improving the reliability of the debug and data signals.
In one embodiment, as shown in FIG. 4, the Type-C input interface circuit 110 includes a USB interface chip; each GND pin of the USB interface chip is connected with the ground terminal; the EH pin and each VBUS pin of the USB interface chip are respectively used for receiving the power supply voltage; the D+ pin of the USB interface chip is connected with the D+ pin of the CH340C chip; the D-pin of the USB interface chip is connected with the D-pin of the CH340C chip.
It can be understood that the Type-C input interface circuit 110 can be connected with the terminal through a Type-C connecting wire, the Type-C input interface circuit 110 is high in universality, a mobile phone charging wire with a Type-C interface can be connected with the mobile phone charging wire, the difficulty in connection between the terminal and the PLC universal switching circuit is reduced, and the difficulty in connection between the terminal and the PLC device is also reduced. The USB interface chip comprises two pairs of D+ pins and D-pins, and any pair of D+ pins and D-pins can be selected to be connected with the D+ pins and the D-pins of the CH340C chip.
In one embodiment, with continued reference to FIG. 4, the Type-C input interface circuit 110 further includes an over-current protection element, a capacitor C6, and a capacitor C7; one end of the overcurrent protection element is respectively connected with each VBUS pin, and the other end of the overcurrent protection element, the first end of the capacitor C6 and the first end of the capacitor C7 are commonly connected and are used for commonly receiving power supply voltage; the second terminal of the capacitor C6 and the second terminal of the capacitor C7 are connected to the ground terminal, respectively.
It will be appreciated that the overcurrent protection element may be a low-voltage chip fuse (denoted by F1 in the figure) for preventing a power short circuit caused by damage to a chip, a capacitor, or the like or a soldering process, thereby protecting the USB power supply of the previous stage. The capacitor C6 and the capacitor C7 can be used for filtering low-frequency noise and high-frequency noise from the USB interface power supply.
The embodiment of the invention also provides a PLC universal switching circuit, which comprises a Type-C input interface circuit 110, a level conversion circuit 120 and an RS232 output interface circuit 130, wherein the Type-C input interface circuit 110 comprises a USB interface chip, an overcurrent protection element, a capacitor C6 and a capacitor C7; the level conversion circuit 120 includes a first conversion module 121 and a second conversion module 122, wherein the first conversion module 121 includes a CH340C chip, a capacitor C1, a resistor R2, a resistor R3, a light emitting diode LED1, a light emitting diode LED2, and a light emitting diode LED3; the second conversion module 122 includes an SP232EEN chip, a capacitor C2, a capacitor C3, a capacitor C4, a capacitor C5, a resistor R4, and a resistor R5; the connection relationship and the working principle between the elements can refer to the above embodiments, and are not described herein.
The embodiment of the application also provides a PLC universal programming circuit which comprises a mobile phone charging wire, a conversion output line and the PLC universal switching circuit of any embodiment.
It can be understood that, based on the one end of the general switching circuit of PLC is Type-C interface, the other end is the RS232 interface, consequently can adopt the cell-phone charging wire that possesses Type-C interface in order to communicate with the terminal, and adopt the conversion output line that possesses the RS232 interface to communicate with PLC equipment, the cell-phone charging wire commonality is high, be convenient for acquire, in addition to the industrial personal who has the ability of working, also have the ability of preparation RS232 interface, thereby obtain the conversion output line that has the RS232 interface, compare in adopting a large amount of programming lines to realize the communication between terminal and the PLC equipment, the general programming circuit of PLC of this embodiment cost is lower, occupation space is littleer.
In one embodiment, the other end of the charging cord of the mobile phone includes at least one of a Type-A interface and a Type-C interface.
It can be understood that one end of the mobile phone charging wire is a Type-C interface, so that the mobile phone charging wire is connected with the PLC universal switching circuit, the other end of the mobile phone charging wire can be a single interface or a plurality of interfaces, when the mobile phone charging wire is a single interface, if the terminal is a Type-A interface, the mobile phone charging wire is also a Type-A interface, and if the terminal is a Type-C interface, the mobile phone charging wire is also a Type-C interface; if the terminal is multi-interface, the terminal can comprise a Type-A interface and a Type-C interface at the same time, so that more types of terminals can be adapted.
In one embodiment, the other end of the conversion output line includes at least one of a MINI interface and an RS232 interface.
It can be understood that one end of the conversion output line is an RS232 interface, so as to be connected with the PLC device, the other end of the conversion output line can be a single interface or multiple interfaces, when the conversion output line is a single interface, if the PLC device is a MINI interface, the conversion output line is also a MINI interface, and if the PLC device is an RS232 interface, the conversion output line is also an RS232 interface; in case of multiple interfaces, the interface may include both a MINI interface and an RS232 interface, thereby adapting to more types of PLC devices.
The embodiment of the invention also provides a PLC universal programming system which comprises a terminal, a PLC device and the PLC universal programming circuit of any embodiment.
In the description of the present specification, reference to the terms "some embodiments," "other embodiments," "desired embodiments," and the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1.一种PLC通用转接电路,其特征在于,包括:1. A PLC universal switching circuit, characterized in that it includes: Type-C输入接口电路,与手机充电线的一端连接,用于通过所述手机充电线接收来自终端的数据信号;A Type-C input interface circuit, connected to one end of a mobile phone charging cable, for receiving a data signal from a terminal through the mobile phone charging cable; 电平转换电路,包括:A level conversion circuit, comprising: 第一转换模块,与所述Type-C输入接口电路连接,用于将所述数据信号的电平转换为TTL电平;A first conversion module, connected to the Type-C input interface circuit, for converting the level of the data signal into a TTL level; 第二转换模块,与所述第一转换模块连接,用于将所述数据信号的电平由TTL电平转换为RS232电平;A second conversion module, connected to the first conversion module, for converting the level of the data signal from the TTL level to the RS232 level; 所述PLC通用转接电路还包括RS232输出接口电路,所述RS232输出接口电路分别与转换输出线的一端和所述第二转换模块连接,用于经所述转换输出线将电平转换后的所述数据信号输出至PLC设备。The PLC universal switching circuit also includes an RS232 output interface circuit, which is respectively connected to one end of the conversion output line and the second conversion module, and is used to output the data signal after level conversion to the PLC device via the conversion output line. 2.根据权利要求1所述的PLC通用转接电路,其特征在于,所述第一转换模块包括CH340C芯片、电容C1、电阻R1、电阻R2、电阻R3、发光二极管LED1、发光二极管LED2、发光二极管LED3;2. The PLC universal switching circuit according to claim 1, characterized in that the first conversion module comprises a CH340C chip, a capacitor C1, a resistor R1, a resistor R2, a resistor R3, a light emitting diode LED1, a light emitting diode LED2, and a light emitting diode LED3; 所述CH340C芯片的D+引脚和D-引脚分别与所述Type-C输入接口电路连接;所述CH340C芯片的V3引脚经所述电容C1连接至地端;所述CH340C芯片的GND引脚与所述地端连接;所述CH340C芯片的VCC引脚;所述发光二极管LED1的正极、所述发光二极管LED2的正极和所述发光二极管LED3的正极共连接,并用于共同接收电源电压;所述发光二极管LED1的负极经所述电阻R1与所述地端连接;所述CH340C芯片的RXD引脚与所述第二转换模块连接,并经电阻R2与所述发光二极管LED2的负极连接;所述CH340C芯片的TXD引脚与所述第二转换模块连接,并经电阻R3与所述发光二极管LED3的负极连接;所述CH340C芯片的RTS#引脚用于向所述第二转换模块发送请求信号;所述CH340C芯片的CTS#引脚用于接收来自所述第二转换模块的清除信号,所述CH340C芯片用于根据所述清除信号输出所述数据信号。The D+ pin and D- pin of the CH340C chip are respectively connected to the Type-C input interface circuit; the V3 pin of the CH340C chip is connected to the ground terminal via the capacitor C1; the GND pin of the CH340C chip is connected to the ground terminal; the VCC pin of the CH340C chip; the positive electrode of the light-emitting diode LED1, the positive electrode of the light-emitting diode LED2 and the positive electrode of the light-emitting diode LED3 are connected in common and used to receive the power supply voltage in common; the cathode of the light-emitting diode LED1 is connected to the ground terminal via the resistor R1; the C The RXD pin of the H340C chip is connected to the second conversion module and is connected to the cathode of the light-emitting diode LED2 via the resistor R2; the TXD pin of the CH340C chip is connected to the second conversion module and is connected to the cathode of the light-emitting diode LED3 via the resistor R3; the RTS# pin of the CH340C chip is used to send a request signal to the second conversion module; the CTS# pin of the CH340C chip is used to receive a clear signal from the second conversion module, and the CH340C chip is used to output the data signal according to the clear signal. 3.根据权利要求2所述的PLC通用转接电路,其特征在于,所述第二转换模块包括SP232EEN芯片、电容C2、电容C3、电容C4和电容C5;3. The PLC universal switching circuit according to claim 2, characterized in that the second conversion module comprises an SP232EEN chip, a capacitor C2, a capacitor C3, a capacitor C4 and a capacitor C5; 所述SP232EEN芯片的R2IN引脚和T2OUT引脚与所述RS232输出接口电路连接;所述SP232EEN芯片的T2IN引脚与所述CH340C芯片的TXD引脚连接;所述SP232EEN芯片的R2OUT引脚与所述CH340C芯片的RXD引脚连接;所述SP232EEN芯片的V-引脚经所述电容C2与地端连接;所述SP232EEN芯片的C2-引脚经所述电容C3连接至所述SP232EEN芯片的C2+引脚;所述SP232EEN芯片的C1-引脚经所述电容C4连接至所述SP232EEN芯片的C1+引脚;所述SP232EEN芯片的V+引脚经所述电容C5接收所述电源电压;所述SP232EEN芯片的R1IN引脚用于接收所述电源电压;所述SP232EEN芯片的GND引脚与所述地端连接;所述SP232EEN芯片的T1IN引脚与所述CH340C芯片的RTS#引脚连接,用于接收所述发送请求信号;所述SP232EEN芯片的R1OUT引脚与所述CH340C芯片的CTS#引脚连接,用于发送所述清除信号。The R2IN pin and T2OUT pin of the SP232EEN chip are connected to the RS232 output interface circuit; the T2IN pin of the SP232EEN chip is connected to the TXD pin of the CH340C chip; the R2OUT pin of the SP232EEN chip is connected to the RXD pin of the CH340C chip; the V- pin of the SP232EEN chip is connected to the ground via the capacitor C2; the C2- pin of the SP232EEN chip is connected to the C2+ pin of the SP232EEN chip via the capacitor C3; the C1 ... The capacitor C4 is connected to the C1+ pin of the SP232EEN chip; the V+ pin of the SP232EEN chip receives the power supply voltage via the capacitor C5; the R1IN pin of the SP232EEN chip is used to receive the power supply voltage; the GND pin of the SP232EEN chip is connected to the ground terminal; the T1IN pin of the SP232EEN chip is connected to the RTS# pin of the CH340C chip for receiving the send request signal; the R1OUT pin of the SP232EEN chip is connected to the CTS# pin of the CH340C chip for sending the clear signal. 4.根据权利要求3所述的PLC通用转接电路,其特征在于,所述第二转换模块还包括电阻R4和电阻R5;所述电阻R4的一端与所述SP232EEN芯片的R2IN引脚连接,所述电阻R4的另一端与所述RS232输出接口电路连接;所述电阻R5的一端与所述SP232EEN芯片的T2OUT引脚连接,所述电阻R5的另一端与所述RS232输出接口电路连接。4. The PLC universal switching circuit according to claim 3 is characterized in that the second conversion module also includes a resistor R4 and a resistor R5; one end of the resistor R4 is connected to the R2IN pin of the SP232EEN chip, and the other end of the resistor R4 is connected to the RS232 output interface circuit; one end of the resistor R5 is connected to the T2OUT pin of the SP232EEN chip, and the other end of the resistor R5 is connected to the RS232 output interface circuit. 5.根据权利要求2所述的PLC通用转接电路,其特征在于,所述Type-C输入接口电路包括USB接口芯片;所述USB接口芯片的各GND引脚与所述地端连接;所述USB接口芯片的EH引脚和各VBUS引脚分别用于接收供电电压;所述USB接口芯片的D+引脚与所述CH340C芯片的D+引脚连接;所述USB接口芯片的D-引脚与所述CH340C芯片的D-引脚连接。5. The PLC universal switching circuit according to claim 2 is characterized in that the Type-C input interface circuit includes a USB interface chip; each GND pin of the USB interface chip is connected to the ground terminal; the EH pin and each VBUS pin of the USB interface chip are respectively used to receive the power supply voltage; the D+ pin of the USB interface chip is connected to the D+ pin of the CH340C chip; and the D- pin of the USB interface chip is connected to the D- pin of the CH340C chip. 6.根据权利要求6所述的PLC通用转接电路,其特征在于,所述Type-C输入接口电路还包括过流保护元件、电容C6和电容C7;所述过流保护元件的一端分别与各所述VBUS引脚连接,所述过流保护元件的另一端、所述电容C6的第一端和所述电容C7的第一端共连接,并用于共同接收所述电源电压;所述电容C6的第二端和所述电容C7的第二端分别与所述地端连接。6. The PLC universal adapter circuit according to claim 6 is characterized in that the Type-C input interface circuit also includes an overcurrent protection element, a capacitor C6 and a capacitor C7; one end of the overcurrent protection element is respectively connected to each of the VBUS pins, and the other end of the overcurrent protection element, the first end of the capacitor C6 and the first end of the capacitor C7 are commonly connected and used to jointly receive the power supply voltage; the second end of the capacitor C6 and the second end of the capacitor C7 are respectively connected to the ground terminal. 7.一种PLC通用编程电路,其特征在于,包括手机充电线、转换输出线以及权利要求1至6任一项所述的PLC通用转接电路。7. A PLC universal programming circuit, characterized in that it comprises a mobile phone charging line, a conversion output line and the PLC universal switching circuit according to any one of claims 1 to 6. 8.根据权利要求7所述PLC通用编程电路,其特征在于,所述手机充电线的另一端包括Type-A接口和Type-C接口中的至少一种。8. According to the PLC universal programming circuit of claim 7, it is characterized in that the other end of the mobile phone charging cable includes at least one of a Type-A interface and a Type-C interface. 9.根据权利要求7所述PLC通用编程电路,其特征在于,所述转换输出线的另一端包括MINI接口和RS232接口中的至少一种。9. The PLC universal programming circuit according to claim 7 is characterized in that the other end of the conversion output line includes at least one of a MINI interface and an RS232 interface. 10.一种PLC通用编程系统,其特征在于,包括终端、PLC设备及权利要求7至9任一项所述的PLC通用编程电路。10. A PLC universal programming system, characterized in that it comprises a terminal, a PLC device and the PLC universal programming circuit as described in any one of claims 7 to 9.
CN202411103147.3A 2024-08-13 2024-08-13 PLC universal switching circuit, PLC universal programming circuit and system Pending CN119025457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411103147.3A CN119025457A (en) 2024-08-13 2024-08-13 PLC universal switching circuit, PLC universal programming circuit and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411103147.3A CN119025457A (en) 2024-08-13 2024-08-13 PLC universal switching circuit, PLC universal programming circuit and system

Publications (1)

Publication Number Publication Date
CN119025457A true CN119025457A (en) 2024-11-26

Family

ID=93534566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411103147.3A Pending CN119025457A (en) 2024-08-13 2024-08-13 PLC universal switching circuit, PLC universal programming circuit and system

Country Status (1)

Country Link
CN (1) CN119025457A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN209281192U (en) * 2018-11-29 2019-08-20 深圳深宝电器仪表有限公司 Signal conversion circuit, wireless transmission terminal and debugging apparatus
CN110188061A (en) * 2019-06-10 2019-08-30 上海乾申软件科技有限公司 RS485 interface and RS232 interface automatic switching circuit and electronic equipment
CN218159011U (en) * 2022-08-31 2022-12-27 重庆步航科技有限公司 Type-C conversion device
CN219936402U (en) * 2023-03-14 2023-10-31 珠江水文水资源勘测中心 Converter for quickly selecting channel Type-C to four-way RS232

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN209281192U (en) * 2018-11-29 2019-08-20 深圳深宝电器仪表有限公司 Signal conversion circuit, wireless transmission terminal and debugging apparatus
CN110188061A (en) * 2019-06-10 2019-08-30 上海乾申软件科技有限公司 RS485 interface and RS232 interface automatic switching circuit and electronic equipment
CN218159011U (en) * 2022-08-31 2022-12-27 重庆步航科技有限公司 Type-C conversion device
CN219936402U (en) * 2023-03-14 2023-10-31 珠江水文水资源勘测中心 Converter for quickly selecting channel Type-C to four-way RS232

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAXLINEAR: "SP232EEN技术手册", pages 1 - 17, Retrieved from the Internet <URL:https://www.datasheets.com/zh-cn/part-details/sp232een-maxlinear-34740403> *
南京沁恒微电子股份有限公司: "CH340技术手册", pages 1 - 10, Retrieved from the Internet <URL:https://www.wch.cn/downloads/CH340DS1_PDF.html> *

Similar Documents

Publication Publication Date Title
US10998737B2 (en) Intelligent switch system
CN101335736B (en) High-speed peripheral interconnecting interface
CN111108654B (en) Data line
TWI398053B (en) Cable assembly and electronic device
CN101977082A (en) Optical transceiver module, optical transmission device and optical transmission method
CN106100084A (en) Charging system, terminal, power supply adaptor and charging wire
CN101872332A (en) A network interface and serial port communication conversion equipment and LCD TV debugging system
CN205644528U (en) Connection interface conversion circuit and connection interface connector
CN119025457A (en) PLC universal switching circuit, PLC universal programming circuit and system
CN116772385A (en) Air conditioning system
CN217216609U (en) A network port switching device
CN107391411B (en) Interface circuit based on switch working mode selection
CN112564741B (en) A system and method for transmitting Ethernet using a type C interface
CN101211329B (en) Serial port connecting circuit
TWI708438B (en) Usb interface converting device
CN101345524A (en) Adapter for standard serial ports
CN215219002U (en) Automatic identification circuit for OTG equipment mode
CN218482967U (en) Communication switching circuit
CN222262701U (en) Two-wire high-speed 485 communication circuit for electric energy meter
CN218122640U (en) Matching circuit
CN218587186U (en) Multiplexing circuit of Ethernet interface and serial interface, electronic equipment
CN220896784U (en) Data communication device for upgrading vehicle-mounted camera software
CN221613300U (en) All-in-one serial port patch cord
CN216719086U (en) Electric energy meter communication isolation circuit, device and electric energy meter
CN101958495B (en) Connecting device capable of being used as transmission signal and also used as power supply transmission means

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