Current measuring device and method

文档序号:66528 发布日期:2021-10-01 浏览:38次 中文

阅读说明:本技术 电流测量装置和方法 (Current measuring device and method ) 是由 孙衍翀 周鹏 于 2021-07-27 设计创作,主要内容包括:本申请涉及一种电流测量装置和方法。所述装置包括:多个采样电阻串联形成的测量支路、与多个采样电阻一一对应的多个开关、第一运算放大器、第二运算放大器、第一模数转换器、第二模数转换器以及处理器。通过与采样电阻一一对应的开关来选择测量支路中的哪些采样电阻接入测量电路。通过更换闭合的开关,来改变测量支路的电阻值,进而切换电流测量的量程。当待测电压值在第二模数转换器的量程内且没有在更换闭合的开关时,根据第二模数转换器的测量值,确定待测电流值。当待测电压值在第二模数转换器的测量量程外或者正在更换闭合的开关时,根据第一模数转换器的测量值,确定待测电流值。该装置能够在切换量程的过程中保持对电流信号的测量。(The present application relates to a current measuring device and method. The device comprises: the device comprises a measuring branch formed by connecting a plurality of sampling resistors in series, a plurality of switches in one-to-one correspondence with the plurality of sampling resistors, a first operational amplifier, a second operational amplifier, a first analog-to-digital converter, a second analog-to-digital converter and a processor. And selecting which sampling resistors in the measuring branch are connected into the measuring circuit through switches in one-to-one correspondence with the sampling resistors. The resistance value of the measuring branch is changed by replacing the closed switch, and the measuring range of the current measurement is further switched. And when the voltage value to be measured is within the measuring range of the second analog-to-digital converter and the closed switch is not replaced, determining the current value to be measured according to the measured value of the second analog-to-digital converter. And when the voltage value to be measured is out of the measuring range of the second analog-to-digital converter or the closed switch is being replaced, determining the current value to be measured according to the measured value of the first analog-to-digital converter. The device can keep the measurement of the current signal during the switching of the measuring range.)

1. A current measuring device, characterized in that the device comprises:

the range switching circuit comprises a plurality of sampling resistors (10) and a plurality of range selection switches (20) which correspond to one another one by one; the sampling resistors (10) are connected in series, the sampling resistors (10) at two ends are respectively a first resistor (11) and a second resistor (12), and one end, close to the first resistor (11) or far away from the second resistor (12), of each sampling resistor (10) is a first end; a first end of each range selection switch (20) is connected with a second end of the corresponding sampling resistor (10), and second ends of the plurality of range selection switches (20) are connected together; at least one of the plurality of range selection switches (20) is closed, and the first end of the first resistor (11) and the second ends of the plurality of range selection switches (20) are the input end and the output end of the current signal to be measured in the range switching circuit;

a maximum measuring range measuring unit comprising a first operational amplifier (30) and a first analog-to-digital converter (40) connected; the first operational amplifier (30) is respectively connected with the first end and the second end of the first resistor (11) and is used for measuring the voltage formed by the current signal to be measured on the first resistor (11), generating a voltage measurement signal and scaling the voltage measurement signal; the first analog-to-digital converter (40) is used for measuring the voltage measurement signal after the first operational amplifier (30) is scaled, so as to obtain a first voltage value;

the adjustable range measuring unit comprises a second operational amplifier (31) and a second analog-to-digital converter (41) which are connected; the second operational amplifier (31) is respectively connected with the first end of the first resistor (11) and the second end of the second resistor (12) and is used for measuring the voltage formed by the current signal to be measured on the plurality of sampling resistors (10), generating a voltage measurement signal and scaling the voltage measurement signal; the second analog-to-digital converter (41) is used for measuring the voltage measurement signal obtained by scaling the second operational amplifier (31) to obtain a second voltage value;

and the processor (50) is respectively connected with the first analog-to-digital converter (40), the control ends of the plurality of range selection switches (20) and the second analog-to-digital converter (41), and is used for determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value when the closed range selection switch (20) is switched or the voltage measurement signal scaled by the second operational amplifier (31) is out of the measurement range of the second analog-to-digital converter (41).

2. The apparatus of claim 1, wherein the processor (50) is configured to receive a range switching command including a target range, the target range corresponding to one of the plurality of range selection switches (20), and the measurement range of the adjustable range measurement unit when the range selection switch (20) corresponding to the target range is closed is the target range; within a first set duration after the range switching instruction is received, closing a range selection switch (20) corresponding to the target range; the range selection switch (20) which is closed when the range switching instruction is received is switched off between a first set time and a second set time after the range switching instruction is received, wherein the second set time is longer than the first set time; determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value within a second set time length after the range switching instruction is received; and determining and outputting a current value corresponding to the current signal to be measured based on the second voltage value outside a second set time length after the range switching instruction is received.

3. The apparatus of claim 2, wherein the processor (50) is configured to determine, outside a second set time period after receiving the range switch command, whether the scaled voltage measurement signal of the second operational amplifier (31) is outside the measurement range of the second analog-to-digital converter (41); if the voltage measurement signal scaled by the second operational amplifier (31) is determined to be out of the measurement range of the second analog-to-digital converter (41), determining a current value corresponding to the current signal to be measured based on the first voltage value and outputting the current value; and if the voltage measurement signal scaled by the second operational amplifier (31) is determined to be within the measurement range of the second analog-to-digital converter (41), determining a current value corresponding to the current signal to be measured based on the second voltage value, and outputting the current value.

4. The apparatus of claim 3, wherein the processor (50) is configured to determine a proportion of the second voltage value in a measurement range of the second analog-to-digital converter (41); when the proportion of the second voltage value in the measuring range of the second analog-to-digital converter (41) is between a proportion upper limit and a proportion lower limit, determining that the voltage measuring signal scaled by the second operational amplifier (31) is in the measuring range of the second analog-to-digital converter (41); when the proportion of the second voltage value in the measuring range of the second analog-to-digital converter (41) is larger than the upper proportion limit or smaller than the lower proportion limit, determining that the voltage measuring signal scaled by the second operational amplifier (31) is out of the measuring range of the second analog-to-digital converter (41).

