Sampling device and sampling method

By designing an adaptive switching sampling range mechanism in the sampling circuit, and using multiple sampling resistor circuits and amplifiers to process voltage signals, the problem of low accuracy in traditional sampling circuits at low current is solved, and high accuracy and large ranges are achieved.

CN119543940APending Publication Date: 2025-02-28WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311109270.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Traditional sampling circuits have low circuit current and the sampling current obtained is low, making it difficult to meet the high-precision measurement requirements.

Method used

A sampling device is designed, including a motor, a driving circuit and a plurality of sampling circuits. By setting the first and second sampling resistor circuits, and using an amplifier and a processor, the sampling range is adaptively switched according to the output results of the voltage signal to improve the current sampling accuracy.

Benefits of technology

It realizes adaptive switching of sampling ranges under different current ranges, improves the accuracy and resolution of sampling currents, and takes into account the requirements of high precision and large range ranges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a sampling device and a sampling method, the sampling device comprises a motor, a driving circuit and a sampling circuit, the sampling circuit comprises a first sampling resistor circuit, a second sampling resistor circuit, a first amplifier corresponding to the first sampling resistor circuit, a second amplifier corresponding to the second sampling resistor circuit, and a processor; the first amplifier amplifies the differential voltage on the first sampling resistance circuit to obtain a first voltage signal; the second amplifier amplifies the differential voltage on the second sampling resistance circuit to obtain a second voltage signal; the processor determines a voltage output result according to the first reference voltage and the second voltage signal, determines a to-be-output voltage signal from the first voltage signal and the second voltage signal according to the voltage output result, and processes the to-be-output voltage signal to obtain a sampling current; the sampling circuit can adaptively switch the sampling range according to the magnitude of the circuit current, and simultaneously considers the sampling current precision and the sampling range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic circuits, and in particular to a sampling device and a sampling method. Background Art

[0002] In electronic circuit technology, drive circuits and motors with different rated currents need to be equipped with sampling circuits with different measurement ranges to collect current signals in order to improve measurement accuracy.

[0003] In traditional technology, a sampling resistor is connected in series to the motor bus, and the circuit current in the drive circuit and the motor loop is sampled through the differential voltage across the sampling resistor. However, when the circuit current is small, the accuracy of the sampled current obtained by the sampling circuit is low. Summary of the invention

[0004] Based on this, it is necessary to provide a sampling device and a sampling method that can improve the current sampling accuracy in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a sampling device, comprising a motor, a drive circuit, and at least two sampling circuits connected to at least two-phase output ends of the motor, one phase output end corresponding to one sampling circuit; the sampling circuit comprises a first sampling resistor circuit, a second sampling resistor circuit, a first amplifier corresponding to the first sampling resistor circuit, a second amplifier corresponding to the second sampling resistor circuit, and a processor;

[0006] The first amplifier is used to amplify the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0007] The second amplifier is used to amplify the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0008] The processor is used to determine a voltage output result according to a first reference voltage and the second voltage signal, determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and process the voltage signal to be output to obtain a sampling current.

[0009] In one embodiment, the processor includes a comparator, a switch selector, and a controller, wherein a first end of the comparator is connected to a first end of the switch selector and a first end of the second amplifier, a second end of the comparator is connected to a second end of the switch selector and the controller, a third end of the switch selector is connected to the controller, and a fourth end of the switch selector is connected to a first end of the first amplifier;

[0010] The comparator is used to determine a voltage output result according to the first reference voltage of the comparator and the second voltage signal;

[0011] The switch selector is used to determine the voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result;

[0012] The controller is used to process the voltage signal to be output to obtain a sampling current.

[0013] In one embodiment, the comparator is used to determine that the voltage output result is a high level output result if the second voltage signal is not less than the first reference voltage;

[0014] The comparator is further configured to determine that the voltage output result is a low level output result if the second voltage signal is less than the first reference voltage.

[0015] In one embodiment, the first amplifier is connected to two ends of the first sampling resistor circuit, and the second amplifier is connected to two ends of the second sampling resistor circuit;

[0016] The first sampling resistance circuit is arranged between the motor and the second sampling resistance circuit, and the second sampling resistance circuit is connected to the driving circuit.

[0017] In one embodiment, the first sampling resistor circuit includes a first sampling resistor, and the second sampling resistor circuit includes a second sampling resistor;

