Universal voltage, resistance and current gating measurement circuit
By designing a general voltage, resistance and current gate measurement circuit, the problem of not being able to realize multiple data collectors and op-amp circuits in the existing technology is solved, and a multi-channel multi-function input circuit is realized, with automatic range switching and High compatibility.
Patent Information
- Application Number
- CN202420454934.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2034-03-08
AI Technical Summary
The prior art cannot realize the structure of multiple data collectors and operational amplifier circuits in different ranges, as well as multi-channel multi-function input circuits.
A general voltage, resistance and current gate measurement circuit is designed, including a constant current source circuit, MCU connection port and measurement gate circuit. Through the hardware range automatic detection switching circuit and logic gate control circuit, multi-channel multi-function input is realized. Circuit.
It realizes multiple input measurement and has automatic range switching function, which reduces MCU port application and cost and improves circuit compatibility.
Smart Images

Figure CN222506415U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of electronic circuits, in particular to a universal voltage, resistance and current gating measurement circuit. Background Art
[0002] The universal input circuit has functions such as voltage, current, and resistance detection, and can realize automatic switching of the range. A current measuring device is disclosed in the patent document with publication number CN102466751A, which includes a first and a second import terminal, a current sampling component including a large current sampling resistor and a first resistor, a measuring component and a control component. The current sampling component has a first current measuring terminal and a second current measuring terminal, wherein the large current sampling resistor uses a four-wire resistance wiring method, a group of terminals at both ends of the resistor are measuring terminals, one of the measuring terminals is coupled to the first import terminal as the first current measuring terminal, and the other group of terminals at both ends of the resistor are sampling terminals, and one of the sampling terminals is coupled to one end of the first resistor through crosstalk isolation.
[0003] With respect to the above-mentioned related technologies, the inventor believes that there are structures that cannot realize multi-channel data acquisition devices and operational amplifier circuits with different ranges, as well as multi-channel multi-functional input circuits. Therefore, it is necessary to propose a new technical solution to improve the above-mentioned technical problems. Utility Model Content
[0004] In view of the defects in the prior art, the purpose of the utility model is to provide a universal voltage, resistance and current gating measurement circuit.
[0005] According to the utility model, a universal voltage, resistance and current gating measurement circuit is provided, comprising: a constant current source circuit, an MCU connection port and a measurement gating circuit; the constant current source circuit is connected to the MCU connection port and the measurement gating circuit respectively, and the MCU connection port is connected to the measurement gating circuit;
[0006] The constant current source circuit includes a constant current source generating circuit and a current output gating circuit. The constant current source circuit includes a voltage regulator tube C1, an operational amplifier U5A, an operational amplifier U5B, a PMOS tube Q3 and a PMOS tube Q4. The positive input end of the operational amplifier U5A is connected to a resistor R9, a positive electrode of the voltage regulator tube C1 and a positive input end of the operational amplifier U5B. The reverse input end of the operational amplifier U5A is connected to a resistor R10. The output end of the operational amplifier U5A is connected to the gate of the PMOS tube Q3. The VCC end of the operational amplifier U5A is connected to a resistor FB1, a capacitor C3 and a capacitor C4. The GND end of the operational amplifier U5A is grounded, the other end of the resistor R9 is grounded, the other end of the resistor R10 is connected to an external power supply, the negative electrode of the voltage regulator tube C1 is connected to an external power supply, the other ends of the capacitors C3 and C4 are grounded, and the other end of the resistor FB1 is connected to an external power supply.
[0007] Preferably, the inverting input terminal of the operational amplifier U5B is connected to a resistor R11, the output terminal of the operational amplifier U5B is connected to the gate of the PMOS tube Q4, and the other end of the resistor R11 is connected to an external power supply.
[0008] Preferably, the source of the PMOS tube Q3 is connected to the inverting input terminal of the operational amplifier U5A, and the drain of the PMOS tube Q3 is connected to the current output gating circuit.
[0009] Preferably, the source of the PMOS tube Q4 is connected to the inverting input terminal of the operational amplifier U5B, and the drain of the PMOS tube Q4 is connected to the current output gating circuit.
[0010] Preferably, the current output gating circuit includes an analog switch U1 and a channel switch U2, the drain of the PMOS tube Q3 is connected to pin 14 of the analog switch U1, the drain of the PMOS tube Q4 is connected to pin 15 of the analog switch U1, pin 1 of the analog switch U1 is connected to pin 5, pin 2 is connected to pin 12, pin 3 is connected to pin 13, pin 7 is connected to pin 8, and pin 16 is connected to the VCC power supply terminal.
[0011] Preferably, pin 1 of the analog switch U1 is connected to a resistor R1, the other end of which is grounded, pin 2 is connected to the channel switch U2, pin 3 is connected to a resistor R2, the other end of which is grounded, and pin 7 is grounded.
[0012] Preferably, the output terminals 2 and 12 of the analog switch U1 are connected to the input terminal 3 of the channel switch U2, the 7 and 8 pins of the channel switch U2 are grounded, and the 16 pin is connected to the VCC power supply terminal.
[0013] Preferably, the MCU connection port is an external MCU control terminal, which is connected to the external MCU control terminal via J1 to control input channel selection and measurement mode.
[0014] Preferably, the measurement gating circuit includes a voltage and current measurement gating circuit, an input channel gating circuit and a gear gating circuit.
[0015] Preferably, the model of the voltage regulator tube is LM4040-2.5V, the model of the operational amplifier is LM358, the model of the analog switch U1 is 3-way 2-to-1 analog switch 74VHC4053M, and the model of the channel switch U2 is a single-ended 8-channel switch CD4051.
[0016] Compared with the prior art, the utility model has the following beneficial effects:
[0017] 1. The utility model provides multiple port inputs, which can realize multi-channel input measurement, adds protection circuit to avoid damage when exceeding the range, and can realize voltage, current and resistance detection functions;
[0018] 2. The utility model realizes the structure of multi-channel data acquisition devices and operational amplifier circuits with different ranges by adopting a hardware range automatic detection switching circuit, and realizes a multi-channel multi-functional input circuit;
[0019] 3. The utility model reduces the application and cost of MCU ports by adopting logic gate control circuit;
[0020] 4. The utility model adopts independent module circuit, which is suitable for various MCU controls and improves circuit compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0022] Figure 1 This is a circuit structure diagram of the utility model. DETAILED DESCRIPTION
[0023] The utility model is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the utility model, but do not limit the utility model in any form. It should be pointed out that for those of ordinary skill in the art, several changes and improvements can be made without departing from the concept of the utility model. These all belong to the protection scope of the utility model.
[0024] Embodiment 1:
[0025] According to the utility model, a universal voltage, resistance and current gating measurement circuit is provided, comprising: a constant current source circuit, an MCU connection port and a measurement gating circuit; the constant current source circuit is connected to the MCU connection port and the measurement gating circuit respectively, and the MCU connection port is connected to the measurement gating circuit;
[0026] The constant current source circuit includes a constant current source generating circuit and a current output gating circuit. The constant current source circuit includes a voltage regulator tube C1, an operational amplifier U5A, an operational amplifier U5B, a PMOS tube Q3 and a PMOS tube Q4. The positive input end of the operational amplifier U5A is connected to a resistor R9, a positive electrode of the voltage regulator tube C1 and a positive input end of the operational amplifier U5B. The reverse input end of the operational amplifier U5A is connected to a resistor R10. The output end of the operational amplifier U5A is connected to the gate of the PMOS tube Q3. The VCC end of the operational amplifier U5A is connected to a resistor FB1, a capacitor C3 and a capacitor C4. The GND end of the operational amplifier U5A is grounded, the other end of the resistor R9 is grounded, the other end of the resistor R10 is connected to an external power supply, the negative electrode of the voltage regulator tube C1 is connected to an external power supply, the other ends of the capacitors C3 and C4 are grounded, and the other end of the resistor FB1 is connected to an external power supply.
[0027] The inverting input terminal of the operational amplifier U5B is connected to a resistor R11 , the output terminal of the operational amplifier U5B is connected to the gate of the PMOS tube Q4 , and the other end of the resistor R11 is connected to an external power supply.
[0028] The source of the PMOS tube Q3 is connected to the inverting input terminal of the operational amplifier U5A, and the drain of the PMOS tube Q3 is connected to the current output gating circuit.
[0029] The source of the PMOS tube Q4 is connected to the inverting input terminal of the operational amplifier U5B, and the drain of the PMOS tube Q4 is connected to the current output gating circuit.
[0030] The current output selection circuit includes an analog switch U1 and a channel switch U2, the drain of the PMOS tube Q3 is connected to the 14th pin of the analog switch U1, the drain of the PMOS tube Q4 is connected to the 15th pin of the analog switch U1, the 1st pin of the analog switch U1 is connected to the 5th pin, the 2nd pin is connected to the 12th pin, the 3rd pin is connected to the 13th pin, the 7th pin is connected to the 8th pin, and the 16th pin is connected to the VCC power supply terminal.
[0031] Pin 1 of the analog switch U1 is connected to a resistor R1, the other end of which is grounded; pin 2 is connected to the channel switch U2; pin 3 is connected to a resistor R2, the other end of which is grounded; and pin 7 is grounded.
[0032] The output terminals 2 and 12 of the analog switch U1 are connected to the input terminal 3 of the channel switch U2. The 7 and 8 pins of the channel switch U2 are grounded, and the 16 pin is connected to the VCC power supply terminal.
[0033] The MCU connection port is an external MCU control terminal. The external MCU control terminal is connected through J1 to control the input channel selection and measurement mode.
[0034] The measurement gating circuit includes a voltage and current measurement gating circuit, an input channel gating circuit and a gear gating circuit.
[0035] The model of the voltage regulator tube is LM4040-2.5V, the model of the operational amplifier is LM358, the model of the analog switch U1 is 3-way 2-to-1 analog switch 74VHC4053M, and the model of the channel switch U2 is single-ended 8-channel switch CD4051.
[0036] Embodiment 2:
[0037] A universal voltage, resistance and current gated measurement circuit comprising:
[0038] The universal input circuit includes: a constant current source circuit 1, an MCU connection port 2, and a measurement selection circuit 3;
[0039] The constant current source circuit 1 includes: the constant current source circuit is composed of two parts: the constant current source generation circuit and the current output selection circuit. The constant current source circuit is composed of the voltage regulator tube LM4040-2.5V operational amplifier LM358 and PMOS tube. One of the operational amplifiers U5 is connected to Q3 to output I = 2.5 / 5.1 = 0.49mA current, and the second channel of U5 is connected to Q4 to output I = 2.5 / 72 = 0.035mA current. U1 is a 3-way 2-to-1 analog switch 74VHC4053M, and the current output end is connected to the two channels of the 14 and 15 pins of U1. The output current selection truth table is controlled by the MCU as follows:
[0040]
[0041]
[0042] U2 is a single-ended 8-channel switch CD4051. The output terminals 2 and 12 of U1 are connected to the input terminal 3 of U2. The selected channel is controlled by MCU. Diodes are connected to the 8 output ports of U2 to prevent reverse voltage input. The truth table of U2 is as follows:
[0043]
[0044] MCU connection port 2 is the external MCU control terminal, which is connected to the external MCU control terminal through J1 to control the input channel selection and measurement mode.
[0045] The measurement gating circuit 3 includes: a voltage and current measurement gating circuit, an input channel gating circuit and a gear gating circuit.
[0046] When the external input is a resistor, a constant current source is used to provide current to generate voltage for measurement. When the external input is a voltage or current, Q1 is controlled to be turned on, the constant current source circuit is turned off, and the input channel passes through a filter circuit composed of R5 and C1, with a series resistor R6 and a Schottky diode D9 to prevent the voltage from exceeding the range.
[0047] U3 is a single-ended 8-channel switch CD4051. The input channel passes through the filter circuit composed of R5 and C1. The series resistor R6 is connected to the input channel of U3. U4A is an LM358 operational amplifier. Pin 2 of U4A is connected to the output pin 1 as a voltage follower circuit. Pin 3 of U4A is connected to the output port of pin 3 of U3. The gear selection circuit is composed of R7, R8 and Q2. When Q2 is not conducting, the output port of pin 1 of U4A is connected in series with R7 to the ADC_IN1 acquisition port. The collected voltage is the actual voltage. When Q2 is conducting, R7 and R8 are connected in series to form a voltage divider circuit. The voltage collected by ADC_IN1 is the voltage across R8. The voltage divided by the acquisition ratio is R8 / (R8+R7)=0.25.
[0048] This circuit is implemented through the following principles:
[0049] At the initial power-on, J1 is connected to the external MCU to control the input channel, range, and measurement mode. The input channel is P1 with a total of 8 input channels, the range control is Ctr2 controlled by Q2, which are (0.1-15V) and (0.1-60V) respectively, and there are three measurement modes: resistance measurement, voltage measurement, and current measurement.
[0050] The input channel selection control is controlled by U3, and one of the channels is selected each time. The U3 selection truth table is as follows:
[0051]
[0052] Range: Assuming that the maximum voltage that the MCU can measure is 3.3V, when the voltage is input, Q1 controlled by Ctr1 is turned on, the constant current source output circuit 1 is turned off, and the on circuit is that the Input is connected to R3, R4 and grounded in parallel. Ctr2 is the Q2 control signal. When Q2 is turned off, the measurement range is 0.1-3.3V, and when Q2 is turned on, the measurement range is 0.1-13.2V. The maximum measurement range does not exceed 15V.
[0053] When inputting current, Q1 controlled by Ctr1 is turned on, constant current source output circuit 1 is turned off, and the on circuit is Input connected to R3, R4 and grounded in parallel. Ctr2 is the Q2 control signal. When Q2 is turned off, the measurement range is 0.2-66mA, and when Q2 is turned on, the measurement range is 0.2-264mA. The maximum measurement range does not exceed 300mA.
[0054] When inputting resistance, Q1 controlled by Ctr1 is turned off, constant current source output circuit 1 is turned on, MCU selects the current output gear by controlling U1, and selects the channel by controlling U2. At this time, U2 is consistent with the strobe control U3, and the current selection gears are 0.035mA, 0.49mA and 0.525mA. Ctr2 is the Q2 control signal. When Q2 is turned off, the measurement range is 0.1-94KΩ, 0.1-6.7KΩ and 0.1-6.2KΩ. When Q2 is turned on, the measurement range is 0.1-357KΩ, 0.1-25KΩ and 0.1-23KΩ.
[0055] Example 3
[0056] The universal input circuit of the utility model has the functions of voltage, current, resistance detection, etc., and can realize automatic range switching. The circuit provides multiple port inputs and can realize multi-channel input measurement. A protection circuit is added in the design to avoid damage to the circuit when the range is exceeded.
[0057] A universal input circuit comprises a current output module, a data channel selection module, an input selection module, a filter circuit and a voltage conversion circuit, and can realize voltage, current and resistance detection functions.
[0058] Ohm measurement circuit: The ohm measurement method uses two-wire measurement. When the external resistor to be measured is connected, the CPU sends instructions to control the output of the 74VHC4053M current source, and selects the multi-channel data selector CD4051BCMd to the corresponding channel. The selected channel current passes through the resistor to be measured, and the ADC is used to measure the voltage value V across the resistor. The actual value of R is measured by calculation. The formula is shown in 2-1:
[0059] R=V / I (2-1)
[0060] The current supply end is selected and controlled by 74VHC4053M. When the A signal is pulled low, the Iout1 channel is turned on, and the resistance to be measured R=Vadc1 / Iout1. At the same time, the current gear can be selected according to different resistance values. There are three gears in total, Iout1, Iout2, and Iout1+Iout2. The measured voltage can be controlled by Q2 to control whether to divide the voltage according to the actual value, providing resistance measurement in multiple gears.
[0061] Current measurement circuit: Convert current measurement into voltage measurement, pass through the voltage follower, and use a sampling resistor to shunt the conversion voltage of the measured current based on Ohm's law. Through channel selection, the input voltage range of the back-end analog-to-digital converter is between ±3V. The relationship between the sampling resistor and the measured current is U=I*R. The actual value of I is measured by calculation, as shown in formula 2-2:
[0062] I=V / R (2-2)
[0063] When current is input, the current source is in a non-conducting state, and the external current source to be measured is turned on. Q1 is controlled to be turned on, and the voltage across the resistor is measured and sent to the corresponding ADC channel through the voltage follower.
[0064] Voltage measurement circuit: Set up a three-stage attenuation and amplification combination circuit to convert the measured signals of different ranges into a suitable voltage to ensure that the sampling voltage is within the measurement range.
[0065] When the voltage source to be tested is connected, Q1 is turned on and the current source output is turned off. The voltage passes through the follower and Q2 to control whether voltage division is required. When the voltage is greater than 3.3V, a voltage division circuit is used, and the measured voltage is 1 / 4 of the actual voltage to be tested. When the voltage to be tested is less than 3.3V, Q2 is turned off and the measured voltage is the actual voltage to be tested.
[0066] A universal input circuit has a current source generation circuit, a current source calibration circuit, and a current source output 8-channel gating circuit. When measuring the resistance to be measured, the appropriate current can be selected according to the resistance value. The current output circuit gating truth table is as follows:
[0067] 74VHC4053
[0068]
[0069] As shown in the figure, when the current source output needs to be controlled, the channels corresponding to the current source are A and B. When EN is enabled (EN is L), the control signal A is L and the output is Iout1, and there is no current output when A is H. When the control signal B is L, the output is Iout2, and there is no output when B is high. The output current can be controlled to be Iout1, Iout2, Iout1+Iout2 and no current output respectively.
[0070] The CD4051 strobe channel truth table is as follows:
[0071]
[0072] When there is current output through 74VHC4053, the corresponding output port is selected through CD4051 to output current, and the corresponding input voltage channel is selected through the corresponding CD4051 for one-to-one correspondence, so that the voltage data of a single channel can be collected, and the resistance value to be measured can be obtained according to the formula R=V / I.
[0073] When the external input is a voltage or current active device, the MCU controls Q1 to conduct, so that the active device is grounded through resistors R3 and R4. Then it passes through the filter circuit and is gated for measurement through CD4051. According to the actual voltage amplitude, a switching diode is added to the ADC input to prevent voltage overvoltage. When a larger voltage is collected, the MCU controls Q2 to conduct, and the voltage across the voltage-dividing resistor R8 is measured to be 1 / 4 of the actual voltage, thereby achieving 0.1-10V voltage measurement. The current source is 0.1-20mA measurement.
[0074] The utility model realizes the structure of multi-channel data collectors and operational amplifier circuits with different ranges by adopting a hardware range automatic detection switching circuit, and realizes a multi-channel multi-functional input circuit.
[0075] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0076] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other at will.
Claims
1. A universal voltage, resistance and current gating measurement circuit, characterized in that: include: A constant current source circuit, an MCU connection port and a measurement gating circuit; the constant current source circuit is connected to the MCU connection port and the measurement gating circuit respectively, and the MCU connection port is connected to the measurement gating circuit; The constant current source circuit includes a constant current source generating circuit and a current output gating circuit. The constant current source circuit includes a voltage regulator tube C1, an operational amplifier U5A, an operational amplifier U5B, a PMOS tube Q3 and a PMOS tube Q4. The positive input end of the operational amplifier U5A is connected to a resistor R9, a positive electrode of the voltage regulator tube C1 and a positive input end of the operational amplifier U5B. The reverse input end of the operational amplifier U5A is connected to a resistor R10. The output end of the operational amplifier U5A is connected to the gate of the PMOS tube Q3. The VCC end of the operational amplifier U5A is connected to a resistor FB1, a capacitor C3 and a capacitor C4. The GND end of the operational amplifier U5A is grounded, the other end of the resistor R9 is grounded, the other end of the resistor R10 is connected to an external power supply, the negative electrode of the voltage regulator tube C1 is connected to an external power supply, the other ends of the capacitors C3 and C4 are grounded, and the other end of the resistor FB1 is connected to an external power supply.
2. The universal voltage, resistance and current gating measurement circuit according to claim 1, characterized in that: The inverting input terminal of the operational amplifier U5B is connected to a resistor R11, the output terminal of the operational amplifier U5B is connected to the gate of the PMOS tube Q4, and the other end of the resistor R11 is connected to an external power supply.
3. The universal voltage, resistance and current gating measurement circuit according to claim 2, characterized in that: The source of the PMOS tube Q3 is connected to the inverting input terminal of the operational amplifier U5A, and the drain of the PMOS tube Q3 is connected to the current output gating circuit.
4. The universal voltage, resistance and current gating measurement circuit according to claim 3, characterized in that: The source of the PMOS tube Q4 is connected to the inverting input terminal of the operational amplifier U5B, and the drain of the PMOS tube Q4 is connected to the current output gating circuit.
5. The universal voltage, resistance and current gating measurement circuit according to claim 4, characterized in that: The current output gating circuit includes an analog switch U1 and a channel switch U2, the drain of the PMOS tube Q3 is connected to the 14th pin of the analog switch U1, the drain of the PMOS tube Q4 is connected to the 15th pin of the analog switch U1, the 1st pin of the analog switch U1 is connected to the 5th pin, the 2nd pin is connected to the 12th pin, the 3rd pin is connected to the 13th pin, the 7th pin is connected to the 8th pin, and the 16th pin is connected to the VCC power supply terminal.
6. The universal voltage, resistance and current gating measurement circuit according to claim 5, characterized in that: Pin 1 of the analog switch U1 is connected to a resistor R1, the other end of which is grounded; pin 2 is connected to the channel switch U2; pin 3 is connected to a resistor R2, the other end of which is grounded; and pin 7 is grounded.
7. The universal voltage, resistance and current gating measurement circuit according to claim 6, characterized in that: The output pins 2 and 12 of the analog switch U1 are connected to the input pin 3 of the channel switch U2, the pins 7 and 8 of the channel switch U2 are grounded, and the pin 16 is connected to the VCC power supply terminal.
8. The universal voltage, resistance and current gating measurement circuit according to claim 1, characterized in that: The MCU connection port is an external MCU control terminal, which is connected to the external MCU control terminal through J1 to control input channel selection and measurement mode.
9. The universal voltage, resistance and current gating measurement circuit according to claim 1, characterized in that: The measurement gating circuit includes a voltage and current measurement gating circuit, an input channel gating circuit and a gear gating circuit.
10. The universal voltage, resistance and current gating measurement circuit according to claim 5, characterized in that: The model of the voltage regulator tube is LM4040-2.5V, the model of the operational amplifier is LM358, the model of the analog switch U1 is 3-way 2-to-1 analog switch 74VHC4053M, and the model of the channel switch U2 is a single-ended 8-channel switch CD4051.
Citation Information
Patent Citations
Current measuring apparatus
CN102466751A