5. The apparatus of claim 4, wherein the processor (50) is further configured to, when the second voltage value gradually increases, take a first upper scale limit as the upper scale limit and a first lower scale limit as the lower scale limit; and when the second voltage value is gradually reduced, taking a second proportion upper limit as the proportion upper limit, taking a second proportion lower limit as the proportion lower limit, wherein the second proportion upper limit is smaller than the first proportion upper limit, and the second proportion lower limit is smaller than the first proportion lower limit.

6. The apparatus of any of claims 3 to 5, further comprising:

the intermediate range measuring unit comprises a third operational amplifier (32) and a third analog-to-digital converter (42) which are connected; the third operational amplifier (32) is respectively connected with the first end of the first resistor (11) and the second end of a third resistor (13) and is used for measuring the voltage formed by the current signal to be measured between the first resistor (11) and the third resistor (13) and generating a voltage measurement signal and scaling the voltage measurement signal, and the third resistor (13) is one sampling resistor (10) except the first resistor (11) and the second resistor (12) in the plurality of sampling resistors (10); the third analog-to-digital converter (42) is used for measuring the voltage measurement signal after the scaling of the third operational amplifier (32) to obtain a third voltage value;

the processor (50) is further connected with the third analog-to-digital converter (42) and is used for determining whether sampling resistors (10) corresponding to the closed range selection switches (20) before and after switching are connected in series between the third resistor (13) and the second end of the second resistor (12) within a second set time length after receiving the range switching instruction; if the sampling resistors (10) corresponding to the closed range selection switches (20) before and after switching are connected in series between the third resistor (13) and the second end of the second resistor (12), determining a current value corresponding to the current signal to be measured based on the third voltage value; and if the range selection switch (20) closed before switching and/or the range selection switch (20) closed after switching are/is connected in series between the third resistor (13) and the first end of the first resistor (11), determining the current value corresponding to the current signal to be measured based on the first voltage value.

7. The apparatus of claim 6, wherein the processor (50) is configured to determine whether the sampling resistor (10) corresponding to the closed span selection switch (20) is connected in series between the third resistor (13) and the first end of the first resistor (11) if it is determined that the scaled voltage measurement signal of the second operational amplifier (31) is outside the measurement span of the second analog-to-digital converter (41); if the sampling resistor (10) corresponding to the closed range selection switch (20) is connected in series between the third resistor (13) and the first end of the first resistor (11), determining a current value corresponding to the current signal to be measured based on the first voltage value; and if the sampling resistor (10) corresponding to the closed range selection switch (20) is connected in series between the third resistor (13) and the second end of the second resistor (12), determining a current value corresponding to the current signal to be measured based on the third voltage value.

8. The apparatus of claim 7, wherein the processor (50) is configured to determine whether the scaled voltage measurement signal of the third operational amplifier (32) is outside the measurement range of the third analog-to-digital converter (42) if the sampling resistor (10) corresponding to the closed range selection switch (20) is connected in series between the third resistor (13) and the second end of the second resistor (12); if the voltage measurement signal scaled by the third operational amplifier (32) is determined to be out of the measurement range of the third analog-to-digital converter (42), determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value; and if the voltage measurement signal scaled by the third operational amplifier (32) is determined to be in the measurement range of the third analog-to-digital converter (42), determining a current value corresponding to the current signal to be measured based on the third voltage value, and outputting the current value.

9. The apparatus of any one of claims 1 to 5, further comprising:

at least one short-circuit switch (21) corresponding to the sampling resistor (10) one by one; the first end of each sampling resistor (10) is connected with the first end of the corresponding sampling resistor, and the second end of each sampling resistor is connected with the input end of the second operational amplifier (31) connected with the second end of the second resistor (12) and used for being closed when the corresponding range selection switch (20) is closed.

10. A method of measuring current, the method comprising:

the current signal to be measured passes through the pass switching circuit; the range switching circuit comprises a plurality of sampling resistors and a plurality of range selection switches which are in one-to-one correspondence; the sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, and one end of each sampling resistor, which is close to the first resistor or far away from the second resistor, is a first end; the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, and the second ends of the plurality of range selection switches are connected together; the first end of the first resistor and the second ends of the plurality of range selection switches are input ends and output ends of current signals to be measured in the range switching circuit;

closing at least one of the plurality of span select switches;

measuring the voltage formed by the current signal to be measured on the first resistor through a first operational amplifier, generating a voltage measurement signal and scaling;

measuring the voltage measurement signal obtained by scaling the first operational amplifier through a first analog-to-digital converter to obtain a first voltage value;

measuring the voltage formed by the current signal to be measured on the plurality of sampling resistors through a second operational amplifier, generating a voltage measurement signal and scaling;

measuring the amplified voltage signal of the second operational amplifier after being zoomed through a second analog-to-digital converter to obtain a second voltage value;

and if the closed range selection switch is switched or the voltage measurement signal scaled by the second operational amplifier is out of the measurement range of the second analog-to-digital converter, determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value.

Technical Field

The present disclosure relates to circuit measurement technologies, and in particular, to a current measurement device and method.

Background

With the development of electronic circuit technology, the requirements for the continuity and accuracy of the measured current are higher and higher. For different current signals, different measuring ranges are required to be used for measurement, so that the measurement accuracy is improved.

In the conventional technology, the switching of the measuring range is realized by controlling the action of a selection switch.

However, since the selective switch needs a certain time to operate, the conventional solution may cause the current measurement channel to be disconnected during the selective switch operation, thereby causing interruption and leakage of current measurement, and causing inaccurate measurement. And also cause measurement inaccuracies when the measurement signal exceeds the range of the switch.

Disclosure of Invention

In view of the above, it is desirable to provide a current measuring device and method that can maintain accurate measurement of current during switching of a range or when the range is exceeded.

