A detection circuit for three-state input signal

By designing a three-state input signal detection circuit and using a combination of op amps and switching tubes, the identification of high-level, low-level and high-impedance signals is achieved, which solves the problem of tight port resources in the existing technology and saves the cost of the detection chip. number of input and output ports and suitable for practical applications.

CN113359016BActive Publication Date: 2024-09-24LISHEN (QINGDAO) NEW ENERGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110579922.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-26
Publication Date
2024-09-24
Estimated Expiration
2041-05-26

AI Technical Summary

Technical Problem

Existing detection chips can only identify two signal states, high level and low level, and cannot effectively identify three-state signals, resulting in the need to occupy multiple input and output ports, resulting in tight port resources.

Method used

A three-state input signal detection circuit is designed, including an input module, an output module and an enable module. Through the combination of an op amp and a switch tube, the identification of high-level, low-level and high-impedance signals is achieved. One output port can represent three states of the input signal.

Benefits of technology

It significantly reduces the number of input and output ports of the detection chip, saving hardware resources, and the voltage amplitude of the output port can be flexibly adjusted, which is suitable for chip signal recognition and has practical value and market promotion value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113359016B
    Figure CN113359016B
Patent Text Reader

Abstract

This invention discloses a detection circuit for a three-state input signal, comprising an input module whose input terminal Vin is connected to the detection signal output terminal of an external electronic circuit, its power input terminal is connected to a power module, and its output terminal is connected to the input terminal A2 of an output module; an enable module whose first input terminal is connected to the detection signal output terminal of the external electronic circuit; an enable module whose second input terminal is connected to the power module; an enable module whose output terminal is connected to the input terminal A1 of the input module; an output module whose input terminal A2 is connected to the output terminal of the input module; a power input terminal of the output module connected to the power module; and an output terminal Vo of the output module connected to an input / output port of a detection chip. This invention discloses a three-state input signal detection circuit that can characterize the three states of the input signal through a single output port, significantly reducing the number of input / output ports required by the detection chip and saving valuable hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic circuits, and in particular to a detection circuit for a three-state input signal. Background Art

[0002] At present, the input signals of electronic circuits include three basic logic states, namely high level, low level and high impedance state. Signals with these three logic states are referred to as three-state signals.

[0003] For existing detection chips (such as single-chip microcomputers), only two signal states, high level and low level, can be identified.

[0004] In order to enable existing detection chips (such as single-chip microcomputers) to identify the three basic logical states of input signals, existing circuits for detecting three-state input signals need to adopt a method of combining the signals of two output ports. For example, the two output ports are respectively connected to two input and output (I / O) ports of the detection chip (such as single-chip microcomputer), and the two output ports are connected to the third input and output port on the detection chip after the two output ports converge and intersect. This will occupy more input and output ports of the detection chip, resulting in a shortage of port resources of the detection chip, making it difficult to meet the connection requirements of other electronic modules. Summary of the invention

[0005] The purpose of the present invention is to provide a detection circuit for a three-state input signal in view of the technical defects in the prior art.

[0006] To this end, the present invention provides a detection circuit for a three-state input signal, comprising an input module, an output module, an enabling module and a power module, wherein:

[0007] The input terminal Vin of the input module is connected to the detection signal output terminal of the external electronic circuit and is used to receive the detection input signal Vin provided by the external electronic circuit;

[0008] The power input terminal of the input module is connected to the output terminal VDD of the power module and is used to receive the DC power supply VDD;

[0009] The output end of the input module is connected to the input end A2 of the output module, and is used to provide the output module with input signals A2 of different states, thereby controlling the change of the output signal Vo of the output module;

[0010] A first input terminal of the enabling module is connected to a detection signal output terminal of an external electronic circuit and is used to receive a detection input signal Vin provided by the external electronic circuit;

[0011] The second input terminal of the enabling module is connected to the output terminal VDD of the power module and is used to receive the DC power supply VDD;

[0012] The output end of the enabling module is connected to the input end A1 of the input module, and is used to provide an enabling signal A1 for the input module;

[0013] The input terminal A2 of the output module is connected to the output terminal of the input module and is used to receive the output signal A2 provided by the input module;

[0014] The power input terminal of the output module is connected to the output terminal VDD of the power module and is used to receive the DC power supply VDD;

[0015] The output terminal Vo of the output module is connected to an input / output port of the detection chip 50 to provide the detection chip 50 with a detection output signal Vo;

[0016] The detection output signal Vo has three states: high level, low level and 0V.

[0017] Preferably, the input module comprises: resistors R1 to R3 and an operational amplifier U1, wherein:

[0018] The first pin of the resistor R1 is used as the input terminal Vin of the input module, connected to the detection signal output terminal of the external electronic circuit, and is used to receive the detection input signal Vin provided by the external electronic circuit;