[0018] The first end of the first sampling resistor is connected to the second end of the first amplifier and the first phase output end of the motor, and the second end of the first sampling resistor is connected to the first end of the second sampling resistor and the third end of the first amplifier;

[0019] The first end of the second sampling resistor is connected to the second end of the second amplifier, and the second end of the second sampling resistor is connected to the output end of the driving circuit and the third end of the second amplifier.

[0020] In one embodiment, the switch selector is used to determine that the first voltage signal is the voltage signal to be output if the voltage output result is the high level output result;

[0021] The switch selector is further configured to determine that the second voltage signal is the voltage signal to be output if the voltage output result is the low level output result.

[0022] In one of the embodiments, the controller includes an analog-to-digital converter, an IO interface, and a control unit;

[0023] The analog-to-digital converter is used to convert the voltage signal to be output into a digital signal, and send the digital signal to the control unit;

[0024] The IO interface is used to identify the voltage output result and send the identification result of the voltage output result to the control unit; the identification result is a low-level output result or a high-level output result;

[0025] The control unit is used to analyze and process the digital signal according to the processing algorithm corresponding to the recognition result to obtain the sampling current.

[0026] In one embodiment, the first amplifier is used to determine a first product result of a differential voltage of the first sampling resistor circuit and a first amplification factor of the first amplifier, and determine the first voltage signal according to a summation result of the first product result and a second reference voltage of the first amplifier;

[0027] The second amplifier is used to determine a second product result of the differential voltage of the second sampling resistor circuit and a second amplification factor of the second amplifier, and determine the second voltage signal according to a summation result of the second product result and a third reference voltage of the second amplifier.

[0028] In one of the embodiments, the first amplification factor and the first resistance value of the first sampling resistor circuit are determined according to the maximum current of the first range of the motor and the input voltage of the analog-to-digital converter;

[0029] The second amplification factor and the second resistance value of the second sampling resistor circuit are determined according to the maximum current of the second range of the motor and the input voltage of the analog-to-digital converter;

[0030] Wherein, the first measurement range is greater than the second measurement range.

[0031] In a second aspect, the present application further provides a sampling method, characterized in that the method is applied to the sampling device as described in any one of the first aspects above, and the method comprises:

[0032] Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0033] Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0034] A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

[0035] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0036] Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0037] Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0038] A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

[0039] In a fourth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0040] Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0041] Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0042] A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

[0043] The sampling device and the sampling method are as follows: the sampling device comprises a motor, a driving circuit and at least two sampling circuits connected to at least two-phase output ends of the motor, one phase output end corresponds to one sampling circuit; the sampling circuit comprises a first sampling resistor circuit, a second sampling resistor circuit, a first amplifier corresponding to the first sampling resistor circuit, a second amplifier corresponding to the second sampling resistor circuit, and a processor; the first amplifier is used to amplify the differential voltage on the first sampling resistor circuit to obtain a first voltage signal; the second amplifier is used to amplify the differential voltage on the second sampling resistor circuit to obtain a second voltage signal; the processor is used to determine a voltage output result according to the first reference voltage and the second voltage signal, determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and process the voltage signal to be output to obtain a sampling current. In an embodiment of the present application, a first sampling resistor circuit and a second sampling resistor circuit are arranged between the motor and the drive circuit, and feedback of the circuit current is realized based on the first sampling resistor circuit and the second sampling resistor circuit. The sampling circuit can determine the magnitude of the circuit current in the motor and the drive circuit according to the voltage output result between the second voltage signal and the first reference voltage, thereby determining the voltage signal to be output from the first voltage signal and the second voltage signal according to the magnitude of the circuit current, and obtaining the sampling current according to the voltage signal to be output, that is, the sampling circuit can adaptively switch the sampling range according to the magnitude of the circuit current, and can take into account the problems of high sampling current accuracy and large sampling range at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 is a first structural schematic diagram of a sampling device in one embodiment;

[0046] Figure 2 is a schematic diagram of the structure of a processor in one embodiment;

[0047] Figure 3 Schematic diagram of the second structure of the sampling device in one embodiment.

[0048] Description of reference numerals:

[0049] 100. Sampling device; 10. Motor; 20. Driving circuit;