A current measurement device, the device comprising: the range switching circuit comprises a plurality of sampling resistors and a plurality of range selection switches which correspond to one another one by one; the sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, and one end of each sampling resistor, which is close to the first resistor or far away from the second resistor, is a first end; the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, and the second ends of the plurality of range selection switches are connected together; at least one of the plurality of range selection switches is closed, and the first end of the first resistor and the second ends of the plurality of range selection switches are the input end and the output end of the current signal to be measured in the range switching circuit; the maximum measuring range measuring unit comprises a first operational amplifier and a first analog-to-digital converter which are connected; the first operational amplifier is respectively connected with the first end and the second end of the first resistor and is used for measuring the voltage formed by the current signal to be measured on the first resistor, generating a voltage measurement signal and scaling the voltage measurement signal; the first analog-to-digital converter is used for measuring the voltage measurement signal obtained by scaling the first operational amplifier to obtain a first voltage value; the adjustable measuring range measuring unit comprises a second operational amplifier and a second analog-to-digital converter which are connected; the second operational amplifier is respectively connected with the first end of the first resistor and the second end of the second resistor and is used for measuring the voltage formed by the current signal to be measured on the plurality of sampling resistors, generating a voltage measurement signal and scaling the voltage measurement signal; the second analog-to-digital converter is used for measuring the voltage measurement signal obtained by scaling the second operational amplifier to obtain a second voltage value; and the processor is respectively connected with the first analog-to-digital converter, the control ends of the plurality of range selection switches and the second analog-to-digital converter, and is used for determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value when the closed range selection switch is switched or the voltage measurement signal scaled by the second operational amplifier is out of the measurement range of the second analog-to-digital converter.

In one embodiment, the processor is configured to receive a range switching instruction including a target range, where the target range corresponds to one of the plurality of range selection switches, and a measurement range of the adjustable range measurement unit at a range selection switch corresponding to the target range is the target range; within a first set duration after the range switching instruction is received, closing a range selection switch corresponding to the target range; disconnecting the range selection switch which is closed when the range switching instruction is received between a first set time length and a second set time length after the range switching instruction is received, wherein the second set time length is greater than the first set time length; determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value within a second set time length after the range switching instruction is received; and determining and outputting a current value corresponding to the current signal to be measured based on the second voltage value outside a second set time length after the range switching instruction is received.

In one embodiment, the processor is configured to determine whether the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter beyond a second set duration after receiving the range switching command; if the voltage measurement signal obtained after the second operational amplifier is scaled is determined to be out of the measurement range of the second analog-to-digital converter, determining a current value corresponding to the current signal to be measured based on the first voltage value and outputting the current value; and if the voltage measurement signal obtained by scaling the second operational amplifier is determined to be within the measurement range of the second analog-to-digital converter, determining a current value corresponding to the current signal to be measured based on the second voltage value and outputting the current value.

In one embodiment, the processor is configured to determine a proportion of the second voltage value in a measurement range of the second analog-to-digital converter; when the proportion of the second voltage value in the measuring range of the second analog-to-digital converter is between the upper proportion limit and the lower proportion limit, determining that the voltage measuring signal scaled by the second operational amplifier is in the measuring range of the second analog-to-digital converter; and when the proportion of the second voltage value in the measurement range of the second analog-to-digital converter is greater than the upper proportion limit or less than the lower proportion limit, determining that the voltage measurement signal scaled by the second operational amplifier is out of the measurement range of the second analog-to-digital converter.

In one embodiment, the processor is further configured to, when the second voltage value gradually increases, take a first upper ratio limit as the upper ratio limit and a first lower ratio limit as the lower ratio limit; and when the second voltage value is gradually reduced, taking a second proportion upper limit as the proportion upper limit, taking a second proportion lower limit as the proportion lower limit, wherein the second proportion upper limit is smaller than the first proportion upper limit, and the second proportion lower limit is smaller than the first proportion lower limit.

In one embodiment, the apparatus further comprises: the intermediate range measuring unit comprises a third operational amplifier and a third analog-to-digital converter which are connected; the third operational amplifier is respectively connected with the first end of the first resistor and the second end of a third resistor, and is used for measuring the voltage formed by the current signal to be measured between the first resistor and the third resistor, generating a voltage measurement signal and scaling the voltage measurement signal, wherein the third resistor is one of the plurality of sampling resistors except the first resistor and the second resistor; the third analog-to-digital converter is used for measuring the voltage measurement signal obtained by scaling the third operational amplifier to obtain a third voltage value; the processor is further connected with the third analog-to-digital converter and used for determining whether sampling resistors corresponding to the closed range selection switches before and after switching are connected in series between the third resistor and the second end of the second resistor within a second set time length after the range switching instruction is received; if the sampling resistors corresponding to the closed range selection switches before and after switching are connected in series between the third resistor and the second end of the second resistor, determining a current value corresponding to the current signal to be measured based on the third voltage value; and if the closed range selection switch before switching and/or the closed range selection switch after switching are/is connected in series between the third resistor and the first end of the first resistor, determining the current value corresponding to the current signal to be measured based on the first voltage value.

In one embodiment, the processor is configured to determine whether a sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the first end of the first resistor if it is determined that the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter; if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the first end of the first resistor, determining a current value corresponding to the current signal to be measured based on the first voltage value; and if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor, determining a current value corresponding to the current signal to be measured based on the third voltage value.

In one embodiment, the processor is configured to determine whether the scaled voltage measurement signal of the third operational amplifier is outside the measurement range of the third analog-to-digital converter if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor; if the voltage measurement signal obtained after the scaling of the third operational amplifier is determined to be out of the measurement range of the third analog-to-digital converter, determining a current value corresponding to the current signal to be measured based on the first voltage value and outputting the current value; and if the voltage measurement signal obtained by scaling the third operational amplifier is determined to be within the measurement range of the third analog-to-digital converter, determining a current value corresponding to the current signal to be measured based on the third voltage value and outputting the current value.

In one embodiment, the apparatus further comprises: at least one short-circuit switch, correspond to said sampling resistance one-to-one; the first end of the sampling resistor is connected with the first end of the corresponding sampling resistor, and the second end of the sampling resistor is connected with the input end of the second operational amplifier connected with the second end of the second resistor and used for being closed when the corresponding range selection switch is closed.