[0019] The second pin of the resistor R1 is connected to the second pin of the operational amplifier U1, and the second pin is the negative input terminal of the signal;

[0020] The first pin of the operational amplifier U1 is the positive signal input terminal of the operational amplifier U1, and is connected to the second pin of the resistor R2 and the first pin of the resistor R3 respectively;

[0021] The third pin of the operational amplifier U1 is used as the input terminal A1 of the input module, and is used to receive the enable signal A1 output by the enable module;

[0022] The 4th pin of the operational amplifier U1 is used as the power input terminal of the input module, connected to the output terminal VDD of the power module, and is used to receive the DC power supply VDD;

[0023] The 4th pin of the op amp U1 is also connected to the 1st pin of the resistor R2;

[0024] The first pin of the resistor R2 is used as the power input terminal of the input module, connected to the output terminal VDD of the power module, and is used to receive the DC power supply VDD;

[0025] The 5th pin of the operational amplifier U1 is connected to the ground terminal GND;

[0026] The second pin of the resistor R3 is connected to the ground terminal GND;

[0027] The sixth pin of the operational amplifier U1 is used as the output terminal of the input module, connected to the input terminal A2 of the output module, and is used to provide the output module with input signals A2 of different states.

[0028] Preferably, the enabling module includes: resistors R4 to R9 and switch tubes Q1 to Q3, wherein:

[0029] The first pins of the resistors R4 and R5 are connected to the detection signal output terminal of the external electronic circuit as the first input terminal of the enabling module, and are used to receive the detection input signal Vin provided by the external electronic circuit;

[0030] The second pin of the resistor R4 is connected to the source S of the switch tube Q1 and the gate G of the switch tube Q2 respectively;

[0031] The source S of the switch tube Q2 is connected to the second pin of the resistor R7;

[0032] The drain electrode D of the switch tube Q2 is connected to the first pin of the resistor R8 and the base electrode B of the switch tube Q3 respectively;

[0033] The first pin of the resistor R7 is used as the second input terminal of the enabling module, connected to the output terminal VDD of the power module, and is used to receive the DC power supply VDD;

[0034] The first pin of the resistor R7 is also connected to the second pin of the resistor R9;

[0035] The second pin of the resistor R8 is connected to the ground terminal GND;

[0036] The collector C of the switch tube Q3, as the output end of the enable module, is connected to the input end A1 of the input module, and is used to output an enable signal A1 for the input module, and the enable signal A1 is used to control the operational amplifier U1 in the input module to be in a disabled or activated state;

[0037] The collector C of the switch tube Q3 is also connected to the first pin of the resistor R9;

[0038] The second pin of the resistor R5 is connected to the first pin of the resistor R6 and the gate G of the switch tube Q1 respectively;

[0039] The second pin of the resistor R6 is connected to the ground terminal GND;

[0040] The drain electrode D of the switch tube Q1 and the emitter electrode E of Q3 are both connected to the ground terminal GND.

[0041] Preferably, the output module includes: resistors R10-R15 and switches Q4-Q6, wherein:

[0042] The first pin of the resistor R10 is used as the input terminal A2 of the output module, connected to the output terminal of the input module, and used to receive the output signal A2 provided by the input module. The output signal A2 has three states: high level, low level and high impedance state;

[0043] The first pin of the resistor R10 is also connected to the first pin of the resistor R11;

[0044] The second pin of the resistor R10 is connected to the gate G of the switch tube Q4;

[0045] The source S of the switch tube Q4 is connected to the second pin of the resistor R12;

[0046] The drain D of the switch tube Q4, as the output terminal Vo of the output module, is connected to an input / output port of the detection chip 50, and is used to provide the detection chip with a detection output signal Vo, which has three states: high level, low level and 0V;

[0047] The drain electrode D of the switch tube Q4 is also connected to the first pin of the resistor R13, the emitter electrode E of the switch tube Q5 and the first pin of the resistor R15 respectively;

[0048] The second pin of the resistor R11 is connected to the base B of the switch tube Q5 and the base B of the switch tube Q6 respectively;

[0049] The collector C of the switch tube Q6 is connected to the second pin of the resistor R15;

[0050] The emitter E of the switch tube Q6 is connected to the ground terminal GND;

[0051] The collector C of the switch tube Q5 is connected to the second pin of the resistor R14;

[0052] The first pin of the resistor R14 is used as a power input terminal of the output module, connected to the output terminal VDD of the power module, and is used to receive the DC power supply VDD;

[0053] The first pin of the resistor R14 is also connected to the first pin of the resistor R12.

[0054] Preferably, the working mode of the enabling module is as follows:

[0055] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the gate G of the switch tube Q1 is pulled down by the resistor R6 to a low potential equal to the ground terminal GND and is cut off, and the gate G of the switch tube Q2 is pulled down by the resistors R4 to R6 to a low potential equal to the ground terminal GND and is cut off, so that the switch tube Q3 is cut off, and the output end of the enabling module is pulled up by the resistor R9 to a high potential equal to the power supply VDD, that is, the input end A1 of the input module is at a high level, so that the operational amplifier U1 in the input module is in a disabled state;

[0056] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the gate G of the switch tube Q1 is turned on after the bias voltage and current are provided by the resistors R5 and R6, so that the gate G of the switch tube Q2 is at a low potential, thereby turning on the switch tube Q2. Then, the switch tube Q3 is turned on after the bias voltage and current are provided by the resistors R7 and R8, so that the input terminal A1 of the input module becomes a low level, thereby activating the operational amplifier U1 in the input module;

[0057] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q1 is turned off, while the switch tube Q2 is turned on, and the switch tube Q3 is turned on by the bias voltage and current provided by the resistor R7 and the resistor R8, so that the input terminal A1 of the input module becomes a low level, thereby activating the operational amplifier U1 in the input module.

[0058] Preferably, the working mode of the output module is as follows:

[0059] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the operational amplifier U1 in the input module is in a disabled state, and its output end is in a high impedance state, that is, the input end A1 of the output module is in a high impedance state, and the switch tubes Q4 to Q6 are all cut off, so that the output end Vo of the output module is pulled down by the resistor R13 to 0V, which is equal to the potential of the ground end GND;

[0060] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the operational amplifier U1 in the input module is in an activated state, and the signal at its output end changes accordingly with the state of the detection input signal Vin, that is, the input end A1 of the output module is at a low level, so that the switch tubes Q5-Q6 are all turned off, and the switch tube Q4 is turned on, then the output end Vo of the output module becomes a high level after being divided by the resistors R12 and R13;

[0061] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q4 is turned off, and the switch tubes Q5-Q6 are turned on, and the output terminal Vo of the output module becomes a low level after being divided by the resistors R14 and R15.

[0062] Preferably, the following working modes are included:

[0063] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the enabling module makes the input terminal A1 of the input module high level, and the input module is in a disabled state, making the input terminal A2 of the output module in a high impedance state, so that the output terminal Vo of the output module is 0V; therefore, the detection chip 50 determines that the input detection signal Vin is in a high impedance state according to the 0V detection output signal Vo;

[0064] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the enabling module makes the input terminal A1 of the input module at a low level, activates the input module, and changes the signal state of its output terminal following the state of the detection input signal Vin; since the detection input signal Vin is at a high level, the output terminal of the input module is at a low level, thereby making the output terminal Vo of the output module at a high level; therefore, the detection chip 50 judges that the input detection signal Vin is at a high level according to the high-level detection output signal Vo;

[0065] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the enabling module makes the input terminal A1 of the input module at a low level, activates the input module, and makes the signal state of its output terminal change with the state of the detection input signal Vin; since the detection input signal Vin is at a low level, the output terminal of the input module is at a high level, thereby making the output terminal Vo of the output module at a low level; therefore, the detection chip 50 judges that the input detection signal Vin is at a low level according to the low-level detection output signal Vo.

[0066] It can be seen from the technical solution provided by the present invention that, compared with the prior art, the present invention provides a detection circuit for a three-state input signal, which is scientifically designed and can realize a signal quantity with three states on an output port. The three states of the input signal can be represented by one output port, which can significantly reduce the number of input and output ports of the detection chip that need to be occupied (only one is required), saving precious hardware resources of the detection chip, and has great production practical significance.

[0067] For the present invention, the high and low level voltage amplitudes of its output port can be flexibly adjusted according to actual needs, which is convenient for the chip to identify the signal state and helps to reduce the number of input and output ports of the detection chip (such as a single-chip microcomputer) that need to be occupied.

[0068] For the technical solution of the present invention, the hardware circuit design is scientific, the electronic components are commonly used models, easy to select and the components are inexpensive. Therefore, the technical solution of the present invention has strong practical value and market promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 A structural block diagram of a detection circuit for a three-state input signal provided by the present invention;

[0070] Figure 2 A specific schematic diagram of a detection circuit for a three-state input signal provided by the present invention. DETAILED DESCRIPTION

[0071] In order to make the technical means implemented by the present invention easier to understand, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant application, rather than to limit the application. It is also necessary to explain that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings.

[0072] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0073] In addition, it should be noted that in the description of this application, unless otherwise clearly specified and limited, the terms "installation, setting" and the like should be understood in a broad sense. For example, it can be a fixed installation or a detachable installation.

[0074] For those skilled in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0075] See also Figure 1 , Figure 2 The present invention provides a detection circuit for a three-state input signal, comprising an input module 10, an output module 30, an enabling module 20 and a power supply module 40, wherein:

[0076] The input terminal Vin of the input module 10 is connected to the detection signal output terminal of the external electronic circuit and is used to receive the detection input signal Vin provided by the external electronic circuit;

[0077] It should be noted that the external electronic circuit should share a common ground with the input module 10 of the present invention, that is, they are both powered by the same power supply VDD. The detection signal Vin provided by the external electronic circuit is a three-state signal, and its high level and low level voltage amplitudes need to be set according to the power supply VDD.

[0078] In specific implementation, the external electronic circuit can be any existing circuit that can provide a three-state signal (ie, a signal including three basic logic states, namely, a high level, a low level and a high impedance state).

[0079] The power input terminal of the input module 10 is connected to the output terminal VDD of the power module 40 and is used to receive the DC power supply VDD;

[0080] The output end of the input module 10 is connected to the input end A2 of the output module 30, and is used to provide the output module 30 with input signals A2 of different states, thereby controlling the change of the output signal Vo of the output module 30;

[0081] A first input terminal of the enabling module 20 is connected to a detection signal output terminal of an external electronic circuit and is used to receive a detection input signal Vin provided by the external electronic circuit;

[0082] The second input terminal of the enabling module 20 is connected to the output terminal VDD of the power module 40 and is used to receive the DC power supply VDD;

[0083] The output end of the enabling module 20 is connected to the input end A1 of the input module 10, and is used to provide an enabling signal A1 to the input module 10;

[0084] The input terminal A2 of the output module 30 is connected to the output terminal of the input module 10 and is used to receive the output signal A2 provided by the input module 10;

[0085] The power input terminal of the output module 30 is connected to the output terminal VDD of the power module 40 and is used to receive the DC power supply VDD;

[0086] The output terminal Vo of the output module 30 is connected to an input / output port of the detection chip 50 (such as a single-chip microcomputer MCU) to provide the detection chip 50 (such as a single-chip microcomputer MCU) with a detection output signal Vo. The detection output signal Vo has three states: high level, low level and 0V, which facilitates the detection chip 50 to identify the signal state.

[0087] It should be noted that the detection chip 50 is used to pre-store and set the correspondence between three different states of detection output signals Vo and three different states of detection input signals, and to determine the state of the detection input signal according to the state of the currently received detection output signal Vo.

[0088] In the present invention, in terms of specific implementation, it should be noted that the detection chip 50 can apply currently commonly used brands, series and models, such as NXP's MC9S12 series, etc. The model of the detection chip 50 is not within the protection scope of the present invention.

[0089] See also Figure 1, for the detection circuit of the three-state input signal provided by the present invention, the specific working principle and working mode are as follows:

[0090] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state (suspended state), the enabling module 20 makes the input terminal A1 of the input module 10 high level, and the input module 10 is in a disabled state, making the input terminal A2 of the output module 30 in a high impedance state, so that the output terminal Vo of the output module 30 is 0V; therefore, the detection chip 50 can judge that the input detection signal Vin is in a high impedance state according to the 0V detection output signal Vo;

[0091] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the enabling module 20 makes the input terminal A1 of the input module at a low level, activates the input module 10, and changes the signal state of its output terminal following the state of the detection input signal Vin; since the detection input signal Vin is at a high level, the output terminal of the input module 10 is at a low level, thereby making the output terminal Vo of the output module 30 at a high level; therefore, the detection chip 50 can judge that the input detection signal Vin is at a high level according to the high-level detection output signal Vo;

[0092] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the enabling module 20 makes the input terminal A1 of the input module at a low level, activates the input module 10, and makes the signal state of its output terminal change following the state of the detection input signal Vin; since the detection input signal Vin is at a low level, the output terminal of the input module 10 is at a high level, thereby making the output terminal Vo of the output module 30 at a low level; therefore, the detection chip 50 can judge that the input detection signal Vin is at a low level according to the low-level detection output signal Vo.

[0093] In the present invention, the specific implementation is as follows: Figure 2 , the input module 10 includes: resistors R1-R3 and an operational amplifier U1, wherein:

[0094] The first pin of the resistor R1 is used as the input terminal Vin of the input module 10, connected to the detection signal output terminal of the external electronic circuit, and is used to receive the detection input signal Vin provided by the external electronic circuit;

[0095] The second pin of the resistor R1 is connected to the second pin of the operational amplifier U1, and the second pin is the negative input terminal of the signal;

[0096] The first pin of the operational amplifier U1 is the positive signal input terminal of the operational amplifier U1, and is connected to the second pin of the resistor R2 and the first pin of the resistor R3 respectively;

[0097] The third pin of the operational amplifier U1 is used as the input terminal A1 of the input module 10 to receive the enable signal A1 output by the enable module 20;