[0050] 30. Sampling circuit; R1, first sampling resistor circuit; R2, second sampling resistor circuit;

[0051] U1, first amplifier; U2, second amplifier; 301, processor;

[0052] U4, comparator; U3, switch selector; U5, controller;

[0053] R11, the first sampling resistor; R21, the second sampling resistor. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0056] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0057] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0058] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0059] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0060] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of 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 embodiments of the present application.

[0061] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0062] In the design of motors and drive circuits, commonly used analog-to-digital converters correspond to digital thresholds of 0 to 4095. There are special working conditions where a large circuit current needs to be monitored, and the circuit current of the motor is in a full-scale state; however, the current is relatively small under common working conditions of the motor, resulting in the digital quantity corresponding to the current obtained by the analog-to-digital converter not being able to be accurately and high-resolution identified; and the high noise has a very large impact on the motor control performance, which will cause current and torque fluctuations in the transmission system, ultimately resulting in poor product performance. Generally, commercial drivers use a sampling resistor in series with the motor bus when sampling current. It has a large range and wide adaptability, but cannot accurately obtain current when the current is small, resulting in low accuracy of the sampled current. Therefore, this application proposes a sampling device and a sampling method to solve the above technical problems.

[0063] Figure 1 FIG. 1 is a first structural diagram of a sampling device in an embodiment, Figure 1As shown, the sampling device 100 includes a motor 10, a drive circuit 20 and at least two sampling circuits 30 connected to at least two phase output ends of the motor 10, and one phase output end corresponds to one sampling circuit 30; the sampling circuit 30 includes a first sampling resistor circuit R1, a first sampling resistor circuit R2, a first amplifier U1 corresponding to the first sampling resistor circuit R1, a second amplifier U2 corresponding to the first sampling resistor circuit R2, and a processor 301; the first amplifier U1 is used to amplify the differential voltage on the first sampling resistor circuit R1 to obtain a first voltage signal; the second amplifier U2 is used to amplify the differential voltage on the first sampling resistor circuit R2 to obtain a second voltage signal; the processor 301 is used to determine a voltage output result according to the first reference voltage and the second voltage signal, and determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and process the voltage signal to be output to obtain a sampling current.

[0064] In this embodiment, if Figure 1 As shown, the sampling device 100 includes a motor 10, a drive circuit 20 and a sampling circuit 30. At least two sampling circuits 30 are arranged at the output end of the motor 10 and the output end of the drive circuit 20. The sampling circuit 30 is arranged between the output end of the drive circuit 20 and the one-phase output end of the motor 10. Figure 1 The A output terminal of the drive circuit 20 and the a output terminal of the motor 10, the C output terminal of the drive circuit 20 and the c output terminal of the motor 10. The first sampling resistor circuit R1 is connected to the processor 301 through the first amplifier U1, and the first sampling resistor circuit R2 is connected to the processor 301 through the second amplifier U2.

[0065] The first sampling resistor circuit R1 and the first sampling resistor circuit R2 are sampling resistor circuits with different resistance values. For example, the resistance value of the first sampling resistor circuit R2 is 10 times the resistance value of the first sampling resistor circuit R1, which means that the resolution of the sampling current can be improved by 10 times. Optionally, the first sampling resistor circuit R1 may include one sampling resistor or multiple sampling resistors; the first sampling resistor circuit R2 may include one sampling resistor or multiple sampling resistors.

[0066] Optionally, the first amplifier U1 and the second amplifier U2 can be one of a general operational amplifier, a high-resistance integrated operational amplifier, a low-temperature drift operational amplifier, a high-precision operational amplifier, a programmable control operational amplifier, a high-voltage and high-power operational amplifier, a low-power operational amplifier and a high-speed operational amplifier.

[0067] Optionally, the processor 301 may include a comparator, a switch selector, a controller, and the like.

[0068] The first amplifier U1 obtains the differential voltage across the first sampling resistor circuit R1, and amplifies the differential voltage across the first sampling resistor circuit R1 according to the amplification factor of the first amplifier and the reference voltage of the first amplifier to obtain a first voltage signal. The second amplifier U2 obtains the differential voltage across the first sampling resistor circuit R2, and amplifies the differential voltage on the first sampling resistor circuit R2 according to the amplification factor of the second amplifier and the reference voltage of the second amplifier to obtain a second voltage signal.

