Switching value detection circuit capable of setting voltage action threshold and detection method thereof
By designing a switch quantity detection circuit that can set the voltage action threshold, the problem of insufficient consideration of exceeding the rated power supply voltage range in the prior art is solved, and flexible detection and threshold setting of the operating voltage are realized to ensure the reliability of the switch quantity under different voltage conditions.
Patent Information
- Application Number
- CN202510196829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-03
AI Technical Summary
The existing switching quantity detection technology lacks the consideration of reliable and inactive beyond the upper and lower limits of the rated DC power supply voltage, resulting in the automation device or detection device that may be erroneously or damaged when the operating voltage is too low or too high.
A switching quantity detection circuit that can set the voltage action threshold is designed, including a passive input detection circuit, an active input detection circuit, a switching quantity input port group, an isolation protection and digital output circuit, and dynamic detection and threshold setting of voltage is achieved through a voltage divider circuit and a comparison circuit.
Active and non-passive adaptation is achieved, and the voltage operation threshold can be set freely, ensuring that the switch quantity is reliable and does not operate when the operating voltage is lower than or higher than the set threshold, and avoids erroneous movement or damage.
Smart Images

Figure CN120085152A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power electronics, and particularly relates to a switching quantity detection circuit with a settable voltage action threshold and a detection method thereof. Background Art
[0002] The statements in this part only provide background technical information related to the present invention and do not necessarily constitute prior art.
[0003] Switching quantities in power electronics technology are widely used in automation devices and their detection devices. The detection of the input and output states of switching quantities is crucial. According to the presence or absence of an operating voltage, they are divided into two types: passive and active. Among them, the active operating voltages of DC 220V and DC 110V are the most common. The operating voltage must operate reliably within a certain range of the rated DC power supply voltage. Existing switching quantity detection technologies are designed and developed under this condition, lacking consideration of reliable non-operation beyond the upper and lower limits of the rated DC power supply voltage. That is, when the operating voltage is lower than the low-voltage action threshold, the switching quantity should reliably not operate to avoid misoperation of the automation device or detection device; when the operating voltage is higher than the high-voltage action threshold, the switching quantity should reliably not operate to avoid damage to the automation device or detection device caused by overvoltage. Summary of the Invention
[0004] To solve the above problems, the present invention proposes a switching quantity detection circuit with a settable voltage action threshold and a detection method thereof, which solves the problem that existing switching quantity detection technologies lack consideration of reliable non-operation beyond the upper and lower limits of the rated DC power supply voltage in the related art, and can achieve active and passive adaptation, and the voltage action threshold can be freely set.
[0005] According to some embodiments, the first solution of the present invention provides a switching quantity detection circuit with a settable voltage action threshold, and adopts the following technical solution:
[0006] A switch quantity detection circuit with a settable voltage action threshold, comprising a passive input detection circuit, an active input detection circuit, a switch quantity input port group, and an isolation protection and digital quantity output circuit; wherein, the passive input detection circuit includes a first voltage division circuit and a first comparison circuit, and the first voltage division circuit is connected to the first comparison circuit; the active input detection circuit includes a second voltage division circuit and a second comparison circuit, and the second voltage division circuit is connected to the second comparison circuit; the switch quantity input port group includes a first terminal and a second terminal, the first terminal is respectively connected to the passive input detection circuit and the active input detection circuit, and the second terminal is connected to the ground terminal; the isolation protection and digital quantity output circuit is respectively connected to the passive input detection circuit and the active input detection circuit. When there is an input signal in the passive input detection circuit, the isolation protection and digital quantity output circuit has a digital quantity output. When the input voltage of the active input detection circuit is greater than the action threshold high voltage or the input voltage of the active input detection circuit is less than the action threshold low voltage, the isolation protection and digital quantity output circuit has no digital quantity output. When the input voltage of the active input detection circuit is between the action threshold low voltage and the action threshold high voltage, the isolation protection and digital quantity output circuit has a digital quantity output.
[0007] As a further technical limitation, the first voltage division circuit includes a first resistor group, a first diode, and a second auxiliary power supply VCC2, and the first resistor group includes a first resistor, a second resistor, and a third resistor.
[0008] Further, the first comparison circuit includes a first auxiliary power supply, a first comparator, and a third auxiliary power supply.
[0009] Further, the second auxiliary power supply is respectively connected to the non-inverting terminal of the first comparator, the first resistor, and the third resistor through the second resistor. The other end of the third resistor is connected to the ground terminal. The positive electrode of the first diode is connected to the first resistor, the negative electrode of the first diode is connected to the first terminal. The inverting terminal of the first comparator is connected to the first auxiliary power supply, and the output terminal of the first comparator is connected to the isolation protection and digital quantity output circuit.
[0010] As a further technical limitation, the second voltage division circuit includes a second resistor group and a second diode, and the second resistor group includes a fourth resistor and a fifth resistor.
[0011] Further, the second comparison circuit includes a second comparator, a third comparator, a fifth auxiliary power supply, a first control voltage, and a second control voltage.
[0012] Further, the positive electrode of the second diode is connected to the first terminal, the fourth resistor is connected to the negative electrode of the second diode, the fourth resistor is connected to the fifth resistor, the inverting terminal and the power supply terminal of the second comparator UB21 are connected, the fifth resistor is connected to the ground terminal, the non-inverting terminal of the second comparator is connected to the first control voltage, the non-inverting terminal of the third comparator is connected to the output terminal of the second comparator, the inverting terminal of the third comparator is connected to the second control voltage, and the output terminal of the third comparator is connected to the isolation protection and digital quantity output circuit.
[0013] As a further technical limitation, the isolation protection and digital quantity output circuit includes a fourth auxiliary power supply, a power type current limiting resistor and an optocoupler, and an optocoupler diode is arranged in the optocoupler.
[0014] Further, the fourth auxiliary power supply is connected to the positive electrode of the optocoupler diode through the power type current limiting resistor, the negative electrode of the optocoupler diode is connected to the output terminals of the second comparator and the third comparator, and the digital quantity is output from the third pin and the fourth pin of the optocoupler.
[0015] According to some embodiments, the second solution of the present invention provides a detection method for a switch quantity detection circuit with a voltage action threshold that can be set, which adopts the switch quantity detection circuit with a voltage action threshold that can be set provided in the first solution, and adopts the following technical solution:
[0016] A detection method for a switch quantity detection circuit with a voltage action threshold that can be set includes:
[0017] When there is no external switch quantity input signal, the passive input detection circuit starts to work. After voltage division and adjustment by the first voltage division circuit and the first comparison circuit, a high level is output from the output terminal of the second comparator. The optocoupler of the isolation protection and digital quantity output circuit works in the cut-off state, and the passive input detection circuit has no digital quantity output;
[0018] When the external switch quantity input is a passive signal, the passive input detection circuit starts to work. After voltage division and adjustment by the first voltage division circuit and the first comparison circuit, a low level is output from the output terminal of the second comparator. The optocoupler of the isolation protection and digital quantity output circuit works in the conducting state, and the passive input detection circuit has digital quantity output. At this time, the active input detection circuit has no starting voltage and does not work;
[0019] When the external switch input is an active signal, the first diode is reversely cut off, the passive input detection circuit does not work, and the active input detection circuit starts to work. After voltage division and adjustment by the second voltage division circuit and the second comparison circuit, the active input detection circuit works according to the set voltage action threshold. When the input voltage of the active input detection circuit is between the action threshold low voltage and the action threshold high voltage, the isolation protection and digital quantity output circuit has a digital quantity output. When the input voltage of the active input detection circuit is greater than the action threshold high voltage or the input voltage of the active input detection circuit is less than the action threshold low voltage, the isolation protection and digital quantity output circuit has no digital quantity output, completing the entire switch input state detection process. Among them, the action threshold low voltage and the action threshold high voltage are the action threshold voltages of the settable voltage.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] The present invention is adaptable to active and passive sources, and the voltage action threshold can be freely set, aiming to solve the problem that the input of the automation device and its detection device malfunctions due to too low operating voltage in the prior art, or the automation device and its detection device are damaged due to overvoltage caused by too high operating voltage. It can be realized that when the switch quantity is a passive input, it operates reliably; when the switch quantity is an active input and the operating voltage is within the specified rated DC power supply voltage range, it operates reliably; when the switch quantity is an active input and the operating voltage is lower than the action threshold low voltage, the switch quantity does not operate reliably; when the operating voltage is higher than the action threshold high voltage, the switch quantity does not operate reliably. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The specification drawings forming a part of this embodiment are used to provide a further understanding of this embodiment. The schematic embodiments and descriptions of this embodiment are used to explain this embodiment and do not constitute an improper limitation on this embodiment.
[0023] Figure 1 It is the structural block diagram of the switch quantity detection circuit with a settable voltage action threshold in the first embodiment of the present invention;
[0024] Figure 2 It is the working flow chart of the switch quantity detection circuit with a settable voltage action threshold in the first embodiment of the present invention;
[0025] Figure 3 It is the topological structure diagram of the switch quantity detection circuit with a settable voltage action threshold in the first embodiment of the present invention;
[0026] Figure 4 It is the topological structure diagram of the passive input detection circuit in the first embodiment of the present invention;
[0027] Figure 5 It is the topological structure diagram of the active input detection circuit in the first embodiment of the present invention. Detailed Implementation Modes
[0028] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0029] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs.
[0030] It should be noted that the terms used herein are only for describing specific implementation modes and are not intended to limit the exemplary implementation modes according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "include" and / or "comprise" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0031] In the present invention, terms such as "upper", "lower", "left", "right", "front", "rear", "vertical", "horizontal", "side", "bottom", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only relationship terms determined for the convenience of describing the structural relationship of each component or element of the present invention and do not specifically refer to any component or element in the present invention. They should not be construed as limiting the present invention.
[0032] In the present invention, terms such as "fixed connection", "connected", "connected to" should be understood in a broad sense, which may mean a fixed connection, an integral connection or a detachable connection; it may be directly connected or indirectly connected through an intermediate medium. For those related scientific research or technical personnel in the field, the specific meanings of the above terms in the present invention can be determined according to specific circumstances and should not be construed as limiting the present invention.
[0033] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0034] Embodiment 1
[0035] Embodiment 1 of the present invention introduces a switch quantity detection circuit with a settable voltage action threshold.
[0036] As Figure 1 、 Figure 2 and Figure 3 shown, a switch quantity detection circuit with a settable voltage action threshold includes a passive input detection circuit, an active input detection circuit, a switch quantity input port group, and an isolation protection and digital quantity output circuit.
[0037] As Figure 4As shown, the source input detection circuit, the passive input detection circuit includes a first voltage division circuit and a first comparison circuit, and the first voltage division circuit is connected to the first comparison circuit.
[0038] As Figure 5 shown, the active input detection circuit includes a second voltage division circuit and a second comparison circuit, and the second voltage division circuit is connected to the second comparison circuit.
[0039] In this embodiment, the digital input port group includes terminal P1 and terminal P2. Terminal P1 is connected to both the passive input detection circuit and the active input detection circuit at the same time, and terminal P2 is connected to ground GND. When an external passive digital signal is input, terminals P1 and P2 have no polarity. When an external active digital signal is input, terminal P1 is connected to the positive pole of the operating circuit voltage, and terminal P2 is connected to the negative pole of the operating circuit voltage.
[0040] In this embodiment, the isolation protection and DI output circuit is connected to both the passive input detection circuit and the active input detection circuit at the same time. When there is an input signal in the passive input detection circuit, the isolation protection and DI output circuit has a digital DI output. When the input voltage UIN of the active input detection circuit is greater than the action threshold high voltage UH or the input voltage UIN of the active input detection circuit is less than the action threshold low voltage UL, the isolation protection and DI output circuit has no digital DI output. When the action threshold low voltage UL ≤ the input voltage UIN of the active input detection circuit ≤ the action threshold high voltage UH, the isolation protection and DI output circuit has a digital DI output.
[0041] As Figure 4 shown, the first voltage division circuit includes a first resistor group, diode DB1 and auxiliary power supply VCC2. The first resistor group includes resistors R11, R12 and R13. The first comparison circuit includes auxiliary power supply VCC1, comparator UB1 and auxiliary power supply VCC3. The auxiliary power supply VCC2 is connected to the non-inverting terminal of the comparator UB1, resistor R11 and resistor R13 through resistor R12 respectively. Resistor R13 is connected to ground GND. The positive pole of diode DB1 is connected to resistor R11, and the negative pole of diode DB1 is connected to terminal P1. The inverting terminal of comparator UB1 is connected to auxiliary power supply VCC1, and the output terminal of comparator UB1 is connected to the isolation protection and DI output circuit.
[0042] As Figure 5As shown in the figure, the second voltage dividing circuit includes a second resistor group and a diode DB2. The second resistor group includes a resistor R21 and a resistor R22. The second comparison circuit includes a comparator UB21, a comparator UB22, an auxiliary power supply VCC5, a control voltage DA21, and a control voltage DA22. The positive pole of the diode DB2 is connected to the terminal P1. The resistor R21 is connected to the negative pole of the diode DB2. The resistor R21 is connected to the resistor R22, the inverting terminal, and the power supply terminal of the comparator UB21. The resistor R22 is connected to the ground GND. The non-inverting terminal of the comparator UB21 is connected to the control voltage DA21. The non-inverting terminal of the comparator UB22 is connected to the output terminal of the comparator UB21. The inverting terminal of the comparator UB22 is connected to the control voltage DA22. The output terminal of the comparator UB22 is connected to the isolation protection and DI output circuit.
[0043] The isolation protection and DI output circuit includes an auxiliary power supply VCC4, a power type current limiting resistor R14, and an optocoupler U1. An optocoupler diode is provided inside the optocoupler U1.
[0044] The auxiliary power supply VCC4 is connected to the positive pole of the optocoupler diode through the power type current limiting resistor R14. The negative pole of the optocoupler diode is connected to the output terminals of the comparator UB21 and the comparator UB22. The digital quantity DI is output from the pins 3 and 4 of the optocoupler U1.
[0045] Embodiment 2
[0046] Embodiment 2 of the present invention introduces a detection method for a switching quantity detection circuit with a settable voltage action threshold.
[0047] A detection method for a switching quantity detection circuit with a settable voltage action threshold includes:
[0048] Step 1: When there is no external switching quantity input signal, the passive input detection circuit starts to work. After voltage division and adjustment by the first voltage dividing circuit and the first comparison circuit, a high level is output from the output terminal of the comparator UB21. The optocoupler U1 of the isolation protection and DI output circuit operates in the cut-off state, and no digital quantity DI is output from the passive input detection circuit.
[0049] Step 2: When the external switching quantity input is a passive signal, the passive input detection circuit starts to work. After voltage division and adjustment by the first voltage dividing circuit and the first comparison circuit, a low level is output from the output terminal of the comparator UB21. The optocoupler U1 of the isolation protection and DI output circuit operates in the conducting state, and the passive input detection circuit outputs a digital quantity DI. At this time, the active input detection circuit has no startup voltage and does not work.
[0050] Step 3: When the external switch input is an active signal, the diode DB1 of the passive input detection circuit is reversely cut off, the passive input detection circuit does not work, and the active input detection circuit starts to work. After voltage division and adjustment by the second voltage division circuit and the second comparison circuit, the active input detection circuit operates according to the set voltage action threshold. When the action threshold low voltage UL ≤ the input voltage UIN of the active input detection circuit ≤ the action threshold high voltage UH, the isolation protection and DI output circuit outputs a digital quantity DI. When the input voltage UIN of the active input detection circuit is greater than the action threshold high voltage UH or the input voltage UIN of the active input detection circuit is less than the action threshold low voltage UL, the isolation protection and DI output circuit does not output a digital quantity DI, completing the entire switch input state detection process. Among them, the action threshold low voltage UL and the action threshold high voltage UH are the action threshold voltages with precisely set voltages.
[0051] This detection circuit is adaptable to active and passive signals, and the voltage action threshold can be freely set, aiming to solve the problem of misoperation of the input quantity of the automation device and its detection device caused by too low operating voltage or damage to the automation device and its detection device caused by overvoltage due to too high operating voltage in the prior art. It can be realized that when the switch quantity is a passive input, it operates reliably; when the switch quantity is an active input and the operating voltage is within the specified rated DC power supply voltage range, it operates reliably; when the switch quantity is an active input and the operating voltage is lower than the action threshold low voltage, the switch quantity does not operate reliably; when the operating voltage is higher than the action threshold high voltage, the switch quantity does not operate reliably.
[0052] The external signal flows in from the switch input terminal P1, and the passive and active signals adaptively enter the corresponding input detection circuits. When the switch quantity is a passive input, it passes through the first voltage division circuit and the first comparison circuit, and then through the isolation protection and DI output circuit to complete the detection process of the passive switch input signal. When the switch quantity is an active input, the upper action threshold high voltage UH and the lower action threshold low voltage UL of the set action voltage are set. After passing through the second voltage division circuit and the second comparison circuit, and then through the isolation protection and DI output circuit, the detection process of the active switch input signal is completed. The circuit function modules are as Figure 1 shown.
[0053] The voltages of the auxiliary power supplies VCC2, VCC3, VCC4, and VCC5 are the same.
[0054] In the default state, there is no external digital input signal. The digital input terminal P1 is in a floating state. The auxiliary power supply VCC2 forms a loop through the resistor R12 and the resistor R13 grounded. For the first voltage division circuit, the resistor R12 = R13. The input voltage V+ at the non-inverting terminal of the comparator UB1 is V+ = VCC3×[R13 / (R12 + R13)] = VCC3 / 2, and the voltage V- at the inverting terminal of the comparator UB1 is V- = VCC1. It is set that the auxiliary power supply VCC1 satisfies VCC3 / 3 < VCC1 < VCC3 / 2. Since V+ > V-, the output Uout of the comparator UB1 outputs a high level. The optocoupler U1 in the isolation protection and DI output circuit operates in the cut-off state, and there is no DI output from the passive input detection circuit.
[0055] When there is an external passive digital input signal, the digital input terminal P1 is short-circuited to ground with the terminal P2. The auxiliary power supply VCC2 forms loops through the resistor R12 and the resistor R13 grounded and through the resistor R12, the resistor R11, and the diode DB1 grounded simultaneously. The resistors R11 and R13 are first in parallel and then in series with R12. For the voltage division circuit, the resistor R11 = R12 = R13. The input voltage V+ at the non-inverting terminal of the comparator UB1 is V+ = VCC3×[(R11 / / R13) / (R12+(R11 / / R13))] = VCC3 / 3, and the voltage V- at the inverting terminal of the comparator UB1 is V- = VCC1. It is set that the auxiliary power supply VCC1 satisfies VCC3 / 3 < VCC1 < VCC3 / 2. Since V+ < V-, the output Uout of the comparator UB1 outputs a low level. The optocoupler U1 in the isolation protection and DI output circuit operates in the conducting state, and the passive input detection circuit outputs DI. The passive input detection circuit is as Figure 4 shown.
[0056] When there is an external active digital input, the diode DB1 in the passive input detection circuit is reverse cut-off, and the passive input detection circuit does not work; the active input detection circuit starts to work and operates according to the action threshold of the set voltage. Let the rated DC voltage be Udc. Under rated conditions, the active digital input voltage UIN = Udc.
[0057] When the active digital input voltage UIN satisfies UL ≤ UIN ≤ UH, there is a DI output. When the output voltage UIN UL, there is no DI output. UL and UH are the action thresholds of the voltage that can be accurately set, expressed as a percentage of the rated DC voltage Udc.
[0058] Taking the operating voltage thresholds UL = 50%Udc and UH = 100%Udc as examples respectively for illustration, the DC voltage UIN of the operating circuit forms a loop through the diode DB2, resistors R21 and R22 to the ground. The resistance of the second voltage division circuit R21 = 100×R22. The input voltage V- at the inverting terminal and the power supply terminal of the comparator UB21 = [R22 / (R21+R22)]≈0.01UIN. The control voltage DA21 = 0.01UL = 0.005Udc, and the control voltage DA22 = 0.01UH = 0.01Udc.
[0059] When the input voltage of the active switch quantity UIN < UL = 50%Udc, the input voltage V- at the inverting terminal and the power supply terminal of the comparator U21 = 0.01UIN < 0.01×UL = 0.005Udc. The input voltage V+ at the non-inverting terminal of the comparator U21 = DA21 = 0.005Udc. The input voltage V+ of the comparator UB21 > V-. The output terminal Uout1 of the comparator UB21 outputs a high level. The input voltage V+ at the non-inverting terminal of the comparator UB22 = high level, and the input voltage V- at the inverting terminal = DA22 = 0.01Udc. The input voltage V+ of the comparator UB22 > V-. The output terminal Uout2 of the comparator UB22 outputs a high level. The optocoupler U1 of the isolation protection and DI output circuit operates in the cut-off state, and there is no DI output in the circuit.
[0060] When the low operating threshold UL = 50%Udc ≤ UIN ≤ UH = 100%Udc, the input voltage V- at the inverting terminal and the power supply terminal of the comparator UB21 = 0.01UIN > 0.01×UL = 0.005Udc. The input voltage V+ at the non-inverting terminal of the comparator UB21 = DA21 = 0.005Udc. The input voltage V+ of the comparator UB21 < V-. The output of the output terminal Uout1 of the comparator UB21 = 0.01UIN. The input voltage V+ at the non-inverting terminal of the comparator UB22 = 0.01UIN, and the input voltage V- at the inverting terminal = DA22 = 0.01Udc. The input voltage V+ of the comparator UB22 < V-. The output terminal Uout2 of the comparator UB22 outputs a low level. The optocoupler U1 of the isolation protection and DI output circuit operates in the conducting state, and the active input detection circuit outputs DI.
[0061] When the input voltage of the active input detection circuit UIN > UH = 100%Udc, the input voltage at the inverting terminal and the power supply terminal of comparator UB21 is V- = 0.01UIN > 0.01×UH = 0.01Udc, and the input voltage at the non-inverting terminal of comparator UB21 is V+ = DA21 = 0.005Udc. Since the input voltage of comparator UB21 V+ < V-, the output Uout1 of comparator UB21 is > 0.01Udc. The input voltage at the non-inverting terminal of comparator UB22 is V+ > 0.01Udc, and the input voltage at the inverting terminal is V- = DA22 = 0.01Udc. Since the input voltage of comparator UB22 V+ > V-, the output Uout2 of comparator UB22 outputs a high level. The optocoupler U1 in the isolation protection and DI output circuit operates in the cut-off state, and there is no DI output from the active input detection circuit. The active input detection circuit is as Figure 5 shown.
[0062] When the input voltage at the cathode of the optocoupler diode of optocoupler U1 is at a high level, optocoupler U1 is in the cut-off state, and there is no DI output from the isolation protection and DI output circuit. When the input voltage at the cathode of the diode of optocoupler U1 is at a low level, optocoupler U1 operates in the conducting state, and the isolation protection and DI output circuit outputs DI.
[0063] Port P1 receives external digital input signals. When there is no external input signal, the passive input detection circuit works. Resistors R12 and R13 in the first voltage division circuit divide the voltage so that the voltage V+ at the input terminal of comparator UB1 > V-. The output terminal of comparator UB1 outputs a high level. The optocoupler U1 in the isolation protection and DI output circuit is in the cut-off state, and there is no DI output from the passive input detection circuit. When there is a passive digital input signal externally, the passive input detection circuit works. The series-parallel relationship of resistors R11, R12, and R13 in the first voltage division circuit changes, and through voltage division, the voltage V+ at the input terminal of comparator UB1 < V-. The output terminal of comparator UB1 outputs a low level. The optocoupler U1 in the isolation protection and DI output circuit works in the conducting state, and the passive input detection circuit outputs DI. When there is an active digital input signal externally, the passive input detection circuit stops working because diode CB1 is reverse cut-off, and the active input detection circuit works. Resistors R21 and R22 in the second voltage division circuit divide the voltage so that the input voltage V- at the inverting input terminal and the power supply terminal of comparator UB21 = 0.01UIN. The non-inverting terminal of comparator UB22 is connected to the output terminal of the comparator. The control voltage DA21 is input to the non-inverting terminal of comparator UB21, and the control voltage DA22 is input to the inverting terminal of comparator U22. By setting the lower action threshold low voltage UL and the upper action threshold high voltage UH of the voltage action threshold, the control voltage DA21 = 0.01UL and the control voltage DA22 = 0.01UH are set. When the active digital input voltage satisfies UIN < UL, the input voltage V+ of comparator UB21 > V-. The output terminal Uout1 of comparator UB21 outputs a high level. The input voltage V+ at the non-inverting terminal of comparator UB22 = high level, and the input voltage V- at the inverting terminal = DA22 = 0.01Udc. The input voltage V+ of comparator UB22 > V-. The output terminal Uout2 of comparator UB22 outputs a high level. The optocoupler U1 in the isolation protection and DI output circuit is in the cut-off state, and there is no DI output from the active input detection circuit. When the active digital input voltage UIN satisfies UL ≤ UIN ≤ UH, the input voltage V+ of comparator UB21 < V-, the input voltage V+ of comparator UB22 < V-. The output terminal Uout2 of comparator UB22 outputs a low level. The optocoupler U1 in the isolation protection and DI output circuit works in the conducting state, and the active input detection circuit outputs DI. When the input voltage of the active input detection circuit satisfies UIN > UH, the input voltage V+ of comparator UB21 < V-, the input voltage V+ of comparator UB22 > V-. The output terminal Uout2 of comparator UB22 outputs a high level. The optocoupler U1 in the isolation protection and DI output circuit is in the cut-off state, and there is no DI output from the active input detection circuit. When the input voltage at the cathode of the optocoupler diode of optocoupler U1 is high, optocoupler U1 is in the cut-off state, and there is no DI output from the active input detection circuit. When the input voltage at the cathode of the optocoupler diode of optocoupler U1 is low, optocoupler U1 works in the conducting state, and the active input detection circuit outputs DI.
[0064] The detailed steps are the same as the working principle of the switch quantity detection circuit with a settable voltage action threshold provided in the first embodiment, and will not be elaborated here.
[0065] The above are only the preferred embodiments of this embodiment and are not used to limit this embodiment. For those skilled in the art, various changes and modifications can be made to this embodiment. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this embodiment shall be included within the protection scope of this embodiment.
Claims
1. A switch detection circuit capable of setting a voltage action threshold, characterized in that: It includes a passive input detection circuit, an active input detection circuit, a switch input port group and an isolation protection and digital output circuit; wherein the passive input detection circuit includes a first voltage divider circuit and a first comparison circuit, and the first voltage divider circuit is connected to the first comparison circuit; the active input detection circuit includes a second voltage divider circuit and a second comparison circuit, and the second voltage divider circuit is connected to the second comparison circuit; the switch input port group includes a first terminal and a second terminal, the first terminal is respectively connected to the passive input detection circuit and the active input detection circuit, and the second terminal is connected to the ground terminal; the isolation protection and digital output circuit are respectively connected to the passive input detection circuit and the active input detection circuit, when the passive input detection circuit has an input signal, the isolation protection and digital output circuit has a digital output, when the input voltage of the active input detection circuit is greater than the action threshold high voltage or the input voltage of the active input detection circuit is less than the action threshold low voltage, the isolation protection and digital output circuit has no digital output, and when the input voltage of the active input detection circuit is between the action threshold low voltage and the action threshold high voltage, the isolation protection and digital output circuit has a digital output.
2. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 1, characterized in that: The first voltage divider circuit includes a first resistor group, a first diode and a second auxiliary power supply VCC2, and the first resistor group includes a first resistor, a second resistor and a third resistor.
3. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 2, characterized in that: The first comparison circuit includes a first auxiliary power supply, a first comparator and a third auxiliary power supply.
4. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 3, characterized in that: The second auxiliary power supply is connected to the same direction end of the first comparator, the first resistor and the third resistor respectively through the second resistor, the other end of the third resistor is connected to the ground end, the positive electrode of the first diode is connected to the first resistor, the negative electrode of the first diode is connected to the first terminal, the reverse end of the first comparator is connected to the first auxiliary power supply, and the output end of the first comparator is connected to the isolation protection and digital output circuit.
5. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 1, characterized in that: The second voltage divider circuit includes a second resistor group and a second diode, and the second resistor group includes a fourth resistor and a fifth resistor.
6. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 5, characterized in that: The second comparison circuit includes a second comparator, a third comparator, a fifth auxiliary power supply, a first control voltage and a second control voltage.
7. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 6, characterized in that: The anode of the second diode is connected to the first terminal, the fourth resistor is connected to the cathode of the second diode, the fourth resistor is connected to the fifth resistor, the reverse end of the second comparator UB21 is connected to the power supply end, the fifth resistor is connected to the ground end, the same direction end of the second comparator is connected to the first control voltage, the same direction end of the third comparator is connected to the output end of the second comparator, the reverse end of the third comparator is connected to the second control voltage, and the output end of the third comparator is connected to the isolation protection and digital output circuit.
8. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 1, characterized in that: The isolation protection and digital output circuit includes a fourth auxiliary power supply, a power-type current-limiting resistor and an optocoupler, and an optocoupler diode is provided in the optocoupler.
9. A switch detection circuit capable of setting a voltage action threshold as claimed in claim 8, characterized in that: The fourth auxiliary power supply is connected to the anode of the optocoupler diode via a power-type current-limiting resistor, the cathode of the optocoupler diode is connected to the output ends of the second comparator and the third comparator, and the digital quantity is output from the third pin and the fourth pin of the optocoupler.
10. A detection method for a switch quantity detection circuit capable of setting a voltage action threshold, used for the switch quantity detection circuit capable of setting a voltage action threshold as claimed in any one of claims 1 to 9, characterized in that: include: When there is no external switch input signal, the passive input detection circuit starts working, and after the voltage division adjustment by the first voltage divider circuit and the first comparison circuit, a high level is output from the output terminal of the second comparator, and the optocoupler of the isolation protection and digital output circuit works in the cut-off state, and the passive input detection circuit has no digital output; When the external switch input is a passive signal, the passive input detection circuit starts working. After the voltage division adjustment by the first voltage division circuit and the first comparison circuit, the output terminal of the second comparator outputs a low level, the optocoupler of the isolation protection and digital output circuit works in the on state, and the passive input detection circuit has a digital output. At this time, the active input detection circuit has no starting voltage and does not work. When the external switch input is an active signal, the first diode is reversely cut off, the passive input detection circuit does not work, and the active input detection circuit starts to work. After the second voltage divider circuit and the second comparison circuit adjust the voltage, the active input detection circuit works according to the set voltage action threshold. When the input voltage of the active input detection circuit is between the action threshold low voltage and the action threshold high voltage, the isolation protection and digital output circuit has digital output. When the input voltage of the active input detection circuit is greater than the action threshold high voltage or the input voltage of the active input detection circuit is less than the action threshold low voltage, the isolation protection and digital output circuit has no digital output, completing the entire switch input state detection process, wherein the action threshold low voltage and the action threshold high voltage are action threshold voltages that can be set.