A method of current measurement, the method comprising: the current signal to be measured passes through the pass switching circuit; the range switching circuit comprises a plurality of sampling resistors and a plurality of range selection switches which are in one-to-one correspondence; the sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, and one end of each sampling resistor, which is close to the first resistor or far away from the second resistor, is a first end; the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, and the second ends of the plurality of range selection switches are connected together; the first end of the first resistor and the second ends of the plurality of range selection switches are input ends and output ends of current signals to be measured in the range switching circuit; closing at least one of the plurality of span select switches; measuring the voltage formed by the current signal to be measured on the first resistor through a first operational amplifier, generating a voltage measurement signal and scaling; measuring the voltage measurement signal obtained by scaling the first operational amplifier through a first analog-to-digital converter to obtain a first voltage value; measuring the voltage formed by the current signal to be measured on the plurality of sampling resistors through a second operational amplifier, generating a voltage measurement signal and scaling; measuring the amplified voltage signal of the second operational amplifier after being zoomed through a second analog-to-digital converter to obtain a second voltage value; and if the closed range selection switch is switched or the voltage measurement signal scaled by the second operational amplifier is out of the measurement range of the second analog-to-digital converter, determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value.

The current measuring device and the method form a range switching circuit by a plurality of sampling resistors and a plurality of range selection switches which are in one-to-one correspondence, the sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, one end of each sampling resistor, which is close to the first resistor or far away from the second resistor, is a first end, the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, the second ends of the range selection switches are connected together, at least one of the range selection switches is closed, and the first end of the first resistor and the second ends of the range selection switches are input ends and output ends of current signals to be measured. In this way, the current signal to be measured only passes through the sampling resistor between the first resistor and the sampling resistor corresponding to the closed range selection switch, and the sampling resistor between the sampling resistor corresponding to the closed range selection switch and the second resistor is short-circuited. The quantity of sampling resistors through which current signals to be measured pass can be changed by selecting different range selection switches to be closed, so that the size of the resistor through which the current signals to be measured pass is changed, and the voltage formed by the current signals to be measured on the sampling resistors is controlled within the measuring range of the measuring unit under the condition that the current signals to be measured are different in size, so that the measuring unit can accurately measure the voltage.

The method comprises the steps of connecting a first operational amplifier and a first analog-to-digital converter to form a maximum measuring range measuring unit, connecting the first operational amplifier to a first end and a second end of a first resistor respectively, measuring the voltage formed by a current signal to be measured on the first resistor, generating a voltage measuring signal and scaling the voltage measuring signal, and measuring the scaled voltage measuring signal of the first operational amplifier by the first analog-to-digital converter to obtain a first voltage value. Since the maximum range measuring unit measures only the voltage formed on one resistor of the first resistor, the maximum range measuring unit can realize measurement within the maximum range.

And the second analog-to-digital converter measures the voltage measurement signal of the second operational amplifier after being scaled to obtain a second voltage value. Because the voltage formed on the sampling resistors is determined by the closed range selection switch, and the closed range selection switch can be selected according to the size of the current signal to be measured so as to control the voltage formed on the sampling resistors within the measurement range of the measurement unit, the measurement range of the adjustable range measurement unit can be adjusted to be matched with the current signal to be measured, and the accurate measurement within a small range is realized.

When the plurality of range selection switches are switched to the closed range selection switches or the voltage measurement signal after the scaling of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, the second voltage value measured by the adjustable range measurement unit is inaccurate, and at the moment, the processor determines and outputs the current value corresponding to the current signal to be measured according to the first voltage value, so that the continuity and the accuracy of the current measurement can be still maintained under the condition that the measurement result of the adjustable range measurement unit is inaccurate.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments or the conventional technologies of the present application, the drawings used in the descriptions of the embodiments or the conventional technologies will be briefly introduced below, it is obvious that the drawings in the following descriptions are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a schematic diagram of a current measuring device according to an embodiment;

FIG. 2 is a flow diagram of current output during span switching in one embodiment;

FIG. 3 is a flow diagram of current and voltage output over-range in one embodiment;

FIG. 4 is a schematic structural diagram of a current measuring device according to another embodiment;

FIG. 5 is a flow chart of current output during span switching in another embodiment;

FIG. 6 is a flow chart of current and voltage output over range in another embodiment;

FIG. 7 is a flow chart of current and voltage output over-range in yet another embodiment;

FIG. 8 is a schematic structural view of a current measuring device in yet another embodiment;

FIG. 9 is a flow chart illustrating a current measurement method according to an embodiment.

Description of reference numerals:

10-sampling resistor, 11-first resistor, 12-second resistor, 13-third resistor, 20-switch, 21-first short-circuit switch, 30-first operational amplifier, 40-first analog-to-digital converter, 31-second operational amplifier, 41-second analog-to-digital converter, 50-processor, 32-third operational amplifier and 42-third analog-to-digital converter.

Detailed Description

To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Embodiments of the present application are set forth in the accompanying drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.

It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or be connected to the other element through intervening elements. Further, "connection" in the following embodiments is understood to mean "electrical connection", "communication connection", or the like, if there is a transfer of electrical signals or data between the connected objects.

As used herein, the singular forms "a", "an" and "the" may include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises/comprising," "includes" or "including," etc., specify the presence of stated features, integers, steps, operations, components, parts, or combinations thereof, but do not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.

The current measuring method in the current measuring device usually adopts a mode of precisely detecting a resistor and an operational amplifier, the resistance value of the resistor is known, the actual current value can be measured by measuring the voltage of the current flowing through two ends of the resistor and then by using the ohm law I as U/R. The measuring method has the advantages of low cost, high precision and small volume. By adopting the method, the influence of power parameters, design cost and other factors on the detection resistor is considered, so different detection resistors need to be selected according to the magnitude of the measurement current to form different measurement channels to switch different ranges. During the switching of the range or when the range is exceeded, there is a possibility that the measurement is inaccurate. For the above reasons, a current measuring device and method capable of maintaining accurate measurement of current during switching of a range or when the range is exceeded are provided.