[0069] The processor 301 determines the voltage output result according to the first reference voltage and the second voltage signal. The voltage output result characterizes the magnitude of the circuit current in the loop where the motor 10 and the drive circuit 20 are located. The voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain the sampled current. Exemplarily, the differential voltage of the second sampling resistor circuit R2 is obtained, and the differential voltage of the second sampling resistor circuit R2 is amplified by the first amplifier U2 to obtain the second voltage signal. If the second voltage signal is less than the first reference voltage, it means that the circuit current is small. The processor 301 determines the second voltage signal as the signal to be output. Since the second voltage signal is less than the first reference voltage and the resistance value of the second sampling resistor circuit R2 is large, the sampling current obtained according to the second voltage signal and the second sampling resistor circuit R2 can achieve a more refined division, and the sampling current resolution is improved, that is, when the circuit current is small, the sampling circuit 30 is switched to a small sampling range;

[0070] If the second voltage signal obtained by amplifying the differential voltage of the second sampling resistor circuit R2 through the first amplifier U2 is not less than the first reference voltage, it means that the circuit current is large, and the processor 301 determines the first voltage signal as the signal to be output. The resistance value of the first sampling resistor circuit R1 is smaller than the resistance value of the second sampling resistor circuit R2. A larger sampling current range can be obtained according to the first voltage signal and the first sampling resistor circuit R1, that is, when the circuit current is large, the sampling circuit 30 switches to a large sampling range.

[0071] It should be noted that the present application adaptively switches the sampling range according to the size of the circuit current while the motor 10 and the drive circuit 20 are powered on.

[0072] In an embodiment of the present application, the sampling device includes a motor, a drive circuit and at least two sampling circuits connected to at least two-phase output ends of the motor, and one sampling circuit corresponds to one phase output end; the sampling circuit includes a first sampling resistor circuit, a second sampling resistor circuit, a first amplifier corresponding to the first sampling resistor circuit, a second amplifier corresponding to the second sampling resistor circuit, and a processor; the first amplifier is used to amplify the differential voltage on the first sampling resistor circuit to obtain a first voltage signal; the second amplifier is used to amplify the differential voltage on the second sampling resistor circuit to obtain a second voltage signal; the processor is used to determine a voltage output result according to the first reference voltage and the second voltage signal, and determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and process the voltage signal to be output to obtain a sampling current. In an embodiment of the present application, a first sampling resistor circuit and a second sampling resistor circuit are arranged between the motor and the drive circuit, and feedback of the circuit current is realized based on the first sampling resistor circuit and the second sampling resistor circuit. The sampling circuit can determine the magnitude of the circuit current in the motor and the drive circuit according to the voltage output result between the second voltage signal and the first reference voltage, thereby determining the voltage signal to be output from the first voltage signal and the second voltage signal according to the magnitude of the circuit current, and obtaining the sampling current according to the voltage signal to be output, that is, the sampling circuit can adaptively switch the sampling range according to the magnitude of the circuit current, and can take into account the problems of high sampling current accuracy and large sampling range at the same time.

[0073] Figure 2 FIG. 1 is a schematic diagram of the structure of a processor in an embodiment. Figure 2 As shown, the processor 301 includes a comparator U4, a switch selector U3 and a controller U5, the first end of the comparator U4 is connected to the first end of the switch selector U3 and the first end of the second amplifier U2, the second end of the comparator U4 is connected to the second end of the switch selector U3 and the controller U5, the third end of the switch selector U3 is connected to the controller U5, and the fourth end of the switch selector U3 is connected to the first end of the first amplifier U1; the comparator U4 is used to determine the voltage output result according to the first reference voltage and the second voltage signal of the comparator U4; the switch selector U3 is used to determine the voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result; the controller U5 is used to process the voltage signal to be output to obtain the sampling current.

[0074] In this embodiment, if Figure 2As shown, the processor 301 includes a comparator U4, a switch selector U3 and a controller U5, a first end of the comparator U4 (IN end of the comparator U4) is connected to a first end of the switch selector U3 (CH2 end of the switch selector U3) and a first end of the second amplifier U2 (OUT end of the second amplifier U2), a second end of the comparator U4 (OUT end of the comparator U4) is connected to a second end of the switch selector U3 (EN end of the switch selector U3) and the controller U5, a third end of the switch selector U3 (OUT end of the switch selector U3) is connected to the controller U5, and a fourth end of the switch selector U3 (CH1 end of the switch selector U3) is connected to a first end of the first amplifier U1 (OUT end of the first amplifier U1).

