Input and output circuit, test control device and system
By using passive components such as transistors, MOS tubes and diodes in the PLC controller and using I2C circuit expansion, the problems of high design cost and large PCB size of traditional PLC controllers are solved, and the miniaturized detection equipment is realized. Effective signal control and circuit expansion.
Patent Information
- Application Number
- CN202411190302.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional PLC controllers are designed for high cost and large PCB design size in consumer electronics testing, so they cannot be effectively laid out on miniaturized detection equipment, and the input and output circuits are insufficient to be expanded.
Passive components such as transistors, MOS tubes and diodes are used to replace standard IC circuits, design input and output circuits, and expand input and output circuits through I2C circuits, optimize signal transmission and processing, and realize effective control of load components.
It reduces the design cost, reduces the PCB design size, ensures reliable signal transmission and processing, improves the reliability and flexibility of the control circuit, and is suitable for miniaturized detection equipment, and realizes effective control of input and output signals.
Smart Images

Figure CN119065295A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation control technology, and in particular to an input-output circuit, a test control device and a system. Background Art
[0002] Automation control is a mechanical and electrical integrated automation control technology and theory applied in modern industrial, agricultural, manufacturing and other production fields. Traditionally, standard controller devices represented by PLC are widely used in factory automation lines. Then, with the development of electronic information technology, traditional control uses standard PLC to realize input detection and output control. Standard IC is used as input detection and output drive inside. This design cost is relatively high. In addition, in the test of consumer electronic products, when collecting input signals such as buttons and gratings and output control signals such as relays and solenoid valves, the use of standard IC increases the design size of PCB, and it is impossible to effectively layout on miniaturized testing equipment. Summary of the invention
[0003] In view of this, the embodiments of the present application are dedicated to providing an input-output circuit, a test control device and a system to solve the problem of relatively high design cost, increased design size of PCB, and inability to perform effective layout on miniaturized testing equipment.
[0004] According to a first aspect of the present invention, the present invention provides an input-output circuit, comprising an input circuit, an output circuit and a controller;
[0005] In the input circuit, the first connection end of the connector X1 is connected to the first power source, and the third connection end of the connector X1 is grounded;
[0006] The second connection end of the connector X1 is connected to the first end of the transistor Q2 through the resistor R23, the second end of the transistor Q2 is connected to the second connection end of the connector X1 through the resistor R21, and the second power supply is connected to the first end of the transistor Q4 through the transistor Q2 and the resistor R25 in sequence; the first end of the transistor Q4 is also grounded through the resistor R27, the second end of the transistor Q4 is grounded, and the third end of the transistor Q4 is used to output a signal;
[0007] In the output circuit, the output end of the controller is connected to the first end of the MOS tube Q3 through the resistor R4, the second end of the MOS tube Q3 is connected to the first connection end of the load element Y1, and the third end of the MOS tube Q3 is grounded;
[0008] The controller is connected to the input circuit and the output circuit respectively, and is used for receiving an output signal of the input circuit and outputting a control signal to the output circuit.
[0009] Preferably, the input circuit also includes a protection circuit;
[0010] In the protection circuit, the third power supply is connected to the third end of the transistor Q4 through the resistor R11 and the light-emitting diode LED1 in sequence, and the third power supply is also connected to the third end of the transistor Q4 through the resistor R18 and the diode DS1 respectively; the third end of the transistor Q4 is also grounded through the diode DS2.
[0011] Preferably, in the input circuit, when the input signal of the element to be controlled is input to the connector X1, the second connection end of the connector X1 sends a low-level signal to the first end of the transistor Q2, the transistor Q2 and the transistor Q4 are turned on, and the third end of the transistor Q4 outputs a low-level signal to the input end of the controller.
[0012] Preferably, in the input circuit, when the control signal of the controlled element is not input to the connector X1, the second connection end of the connector X1 sends a high-level signal to the first end of the transistor Q2, the transistor Q2 and the transistor Q4 are both off, and the third end of the transistor Q4 outputs a high-level signal to the input end of the controller.
[0013] Preferably, the output circuit further includes a load detection circuit;
[0014] In the load prompt circuit, the fourth power supply is connected to the second end of the MOS tube Q3 through the resistor R34 and the light-emitting diode LED2 in sequence, and the fourth power supply is also connected to the second end of the MOS tube Q3 through the diode DS3. The fourth power supply is connected to the second connection end of the load element Y1.
[0015] Preferably, in the output circuit, when the output terminal of the controller outputs a high level signal, the MOS tube Q3 is turned on, and the voltage signal is input to the load element Y1 for the load element Y1 to work.
[0016] Preferably, in the output circuit, when the output terminal of the controller outputs a low-level signal, the MOS tube Q3 is not turned on, and the load element Y1 stops working.
[0017] Preferably, the transistor Q2 is a PNP transistor;
[0018] The MOS tube Q3 is an NMOS tube;
[0019] The transistor Q4 is an NPN transistor.
[0020] According to a second aspect of the present invention, there is also provided a test control device, comprising an input module, an output module and the input-output circuit:
[0021] An input module, the input module comprising a plurality of input circuits, the input circuits being used to collect input signals of the components to be controlled and transmit the input signals to the controller;
[0022] An output module, the output module comprising a plurality of output circuits, for outputting voltage signals to control the device;
[0023] The I2C circuit is connected to the controller and is used to expand the input circuit and the output circuit.
[0024] According to a third aspect of the present invention, there is also provided a test control system, comprising a serial port circuit, a power supply circuit and the test control device;
[0025] The power supply circuit is connected to the controller and is used to provide power;
[0026] The serial port circuit is connected to the controller and is used to control the device.
[0027] According to the first aspect of the present invention, by setting a plurality of transistors and resistors, the design of the input circuit is optimized, ensuring the reliable transmission and processing of the signal. The connector X1 can effectively control whether the transistor is turned on or off in the high ground level state, providing stable circuit control and signal transmission functions. In the output circuit, the effective control of the load element is achieved through the connection design of the controller MCU and the MOS tube. The introduction of the MOS tube Q3 improves the reliability of the control circuit, ensuring that the load element Y1 can perform corresponding operations according to the output signal of the controller. Furthermore, by using passive components such as resistors, diodes, triodes and MOS tubes in the input circuit and the output circuit to replace the IC circuit, the design size of the PCB is reduced, and effective layout can be performed on miniaturized detection equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of an input-output circuit according to an embodiment of the present invention is shown;
[0029] Figure 2 A schematic diagram of a test control device according to an embodiment of the present invention is shown;
[0030] Figure 3 A schematic diagram of an I2C circuit according to an embodiment of the present invention is shown;
[0031] Figure 4 A schematic diagram of a test control system according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] In order to make the above-mentioned purposes, characteristic vectors and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is understandable that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only part of the structure related to the present application is shown in the accompanying drawings, rather than all of the structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0033] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0034] Reference to "embodiment" herein means that a particular feature vector, structure or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] Traditionally, standard controller devices represented by PLC are widely used in factory automation lines. Then, with the development of electronic information technology, traditional control uses standard PLC to realize input detection and output control, and standard IC is used internally as input detection and output drive. This has relatively high design cost and increases the design size of PCB. It is impossible to effectively layout on miniaturized detection equipment, and it cannot be expanded when the input circuit and output circuit are not enough. Based on this, the core of the embodiment of the present application is to provide a detection device including input and output circuits. In addition to replacing the standard IC circuit with passive components such as resistors, diodes, transistors and MOS tubes, it is also expanded by designing I2C circuits when the input circuit and output circuit are not enough.
[0036] The test device is mainly used in consumer electronic product testing equipment. It is used to collect signals from input elements on automation equipment, such as buttons, gratings, in-position sensors on cylinders, switch signals, etc., and automatically control output elements such as relays, solenoid valves, and indicator lights. For example, a button is detected and the current function of the button is reset. At this time, the low-level signal is a valid signal. After detection, the low-level signal is input into the MCU controller for processing, and then a signal is output to the external device through the controller to reset the device.
[0037] Figure 1 FIG. 4 shows a schematic diagram of an input-output circuit according to an embodiment of the present invention; Figure 1 As shown, an input-output circuit comprises an input circuit, an output circuit and a controller;
[0038] In the input circuit, the first connection end of the connector X1 is connected to the first power source, and the third connection end of the connector X1 is grounded;
[0039] The second connection end of the connector X1 is connected to the first end of the transistor Q2 through the resistor R23, the second end of the transistor Q2 is connected to the second connection end of the connector X1 through the resistor R21, and the second power supply is connected to the first end of the transistor Q4 through the transistor Q2 and the resistor R25 in sequence; the first end of the transistor Q4 is also grounded through the resistor R27, the second end of the transistor Q4 is grounded, and the third end of the transistor Q4 is used to output a signal;
[0040] In the output circuit, the output end of the controller is connected to the first end of the MOS tube Q3 through the resistor R4, the second end of the MOS tube Q3 is connected to the first connection end of the load element Y1, and the third end of the MOS tube Q3 is grounded;
[0041] The controller is connected to the input circuit and the output circuit respectively, and is used for receiving the output signal of the input circuit and outputting the control signal to the output circuit.
[0042] In this embodiment, by setting a plurality of transistors and resistors, the design of the input circuit is optimized to ensure reliable transmission and processing of signals. Connector X1 can effectively control whether the transistor is turned on or off in a high ground level state, providing stable circuit control and signal transmission functions. In the output circuit, effective control of the load element is achieved through the connection design between the controller MCU and the MOS tube. The introduction of the MOS tube Q3 improves the reliability of the control circuit, ensuring that the load element Y1 can perform corresponding operations according to the output signal of the controller. Furthermore, by using passive components such as resistors, diodes, triodes and MOS tubes in the input circuit and the output circuit to replace the IC circuit, the design size of the PCB is reduced, and effective layout can be performed on miniaturized detection equipment.
[0043] In one embodiment, Figure 1 FIG. 4 shows a schematic diagram of an input-output circuit according to an embodiment of the present invention; Figure 1 As shown, in the input circuit, the first connection end of the connector X1 is connected to the first power source, and the third connection end of the connector X1 is grounded;
[0044] The second connection end of the connector X1 is connected to the first end of the transistor Q2 through the resistor R23, the second end of the transistor Q2 is connected to the second connection end of the connector X1 through the resistor R21, and the second power supply is connected to the first end of the transistor Q4 through the transistor Q2 and the resistor R25 in sequence; the first end of the transistor Q4 is also grounded through the resistor R27, the second end of the transistor Q4 is grounded, and the third end of the transistor Q4 is used to output a - signal.
[0045] In this embodiment, by setting multiple transistors and resistors, the design of the input circuit is optimized to ensure reliable transmission and processing of signals. Connector X1 can effectively control the conduction of the transistor in a high ground level state, providing stable circuit control and signal transmission functions.
[0046] In one embodiment, Figure 1 FIG. 4 shows a schematic diagram of an input-output circuit according to an embodiment of the present invention; Figure 1 As shown, a protection circuit is also included in the input circuit;
[0047] In the protection circuit, the third power supply is connected to the third end of the transistor Q4 through the resistor R11 and the light-emitting diode LED1 in sequence, and is also connected to the third end of the transistor Q4 through the resistor R18 and the diode DS1 respectively; the third end of the transistor Q4 is also grounded through the diode DS2.
[0048] In this embodiment, the design of the protection circuit introduces light-emitting diode LED1 and diode DS1 to protect circuit components and prevent overcurrent or other circuit abnormalities from damaging the components. At the same time, the introduction of light-emitting diode LED1 can also intuitively display the circuit working status, thereby improving the maintainability of the equipment.
[0049] In one embodiment, when the control signal of the controlled element is input to connector X1, the second connection end of connector X1 sends a low level signal to the first end of transistor Q2, transistor Q2 and transistor Q4 are turned on, and the third end of transistor Q4 outputs a low level signal to the input end of the controller.
[0050] When the control signal of the controlled element is not input to connector X1, the second connection end of connector X1 sends a high level signal to the first end of transistor Q2, transistor Q2 and transistor Q4 are both off, and the third end of transistor Q4 outputs a high level signal to the input end of the controller.
[0051] In this embodiment, in the input circuit, when the control signal is input, transistors Q2 and Q4 are turned on, thereby transmitting the low-level signal to the controller MCU. This design ensures the effective transmission of the input signal, and can accurately control the working state of the circuit, improving the accuracy and reaction speed of the control. When there is no control signal input, transistors Q2 and Q4 are not turned on, and a high-level signal is output to the controller MCU, so that the device is in standby or non-working state. This design enables the device to automatically enter the energy-saving mode when there is no signal input, reducing energy consumption and also improving the safety of the device.
[0052] In one embodiment, Figure 1 FIG. 4 shows a schematic diagram of an input-output circuit according to an embodiment of the present invention; Figure 1 As shown, in the output circuit, the output end of the controller is connected to the first end of the MOS tube Q3 through the resistor R4, the second end of the MOS tube Q3 is connected to the first connection end of the load element Y1, and the third end of the MOS tube Q3 is grounded.
[0053] In this embodiment, in the output circuit, the connection design between the controller MCU and the MOS tube realizes effective control of the load element. The introduction of the MOS tube Q3 improves the reliability of the control circuit and ensures that the load element Y1 can perform corresponding operations according to the output signal of the controller.
[0054] In one embodiment, Figure 1 FIG. 4 shows a schematic diagram of an input-output circuit according to an embodiment of the present invention; Figure 1 As shown, the output circuit also includes a load detection circuit; in the load prompt circuit, the fourth power supply is connected to the second end of the MOS tube Q3 through the resistor R34 and the light-emitting diode LED2 in sequence, the fourth power supply is also connected to the second end of the MOS tube Q3 through the diode DS3, and the fourth power supply is connected to the second connection end of the load element Y1.
[0055] In this embodiment, the introduction of the load detection circuit enables the device to monitor the working state of the load element Y1 in real time, and the light-emitting diode LED2 can provide visual feedback, which helps the operator to find the abnormal working state of the load in time. At the same time, the circuit design can further protect the load element through the diode DS3, thereby enhancing the durability and stability of the circuit.
[0056] In one embodiment, when the output terminal of the controller outputs a high level signal, the MOS tube Q3 is turned on, and the voltage signal is input to the load element Y1 for the load element Y1 to work.
[0057] When the output terminal of the controller outputs a low level signal, the MOS tube Q3 is not turned on, and the load element Y1 stops working.
[0058] In this embodiment, when the controller outputs a high-level signal, the MOS tube Q3 is turned on, so that the voltage signal can be smoothly transmitted to the load element Y1, thereby ensuring the normal operation of the load element. This design synchronizes the working state of the load element with the control signal, ensuring the efficient operation of the circuit. When the controller outputs a low-level signal, the MOS tube Q3 is not turned on, and the load element Y1 stops working. This design can effectively realize the automatic power-off and stop working of the load element, avoid ineffective energy consumption, extend the service life of the equipment, and improve the safety and reliability of the system.
[0059] In one embodiment, the transistor Q2 is a PNP transistor; the MOS transistor Q3 is an NMOS transistor; and the transistor Q4 is an NPN transistor.
[0060] Figure 2 FIG. 4 is a schematic diagram showing a test control device according to an embodiment of the present invention. Figure 2 The invention also provides a test control device, including an input module, an output module and an input-output circuit:
[0061] An input module, the input module includes a plurality of input circuits, the input circuits are used to collect input signals of the components to be controlled and transmit the input signals to the controller;
[0062] An output module, the output module includes a plurality of output circuits, and is used to output voltage signals to control the device;
[0063] The I2C circuit is connected to the controller and is used to expand the input circuit and the output circuit.
[0064] Figure 3 FIG. 4 shows a schematic diagram of an I2C circuit according to an embodiment of the present invention; FIG. Figure 3 As shown, further, the I2C bus is connected to the controller MCU minimum system, and the bus is connected to multiple circuit boards according to actual needs. Input or output circuits are added to the circuit boards, and each circuit board is connected to the power supply to meet the power supply requirements.
[0065] The device collects the control signal of the controlled element through the input connector and outputs the control signal through the output connector, so that the equipment control system can flexibly receive and transmit signals. The application of I2C circuit expands the number of input and output circuits, thereby enhancing the control capability and flexibility and adapting to more control requirements. At the same time, the design of input and output circuits not only reduces the design size of PCB, improves the effective layout on miniaturized detection equipment, but also can be expanded through I2C circuit when the input circuit and output circuit are insufficient.
[0066] In one embodiment, the process implemented by the test device is as follows:
[0067] In the input circuit, the signal (or external sensor, button, and other input signals) comes in from the connector X1, and the first connection terminal PIN1 and the third connection terminal PIN3 of the connector X1 provide power. When the external input electronic component is triggered by the operation source or a certain component, a 0 signal (low level signal) will be generated at the second connection terminal PIN2 of the connector X1, otherwise it will be a 1 signal (high level signal). When the signal is 0, the transistor (PNP) Q2 is turned on, and the resistor R27 will generate a voltage (R27*24) / (R25+R27). This voltage will turn on the transistor (NPN) Q4, and the input end (INPUT end) of the controller will be connected to GND through the conduction of the transistor Q4, so the INPUT will be a 0 signal. Otherwise, when the PIN2 of the connector X1 is a 1 signal, the transistor Q2 is not turned on, and the transistor Q4 is not turned on either. The voltage of the INPUT is from VDD3V3 through the resistor R11 and the light-emitting diode LED1. The voltage of INPUT1 is VDD3V3, which is 3.3V, which is a 1 signal.
[0068] Since the MCU controller is compatible with a maximum level of 3V3, we add reverse protection diodes to the GND and VDD3V3 ends at the INPUT input to protect the voltage on the INPUT side from exceeding VDD3V3, thereby protecting the MCU. Resistor R18 is a pull-up current limiting resistor. When the connector X1 is a 0 signal, there is a resistor to limit the current from the power supply to the MCU end.
[0069] In the output circuit, the signal is given by the controller MCU to the output end (OUTPUT1) of the controller, and there are also 0 signals and 1 signals. Since the transistor Q3 is an NMOS tube, when OUTPUT1 is signal 1, the second end (PIN2) and the third end (PIN3) of the NMOS tube Q3 mode are turned on, and the load element Y1 works. When OUTPUT1 is signal 0, the second end (PIN2) and the third end (PIN3) of the transistor Q3 are not turned on, and the load element Y1 does not work. Here, the light-emitting diode LED2 is an indicator light when the load is working. The diode DS3 is a freewheeling diode. If the resistive load is replaced by an inductive load (such as a coil, solenoid or relay), a "freewheeling diode" needs to be connected in parallel with the load to protect the MOS tube from any self-generated back electromotive force.
[0070] Figure 4 FIG. 4 is a schematic diagram showing a test control system according to an embodiment of the present invention. Figure 4 As shown, a test system is also provided, including a test device, a serial port circuit and a power supply circuit;
[0071] The power circuit is connected to the controller and is used to provide power;
[0072] The serial port circuit is connected to the controller and is used to control the device.
[0073] The test system is mainly used in consumer electronic product testing equipment to collect signals from input components of automation equipment, such as buttons, gratings, in-position sensors on cylinders, switch signals, etc., and automatically control output components such as relays, solenoid valves, and indicator lights. Users can control the equipment automatically or manually through TTL communication or external buttons, thereby reducing the operator's operation of the test equipment and improving production efficiency.
[0074] The above are only some specific implementation methods of the present application. Any other improvements made based on the concept of the present application are deemed to be within the protection scope of the present application.
Claims
1. An input-output circuit, characterized in that: It includes an input circuit, an output circuit and a controller; In the input circuit, the first connection end of the connector X1 is connected to the first power source, and the third connection end of the connector X1 is grounded; The second connection end of the connector X1 is connected to the first end of the transistor Q2 through the resistor R23, the second end of the transistor Q2 is connected to the second connection end of the connector X1 through the resistor R21, and the second power supply is connected to the first end of the transistor Q4 through the transistor Q2 and the resistor R25 in sequence; the first end of the transistor Q4 is also grounded through the resistor R27, the second end of the transistor Q4 is grounded, and the third end of the transistor Q4 is used to output a signal; In the output circuit, the output end of the controller is connected to the first end of the MOS tube Q3 through the resistor R4, the second end of the MOS tube Q3 is connected to the first connection end of the load element Y1, and the third end of the MOS tube Q3 is grounded; The controller is connected to the input circuit and the output circuit respectively, and is used for receiving an output signal of the input circuit and outputting a control signal to the output circuit.
2. The circuit according to claim 1, characterized in that The input circuit also includes a protection circuit; In the protection circuit, the third power supply is connected to the third end of the transistor Q4 through the resistor R11 and the light-emitting diode LED1 in sequence, and the third power supply is also connected to the third end of the transistor Q4 through the resistor R18 and the diode DS1 respectively; the third end of the transistor Q4 is also grounded through the diode DS2.
3. The circuit according to claim 2, characterized in that In the input circuit, when the input signal of the controlled element is input to the connector X1, the second connection end of the connector X1 sends a low-level signal to the first end of the transistor Q2, the transistor Q2 and the transistor Q4 are turned on, and the third end of the transistor Q4 outputs a low-level signal to the input end of the controller.
4. The circuit according to claim 2, characterized in that In the input circuit, when the control signal of the controlled element is not input to the connector X1, the second connection end of the connector X1 sends a high-level signal to the first end of the transistor Q2, the transistor Q2 and the transistor Q4 are both off, and the third end of the transistor Q4 outputs a high-level signal to the input end of the controller.
5. The circuit according to claim 1, characterized in that The output circuit also includes a load detection circuit; In the load prompt circuit, the fourth power supply is connected to the second end of the MOS tube Q3 through the resistor R34 and the light-emitting diode LED2 in sequence, and the fourth power supply is also connected to the second end of the MOS tube Q3 through the diode DS3. The fourth power supply is connected to the second connection end of the load element Y1.
6. The circuit according to claim 5, characterized in that In the output circuit, when the output terminal of the controller outputs a high level signal, the MOS tube Q3 is turned on, and the voltage signal is input to the load element Y1 for the load element Y1 to work.
7. The circuit according to claim 5, characterized in that In the output circuit, when the output terminal of the controller outputs a low level signal, the MOS tube Q3 is not turned on, and the load element Y1 stops working.
8. The circuit according to claim 1, characterized in that The transistor Q2 is a PNP transistor; The MOS tube Q3 is an NMOS tube; The transistor Q4 is an NPN transistor.
9. A test control device, characterized in that: It comprises an input module, an output module and an input-output circuit as claimed in claims 1 to 8: An input module, the input module comprising a plurality of input circuits, the input circuits being used to collect input signals of the components to be controlled and transmit the input signals to the controller; An output module, the output module comprising a plurality of output circuits, for outputting voltage signals to control the device; The I2C circuit is connected to the controller and is used to expand the input circuit and the output circuit.
10. A test control system, characterized in that: comprising a serial port circuit, a power supply circuit and the test control device as claimed in claim 9; The power supply circuit is connected to the controller and is used to provide power; The serial port circuit is connected to the controller and is used to control the device.
Citation Information
Patent Citations
High-end load switch circuit and IC (integrated circuit)
CN107437933A
Integrated function test system and method
CN117074825A
Anti-creeping I / O interface circuit with test function
CN117349209A
Flasher circuit
CN204432501U
Automatic changeover switch controller circuit
CN207664704U