In one embodiment, as shown in fig. 1, a current measuring device is provided, which includes a plurality of sampling resistors 10 and a plurality of range selection switches 20 in a one-to-one correspondence, a first operational amplifier 30, a first analog-to-digital converter 40, a second operational amplifier 31, a second analog-to-digital converter 41, and a processor 50. The range switching circuit comprises a plurality of sampling resistors 10 and a plurality of range selection switches 20 which correspond to one another one by one; the sampling resistors 10 are connected in series, the sampling resistors 10 at two ends are respectively a first resistor 11 and a second resistor 12, and one end of each sampling resistor 10 close to the first resistor 11 or far away from the second resistor 12 is a first end; the first end of each range selection switch 20 is connected with the second end of the corresponding sampling resistor 10, and the second ends of the range selection switches 20 are connected together; at least one of the plurality of range selection switches 20 is closed, and the first end of the first resistor 11 and the second end of the plurality of range selection switches 20 are the input end and the output end of the current signal to be measured in the range switching circuit; a maximum measurement range measuring unit including a first operational amplifier 30 and a first analog-to-digital converter 40 connected; the first operational amplifier 30 is respectively connected to the first end and the second end of the first resistor 11, and is configured to measure a voltage formed by the current signal to be measured on the first resistor 11, generate a voltage measurement signal, and perform scaling; the first analog-to-digital converter 40 is configured to measure the scaled voltage measurement signal of the first operational amplifier 30 to obtain a first voltage value; the adjustable range measuring unit comprises a second operational amplifier 31 and a second analog-to-digital converter 41 which are connected; the second operational amplifier 31 is respectively connected to the first end of the first resistor 11 and the second end of the second resistor 12, and is configured to measure a voltage formed by the current signal to be measured on the plurality of sampling resistors 10, generate a voltage measurement signal, and perform scaling; the second analog-to-digital converter 41 is configured to measure the voltage measurement signal scaled by the second operational amplifier 31 to obtain a second voltage value; and the processor 50 is connected with the first analog-to-digital converter 40, the control ends of the plurality of range selection switches 20 and the second analog-to-digital converter 41, and is used for determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value when the closed range selection switch 20 is switched or the voltage measurement signal scaled by the second operational amplifier 31 is out of the measurement range of the second analog-to-digital converter 41.

Illustratively, in the plurality of sampling resistors 10, the resistance values increase in order from the first resistor 11 to the second resistor 12, the resistance value of the first resistor 11 is the smallest, and the resistance value of the second resistor 12 is the largest.

Illustratively, the range selection switch 20 may be one of a switch tube, a relay switch, and a single pole switch.

Illustratively, the first operational amplifier 30 and the second operational amplifier 31 may be one of general operational amplifiers F003, F007, F030, a high speed operational amplifier F051B, a high precision operational amplifier F714, a high impedance operational amplifier CF072, and a low power operational amplifier F010.

Illustratively, the first analog-to-digital converter 40 and the second analog-to-digital converter 41 may be one of ADCs 0808, AD7678, AD9221, AD9223, and AD 9220.

Illustratively, the Processor 50 may be a Central Processing Unit (CPU), and may be one of other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. The general purpose processor may be a microprocessor or any conventional processor.

In this embodiment, a range switching circuit is composed of a plurality of sampling resistors and a plurality of range selection switches in one-to-one correspondence, the plurality of sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, one end of each sampling resistor, which is close to the first resistor or is far away from the second resistor, is a first end, the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, the second ends of the plurality of range selection switches are connected together, at least one of the plurality of range selection switches is closed, and the first end of the first resistor and the second ends of the plurality of range selection switches are input ends and output ends of current signals to be measured. In this way, the current signal to be measured only passes through the sampling resistor between the first resistor and the sampling resistor corresponding to the closed range selection switch, and the sampling resistor between the sampling resistor corresponding to the closed range selection switch and the second resistor is short-circuited. The quantity of sampling resistors through which current signals to be measured pass can be changed by selecting different range selection switches to be closed, so that the size of the resistor through which the current signals to be measured pass is changed, and the voltage formed by the current signals to be measured on the sampling resistors is controlled within the measuring range of the measuring unit under the condition that the current signals to be measured are different in size, so that the measuring unit can accurately measure the voltage.

The method comprises the steps of connecting a first operational amplifier and a first analog-to-digital converter to form a maximum measuring range measuring unit, connecting the first operational amplifier to a first end and a second end of a first resistor respectively, measuring the voltage formed by a current signal to be measured on the first resistor, generating a voltage measuring signal and scaling the voltage measuring signal, and measuring the scaled voltage measuring signal of the first operational amplifier by the first analog-to-digital converter to obtain a first voltage value. Since the maximum range measuring unit measures only the voltage formed on one resistor of the first resistor, the maximum range measuring unit can realize measurement within the maximum range.

And the second analog-to-digital converter measures the voltage measurement signal of the second operational amplifier after being scaled to obtain a second voltage value. Because the voltage formed on the sampling resistors is determined by the closed range selection switch, and the closed range selection switch can be selected according to the size of the current signal to be measured so as to control the voltage formed on the sampling resistors within the measurement range of the measurement unit, the measurement range of the adjustable range measurement unit can be adjusted to be matched with the current signal to be measured, and the accurate measurement within a small range is realized.

When the plurality of range selection switches are switched to the closed range selection switches or the voltage measurement signal after the scaling of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, the second voltage value measured by the adjustable range measurement unit is inaccurate, and at the moment, the processor determines and outputs the current value corresponding to the current signal to be measured according to the first voltage value, so that the continuity and the accuracy of the current measurement can be still maintained under the condition that the measurement result of the adjustable range measurement unit is inaccurate.

In one embodiment, as shown in FIG. 2, processor 50 is configured to perform the following steps:

s202, a range switching command containing a target range is received.

Specifically, the target range corresponds to one of the range selection switches 20, and the measurement range of the adjustable range measurement unit when the range selection switch 20 corresponding to the target range is closed is the target range.

And S204, within the first set duration after the range switching instruction is received, closing the range selection switch corresponding to the target range.

And S206, disconnecting the range selection switch which is closed when the range switching instruction is received between the first set time length and the second set time length after the range switching instruction is received.

Specifically, the second set duration is greater than the first set duration.

And S208, determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value within a second set time length after the range switching instruction is received.

And S210, determining and outputting a current value corresponding to the current signal to be measured based on the second voltage value outside the second set time length after the range switching instruction is received.

In practical applications, if the range selection switch 20 corresponding to the target range is the same as the range selection switch 20 corresponding to the first resistor 11, the current value corresponding to the current signal to be measured may be determined and output based on the first voltage value in addition to the second set time period after receiving the range switching instruction.