[0075] The comparator U4 determines a voltage output result based on the first reference voltage and the second voltage signal of the comparator U4, and the voltage output result is sent to the EN terminal of the switch selector U3. The switch selector U3 determines whether to turn on the path between the CH1 terminal and the OUT terminal or the path between the CH2 terminal and the OUT terminal based on the voltage output result, that is, determines the voltage signal to be output from the first voltage signal and the second voltage signal, and sends the voltage signal to be output to the controller U5. The controller U5 processes the voltage signal to be output to obtain a sampling current.

[0076] The comparator U4 is used to determine that the voltage output result is a high-level output result if the second voltage signal is not less than the first reference voltage; the comparator U4 is also used to determine that the voltage output result is a low-level output result if the second voltage signal is less than the first reference voltage. The switch selector is used to determine that the first voltage signal is a voltage signal to be output if the voltage output result is a high-level output result; the switch selector is also used to determine that the second voltage signal is a voltage signal to be output if the voltage output result is a low-level output result.

[0077] For example, the first reference voltage of the comparator U4 is 1V. When the circuit current is large, the second voltage signal obtained through the second amplifier U2 is not less than the first reference voltage. The comparator U4 outputs a high-level output result to the switch selector U3. The switch selector U3 turns on the path between the CH1 terminal and the OUT terminal, and outputs the first voltage signal to the processor as the voltage signal to be output; when the circuit current is small, the second voltage signal obtained through the second amplifier U2 is less than the first reference voltage. The comparator U4 outputs a low-level output result to the switch selector U3. The switch selector U3 turns on the path between the CH2 terminal and the OUT terminal, and outputs the second voltage signal to the processor as the voltage signal to be output.

[0078] In an embodiment of the present application, a comparator is used to determine a voltage output result according to a first reference voltage and a second voltage signal of the comparator; a switch selector is used to determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result; and a controller is used to process the voltage signal to be output to obtain a sampling current. In this embodiment, the comparator determines the magnitude of the circuit current according to the voltage output result determined by the first reference voltage and the second voltage signal of the comparator. When the circuit current is small, the controller obtains the sampling current according to the second voltage signal, and can collect the state with high precision and high resolution, effectively reducing the influence of noise on the motor performance; when the circuit current is large, the controller obtains the sampling current according to the first voltage signal, and realizes the adaptive switching of the sampling range.

[0079] As mentioned above Figure 1 As shown, the first amplifier U1 is connected to both ends of the first sampling resistor circuit R1, and the second amplifier U2 is connected to both ends of the first sampling resistor circuit R2; the first sampling resistor circuit R1 is arranged between the motor 10 and the first sampling resistor circuit R2, and the first sampling resistor circuit R2 is connected to the drive circuit 20.

[0080] In this embodiment, the first sampling resistor circuit R1 and the first sampling resistor circuit R2 are connected in series between a phase output end of the motor 10 and an output end of the drive circuit 20, the first amplifier U1 is connected to both ends of the first sampling resistor circuit R1, and the second amplifier U2 is connected to both ends of the first sampling resistor circuit R2. The first amplifier U1 amplifies the differential voltage across the first sampling resistor circuit R1 to obtain a first voltage signal, and the second amplifier U2 amplifies the differential voltage across the first sampling resistor circuit R2 to obtain a second voltage signal.

[0081] Figure 3 FIG. 1 is a second structural diagram of a sampling device in one embodiment, Figure 3 As shown, the first sampling resistor circuit includes a first sampling resistor R11, and the second sampling resistor circuit includes a second sampling resistor R21; the first end of the first sampling resistor R11 is connected to the second end of the first amplifier U1 and the first phase output end of the motor 10, and the second end of the first sampling resistor R11 is connected to the first end of the second sampling resistor R21 and the third end of the first amplifier U1; the first end of the second sampling resistor R21 is connected to the second end of the second amplifier U2, and the second end of the second sampling resistor R21 is connected to the output end of the drive circuit 20 and the third end of the second amplifier U2.