[0098] The fourth pin of the operational amplifier U1 is used as the power input terminal of the input module 10, connected to the output terminal VDD of the power module 40, and is used to receive the DC power supply VDD;

[0099] The 4th pin of the op amp U1 is also connected to the 1st pin of the resistor R2;

[0100] The first pin of the resistor R2 is used as a power input terminal of the input module 10 and is connected to the output terminal VDD of the power module 40 for receiving the DC power VDD.

[0101] The 5th pin of the operational amplifier U1 is connected to the ground terminal GND;

[0102] The second pin of the resistor R3 is connected to the ground terminal GND;

[0103] The sixth pin of the operational amplifier U1 , as the output terminal of the input module 10 , is connected to the input terminal A2 of the output module 30 , and is used to provide the output module 30 with an input signal A2 of different states, thereby controlling the change of the detection output signal Vo of the output module 30 .

[0104] It should be noted that the third pin of the operational amplifier U1 is the shutdown mode enable terminal. When the shutdown mode enable terminal is at a high level, the operational amplifier U1 is disabled, and the output terminal (i.e., the sixth pin) of the operational amplifier U1 is in a high impedance state; when the shutdown mode enable terminal is at a low level, the operational amplifier U1 is activated, so that the signal state of the output terminal (i.e., the sixth pin) of the operational amplifier U1 changes accordingly with the state of the input terminal signal Vin, that is, when the input signal Vin is detected to be at a high level, the output terminal (i.e., the sixth pin) of the operational amplifier U1 is at a low level; when the input signal Vin is detected to be at a low level, the output terminal (i.e., the sixth pin) of the operational amplifier U1 is at a high level.

[0105] It should be noted that the output of the operational amplifier U1 should be a push-pull output.

[0106] In the present invention, the specific implementation is as follows: Figure 2 , the enabling module 20 includes: resistors R4-R9 and switch tubes Q1-Q3, wherein:

[0107] The first pins of the resistors R4 and R5 are connected to the detection signal output terminal of the external electronic circuit as the first input terminal of the enabling module 20, and are used to receive the detection input signal Vin provided by the external electronic circuit;

[0108] The second pin of the resistor R4 is connected to the source S of the switch tube Q1 and the gate G of the switch tube Q2 respectively;

[0109] The source S of the switch tube Q2 is connected to the second pin of the resistor R7;

[0110] The drain electrode D of the switch tube Q2 is connected to the first pin of the resistor R8 and the base electrode B of the switch tube Q3 respectively;

[0111] The first pin of the resistor R7 is used as the second input terminal of the enabling module 20 and is connected to the output terminal VDD of the power module 40 for receiving the DC power supply VDD;

[0112] The first pin of the resistor R7 is also connected to the second pin of the resistor R9;

[0113] The second pin of the resistor R8 is connected to the ground terminal GND;

[0114] The collector C of the switch tube Q3, as the output end of the enabling module 20, is connected to the input end A1 of the input module 10, and is used to output an enabling signal A1 for the input module 10, and the enabling signal A1 is used to control the operational amplifier U1 in the input module 10 to be in a disabled or activated state;

[0115] The collector C of the switch tube Q3 is also connected to the first pin of the resistor R9;

[0116] The second pin of the resistor R5 is connected to the first pin of the resistor R6 and the gate G of the switch tube Q1 respectively;

[0117] The second pin of the resistor R6 is connected to the ground terminal GND;

[0118] The drain electrode D of the switch tube Q1 and the emitter electrode E of Q3 are both connected to the ground terminal GND.

[0119] In the present invention, in specific implementation, the working principle and working mode of the enabling module 20 are as follows:

[0120] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state (suspended state), the gate G of the switch tube Q1 is pulled down by the resistor R6 to a low potential equal to the ground terminal GND and is cut off, and the gate G of the switch tube Q2 is pulled down by the resistors R4 to R6 to a low potential equal to the ground terminal GND and is cut off, so that the switch tube Q3 is cut off, and the output end of the enabling module 20 is pulled up by the resistor R9 to a high potential equal to the power supply VDD, that is, the input end A1 of the input module 10 is at a high level, so that the operational amplifier U1 in the input module 10 is in a disabled state;

[0121] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the gate G of the switch tube Q1 is turned on after the resistors R5 and R6 provide bias voltage and current, so that the gate G of the switch tube Q2 is at a low potential, thereby turning on the switch tube Q2. Then, the switch tube Q3 is turned on after the resistors R7 and R8 provide bias voltage and current, so that the input terminal A1 of the input module 10 becomes a low level, thereby activating the operational amplifier U1 in the input module 10.

[0122] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q1 is turned off, while the switch tube Q2 is turned on, and the switch tube Q3 is turned on by the bias voltage and current provided by the resistors R7 and R8, so that the input terminal A1 of the input module 10 becomes a low level, thereby activating the operational amplifier U1 in the input module 10.