In this embodiment, when the processor receives the range switching instruction, the range selection switch corresponding to the target range is first closed, and then the previously closed range selection switch is opened, so that it can be ensured that at least one of the plurality of range switches is closed in the range switching process, and the maximum range measurement unit can perform accurate measurement. In the process of range switching, the measurement value of the adjustable range measurement unit may be inaccurate, and at the moment, the current value corresponding to the current signal to be measured is determined based on the first voltage value, so that the accuracy and the continuity of current measurement can be ensured. After the range is switched, the measurement value of the adjustable range measurement unit is accurate, and then the current value corresponding to the current signal to be measured is determined based on the second voltage value, so that a more accurate measurement result can be obtained.

In one embodiment, as shown in FIG. 3, processor 50 is configured to perform the following steps:

s302, determining whether the voltage measuring signal after the scaling of the second operational amplifier is out of the measuring range of the second analog-to-digital converter. If the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, executing S304; if the scaled voltage measurement signal of the second operational amplifier is within the measurement range of the second analog-to-digital converter, S306 is executed.

Specifically, the processor 50 is configured to determine a ratio of the second voltage value in the measurement range of the second analog-to-digital converter 41; when the proportion of the second voltage value in the measurement range of the second analog-to-digital converter 41 is between the upper proportion limit and the lower proportion limit, determining that the voltage measurement signal scaled by the second operational amplifier 31 is in the measurement range of the second analog-to-digital converter 41; when the proportion of the second voltage value in the measurement range of the second analog-to-digital converter 41 is greater than the upper limit of the proportion or less than the lower limit of the proportion, it is determined that the voltage measurement signal scaled by the second operational amplifier 31 is outside the measurement range of the second analog-to-digital converter 41.

The second voltage value is, for example, in a ratio of the measurement range of the second analog-to-digital converter 41: the difference between the second voltage value and the minimum value of the measuring range of the second analog-to-digital converter 41 is divided by the difference between the maximum value and the minimum value of the measuring range of the second analog-to-digital converter 41.

In such a way, whether the signal to be measured after the second operational amplifier is scaled is out of the measurement range of the second analog-to-digital converter is judged, so that whether the second analog-to-digital converter exceeds the measurement range is determined, and whether the second voltage value output by the second analog-to-digital converter is reliable and accurate is further determined.

And S304, determining a current value corresponding to the current signal to be measured based on the first voltage value and outputting the current value.

And S306, determining a current value corresponding to the current signal to be measured based on the second voltage value and outputting the current value.

For example, S302, S304 and S306 may be executed in conjunction with S208, that is, after receiving the second set duration after the range switching command, determining whether the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, and outputting the second voltage value if the scaled voltage measurement signal of the second operational amplifier is within the measurement range of the second analog-to-digital converter.

In this embodiment, the processor first determines whether the current adjustable-range measuring unit is out of range by determining whether the scaled voltage measurement signal is within the measurement range of the second analog-to-digital converter, so as to determine whether the second voltage value output by the adjustable-range measuring unit is accurate. If the scaled voltage measurement signal is outside the measurement range of the second analog-to-digital converter, it indicates that the adjustable range measurement unit has exceeded the measurement range at the moment, the output second voltage value is inaccurate, and the measurement accuracy can be ensured by adopting the first voltage value output by the maximum range measurement unit. If the scaled voltage measurement signal is within the measurement range of the second analog-to-digital converter, it indicates that the adjustable range measurement unit does not exceed the measurement range at this time, the output second voltage value is accurate, and the measurement precision can be improved by using the second voltage value output by the adjustable range measurement unit.

In one embodiment, the processor 50 is further configured to, when the second voltage value gradually increases, take the first upper scale limit as the upper scale limit and the first lower scale limit as the lower scale limit; and when the second voltage value is gradually reduced, taking the second proportion upper limit as the proportion upper limit, taking the second proportion lower limit as the proportion lower limit, wherein the second proportion upper limit is smaller than the first proportion upper limit, and the second proportion lower limit is smaller than the first proportion lower limit.

Specifically, the second voltage value gradually increases, that is, the second voltage value at the next time is greater than the second voltage value at the previous time within the set time period. The second voltage value gradually decreases, that is, the second voltage value at the next moment is smaller than the second voltage value at the previous moment in the set time length.

Illustratively, the processor 50 includes a hysteresis comparator for changing the upper scale limit of the processor 50 to a first upper scale limit and the lower scale limit to a first lower scale limit when the voltage value is gradually increased, and changing the upper scale limit of the processor 50 to a second upper scale limit and the lower scale limit to a second lower scale limit when the voltage value is gradually decreased.

Illustratively, the first upper proportion limit, the first lower proportion limit, the second upper proportion limit and the second lower proportion limit are determined according to an actual noise value of the current signal to be measured.

In this embodiment, when the voltage value gradually increases, the upper proportional limit and the lower proportional limit of the processor are changed to the first upper proportional limit and the first lower proportional limit, and when the voltage value gradually decreases, the upper proportional limit and the lower proportional limit of the processor are changed to the second upper proportional limit and the second lower proportional limit, respectively. The first upper proportion limit, the first lower proportion limit, the second upper proportion limit and the second lower proportion limit are determined according to an actual noise value. Therefore, when the voltage value acquired by the analog-to-digital converter is noisy, the voltage fluctuation caused by the noise can be covered by the hysteresis width, so that the influence of the noise on the judgment of the processor on whether the second analog-to-digital converter exceeds the measuring range is avoided, the current value output by the processor is frequently replaced and selected due to the influence of the noise, and the current value output by the processor is more stable.

In one embodiment, as shown in fig. 4, the apparatus further comprises a third operational amplifier 32, a third analog-to-digital converter 42. A middle range measuring unit including a third operational amplifier 32 and a third analog-to-digital converter 42 connected; the third operational amplifier 32 is respectively connected to the first end of the first resistor 11 and the second end of the third resistor 13, and is configured to measure a voltage formed between the first resistor 11 and the third resistor 13 by the current signal to be measured, generate a voltage measurement signal, and perform scaling, where the third resistor 13 is one sampling resistor 10 of the plurality of sampling resistors 10 except for the first resistor 11 and the second resistor 12; the third analog-to-digital converter 42 is configured to measure the voltage measurement signal scaled by the third operational amplifier 32 to obtain a third voltage value; the processor 50 is further connected to the third analog-to-digital converter 42, and is configured to determine, within a second set time period after receiving the range switching instruction, whether the sampling resistors 10 corresponding to the closed range selection switches 20 before and after switching are both connected in series between the third resistor 13 and the second end of the second resistor 12; if the sampling resistors 10 corresponding to the closed range selection switches 20 before and after switching are connected in series between the third resistor 13 and the second end of the second resistor 12, determining a current value corresponding to the current signal to be measured based on the third voltage value; if the range selection switch 20 closed before switching and/or the range selection switch 20 closed after switching is connected in series between the third resistor 13 and the first end of the first resistor 11, the current value corresponding to the current signal to be measured is determined based on the first voltage value.