[0082] In this embodiment, if Figure 3As shown, the first sampling resistor circuit includes a first sampling resistor R11, and the second sampling resistor circuit includes a second sampling resistor R21; the first end of the first sampling resistor R11 is connected to the second end of the first amplifier U1 and the first phase output end of the motor 10, and the second end of the first sampling resistor R11 is connected to the first end of the second sampling resistor R21 and the third end of the first amplifier U1; the first end of the second sampling resistor R21 is connected to the second end of the second amplifier U2, and the second end of the second sampling resistor R21 is connected to the output end of the drive circuit 20 and the third end of the second amplifier U2.

[0083] In one embodiment, the controller includes an analog-to-digital converter, an IO interface and a control unit; the analog-to-digital converter is used to convert the voltage signal to be output into a digital signal and send the digital signal to the control unit; the IO interface is used to identify the voltage output result and send the identification result of the voltage output result to the control unit; the identification result is a low-level output result or a high-level output result; the control unit is used to analyze and process the digital signal according to the processing algorithm corresponding to the identification result to obtain a sampling current.

[0084] Optionally, the control unit may be a microcontroller unit (MCU) or a field programmable gate array (FPGA) chip. If the control unit is an FPGA, the threshold of the output voltage signal of the effective input of the analog to digital converter (ADC) channel is an analog value of 0 to 1V, corresponding to a digital value of 0 to 4095. The ADC, the control unit and the IO interface may be integrated together, or the ADC may be separately provided from the control unit and the IO interface.

[0085] In this embodiment, the I / O interface is used to identify the voltage output result of the comparator input. The identification result is obtained by the level of the IO interface, and it can be determined whether the ADC reads the first level signal of the CH1 channel or the second level signal of the CH2 channel. The identification result is sent to the controller, and the controller analyzes the digital signal of the output voltage signal according to the processing algorithm corresponding to the CH1 channel or the CH2 channel to obtain the sampling current.

[0086] In an embodiment of the present application, by connecting the first sampling resistor and the second sampling resistor in series in the motor and the drive circuit, the differential voltage first amplifier and the second amplifier at both ends of the first sampling resistor and the second sampling resistor proportionally amplify the output first voltage signal or the second voltage signal to the analog threshold range that can be recognized by the ADC, and convert the first voltage signal or the second voltage signal into a corresponding digital signal so that the control unit can obtain the sampling current according to the digital signal, thereby having the advantages of low cost, fast response and high accuracy.

[0087] In one embodiment, the first amplifier is used to determine a first product result of a differential voltage of a first sampling resistor circuit and a first amplification factor of the first amplifier, and determine a first voltage signal according to a sum result of the first product result and a second reference voltage of the first amplifier; the second amplifier is used to determine a second product result of a differential voltage of a second sampling resistor circuit and a second amplification factor of the second amplifier, and determine a second voltage signal according to a sum result of the second product result and a third reference voltage of the second amplifier.

[0088] The first amplifier and the second amplifier have fixed amplification factors.

[0089] In this embodiment, the voltages at both ends of the first sampling resistor circuit are respectively input to the second end of the first amplifier (the IN+ end of the first amplifier) ​​and the third end of the first amplifier (the IN- end of the first amplifier), and the voltage at the IN+ end of the first amplifier and the voltage at the IN- end of the first amplifier are subtracted to obtain a differential voltage, and the differential voltage is multiplied by the first amplification factor to obtain a first product result, and then the first product result and the second reference voltage of the first amplifier (i.e., the voltage of the reference pin REF of the first amplifier) ​​are summed to obtain a first voltage signal, and the first voltage signal is output through the OUT pin of the first amplifier. Similarly, the second voltage signal can be obtained.

[0090] In the embodiment of the present application, the first amplifier is used to determine the first product result of the differential voltage of the first sampling resistor circuit and the first amplification factor of the first amplifier, and determine the first voltage signal according to the sum of the first product result and the second reference voltage of the first amplifier; the second amplifier is used to determine the second product result of the differential voltage of the second sampling resistor circuit and the second amplification factor of the second amplifier, and determine the second voltage signal according to the sum of the second product result and the third reference voltage of the second amplifier. In order to reduce the power consumption of the sampling device, the resistance value of the first resistor circuit and the resistance value of the second resistor circuit are set very small, so that the differential voltage on the first resistor circuit and the differential voltage on the second resistor circuit are very small, and the differential voltage on the first resistor circuit and the differential voltage on the second resistor circuit are amplified by the first amplifier and the second amplifier to obtain the first voltage signal and the second voltage signal, so that the controller can process the first voltage signal or the second voltage signal to obtain the sampling current.