[0123] In the present invention, for specific implementation, see Figure 2 The output module 30 includes resistors R10-R15 and switches Q4-Q6, wherein:

[0124] The first pin of the resistor R10, as the input terminal A2 of the output module 30, is connected to the output terminal of the input module 10 (specifically connected to the sixth pin of the operational amplifier U1), and is used to receive the output signal A2 provided by the input module 10. The output signal A2 has three states: high level, low level and high impedance state;

[0125] The first pin of the resistor R10 is also connected to the first pin of the resistor R11;

[0126] The second pin of the resistor R10 is connected to the gate G of the switch tube Q4;

[0127] The source S of the switch tube Q4 is connected to the second pin of the resistor R12;

[0128] The drain D of the switch tube Q4, as the output terminal Vo of the output module 30, is connected to an input / output port of the detection chip 50 (such as a single-chip microcomputer MCU) to provide the detection chip with a detection output signal Vo, which has three states: high level, low level and 0V;

[0129] The drain electrode D of the switch tube Q4 is also connected to the first pin of the resistor R13, the emitter electrode E of the switch tube Q5 and the first pin of the resistor R15 respectively;

[0130] The second pin of the resistor R11 is connected to the base B of the switch tube Q5 and the base B of the switch tube Q6 respectively;

[0131] The collector C of the switch tube Q6 is connected to the second pin of the resistor R15;

[0132] The emitter E of the switch tube Q6 is connected to the ground terminal GND;

[0133] The collector C of the switch tube Q5 is connected to the second pin of the resistor R14;

[0134] The first pin of the resistor R14 is used as a power input terminal of the output module 30 and is connected to the output terminal VDD of the power module 40 for receiving the DC power VDD.

[0135] The first pin of the resistor R14 is also connected to the first pin of the resistor R12.

[0136] In the present invention, in specific implementation, the working principle and working mode of the output module 30 are as follows:

[0137] 1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state (suspended state), the operational amplifier U1 in the input module 10 is in a disabled state, and its output end (i.e., the 6th pin) is in a high impedance state, that is, the input end A2 of the output module 30 is in a high impedance state, and the switch tubes Q4 to Q6 are all turned off, so that the output end Vo of the output module 30 is pulled down by the resistor R13 to 0V, which is equal to the potential of the ground end GND;

[0138] The detection chip can identify that the current detection input signal Vin is in a high impedance state according to the detection output signal Vo of 0V.

[0139] 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the operational amplifier U1 in the input module 10 is in an activated state, and the signal at its output end (i.e., the 6th pin) changes accordingly with the state of the detection input signal Vin, that is, the input end A2 of the output module 30 is at a low level, so that the switch tubes Q5-Q6 are all turned off, and the switch tube Q4 is turned on, then the output end Vo of the output module 30 becomes a high level after being divided by the resistors R12 and R13;

[0140] The detection chip can identify that the current detection input signal Vin is at a high level according to the high level detection output signal Vo.

[0141] 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q4 is turned off, and the switch tubes Q5-Q6 are turned on, then the output terminal Vo of the output module 30 becomes a low level after being divided by the resistors R14 and R15;

[0142] The detection chip can identify that the current detection input signal Vin is at a low level according to the low level detection output signal Vo.

[0143] It should be noted that the present invention utilizes the enable function of the operational amplifier to convert the three states of the input signal, thereby realizing that one output port can represent the three states of the input signal, thereby helping to save the I / O (input and output port) resources of the integrated detection chip or the single-chip microcomputer.

[0144] To sum up, compared with the prior art, the detection circuit for a three-state input signal provided by the present invention is scientifically designed and can realize a signal quantity with three states at one output port. The three states of the input signal can be represented by one output port, which can significantly reduce the number of input and output ports of the detection chip that need to be occupied (only one is required), saving precious hardware resources of the detection chip, and has great production practical significance.

[0145] For the present invention, the high and low level voltage amplitudes of its output port can be flexibly adjusted according to actual needs, which is convenient for the chip to identify the signal state and helps to reduce the number of input and output ports of the detection chip (such as a single-chip microcomputer) that need to be occupied.

[0146] For the technical solution of the present invention, the hardware circuit design is scientific, the electronic components are commonly used models, easy to select and the components are inexpensive. Therefore, the technical solution of the present invention has strong practical value and market promotion value.