In this embodiment, a third operational amplifier and a third analog-to-digital converter are connected to form an intermediate range measurement unit, the third operational amplifier is connected to the first end of the first resistor and the second end of the third resistor, respectively, the voltage formed by the current signal to be measured between the first resistor and the third resistor is measured, a voltage measurement signal is generated and scaled, and the third analog-to-digital converter measures the scaled voltage measurement signal of the third operational amplifier to obtain a third voltage value. Because the voltage formed between the first resistor and the third resistor is larger than the voltage formed on the first resistor, the current signal to be measured which can be measured by the intermediate range measuring unit is smaller than the current signal to be measured which can be measured by the maximum range measuring unit, and the measurement with the measurement range smaller than that of the maximum range unit and the measurement accuracy larger than that of the maximum range unit can be realized.

If the difference between the measurement range when the range switch corresponding to the first resistor is closed and the measurement range when the range switch corresponding to the second resistor is closed is large, such as five or six orders of magnitude, the maximum range measurement unit cannot distinguish a small current signal to be measured, and at the moment, the intermediate range measurement unit is adopted for measurement, so that the small current signal to be measured can be distinguished, and the continuity and the accuracy of current measurement can be still maintained under the condition that the measurement result of the adjustable range measurement unit is inaccurate.

In one embodiment, as shown in FIG. 5, processor 50 is configured to perform the following steps:

s502, a range switching command containing a target range is received.

S504, whether the sampling resistors corresponding to the closed range selection switches before and after switching are connected in series between the third resistor and the second end of the second resistor is determined. If the sampling resistors corresponding to the range selection switches closed before and after switching are connected in series between the third resistor and the second end of the second resistor, step S506 is executed, and if the range selection switch closed before switching and/or the range selection switch closed after switching are connected in series between the third resistor and the first end of the first resistor, step S508 is executed.

And S506, determining and outputting the current value of the current signal to be measured based on the third voltage value within a second set time length after the measuring range switching instruction is received.

And S508, determining and outputting the current value of the current signal to be measured based on the first voltage value within a second set time length after the measuring range switching instruction is received.

And S510, within the first set duration after the range switching instruction is received, closing a range selection switch corresponding to the target range.

S512, the range selection switch which is closed when the range switching instruction is received is switched off between the first set time length and the second set time length after the range switching instruction is received.

And S514, after the second set time length, determining and outputting the current value of the current signal to be measured based on the second voltage value.

In this embodiment, if the sampling resistors corresponding to the closed range selection switches before and after switching are all connected in series between the third resistor and the second end of the second resistor, the measurement ranges corresponding to the closed range selection switches before and after switching are all small, and at this time, the third voltage value output by the middle measurement unit is selected to determine the current value of the current signal to be measured, so that the small current signal to be measured can be distinguished, and the continuity and accuracy of current measurement can be still maintained under the condition that the measurement result of the adjustable range measurement unit is inaccurate. If the closed range selection switch before switching and/or the closed range selection switch after switching are/is connected in series between the third resistor and the first end of the first resistor, the measurement range corresponding to the closed range selection switch before switching and/or after switching exceeds the measurement range corresponding to the middle measurement unit, at the moment, the third voltage value output by the middle measurement unit is inaccurate, the first voltage value output by the maximum range measurement unit is selected to determine the current value of the current signal to be measured, and the accuracy of current measurement can be ensured.

In one embodiment, as shown in FIG. 6, processor 50 is configured to perform the following steps:

s602, determining whether the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter. If it is determined that the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, step S604 is performed. If it is determined that the scaled voltage measurement signal of the second operational amplifier is within the measurement range of the second analog-to-digital converter, step S606 is executed.

And S604, determining whether the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the first end of the first resistor. If the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor, step S608 is executed. If the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the first end of the first resistor, step S610 is executed.

And S606, determining a current value corresponding to the current signal to be measured based on the second voltage value and outputting the current value.

And S608, determining a current value corresponding to the current signal to be measured based on the third voltage value and outputting the current value.

And S610, determining a current value corresponding to the current signal to be measured based on the first voltage value and outputting the current value.

In the embodiment, when the voltage measurement signal scaled by the second operational amplifier is within the measurement range of the second analog-to-digital converter, the current value corresponding to the current signal to be measured is determined based on the second voltage value. And when the voltage measurement signal after the scaling of the second operational amplifier is out of the measurement range of the second analog-to-digital converter, determining whether the sampling resistor corresponding to the closed range selection switch is connected between the third resistor and the first end of the first resistor in series. And if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor, determining a current value corresponding to the current signal to be measured based on the third voltage value. And if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the first end of the first resistor, determining a current value corresponding to the current signal to be measured based on the first voltage value. By the measuring method, the current signal to be measured can be measured as accurately as possible on the premise of ensuring that the measuring range is not exceeded.

In one embodiment, as shown in FIG. 7, processor 50 is configured to perform the following steps:

s702, determining whether the voltage measurement signal scaled by the third operational amplifier is outside the measurement range of the third analog-to-digital converter. If it is determined that the scaled voltage measurement signal of the third operational amplifier is outside the measurement range of the third adc, step S704 is executed. If it is determined that the scaled voltage measurement signal of the third operational amplifier is within the measurement range of the third analog-to-digital converter, step S706 is performed.

Specifically, if the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor, it is determined whether the voltage measurement signal scaled by the third operational amplifier is outside the measurement range of the third analog-to-digital converter.

In particular, determining whether the scaled voltage measurement signal of the third operational amplifier is outside the measurement range of the third analog-to-digital converter may be similar to determining whether the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter and will not be described in detail herein.

And S704, determining a current value corresponding to the current signal to be measured based on the first voltage value, and outputting the current value.