[0091] In one embodiment, the first amplification factor and the first resistance of the first sampling resistor circuit are determined according to the maximum current of the first range of the motor and the input voltage of the analog-to-digital converter; the second amplification factor and the second resistance of the second sampling resistor circuit are determined according to the maximum current of the second range of the motor and the input voltage of the analog-to-digital converter; wherein the first range is greater than the second range.

[0092] In this embodiment, the first amplification factor of the first amplifier U1 is K1, the amplification factor of the second amplifier U2 is K2, the first resistance of the first sampling resistor circuit is R1, the second resistance of the second sampling resistor circuit is R2, and the first amplification factor K1 and the first resistance R1 satisfy |K1*I max1 *R1+V REF1 |≤u1, the second magnification K2 and the second resistance R2 satisfy |K2*I max2 *R2+V REF2 |≤u1, where I max1 is the maximum current of the first range of the motor, I max2 is the maximum current of the second range of the motor, and u1 is the input voltage of the analog-to-digital converter.

[0093] Optionally, the first range of the motor is 0-10A, the second range is 0-2A, I max1 10A, I max2 The input voltage of the analog-to-digital converter is 3.3V.

[0094] In an embodiment of the present application, the first amplification factor and the first resistance of the first sampling resistor circuit are determined according to the maximum current of the first range of the motor and the input voltage of the analog-to-digital converter; the second amplification factor and the second resistance of the second sampling resistor circuit are determined according to the maximum current of the second range of the motor and the input voltage of the analog-to-digital converter; wherein the first range is greater than the second range. In this embodiment, the first amplification factor and the first resistance of the first sampling resistor circuit are determined by the maximum current of the first range of the motor and the input voltage of the analog-to-digital converter, and the second amplification factor and the second resistance of the second sampling resistor circuit are determined by the maximum current of the second range of the motor and the input voltage of the analog-to-digital converter, which can ensure that the differential voltage across the first sampling resistor circuit and the second sampling resistor circuit can be proportionally amplified to the analog threshold range that can be recognized by the analog-to-digital converter under the first range and the second range of the motor, thereby improving the stability of the sampling circuit.

[0095] In an exemplary embodiment, a sampling method is provided, comprising the following steps: amplifying a differential voltage on a first sampling resistor circuit to obtain a first voltage signal; amplifying a differential voltage on a second sampling resistor circuit to obtain a second voltage signal; determining a voltage output result according to a first reference voltage and a second voltage signal, determining a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and processing the voltage signal to be output to obtain a sampling current.

[0096] For specific implementation methods, please refer to the above Figure 1 The embodiment shown.

[0097] In the above sampling method, the differential voltage on the first sampling resistor circuit is amplified to obtain a first voltage signal; the differential voltage on the second sampling resistor circuit is amplified to obtain a second voltage signal; the voltage output result is determined according to the first reference voltage and the second voltage signal, and the voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain the sampling current. In the embodiment of the present application, the magnitude of the circuit current on the motor and the drive circuit can be determined according to the voltage output result between the second voltage signal and the first reference voltage, so that the voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the magnitude of the circuit current, and the sampling current is obtained according to the voltage signal to be output, that is, the sampling circuit can adaptively switch the sampling range according to the magnitude of the circuit current, and can simultaneously take into account the problems of high sampling current accuracy and large sampling range.

[0098] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0099] Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0100] Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0101] A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

[0102] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0103] Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal;

[0104] Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal;

[0105] A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0107] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A sampling device, characterized in that: The sampling device includes a motor, a drive circuit, and at least two sampling circuits connected to at least two-phase output ends of the motor, one phase output end corresponds to one sampling circuit; the sampling circuit includes a first sampling resistor circuit, a second sampling resistor circuit, a first amplifier corresponding to the first sampling resistor circuit, a second amplifier corresponding to the second sampling resistor circuit, and a processor; The first amplifier is used to amplify the differential voltage on the first sampling resistor circuit to obtain a first voltage signal; The second amplifier is used to amplify the differential voltage on the second sampling resistor circuit to obtain a second voltage signal; The processor is used to determine a voltage output result according to a first reference voltage and the second voltage signal, determine a voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result, and process the voltage signal to be output to obtain a sampling current.