[0147] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A detection circuit for a three-state input signal, characterized in that: It comprises an input module (10), an output module (30), an enabling module (20) and a power module (40), wherein: An input terminal Vin of the input module (10) is connected to a detection signal output terminal of an external electronic circuit and is used to receive a detection input signal Vin provided by the external electronic circuit; A power input terminal of the input module (10), connected to an output terminal VDD of the power module (40), and used for receiving a direct current power supply VDD; The output end of the input module (10) is connected to the input end A2 of the output module (30) and is used to provide the output module (30) with an input signal A2 of different states, thereby controlling the change of the output signal Vo of the output module (30); A first input terminal of the enabling module (20) is connected to a detection signal output terminal of an external electronic circuit and is used to receive a detection input signal Vin provided by the external electronic circuit; A second input terminal of the enabling module (20) is connected to an output terminal VDD of the power module (40) and is used to receive a direct current power supply VDD; An output end of the enabling module (20) is connected to an input end A1 of the input module (10) and is used to provide an enabling signal A1 to the input module (10); An input terminal A2 of the output module (30) is connected to an output terminal of the input module (10) and is used to receive an output signal A2 provided by the input module (10); A power input terminal of the output module (30) is connected to an output terminal VDD of the power module (40) and is used to receive a direct current power supply VDD; An output terminal Vo of the output module (30) is connected to an input / output port of the detection chip 50, and is used to provide a detection output signal Vo for the detection chip 50; Among them, the detection output signal Vo has three states: high level, low level and 0V; The input module (10) comprises: resistors R1-R3 and an operational amplifier U1, wherein: The first pin of the resistor R1 is used as an input terminal Vin of the input module (10), connected to a detection signal output terminal of an external electronic circuit, and used to receive a detection input signal Vin provided by the external electronic circuit; The second pin of the resistor R1 is connected to the second pin of the operational amplifier U1, and the second pin is the negative input terminal of the signal; The first pin of the operational amplifier U1 is the positive signal input terminal of the operational amplifier U1, and is connected to the second pin of the resistor R2 and the first pin of the resistor R3 respectively; The third pin of the operational amplifier U1 is used as the input terminal A1 of the input module (10) and is used to receive the enable signal A1 output by the enable module (20); The fourth pin of the operational amplifier U1 is used as a power input terminal of the input module (10), connected to the output terminal VDD of the power module (40), and is used to receive the DC power supply VDD; The 4th pin of the op amp U1 is also connected to the 1st pin of the resistor R2; The first pin of the resistor R2 is used as a power input terminal of the input module (10), connected to the output terminal VDD of the power module (40), and is used to receive the DC power supply VDD; The 5th pin of the operational amplifier U1 is connected to the ground terminal GND; The second pin of the resistor R3 is connected to the ground terminal GND; The sixth pin of the operational amplifier U1, serving as the output terminal of the input module (10), is connected to the input terminal A2 of the output module (30) and is used to provide the output module (30) with input signals A2 of different states; The enabling module (20) comprises: resistors R4-R9 and switch tubes Q1-Q3, wherein: The first pins of the resistor R4 and the resistor R5 are used as the first input end of the enabling module (20), connected to the detection signal output end of the external electronic circuit, and used to receive the detection input signal Vin provided by the external electronic circuit; The second pin of the resistor R4 is connected to the source S of the switch tube Q1 and the gate G of the switch tube Q2 respectively; The source S of the switch tube Q2 is connected to the second pin of the resistor R7; The drain electrode D of the switch tube Q2 is connected to the first pin of the resistor R8 and the base electrode B of the switch tube Q3 respectively; The first pin of the resistor R7 is used as a second input terminal of the enabling module (20), connected to the output terminal VDD of the power module (40), and is used to receive the direct current power supply VDD; The first pin of the resistor R7 is also connected to the second pin of the resistor R9; The second pin of the resistor R8 is connected to the ground terminal GND; The collector C of the switch tube Q3, as the output end of the enable module (20), is connected to the input end A1 of the input module (10) and is used to output an enable signal A1 for the input module (10), wherein the enable signal A1 is used to control the operational amplifier U1 in the input module (10) to be in a disabled or activated state; The collector C of the switch tube Q3 is also connected to the first pin of the resistor R9; The second pin of the resistor R5 is connected to the first pin of the resistor R6 and the gate G of the switch tube Q1 respectively; The second pin of the resistor R6 is connected to the ground terminal GND; The drain electrode D of the switch tube Q1 and the emitter electrode E of Q3 are both connected to the ground terminal GND.

