Drain-source switching circuit and electronic equipment
By designing a drain-source switching circuit, the automatic switching between source and drain input circuits is realized, which solves the problem that existing modules can only support a single input type, simplifies system design, improves compatibility and scalability, and reduces hardware adaptation complexity and cost.
Patent Information
- Application Number
- CN202520010504.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2035-01-02
AI Technical Summary
Existing digital input modules typically only support one type of input module, either source or sink, which means that different modules must be selected when different types of input devices need to be supported, increasing the complexity of system design and the difficulty of hardware adaptation.
Design a drain-source switching circuit to achieve automatic switching between source and drain input circuits through the cooperation of a gating module and a drain-source switching module. Use a switching module and a filtering module for signal processing and mode switching, and an output module for signal detection.
It simplifies system design, improves system compatibility and scalability, reduces the complexity and cost of hardware adaptation, and ensures the reliability and flexibility of system operation.
Smart Images

Figure CN223713963U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of electronic circuit technology, and in particular to a drain-source switching circuit and electronic device. Background Technology
[0002] With the continuous development of industrial automation technology, automated control systems have been widely used in various industries. In these systems, digital input modules (DIMs), as a crucial component, are responsible for receiving switching signals from sensors, switches, and other devices, and converting them into digital signals that the control system can process. To achieve this function, DIMs need to support various types of input signals, primarily including source-type and sink-type input circuits. Because different devices have different signal types, existing DIMs are typically designed to support only one type of input module—either source-type or sink-type. When a control system needs to support different types of input devices, different modules must be selected, increasing the complexity of the system design. Utility Model Content
[0003] This utility model provides a drain-source switching circuit and electronic device to solve the above-mentioned technical problems.
[0004] The first aspect of this utility model provides a drain-source switching circuit, comprising:
[0005] A gating module, one end of which receives an input signal, to turn on or off according to the input signal;
[0006] A drain-source switching module has its control terminal connected to the other end of the gating module, its power supply terminal receiving a first power supply, and its drain-source switching terminal connected to the circuit under test. When the gating module is off, the drain-source switching module switches to a source-type input circuit, receiving a first current or a first voltage signal through the drain-source switching terminal, and outputting a first control signal according to the state of the drain-source switching terminal. When the gating module is on, the drain-source switching module switches to a drain-type input circuit, outputting a second current or receiving a second voltage signal through the drain-source switching terminal, and outputting a second control signal according to the state of the drain-source switching terminal.
[0007] The output module has its input terminal connected to the output terminal of the source-sink switching module to output a detection signal according to the first control signal or the second control signal.
[0008] Optionally, the drain-source switching module includes a switching module and a filtering module. The control terminal of the switching module is the control terminal of the drain-source switching module. The first terminal of the switching module is the power supply terminal of the drain-source switching module. The second terminal of the switching module and the first terminal of the filtering module are connected together to form the drain-source switching terminal. The second terminal of the filtering module is the output terminal of the drain-source switching module.
[0009] When the drain-source switching module is switched to a source input circuit, the switching module is in the off state, the drain-source switching terminal receives a first current or a first voltage signal, and the filtering module outputs a first control signal according to the state of the drain-source switching terminal.
[0010] When the drain-source switching module is switched to a drain-type input circuit, the switching module is in the on state, the drain-source switching terminal outputs a second current or receives a second voltage signal, and the filtering module outputs a second control signal according to the state of the drain-source switching terminal.
[0011] Optionally, the switching module includes a first switching module and a first voltage divider module. The first terminal of the first switching module and the input terminal of the first voltage divider module are both connected to the first terminal of the switching module. The first output terminal of the first voltage divider module is the control terminal of the switching module. The second output terminal of the first voltage divider module is connected to the control terminal of the first switching module.
[0012] When the drain-source switching module is switched to a source input circuit, the first switching module is in the off state;
[0013] When the drain-source switching module switches to a drain input circuit, the first voltage divider module divides the voltage output by the first power supply to turn on the first switching module. The first power supply outputs a second current to the drain-source switching terminal through the first switching module, or the first power supply outputs a third current to the filter module through the first switching module.
[0014] Optionally, the switching module further includes a second switching module and a second voltage divider module, wherein a first end of the second voltage divider module is connected to a first end of the first voltage divider module, a second end of the second voltage divider module is connected to a second end of the first voltage divider module, a third end of the second voltage divider module is connected to a control terminal of the second switching module, a first end of the second switching module is connected to a second end of the first switching module, and a second end of the second switching module is connected to the output terminal of the filter module.
[0015] When the drain-source switching module is switched to a source input circuit, the second switching module is in the off state;
[0016] When the drain-source switching module switches to a drain input circuit, the second switching module is turned on when the first switching module is turned on, and the third current output from the first power supply to the filter module through the first switching module is shunted.
[0017] Optionally, the gating module includes a first isolation module, a first end of the first isolation module being one end of the gating module, a second end of the first isolation module being the other end of the gating module, and a third and fourth end of the first isolation module being grounded.
[0018] When the first terminal of the first isolation module receives the first input signal and is connected to the third terminal, it controls the second and fourth terminals of the first isolation module to be connected.
[0019] When the first terminal of the first isolation module receives the second input signal and is disconnected from the third terminal, the second and fourth terminals of the first isolation module are controlled to disconnect.
[0020] Optionally, the output module includes a second isolation module, a pull-up module, and a third power supply. The first terminal of the second isolation module is the input terminal of the output module. The second terminal of the second isolation module and the output terminal of the pull-up module are connected together to form the output terminal of the output module. The third and fourth terminals of the second isolation module are both grounded. The input terminal of the pull-up module is connected to the third power supply.
[0021] When the first control signal or the second control signal turns on the first and third terminals of the second isolation module, the second and fourth terminals of the second isolation module are turned on, and the output module outputs a low-level detection signal.
[0022] When the first control signal or the second control signal disconnects the first and third terminals of the second isolation module, the second and fourth terminals of the second isolation module are disconnected, and the output module outputs a high-level detection signal.
[0023] Optionally, the circuit under test is a PNP circuit, which includes a PNP transistor, a third voltage divider module, and a fourth power supply. The emitter of the PNP transistor and the first terminal of the third voltage divider module are connected together and then connected to the power supply terminal of the drain-source switching module. The base of the PNP transistor is connected to the second terminal of the third voltage divider module. The collector of the PNP transistor is connected to the drain-source switching terminal. The third terminal of the third voltage divider module is connected to the fourth power supply.
[0024] When the fourth power supply outputs a low-level signal, the PNP transistor is turned on and outputs a first current to the drain-source switching terminal;
[0025] When the fourth power supply outputs a high-level signal, the PNP transistor is turned off, and the drain-source switching terminal is in a low-level signal state.
[0026] Optionally, the circuit under test is an NPN circuit, which includes an NPN transistor, a fourth voltage divider module, and a fifth power supply. The collector of the NPN transistor is connected to the drain-source switching terminal, the base of the NPN transistor is connected to the first terminal of the fourth voltage divider module, the emitter of the NPN transistor is grounded, the second terminal of the fourth voltage divider module is connected to the fifth power supply, and the third terminal of the fourth voltage divider module is grounded.
[0027] When the fifth power supply outputs a high-level signal, the NPN transistor is turned on and the second current output from the drain-source switching terminal is grounded;
[0028] When the fifth power supply outputs a low-level signal, the NPN transistor is turned off, and the drain-source switching terminal is in a high-level signal state.
[0029] A second aspect of this utility model provides an electronic device, which includes the drain-source switching circuit and the circuit under test described in the first aspect, wherein the circuit under test is a PNP circuit or an NPN circuit.
[0030] Optionally, the electronic device further includes a main control chip, which is connected to the output module.
[0031] The technical effects of this utility model embodiment are as follows: by cooperating with the gating module and the drain-source switching module, the automatic switching between the source input circuit and the drain input circuit is realized, supporting input signals of different device types, simplifying system design. The circuit can flexibly switch the input mode according to the state of the input signal, improving the system's compatibility and scalability. The output module can stably output the detection signal, ensuring the system's reliable operation and reducing the complexity and cost of hardware adaptation. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of this utility model, the drawings used in the description of the embodiments of this utility model will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a schematic diagram of the first structure of a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0034] Figure 2 This is a schematic diagram of the drain-source switching module in a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0035] Figure 3This is a schematic diagram of the first structure of the switching module in the drain-source switching module of the drain-source switching circuit provided in Embodiment 1 of this utility model;
[0036] Figure 4 This is a schematic diagram of the second structure of the switching module in the drain-source switching module of a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0037] Figure 5 This is a schematic diagram of the gating module in a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0038] Figure 6 This is a schematic diagram of the output module in a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0039] Figure 7 This is a schematic diagram of the PNP circuit in a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0040] Figure 8 This is a schematic diagram of the NPN circuit in a drain-source switching circuit provided in Embodiment 1 of this utility model;
[0041] Figure 9 This is a circuit diagram showing the connection between a drain-source switching circuit and a PNP circuit according to Embodiment 1 of this utility model;
[0042] Figure 10 This is a circuit diagram showing the connection between a drain-source switching circuit and an NPN circuit according to Embodiment 1 of this utility model;
[0043] Figure 11 This is a schematic diagram of the structure of an electronic device provided in Embodiment 2 of this utility model;
[0044] In the diagram: 101, selection module; 102, drain-source switching module; 103, output module; 10, drain-source switching circuit; 20, circuit under test; 30, first power supply; 121, switching module; 122, filtering module; 123, first switching module; 124, first voltage divider module; 125, second switching module; 126, second voltage divider module; 127, first isolation module; 128, second power supply; 131, second isolation module; 132, pull-up module; 133, third power supply; 201, PNP transistor; 202, third voltage divider module; 203, fourth power supply; 204, NPN transistor; 205, fourth voltage divider module; 206, fifth power supply. Detailed Implementation
[0045] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present utility model.
[0046] It should be understood that this invention can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, providing these embodiments will make the disclosure thorough and complete, and will fully convey the scope of this invention to those skilled in the art. In the drawings, for clarity, the dimensions of layers and regions, as well as their relative dimensions, may be exaggerated. The same reference numerals denote the same elements throughout.
[0047] It should be understood that when an element or layer is referred to as "on," "adjacent to," "connected to," or "coupled to" other elements or layers, it may be directly on, adjacent to, connected to, or coupled to other elements or layers, or there may be intervening elements or layers. Conversely, when an element is referred to as "directly on," "directly adjacent to," "directly connected to," or "directly coupled to" other elements or layers, there are no intervening elements or layers. It should be understood that although the terms first, second, third, etc., may be used to describe various elements, components, areas, layers, and / or portions, these elements, components, areas, layers, and / or portions should not be limited by these terms. These terms are only used to distinguish one element, component, area, layer, or portion from another element, component, area, layer, or portion. Therefore, without departing from the teachings of this utility model, the first element, component, area, layer, or portion discussed below may be referred to as the second element, component, area, layer, or portion.
[0048] To fully understand this utility model, detailed structures and steps will be presented in the following description to illustrate the technical solution proposed by this utility model. Preferred embodiments of this utility model are described in detail below; however, in addition to these detailed descriptions, this utility model may have other embodiments.
[0049] Example 1
[0050] This embodiment provides a drain-source switching circuit 10, such as Figure 1 As shown, it includes:
[0051] The gating module 101 receives an input signal at one end A1, and turns it on or off according to the input signal;
[0052] The drain-source switching module 102 has its control terminal A2 connected to the other end B1 of the gating module 101, its power supply terminal A4 receiving the first power supply 30, and its drain-source switching terminal A3 connected to the circuit under test 20. When the gating module 101 is turned off, the drain-source switching module 102 switches to a source input circuit, receives the first current or the first voltage signal through the drain-source switching terminal A3, and outputs the first control signal according to the state of the drain-source switching terminal A3. When the gating module 101 is turned on, the drain-source switching module 102 switches to a drain input circuit, outputs the second current or receives the second voltage signal through the drain-source switching terminal A3, and outputs the second control signal according to the state of the drain-source switching terminal A3.
[0053] The output module 103 has its input terminal A5 connected to the output terminal B2 of the source-sink switching module 102 to output a detection signal according to the first control signal or the second control signal.
[0054] The main function of the gating module 101 is to control the operating mode of the drain-source switching module 102. One end A1 receives an input signal, such as a control signal output by a control chip, and turns it on or off according to the state of the input signal (high level or low level). The control terminal A2 of the drain-source switching module 102 is connected to the other end B1 of the gating module 101. Its main function is to switch between the source input circuit and the drain input circuit according to the state of the gating module 101. When the gating module 101 is off, the drain-source switching module 102 becomes a source input circuit. In the source input circuit mode, the drain-source switching terminal A3 receives current or does not receive current according to the state of the circuit, such as the state of an external signal or load. The state of the drain-source switching terminal A3 (receiving a first current or a first voltage signal) is detected, and this state determines the output first control signal, which is used for subsequent control logic or device response. When the selection module 101 is turned on, the drain-source switching module 102 switches to a drain input circuit. The drain-source switching terminal A3 outputs or does not output current, similar to a source input circuit. The state of the drain-source switching terminal A3 determines the second control signal, which is used to perform further control or processing. The input terminal of the output module 103 receives the control signal from the drain-source switching module 102. This control signal may be either the first control signal or the second control signal, depending on the current circuit mode of the drain-source switching module 102 (source input circuit or drain input circuit). When the drain-source switching module 102 switches to a source input circuit, it outputs the first control signal. After receiving the first control signal, the output module 103 outputs a corresponding detection signal based on the state of the first control signal (e.g., high level or low level). When the drain-source switching module 102 switches to a drain input circuit, it outputs the second control signal. After receiving the second control signal, the output module 103 still outputs a corresponding detection signal based on the signal's state. The output of the second control signal is similar to the first control signal, but represents the state under different drain-source input circuits.
[0055] The technical advantages of the solution provided in this embodiment are as follows: Through automatic switching of the source-sink switching module, it supports both source and sink input signal types, eliminating the need to select specific modules or adjust wiring, thus enhancing adaptability. Improved module versatility reduces the number of modules required due to signal type differences, lowering system design complexity. It avoids the risk of jumper or power wiring errors, improving configuration and debugging efficiency. Because it is compatible with different input signal types, it eliminates the need to replace modules due to equipment upgrades or signal changes, reducing procurement and maintenance costs. When the system requires rapid configuration adjustments, complex wiring changes are unnecessary, making maintenance more efficient.
[0056] As one implementation method, such as Figure 2As shown, the drain-source switching module 102 includes a switch module 121 and a filter module 122. The control terminal A2 of the switch module 121 is the control terminal A2 of the drain-source switching module 102. The first terminal A4 of the switch module 121 is the power supply terminal A4 of the drain-source switching module 102. The second terminal B4 of the switch module 121 and the first terminal A5 of the filter module 122 are connected together to form the drain-source switching terminal A3. The second terminal B2 of the filter module 122 is the output terminal B2 of the drain-source switching module 102.
[0057] When the drain-source switching module 102 switches to the source input circuit, the switching module 121 is in the off state, the drain-source switching terminal A3 receives the first current or the first voltage signal, and the filtering module 122 outputs the first control signal according to the state of the drain-source switching terminal A3.
[0058] When the drain-source switching module 102 switches to a drain input circuit, the switching module 121 is in the on state, the drain-source switching terminal A3 outputs a second current or receives a second voltage signal, and the filtering module 122 outputs a second control signal according to the state of the drain-source switching terminal A3.
[0059] The switching module 121 is the core component of the drain-source switching module 102. Its control terminal A2 receives signals from the gating module 101 to control its on / off state. When the control signal is an off control signal, the switching module 121 is in the off state, and its first terminal (power terminal A4) and second terminal (drain-source switching terminal A3) are disconnected. When the control signal is an on control signal, the switching module 121 is in the on state, and a path is formed between its first and second terminals, allowing current to flow through the drain-source switching terminal A3. The main function of the filtering module 122 is to process and filter the signal input to the drain-source switching terminal A3 and output the corresponding control signal. When the switching module 121 is in the off state, the drain-source switching terminal A3 receives a first current or a first voltage signal. The filtering module 122 filters the signal from the drain-source switching terminal A3 and converts its state into a first control signal for use by subsequent output modules. When the switching module 121 is in the on state, the drain-source switching terminal A3 outputs a second current or receives a second voltage signal. The filtering module 122 filters the signal at the drain-source switching terminal A3 and converts its state into a second control signal.
[0060] The technical advantages of this implementation are as follows: by cooperating with the gating module and the drain-source switching module, automatic switching between the source-type input circuit and the drain-type input circuit is realized, supporting input signals of different device types and simplifying system design. The circuit can flexibly switch the input mode according to the state of the input signal, improving the system's compatibility and scalability. The output module can stably output the detection signal, ensuring reliable system operation and reducing the complexity and cost of hardware adaptation.
[0061] As one implementation method of the switching module, such as Figure 3 As shown, the switch module 121 includes a first switch module 123 and a first voltage divider module 124. The first terminal A6 of the first switch module 123 and the input terminal A7 of the first voltage divider module 124 are connected to the first terminal A4 of the switch module 121. The first output terminal A11 of the first voltage divider module 124 is the control terminal A2 of the switch module 121. The second output terminal A9 of the first voltage divider module 124 is connected to the control terminal A8 of the first switch module 123.
[0062] When the drain-source switching module 102 switches to the source input circuit, the first switch module 123 is in the off state;
[0063] When the drain-source switching module 102 switches to a drain input circuit, the first voltage divider module 124 divides the voltage output by the first power supply 30 and then turns on the first switch module 123. The first power supply 30 outputs a second current to the drain-source switching terminal A3 through the first switch module 123, or the first power supply 30 outputs a third current to the filter module 122 through the first switch module 123.
[0064] The function of the first switching module 123 is to turn on or off according to the state of the control signal (provided by the first voltage divider module 124), thereby switching the operating mode of the drain-source switching module 102. When the control signal output by the first voltage divider module 124 is a turn-off control signal, the first switching module 123 is turned off, cutting off the current path. The drain-source switching terminal A3 cannot receive current from the first power supply 30 through the first switching module 123. When the first voltage divider module 124 divides the voltage of the first power supply 30, the output control signal turns on the first switching module 123. The first power supply 30 outputs a second current to the drain-source switching terminal A3 or provides a third current to the filter module 122 through the first switching module 123. The function of the first voltage divider module 124 is to divide the voltage of the first power supply 30 and output a control signal according to the divided voltage to drive the first switching module 123. When the drain-source switching module 102 needs to operate in the source input circuit mode, the voltage divider signal output by the first voltage divider module 124 turns the first switching module 123 off. At this time, the first power supply 30 is disconnected from the drain-source switching terminal A3 or the filter module 122. When the drain-source switching module 102 switches to a drain input circuit, the first voltage divider module 124 divides the voltage of the first power supply 30, and the output control signal turns on the first switch module 123. The first power supply 30 can output a second current to the drain-source switching terminal A3 or provide a third current to the filter module 122 through the first switch module 123.
[0065] The technical advantages of this embodiment are as follows: Through the coordinated operation of the first switching module and the first voltage divider module, it can automatically adapt to source and sink input modes without the need for external jumpers or complex adjustments, and is compatible with different types of input signals. The first voltage divider module divides the power supply signal, avoiding the direct impact of high-voltage signals on the first switching module and the filtering module, thus improving the reliability of signal processing. The module can quickly respond to changes in signal modes, achieving real-time switching, meeting the needs of multi-scenario and dynamic adjustment in industrial automation, and enhancing the system's flexibility and adaptability.
[0066] As one implementation of the first isolation unit 113, such as Figure 4 As shown, the switch module 121 also includes a second switch module 125 and a second voltage divider module 126. The first terminal A14 of the second voltage divider module 126 is connected to the first terminal A11 of the first voltage divider module 124. The second terminal A13 of the second voltage divider module 126 is connected to the second terminal A7 of the first voltage divider module 124. The third terminal A15 of the second voltage divider module 126 is connected to the control terminal A12 of the second switch module 125. The first terminal A11 of the second switch module 125 is connected to the second terminal A10 of the first switch module 123. The second terminal B5 of the second switch module 125 is connected to the output terminal of the filter module 122.
[0067] When the drain-source switching module 102 switches to the source input circuit, the second switching module 125 is in the off state;
[0068] When the drain-source switching module 102 switches to a drain input circuit, the first switch module 123 is turned on, the second switch module 125 is turned on, and the third current output from the first power supply 30 to the filter module 122 through the first switch module 123 is shunted.
[0069] The function of the second switching module 125 is to assist in shunt current to support the current output in the sink input circuit. When the drain-source switching module 102 is in the source input circuit, the second switching module 125 is in the off state, and the first switching module 123 does not output current. When the drain-source switching module 102 switches to the sink input circuit, the first switching module 123 is turned on, and the second switching module 125 is also turned on under the control signal of the second voltage divider module 126. The second switching module 125 shunts the third current output from the first power supply 30 to the filter module 122 through the first switching module 123, balancing the load distribution. The function of the second voltage divider module 126 is to provide a control signal to drive the second switching module 125 to the on or off state. In the source input circuit, the control signal output by the second voltage divider module 126 keeps the second switching module 125 in the off state. In the sink input circuit, the second voltage divider module 126 divides the voltage of the first power supply 30 and transmits the divided signal to the second switching module 125, turning it on. After the second switch module 125 is turned on, it works with the first switch module 123 to divert part of the current to the filter module 122.
[0070] The technical advantage of this implementation is that the coordinated operation of the second switching module and the second voltage divider module ensures current distribution of the drain-source switching module under different input modes. When the drain-source switching module is in source input mode, the second switching module remains off to avoid current shunting; while in drain input mode, the second switching module is on, shunting current to the filter module to balance the load. By precisely controlling the conduction state of the second switching module through the second voltage divider module, reasonable current distribution and load balancing are achieved, improving the efficiency and stability of the system.
[0071] As one implementation of the second isolation unit 114, such as Figure 5 As shown, the gating module 101 includes a first isolation module 127. The first terminal B6 of the first isolation module 127 is one terminal A1 of the gating module 101, the second terminal B7 of the first isolation module 127 is the other terminal B1 of the gating module 101, and the third terminal B8 and the fourth terminal B9 of the first isolation module 127 are both grounded.
[0072] When the first terminal B6 of the first isolation module 127 receives the first input signal and is connected to the third terminal B8, it controls the second terminal B7 and the fourth terminal B9 of the first isolation module 127 to be connected.
[0073] When the first terminal B6 of the first isolation module 127 receives the second input signal and is disconnected from the third terminal B8, the second terminal B7 and the fourth terminal B9 of the first isolation module 127 are disconnected.
[0074] The first isolation module 127 functions to isolate and control input signals using isolation technology, thereby ensuring the security and stability of its signal processing. The first terminal B6 of the first isolation module 127 is connected to the second power supply 128. The second power supply 128 controls its conduction or disconnection based on the states of the first input signal (e.g., a high-level signal) and the second input signal (e.g., a low-level signal), thus controlling the operating mode of the first isolation module 127. When the first terminal of the first isolation module 127 receives the first input signal and is connected to its third terminal, the internal circuit of the first isolation module 127 is activated, connecting the second and fourth terminals. In this state, the first isolation module 127 allows signals to flow from the second terminal to the fourth terminal. When the first terminal of the first isolation module 127 receives the second input signal and is disconnected from its third terminal, the internal circuit of the first isolation module 127 is deactivated, disconnecting the second and fourth terminals. In this state, signals cannot flow from the second terminal to the fourth terminal, blocking signal transmission.
[0075] The technical advantages of this implementation are as follows: the first isolation module achieves isolation and control of input signals through isolation technology, ensuring the operational safety and signal stability of the first isolation module. When conducting, the signal is allowed to flow from the second terminal to the fourth terminal; when disconnected, signal transmission is blocked, switching the operating mode of the first isolation module. This design effectively prevents signal interference or false triggering, improves the system's anti-interference capability and operational reliability, and simplifies the implementation of signal control and mode switching.
[0076] As one implementation of the output module 112, such as Figure 6 As shown, the output module 103 includes a second isolation module 131, a pull-up module 132, and a third power supply 133. The first terminal B11 of the second isolation module 131 is the input terminal A5 of the output module 103. The second terminal B13 of the second isolation module 131 and the output terminal B16 of the pull-up module 132 are connected together to form the output terminal B3 of the output module 103. The third terminal B12 and the fourth terminal B14 of the second isolation module 131 are both grounded. The input terminal B15 of the pull-up module 132 is connected to the third power supply 133.
[0077] When the first control signal or the second control signal turns on the first terminal B11 and the third terminal B12 of the second isolation module 131, the second terminal B13 and the fourth terminal B14 of the second isolation module 131 are turned on, and the output module 103 outputs a low-level detection signal.
[0078] When the first control signal or the second control signal disconnects the first terminal B11 and the third terminal B12 of the second isolation module 131, the second terminal B13 and the fourth terminal B14 of the second isolation module 131 are disconnected, and the output module 103 outputs a high-level detection signal.
[0079] The output module 103 primarily isolates the input control signal from the detection signal and outputs the corresponding level. The second isolation module 131 isolates the input signal and determines the output level of the output module 103 by controlling its on / off state. The pull-up module 132 provides a high-level signal to the output terminal through a pull-up resistor, ensuring that the output module 103 can stably output a high-level detection signal when the second isolation module 131 is off. When the first or second control signal connects the first terminal B11 to the third terminal B12 of the second isolation module 131, the second terminal B13 and the fourth terminal B14 of the second isolation module 131 also connect. At this time, the second terminal B13 of the second isolation module 131 is connected to ground, the function of the pull-up module 132 is disabled, and a low-level detection signal is output. When the first control signal or the second control signal disconnects the first terminal B11 and the third terminal B12 of the second isolation module 131, the second terminal B13 and the fourth terminal B14 of the second isolation module 131 are also disconnected. The second terminal B13 of the second isolation module 131 is disconnected from the ground. The pull-up module 132 pulls the output terminal to the high level of the third power supply 133 through the pull-up resistor, thereby outputting a high-level detection signal.
[0080] The technical advantages of this implementation are as follows: the output module achieves isolation and level conversion between the input control signal and the detection signal through a second isolation module and a pull-up module. When the second isolation module is on, the output terminal is connected to ground, outputting a low-level signal; when the second isolation module is off, the pull-up module pulls the output terminal to a high level through a pull-up resistor, outputting a high-level signal. This design effectively isolates the input signal from the output terminal, ensures stable signal transmission, improves the system's anti-interference capability, optimizes level output control, and enhances the system's reliability and flexibility.
[0081] As one implementation method, such as Figure 7 As shown, the circuit under test 20 is a PNP circuit, which includes a PNP transistor 201, a third voltage divider module 202, and a fourth power supply 203. The emitter of the PNP transistor 201 and the first terminal of the second voltage divider module 126 are connected together and then connected to the power supply terminal of the drain-source switching module 102. The base of the PNP transistor 201 is connected to the second terminal of the second voltage divider module 126. The collector of the PNP transistor 201 is connected to the drain-source switching terminal. The third terminal of the third voltage divider module 202 is connected to the fourth power supply 203.
[0082] When the fourth power supply 203 outputs a low-level signal, the PNP transistor 201 is turned on and outputs the first current to the drain-source switching terminal A3;
[0083] When the fourth power supply 203 outputs a high-level signal, the PNP transistor 201 is turned off, and the drain-source switching terminal A3 is in a low-level signal state.
[0084] The main function of the PNP circuit is to control the conduction or cutoff of the PNP transistor 201 based on the voltage level of the fourth power supply 203, and to output current or provide a voltage level signal to the drain-source switching terminal. The PNP transistor 201 controls its conduction or cutoff state through the potential difference between its emitter and base, thereby achieving current output or blocking. When the fourth power supply 203 outputs a low level, the third voltage divider module 202 maintains the voltage between the emitter and base above the conduction voltage, causing the PNP transistor 201 to conduct. After conduction, the current output from the first power supply 30 flows from the emitter of the PNP transistor 201 into the collector and is output to the drain-source switching terminal. At this time, the drain-source switching terminal outputs the first current. When the fourth power supply 203 outputs a high level, the third voltage divider module 202 pulls up the base voltage of the PNP transistor 201. The voltage difference between the emitter and base of the PNP transistor 201 is insufficient to keep the PNP transistor 201 conducting. After the PNP transistor 201 is turned off, it blocks the current flow, and no current flows into the drain-source switching terminal. At this time, the drain-source switching terminal A3 is in a low-level signal state.
[0085] The technical advantages of this embodiment are as follows: By controlling the conduction and cutoff of the PNP transistor, the PNP circuit can precisely adjust the current output or level state of the drain-source switching terminal, realize the dynamic switching of the source input circuit, and has high stability and flexibility. It can reliably output the first current or low-level signal according to the level change of the fourth power supply, simplifying the design while improving the adaptability of the circuit.
[0086] As one implementation method, such as Figure 8 As shown, the circuit under test 20 is an NPN circuit. The NPN circuit includes: an NPN transistor 204, a fourth voltage divider module 205, and a fifth power supply 206. The collector of the NPN transistor 204 is connected to the drain-source switching terminal, the base of the NPN transistor 204 is connected to the first terminal of the fourth voltage divider module, the emitter of the NPN transistor 204 is grounded, the second terminal of the fourth voltage divider module is connected to the fifth power supply, and the third terminal of the fourth voltage divider module is grounded.
[0087] When the fifth power supply 206 outputs a high-level signal, the NPN transistor 204 is turned on and the second current output from the drain-source switching terminal A3 is grounded;
[0088] When the fifth power supply 206 outputs a low-level signal, the NPN transistor 204 is turned off, and the drain-source switching terminal A3 is in a high-level signal state.
[0089] In this circuit, the NPN transistor 204 is switched on or off to achieve current output or a low-level signal state at the drain-source switching terminal. The NPN transistor 204 is controlled to turn on or off based on the voltage relationship between its base and emitter, thus determining the current output from the drain-source switching terminal. The fifth power supply 206 provides a high-level signal, which, through the fourth voltage divider module 205, provides sufficient voltage (base voltage higher than emitter voltage) to the base of the NPN transistor 204, turning on the NPN transistor 204. In the on-state, the first power supply 30 outputs a second current to the drain-source switching terminal A3 through the first switch module 123, and the current flows from the collector to the emitter and ground. The fifth power supply 206 provides a low-level signal. The base voltage is insufficient to maintain the conduction condition of the NPN transistor 204 (the voltage difference between the base voltage and the emitter voltage is lower than the conduction threshold). The NPN transistor 204 is turned off, and the current between the collector and emitter is blocked. Since the switching module 121 is in the conducting state at this time, the drain-source switching terminal is in a high-level signal state.
[0090] The technical advantages of this embodiment are as follows: This NPN circuit, by controlling the conduction and cutoff of the NPN transistor, realizes the current output or low-level signal state at the drain-source switching terminal, precisely adjusting the circuit's operating mode. Its structure is simple, its response is fast, and it can reliably output the first current or low-level signal according to the level change of the fifth power supply, improving the system's control accuracy and adaptability, while also enhancing the circuit's stability and reliability.
[0091] As an optional circuit structure, such as Figure 9 The diagram shows the connection between the drain-source switching circuit 10 and the PNP circuit. The PNP circuit includes a PNP transistor Q3, resistors R12 and R13, and a fourth power supply V4. The selection module 101 is an optocoupler U1. The drain-source switching module 102 includes a first switch module 123, a first voltage divider module 124, a second switch module 125, a second voltage divider module 126, and a filter module 122. The first switch module 123 includes a PNP transistor Q1 and a resistor R5. The first voltage divider module 124 includes resistors R1 and R3. The second switch module 125 includes a PNP transistor Q2 and a resistor R6. The second voltage divider module 126 includes resistors R2 and R4. The filter module 122 includes resistors R7 and R8 and a capacitor C1. The output module includes a second isolation module 131 and a pull-up module 132. The second isolation module 131 is an optocoupler U2, and the pull-up module 132 includes resistors R10 and R11 and a third power supply V3.
[0092] The connections of the above devices are as follows: The first power supply V1 is connected to the first terminal of resistor R12, the emitter of PNP transistor Q3, the emitter of PNP transistor Q1, the first terminal of resistor R1, and the first terminal of resistor R2. The second terminal of resistor R12 is connected to the base of PNP transistor Q3 and the first terminal of resistor R13. The second terminal of resistor R13 is connected to the fourth power supply V4. The base of PNP transistor Q1 is connected to the second terminal of resistor R1 and the first terminal of resistor R3. The second terminal of resistor R3 is connected to the first terminal of resistor R4 and the collector of optocoupler U1. The second terminal of resistor R2 is connected to the second terminal of resistor R4 and the base of PNP transistor Q2. The emitter of optocoupler U1 is grounded. The anode of optocoupler U1 diode is connected to the first terminal of resistor R9. The first terminal of resistor R9... The second terminal is connected to the second power supply V2. The cathode of the optocoupler U1 diode is grounded. The collector of the PNP transistor Q1 is connected to the first terminal of resistor R5. The second terminal of resistor R5 is connected to the first terminal of resistor R6, the first terminal of resistor R7, and the collector of PNP transistor Q3. The second terminal of resistor R6 is connected to the emitter of PNP transistor Q2. The collector of PNP transistor Q2 is connected to the second terminal of resistor R7, the first terminal of capacitor C1, the first terminal of resistor R8, and the anode of optocoupler U2 diode. The second terminal of capacitor C1, the second terminal of resistor R8, and the cathode of optocoupler U2 diode are all connected to ground. The collector of optocoupler U2 transistor is connected to the first terminal of resistor R10 and the first terminal of resistor R11. The second terminal of resistor R10 is connected to the third power supply V3. The second terminal of resistor R11 is the output terminal.
[0093] The circuit operates as follows: When the second power supply V2 outputs a low-level signal, optocoupler U1 is not conducting, and the drain-source switching circuit 10 switches to a source-type input circuit. The first power supply 30 is connected to 24V and GND. Since the transistor in optocoupler U1 is not conducting, the PNP transistor Q1 is also not conducting. When the fourth power supply V4 outputs a high-level signal, the PNP transistor Q3 is not conducting, and the drain-source switching terminal Vin is low. At this time, the output terminal of optocoupler U2 is not conducting, and the output terminal Vout outputs a high-level signal to the main control chip. When the fourth power supply V4 outputs a low-level signal, the PNP transistor Q3 conducts, the drain-source switching terminal Vin is high, driving the input terminal of optocoupler U2 to conduct, and the output terminal of optocoupler U2 to conduct. Vout then outputs a low-level signal to the main control chip.
[0094] like Figure 10The diagram shows the circuit diagram of drain-source switching circuit 10 connected to NPN circuit. NPN circuit includes NPN transistor Q4, resistor R14, resistor R15 and fifth power supply V5. The collector of NPN transistor Q4 is connected to drain-source switching terminal Vin, the emitter of NPN transistor Q4 is grounded, the base of NPN transistor Q4 is connected to the first terminal of resistor R14 and the first terminal of resistor R15 respectively, the second terminal of resistor R14 is connected to the fifth power supply V5, and the second terminal of resistor R15 is grounded.
[0095] The circuit operates as follows: When the second power supply V2 outputs a high-level signal, optocoupler U1 conducts, and the drain-source switching circuit 10 switches to a drain input circuit. The first power supply V1 is connected to 24V and GND, and the output of optocoupler U1 conducts. The current output by the first power supply V1 forms a voltage divider across resistors R1 and R3. At this time, the voltage difference between the base and emitter of PNP transistor Q1 exceeds 0.7V, and PNP transistor Q1 conducts. When the fifth power supply V5 outputs a high-level signal, NPN transistor Q4 conducts, and the drain-source switching terminal Vin is at a low level. The current output by the first power supply V1 forms a path through PNP transistor Q1, resistor R5, and NPN transistor Q4. At this time, the output of optocoupler U2 is not conducting, and the third power supply V3 outputs a high-level signal, which is sent to the main control chip through the output terminal Vout. When the fifth power supply V5 outputs a low-level signal, the NPN transistor Q4 is not turned on. Since the PNP transistor Q1 is turned on, the current output by the first power supply V1 is output to the input terminal of the optocoupler U2 through the PNP transistor Q1, resistor R5, resistor R6, PNP transistor Q2, and resistor R7. The output terminal of the optocoupler U2 is turned on, and the output terminal Vout outputs a low level to the main control chip.
[0096] Example 2
[0097] This second embodiment provides an electronic device, which includes the drain-source switching circuit 10 and the circuit under test 20 from the first embodiment. The circuit under test 20 is a PNP circuit or an NPN circuit. The electronic device also includes a main control chip 40, which is connected to the output module 103.
[0098] The drain-source switching circuit 10 controls the device's operating mode (source-type input circuit or drain-type input circuit) according to different input signals. Based on the state of the external control signal, this circuit, through multiple stages of components such as the gating module 101, drain-source switching module 102, and switching module, adjusts the signal flow and current distribution to ensure the device can operate normally under either source-type or drain-type input circuit conditions. The circuit under test 20 can be a PNP circuit or an NPN circuit, based on different transistor types (PNP or NPN transistors). The main function of these circuits is to control current flow according to changes in the input signal and feed back the state of the circuit under test 20 to the drain-source switching circuit 10. The PNP transistor's on / off state affects the current output or level state based on changes in the power supply voltage. The NPN transistor's on / off state achieves current output or status feedback. The drain-source switching circuit 10 controls the on / off state of these circuits according to the different operating modes of the circuit under test 20, ensuring correct current flow. The main control chip 40 receives signals from each module and controls the overall operating state of the system according to a predetermined program logic. The main control chip 40 is connected to the output module 103. Based on the feedback signal from the output module 103, it can determine the state of the circuit under test 20 and make corresponding adjustments as needed.
[0099] The above embodiments are only used to illustrate the technical solutions of this utility model, and are not intended to limit it. Although this utility model has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this utility model, and should all be included within the protection scope of this utility model.
Claims
1. A drain-source switching circuit, characterized in that, include: A gating module, one end of which receives an input signal, to turn on or off according to the input signal; A drain-source switching module has its control terminal connected to the other end of the gating module, its power supply terminal receiving a first power supply, and its drain-source switching terminal connected to the circuit under test. When the gating module is off, the drain-source switching module switches to a source input circuit, receiving a first current or a first voltage signal through the drain-source switching terminal, and outputting a first control signal according to the state of the drain-source switching terminal. When the gating module is on, the drain-source switching module switches to a drain input circuit, outputting a second current or receiving a second voltage signal through the drain-source switching terminal, and outputting a second control signal according to the state of the drain-source switching terminal. The output module has its input terminal connected to the output terminal of the source-sink switching module to output a detection signal according to the first control signal or the second control signal.
2. The drain-source switching circuit as described in claim 1, characterized in that, The drain-source switching module includes a switching module and a filtering module. The control terminal of the switching module is the control terminal of the drain-source switching module. The first terminal of the switching module is the power supply terminal of the drain-source switching module. The second terminal of the switching module and the first terminal of the filtering module are connected together to form the drain-source switching terminal. The second terminal of the filtering module is the output terminal of the drain-source switching module. When the drain-source switching module is switched to a source input circuit, the switching module is in the off state, the drain-source switching terminal receives a first current or a first voltage signal, and the filtering module outputs a first control signal according to the state of the drain-source switching terminal. When the drain-source switching module is switched to a drain-type input circuit, the switching module is in the on state, the drain-source switching terminal outputs a second current or receives a second voltage signal, and the filtering module outputs a second control signal according to the state of the drain-source switching terminal.
3. The drain-source switching circuit as described in claim 2, characterized in that, The switching module includes a first switching module and a first voltage divider module. The first terminal of the first switching module and the input terminal of the first voltage divider module are both connected to the first terminal of the switching module. The first output terminal of the first voltage divider module is the control terminal of the switching module. The second output terminal of the first voltage divider module is connected to the control terminal of the first switching module. When the drain-source switching module is switched to a source input circuit, the first switching module is in the off state; When the drain-source switching module switches to a drain input circuit, the first voltage divider module divides the voltage output by the first power supply to turn on the first switching module. The first power supply outputs a second current to the drain-source switching terminal through the first switching module, or the first power supply outputs a third current to the filter module through the first switching module.
4. The drain-source switching circuit as described in claim 3, characterized in that, The switching module further includes a second switching module and a second voltage divider module. The first end of the second voltage divider module is connected to the first end of the first voltage divider module, the second end of the second voltage divider module is connected to the second end of the first voltage divider module, the third end of the second voltage divider module is connected to the control terminal of the second switching module, the first end of the second switching module is connected to the second end of the first switching module, and the second end of the second switching module is connected to the output terminal of the filter module. When the drain-source switching module is switched to a source input circuit, the second switching module is in the off state; When the drain-source switching module switches to a drain input circuit, the second switching module is turned on when the first switching module is turned on, and the third current output from the first power supply to the filter module through the first switching module is shunted.
5. The drain-source switching circuit as described in claim 1, characterized in that, The gating module includes a first isolation module, a first end of the first isolation module being one end of the gating module, a second end of the first isolation module being the other end of the gating module, and a third and fourth end of the first isolation module being grounded. When the first terminal of the first isolation module receives the first input signal and is connected to the third terminal, it controls the second and fourth terminals of the first isolation module to be connected. When the first terminal of the first isolation module receives the second input signal and is disconnected from the third terminal, the second and fourth terminals of the first isolation module are controlled to disconnect.
6. The drain-source switching circuit as described in claim 1, characterized in that, The output module includes a second isolation module, a pull-up module, and a third power supply. The first terminal of the second isolation module is the input terminal of the output module. The second terminal of the second isolation module and the output terminal of the pull-up module are connected together to form the output terminal of the output module. The third and fourth terminals of the second isolation module are both grounded. The input terminal of the pull-up module is connected to the third power supply. When the first control signal or the second control signal turns on the first and third terminals of the second isolation module, the second and fourth terminals of the second isolation module are turned on, and the output module outputs a low-level detection signal. When the first control signal or the second control signal disconnects the first and third terminals of the second isolation module, the second and fourth terminals of the second isolation module are disconnected, and the output module outputs a high-level detection signal.
7. The drain-source switching circuit as described in claim 1, characterized in that, The circuit under test is a PNP circuit, which includes a PNP transistor, a third voltage divider module, and a fourth power supply. The emitter of the PNP transistor and the first terminal of the third voltage divider module are connected together and then connected to the power supply terminal of the drain-source switching module. The base of the PNP transistor is connected to the second terminal of the third voltage divider module. The collector of the PNP transistor is connected to the drain-source switching terminal. The third terminal of the third voltage divider module is connected to the fourth power supply. When the fourth power supply outputs a low-level signal, the PNP transistor is turned on and outputs a first current to the drain-source switching terminal; When the fourth power supply outputs a high-level signal, the PNP transistor is turned off, and the drain-source switching terminal is in a low-level signal state.
8. The drain-source switching circuit as described in claim 1, characterized in that, The circuit under test is an NPN circuit, which includes an NPN transistor, a fourth voltage divider module, and a fifth power supply. The collector of the NPN transistor is connected to the drain-source switching terminal, the base of the NPN transistor is connected to the first terminal of the fourth voltage divider module, the emitter of the NPN transistor is grounded, the second terminal of the fourth voltage divider module is connected to the fifth power supply, and the third terminal of the fourth voltage divider module is grounded. When the fifth power supply outputs a high-level signal, the NPN transistor is turned on and the second current output from the drain-source switching terminal is grounded; When the fifth power supply outputs a low-level signal, the NPN transistor is turned off, and the drain-source switching terminal is in a high-level signal state.
9. An electronic device, characterized in that, The electronic device includes the drain-source switching circuit and the circuit under test as described in any one of claims 1 to 8, wherein the circuit under test is a PNP circuit or an NPN circuit.
10. The electronic device as claimed in claim 9, characterized in that, The electronic device also includes a main control chip, which is connected to the output module.