2. The sampling device according to claim 1, characterized in that: The processor includes a comparator, a switch selector, and a controller, wherein a first end of the comparator is connected to a first end of the switch selector and a first end of the second amplifier, a second end of the comparator is connected to a second end of the switch selector and the controller, a third end of the switch selector is connected to the controller, and a fourth end of the switch selector is connected to a first end of the first amplifier; The comparator is used to determine a voltage output result according to the first reference voltage of the comparator and the second voltage signal; The switch selector is used to determine the voltage signal to be output from the first voltage signal and the second voltage signal according to the voltage output result; The controller is used to process the voltage signal to be output to obtain a sampling current.

3. The sampling device according to claim 2, characterized in that: The comparator is configured to determine that the voltage output result is a high level output result if the second voltage signal is not less than the first reference voltage; The comparator is further configured to determine that the voltage output result is a low level output result if the second voltage signal is less than the first reference voltage.

4. The sampling device according to claim 1, characterized in that: The first amplifier is connected to two ends of the first sampling resistor circuit, and the second amplifier is connected to two ends of the second sampling resistor circuit; The first sampling resistance circuit is arranged between the motor and the second sampling resistance circuit, and the second sampling resistance circuit is connected to the driving circuit.

5. The sampling device according to claim 3, characterized in that: The first sampling resistor circuit includes a first sampling resistor, and the second sampling resistor circuit includes a second sampling resistor; The first end of the first sampling resistor is connected to the second end of the first amplifier and the first phase output end of the motor, and the second end of the first sampling resistor is connected to the first end of the second sampling resistor and the third end of the first amplifier; The first end of the second sampling resistor is connected to the second end of the second amplifier, and the second end of the second sampling resistor is connected to the output end of the driving circuit and the third end of the second amplifier.

6. The sampling device according to claim 3, characterized in that: The switch selector is used to determine that the first voltage signal is the voltage signal to be output if the voltage output result is the high level output result; The switch selector is further configured to determine that the second voltage signal is the voltage signal to be output if the voltage output result is the low level output result.

7. The sampling device according to claim 2, characterized in that: The controller includes an analog-to-digital converter, an IO interface and a control unit; The analog-to-digital converter is used to convert the voltage signal to be output into a digital signal, and send the digital signal to the control unit; The IO interface is used to identify the voltage output result and send the identification result of the voltage output result to the control unit; the identification result is a low-level output result or a high-level output result; The control unit is used to analyze and process the digital signal according to the processing algorithm corresponding to the recognition result to obtain the sampling current.

8. The sampling device according to claim 7, characterized in that: The first amplifier is used to determine a first product result of a differential voltage of the first sampling resistor circuit and a first amplification factor of the first amplifier, and determine the first voltage signal according to a summation result of the first product result and a second reference voltage of the first amplifier; The second amplifier is used to determine a second product result of the differential voltage of the second sampling resistor circuit and a second amplification factor of the second amplifier, and determine the second voltage signal according to a summation result of the second product result and a third reference voltage of the second amplifier.

9. The sampling device according to claim 8, characterized in that: The first amplification factor and the first resistance value of the first sampling resistor circuit are determined according to the maximum current of the first range of the motor and the input voltage of the analog-to-digital converter; The second amplification factor and the second resistance value of the second sampling resistor circuit are determined according to the maximum current of the second range of the motor and the input voltage of the analog-to-digital converter; Wherein, the first measurement range is greater than the second measurement range.

10. A sampling method, characterized in that: The method is applied to the sampling device according to any one of claims 1 to 9, and the method comprises: Amplifying the differential voltage on the first sampling resistor circuit to obtain a first voltage signal; Amplifying the differential voltage on the second sampling resistor circuit to obtain a second voltage signal; A voltage output result is determined according to the first reference voltage and the second voltage signal, and a voltage signal to be output is determined from the first voltage signal and the second voltage signal according to the voltage output result, and the voltage signal to be output is processed to obtain a sampling current.

Citation Information

Cited By

  • Current sampling module and electronic equipment

    CN121499881A