2. The detection circuit for a three-state input signal as claimed in claim 1, characterized in that: The output module (30) comprises: resistors R10-R15 and switch tubes Q4-Q6, wherein: The first pin of the resistor R10 is used as an input terminal A2 of the output module (30), connected to the output terminal of the input module (10), and is used to receive an output signal A2 provided by the input module (10). The output signal A2 has three states: high level, low level and high impedance state; The first pin of the resistor R10 is also connected to the first pin of the resistor R11; The second pin of the resistor R10 is connected to the gate G of the switch tube Q4; The source S of the switch tube Q4 is connected to the second pin of the resistor R12; The drain electrode D of the switch tube Q4, as the output terminal Vo of the output module (30), is connected to an input / output port of the detection chip 50, and is used to provide the detection chip with a detection output signal Vo, the detection output signal Vo having three states: high level, low level and 0V; The drain electrode D of the switch tube Q4 is also connected to the first pin of the resistor R13, the emitter electrode E of the switch tube Q5 and the first pin of the resistor R15 respectively; The second pin of the resistor R11 is connected to the base B of the switch tube Q5 and the base B of the switch tube Q6 respectively; The collector C of the switch tube Q6 is connected to the second pin of the resistor R15; The emitter E of the switch tube Q6 is connected to the ground terminal GND; The collector C of the switch tube Q5 is connected to the second pin of the resistor R14; The first pin of the resistor R14 is used as a power input terminal of the output module (30), connected to the output terminal VDD of the power module (40), and is used to receive the DC power supply VDD; The first pin of the resistor R14 is also connected to the first pin of the resistor R12.

3. The detection circuit of a three-state input signal as claimed in claim 1, characterized in that: The working mode of the enabling module (20) is as follows:

1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the gate G of the switch tube Q1 is pulled down by the resistor R6 to a low potential equal to the ground terminal GND and is cut off, and the gate G of the switch tube Q2 is pulled down by the resistors R4~R6 to a low potential equal to the ground terminal GND and is cut off, so that the switch tube Q3 is cut off, and the output end of the enabling module (20) is pulled up by the resistor R9 to a high potential equal to the power supply VDD, that is, the input end A1 of the input module (10) is at a high level, so that the operational amplifier U1 in the input module (10) is in a disabled state; 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the gate G of the switch tube Q1 is turned on after the bias voltage and current are provided by the resistors R5 and R6, so that the gate G of the switch tube Q2 is at a low potential, thereby turning on the switch tube Q2. Then, the switch tube Q3 is turned on after the bias voltage and current are provided by the resistors R7 and R8, so that the input terminal A1 of the input module (10) becomes a low level, thereby activating the operational amplifier U1 in the input module (10); 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q1 is turned off, while the switch tube Q2 is turned on, and the switch tube Q3 is turned on by the bias voltage and current provided by the resistor R7 and the resistor R8, so that the input terminal A1 of the input module (10) becomes a low level, thereby activating the operational amplifier U1 in the input module (10).

4. The detection circuit of a three-state input signal as claimed in claim 2, characterized in that: The working mode of the output module (30) is as follows:

1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the operational amplifier U1 in the input module (10) is in a disabled state, and its output end is in a high impedance state, that is, the input end A2 of the output module (30) is in a high impedance state, and the switch tubes Q4-Q6 are all turned off, so that the output end Vo of the output module (30) is pulled down by the resistor R13 to 0V, which is equal to the potential of the ground end GND; 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the operational amplifier U1 in the input module (10) is in an activated state, and the signal at its output end changes accordingly with the state of the detection input signal Vin, that is, the input end A2 of the output module (30) is at a low level, so that the switch tubes Q5-Q6 are all turned off, and the switch tube Q4 is turned on, and the output end Vo of the output module (30) becomes a high level after being divided by the resistors R12 and R13; 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the switch tube Q4 is turned off, while the switch tubes Q5-Q6 are turned on, and the output terminal Vo of the output module (30) becomes a low level after being divided by the resistors R14 and R15.

5. The detection circuit for a three-state input signal according to any one of claims 1 to 4, characterized in that: The following working modes are included:

1. When the detection input signal Vin provided by the external electronic circuit is in a high impedance state, the enabling module (20) makes the input terminal A1 of the input module (10) high level, and the input module (10) is in a disabled state, making the input terminal A2 of the output module (30) in a high impedance state, so that the output terminal Vo of the output module (30) is 0V; therefore, the detection chip 50 determines that the input detection signal Vin is in a high impedance state according to the detection output signal Vo of 0V; 2. When the detection input signal Vin provided by the external electronic circuit is at a high level, the enabling module (20) makes the input terminal A1 of the input module at a low level, activates the input module (10), and causes the signal state of the output terminal to change following the state of the detection input signal Vin; since the detection input signal Vin is at a high level, the output terminal of the input module (10) is at a low level, thereby making the output terminal Vo of the output module (30) at a high level; therefore, the detection chip 50 determines that the input detection signal Vin is at a high level according to the high-level detection output signal Vo; 3. When the detection input signal Vin provided by the external electronic circuit is at a low level, the enabling module (20) makes the input terminal A1 of the input module at a low level, activates the input module (10), and causes the signal state of its output terminal to change following the state of the detection input signal Vin; since the detection input signal Vin is at a low level, the output terminal of the input module (10) is at a high level, thereby making the output terminal Vo of the output module (30) at a low level; therefore, the detection chip 50 determines that the input detection signal Vin is at a low level according to the low-level detection output signal Vo.