And S706, determining a current value corresponding to the current signal to be measured based on the third voltage value and outputting the current value.

In this embodiment, when the sampling resistor corresponding to the closed range selection switch is connected in series between the third resistor and the second end of the second resistor, the processor first determines whether the intermediate range measurement unit is out of range by determining whether the scaled voltage measurement signal is within the measurement range of the third analog-to-digital converter, so as to determine whether the third voltage value output by the intermediate range measurement unit is accurate. If the scaled voltage measurement signal is outside the measurement range of the third analog-to-digital converter, it indicates that the intermediate range measurement unit has exceeded the measurement range at this time, the output third voltage value is inaccurate, and the measurement accuracy can be ensured by using the first voltage value output by the maximum range measurement unit. If the scaled voltage measurement signal is within the measurement range of the third analog-to-digital converter, it indicates that the intermediate range measurement unit does not exceed the measurement range at this time, the output third voltage value is accurate, and the measurement precision can be improved by using the third voltage value output by the intermediate range measurement unit.

In one embodiment, as shown in fig. 8, the device further comprises at least one short-circuit switch 21. At least one short-circuit switch 21 is in one-to-one correspondence with the sampling resistors 10, the first end of the short-circuit switch is connected with the first end of the corresponding sampling resistor 10, and the second end of the short-circuit switch is connected with the input end of the second operational amplifier 31 connected with the second end of the second resistor 12, and is used for being closed when the corresponding range selection switch 20 is closed.

In this embodiment, by setting the short-circuit switch, when the corresponding sampling resistor is not connected to the measurement branch, the sampling resistor is short-circuited. Therefore, the phenomenon that the line parasitic capacitance of the sampling resistor reduces the line bandwidth of the measuring branch circuit is avoided, and the measuring sensitivity is higher.

In one embodiment, as shown in fig. 9, there is provided a current measuring method including the steps of:

s802, the current signal to be measured passes through the pass switching circuit.

Specifically, the range switching circuit comprises a plurality of sampling resistors and a plurality of range selection switches which are in one-to-one correspondence; the sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, and one end of each sampling resistor, which is close to the first resistor or far away from the second resistor, is a first end; the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, and the second ends of the range selection switches are connected together; the first end of the first resistor and the second ends of the plurality of range selection switches are the input end and the output end of the current signal to be measured in the range switching circuit.

S804, at least one of the plurality of span select switches is closed.

And S806, measuring the voltage formed by the current signal to be measured on the first resistor through the first operational amplifier, generating a voltage measurement signal and scaling the voltage measurement signal.

And S808, measuring the voltage measurement signal obtained by scaling the first operational amplifier through the first analog-to-digital converter to obtain a first voltage value.

And S810, measuring the voltage formed by the current signal to be measured on the plurality of sampling resistors through a second operational amplifier, generating a voltage measurement signal and scaling the voltage measurement signal.

And S812, measuring the amplified voltage signal of the second operational amplifier after being scaled through the second analog-to-digital converter to obtain a second voltage value.

S814, if the closed range selection switch is being switched or the scaled voltage measurement signal of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, determining and outputting a current value corresponding to the current signal to be measured based on the first voltage value.

In this embodiment, a range switching circuit is composed of a plurality of sampling resistors and a plurality of range selection switches in one-to-one correspondence, the plurality of sampling resistors are connected in series, the sampling resistors at two ends are respectively a first resistor and a second resistor, one end of each sampling resistor, which is close to the first resistor or is far away from the second resistor, is a first end, the first end of each range selection switch is connected with the second end of the corresponding sampling resistor, the second ends of the plurality of range selection switches are connected together, at least one of the plurality of range selection switches is closed, and the first end of the first resistor and the second ends of the plurality of range selection switches are input ends and output ends of current signals to be measured. In this way, the current signal to be measured only passes through the sampling resistor between the first resistor and the sampling resistor corresponding to the closed range selection switch, and the sampling resistor between the sampling resistor corresponding to the closed range selection switch and the second resistor is short-circuited. The quantity of sampling resistors through which current signals to be measured pass can be changed by selecting different range selection switches to be closed, so that the size of the resistor through which the current signals to be measured pass is changed, and the voltage formed by the current signals to be measured on the sampling resistors is controlled within the measuring range of the measuring unit under the condition that the current signals to be measured are different in size, so that the measuring unit can accurately measure the voltage.

The method comprises the steps of connecting a first operational amplifier and a first analog-to-digital converter to form a maximum measuring range measuring unit, connecting the first operational amplifier to a first end and a second end of a first resistor respectively, measuring the voltage formed by a current signal to be measured on the first resistor, generating a voltage measuring signal and scaling the voltage measuring signal, and measuring the scaled voltage measuring signal of the first operational amplifier by the first analog-to-digital converter to obtain a first voltage value. Since the maximum range measuring unit measures only the voltage formed on one resistor of the first resistor, the maximum range measuring unit can realize measurement within the maximum range.

And the second analog-to-digital converter measures the voltage measurement signal of the second operational amplifier after being scaled to obtain a second voltage value. Because the voltage formed on the sampling resistors is determined by the closed range selection switch, and the closed range selection switch can be selected according to the size of the current signal to be measured so as to control the voltage formed on the sampling resistors within the measurement range of the measurement unit, the measurement range of the adjustable range measurement unit can be adjusted to be matched with the current signal to be measured, and the accurate measurement within a small range is realized.

When the plurality of range selection switches are switched to the closed range selection switches or the voltage measurement signal after the scaling of the second operational amplifier is outside the measurement range of the second analog-to-digital converter, the second voltage value measured by the adjustable range measurement unit is inaccurate, and at the moment, the processor determines and outputs the current value corresponding to the current signal to be measured according to the first voltage value, so that the continuity and the accuracy of the current measurement can be still maintained under the condition that the measurement result of the adjustable range measurement unit is inaccurate.

It should be understood that although the various steps in the flowcharts of fig. 2-3, 5-7, and 9 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3, 5-7, and 9 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternatively with other steps or at least some of the other steps.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.

In the description herein, references to the description of "some embodiments," "other embodiments," "desired embodiments," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, a schematic description of the above terminology may not necessarily refer to the same embodiment or example.

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

25页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:电流测量装置和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!