Motor current sampling circuit, sampling method and sampling equipment

By using differential operational amplifier circuit and MOS tube circuit in the motor current sampling circuit, combined with reference calibration technology, the problems of high cost and low accuracy of traditional motor current sampling circuits are solved, and efficient and low-cost current acquisition and motor control are achieved.

CN119448867APending Publication Date: 2025-02-14EAST JOY LONG AUTOMOBILE ELECTRONICS SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411550572.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Traditional motor current sampling circuits require high common mode rejection ratios and high precision resistors, resulting in high cost and excessive configuration requirements.

Method used

Differential operational amplifier circuit and MOS tube circuit are used to reference calibration of the voltage across the sampling resistor before the motor is operated, and the common mode voltage is eliminated, and a conventional op amp and one percent accuracy resistor are used.

Benefits of technology

It reduces hardware costs, improves current acquisition accuracy, enhances the flexibility and practicality of the system, and realizes accurate commutation and speed control of the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119448867A_ABST
    Figure CN119448867A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motors, and provides a motor current sampling circuit, sampling method and sampling device.The sampling circuit comprises a sampling resistor, a differential operational amplifier circuit and an MOS tube circuit, the sampling resistor is provided with a sampling resistor first end and a sampling resistor second end, the sampling resistor first end is used for being connected with a motor first end, and the sampling resistor second end is used for being connected with a motor second end; the inverting input end of the operational amplifier is connected with the first end of the sampling resistor, the non-inverting input end of the operational amplifier is connected with the second end of the sampling resistor, the differential operational amplifier circuit is used for collecting and amplifying sampling voltage, and the MOS tube circuit comprises a first MOS tube circuit, a second MOS tube circuit, a third MOS tube circuit and a fourth MOS tube circuit. The first MOS tube circuit and the second MOS tube circuit are connected with the second end of the sampling resistor, and the third MOS tube circuit and the fourth MOS tube circuit are used for being connected with the second end of the motor. According to the invention, the aim of acquiring the phase current of the motor by using a common operational amplifier and a conventional resistor with the precision of one percent is fulfilled, and the hardware cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electric motors, and in particular to a motor current sampling circuit, a sampling method and a sampling device. Background Art

[0002] At present, the current acquisition technology of electric motors has been widely used in many fields. The core is to reflect the real-time current value of the motor with high precision by directly connecting the sampling resistor in series in the motor circuit. In order to achieve accurate current acquisition, the hardware circuit usually adopts differential op amp design. The differential op amp circuit can significantly reduce the influence of common mode voltage on the current acquisition accuracy and ensure the accuracy of the data by virtue of its high common mode rejection ratio. In order to further improve the acquisition accuracy, the resistors outside the op amp must also meet the accuracy requirement of one thousandth. The configuration requirements of this high-precision hardware circuit are too high and the cost is too high. Summary of the invention

[0003] In order to help solve the problem that conventional current sampling circuits for motors need to have a high common-mode rejection ratio and are high in cost, the present application provides a motor current sampling circuit, a sampling method and a sampling device.

[0004] In a first aspect, the present application provides a motor current sampling circuit, which adopts the following technical solution: A motor current sampling circuit, wherein the motor has a motor first end and a motor second end, and the sampling circuit comprises: A sampling resistor, wherein the sampling resistor has a first end and a second end of the sampling resistor, wherein the first end of the sampling resistor is used to connect to the first end of the motor and to collect the motor current as a sampling voltage, A differential operational amplifier circuit, wherein the differential operational amplifier circuit is provided with an operational amplifier, wherein the inverting input terminal of the operational amplifier is connected to the first terminal of the sampling resistor, and the non-inverting input terminal of the operational amplifier is connected to the second terminal of the sampling resistor, and the differential operational amplifier circuit is used to collect and amplify the sampling voltage. MOS tube circuit, the MOS tube circuit includes a first MOS tube circuit, a second MOS tube circuit, a third MOS tube circuit and a fourth MOS tube circuit, the first MOS tube circuit and the second MOS tube circuit are connected to the second end of the sampling resistor, the third MOS tube circuit and the fourth MOS tube circuit are used to connect the second end of the motor, Before the motor rotates from the first end of the motor to the second end of the motor, the first MOS tube circuit and the third MOS tube circuit are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be a first voltage, and before the motor rotates from the second end of the motor to the first end of the motor, the second MOS tube circuit and the fourth MOS tube circuit are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be a second voltage.

[0005] By adopting the above technical solution, a motor current sampling circuit using a conventional op amp is defined, and the accurate acquisition of the motor phase current is achieved through the combination of a sampling resistor and a differential operational amplifier circuit. By performing a reference calibration on the voltage across the sampling resistor before the motor is actuated, the influence of the common mode voltage on the current acquisition is effectively eliminated, and the use of ordinary op amps and conventional 1% precision resistors reduces the hardware cost.

[0006] Preferably, the sampling circuit further includes a first voltage source, a second voltage source and a control chip, the MOS tube circuit includes the MOS tube and a chip interface, one end of the chip interface is connected to the gate of the MOS tube, and the other end is connected to the control chip, The MOS tube includes a first MOS tube, a second MOS tube, a third MOS tube and a fourth MOS tube, the chip interface includes a first chip interface, a second chip interface, a third chip interface and a fourth chip interface, the drain of the first MOS tube is connected to the first voltage source, the source of the second MOS tube is grounded, the source of the first MOS tube and the drain of the second MOS tube are connected to the second end of the sampling resistor, the drain of the third MOS tube is connected to the second voltage source, the source of the fourth MOS tube is grounded, and the source of the third MOS tube and the drain of the fourth MOS tube are connected to the second end of the motor, The control chip is used to perform commutation control on the motor through the first MOS tube and the second MOS tube respectively, and the control chip is used to perform speed control on the motor through the third MOS tube and the fourth MOS tube respectively.

[0007] By adopting the above technical solution, the connection mode between the MOS tube circuit and the control chip is further refined, and the specific functions of the first, second, third, and fourth MOS tube circuits are clarified. Through the precise control of the control chip, not only the commutation of the motor is realized, but also the speed control of the motor is realized through the third and fourth MOS tubes, which enhances the flexibility and practicality of the system.

[0008] Preferably, the differential operational amplifier circuit is a differential operational amplifier circuit, and the differential operational amplifier circuit further includes a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a bypass capacitor, an ADC port of the control chip and a third voltage source. The first end of the sampling resistor, the first resistor and the inverting input end of the operational amplifier are connected in sequence, the second end of the sampling resistor, the second resistor and the non-inverting input end of the operational amplifier are connected in sequence, one end of the third resistor is connected to the inverting input end, and the other end is connected to the output end of the operational amplifier, one end of the fourth resistor is connected to the output end, and the other end is connected to the ADC port, one end of the bypass capacitor is connected to the fourth resistor, and the other end is grounded, one end of the ADC port is connected to the fourth resistor, and the other end is connected to the control chip, one end of the fifth resistor is connected to the non-inverting input end, and the other end is grounded, one end of the sixth resistor is connected to the non-inverting input end, and the other end is grounded, The first resistor and the second resistor are used to limit the input current of the differential operational amplifier circuit, the third resistor is used to adjust the gain and amplification factor of the differential operational amplifier circuit, the fourth resistor is used to limit the output current of the differential operational amplifier circuit, the fifth resistor, the sixth resistor and the third voltage source are used to provide a bias voltage to the differential operational amplifier circuit, and the ADC port is used to collect the output voltage of the differential operational amplifier circuit.

[0009] By adopting the above technical solution, the specific composition of the differential operational amplifier circuit is described in detail, including components such as resistors, bypass capacitors, ADC ports, etc. The introduction of these components improves the stability and anti-interference ability of the circuit.

[0010] Preferably, the control chip calculates the motor current in the following manner: Vout=A*U1+U2, U1=I*R, Among them, Vout is the output voltage of the differential operational amplifier circuit, A is the amplification factor of the differential operational amplifier circuit, U1 is the voltage value of the sampling voltage, R is the resistance value of the sampling resistor, I is the current value of the motor current, and U2 is the reference voltage value. When the sampling circuit is interfered by the common mode voltage, the reference voltage value is not equal to the bias voltage value.

[0011] By adopting the above technical solution, a method for calculating the motor current by the control chip is proposed. The motor current can be accurately calculated by combining the output voltage, amplification factor, sampling voltage, bias voltage or reference voltage of the differential operational amplifier circuit with the known sampling resistor value. This method is simple and effective, and the calculation accuracy is less affected by circuit parameters.

[0012] In a second aspect, the present application provides a sampling method of the sampling circuit as described in the first aspect, adopting the following technical solution: The sampling method of the sampling circuit as described in the first aspect above, wherein the sampling method comprises the following steps: The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be a first voltage through the first MOS tube circuit and the third MOS tube circuit, and records the reference voltage value at this time. The motor rotates from the first end of the motor to the second end of the motor, and the motor current is calculated. The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be a second voltage through the second MOS tube circuit and the fourth MOS tube circuit, and records the reference voltage value at this time. The motor rotates from the second end of the motor to the first end of the motor, and the motor current is calculated.

[0013] By adopting the above technical solution, this reference calibration method effectively eliminates the influence of common mode voltage on sampling accuracy, thereby ensuring the accuracy of motor phase current collected in different rotation directions. This method is not only simple and easy to implement, but also greatly improves the stability and reliability of the sampling results.

[0014] Preferably, in the sampling method, when the control chip controls the first MOS tube to be turned on and the second MOS tube to be turned off, the motor rotates from the first end of the motor to the second end of the motor; When the control chip controls the second MOS tube to be turned on and the first MOS tube to be turned off, the motor rotates from the second end of the motor to the first end of the motor.

[0015] By adopting the above technical solution, the MOS tube control logic in the motor commutation process is further refined. This clear control logic ensures the accuracy and controllability of the motor commutation, and also provides a stable electrical environment for subsequent current sampling.

[0016] Preferably, when the motor rotates, the control chip controls the speed of the motor through the third MOS tube and the fourth MOS tube.

[0017] By adopting the above technical solution, this speed control strategy not only meets the speed requirements of the motor under different working conditions, but also ensures the current sampling accuracy during the speed regulation process. By keeping away from the MOS tube for speed control and close to the MOS tube for commutation control, the common mode voltage interference that may be introduced during the speed regulation process is avoided, thereby ensuring the accuracy of the sampling results.

[0018] In a third aspect, the present application provides a motor sampling device, which adopts the following technical solution: A motor sampling device, wherein the motor sampling device comprises the sampling circuit as described in any one of the first aspects above.

[0019] By adopting the above technical solution, a motor sampling device including the above sampling circuit is defined, which can accurately collect the motor phase current, has low hardware cost and a wide range of applications. By integrating the control chip and MOS tube circuit, accurate control and sampling of the motor are achieved, providing strong support for the intelligence and efficiency of the motor drive system.

[0020] In summary, the motor current sampling circuit of the present application achieves the goal of collecting motor phase current using conventional op amps and conventional 1% precision resistors, reducing hardware costs. At the same time, by calibrating the reference voltage before the motor is actuated, the influence of the common mode voltage on current collection is effectively eliminated, and the collection accuracy is improved. In addition, by precisely controlling the MOS tube through the control chip, the commutation and speed regulation functions of the motor are realized, enhancing the flexibility and practicality of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a structural schematic diagram of a motor current sampling circuit in the prior art; Figure 2 A schematic diagram of the structure of an embodiment of a motor current sampling circuit of the present application; Figure 3 A schematic flow chart of an embodiment of a sampling method of a sampling circuit of the present application; Figure 4 A curve diagram showing the relationship between the common mode rejection ratio and the current frequency of the sampling circuit of the present application.

[0022] Figure numerals: 1. operational amplifier circuit; 2. first MOS tube circuit; 3. third MOS tube circuit; 4. second MOS tube circuit; 5. fourth MOS tube circuit; 6. differential operational amplifier circuit. DETAILED DESCRIPTION

[0023] With reference to the accompanying drawings and specific embodiments, the composition, characteristics and advantages of the motor current sampling circuit, sampling method and sampling device according to the present application will be described below in an exemplary manner. However, all descriptions should not be used to form any limitations on the present application.

[0024] In addition, for any single technical feature described or implied in the embodiments mentioned in this document, or any single technical feature displayed or implied in the drawings, this application still allows for continued arbitrary combination or deletion between these technical features (or their equivalents) without any technical obstacles, and thus it should be considered that these more embodiments according to this application are also within the scope of the description of this document.

[0025] It should also be noted that the terms "disposed" and the like should be understood in a broad sense, for example, it can be fixedly connected, detachably connected, or integrated; it can be directly connected, or indirectly connected through an intermediate medium. Unless otherwise clearly defined, those skilled in the art can understand the specific meanings of the above terms in this application according to specific circumstances.

[0026] Figure 1 Schematic diagram of the structure of the motor current sampling circuit in the prior art. The conventional motor current sampling circuit is usually composed of a sampling resistor Rshunt and an operational amplifier circuit 1. In order to reduce the influence of the common mode voltage, the operational amplifier circuit 1 in the prior art is usually a differential operational amplifier circuit, and the differential operational amplifier circuit needs to have a high common mode rejection ratio, and its peripheral resistors also need to meet the accuracy requirement of one thousandth, which is very costly.

[0027] Figure 2 The present invention is a schematic diagram of the structure of an embodiment of a motor current sampling circuit of the present invention. The motor has a first end and a second end, which correspond to the "1" on the left side and the "2" on the right side of the motor M3 in the figure, respectively. The motor current sampling circuit may include a sampling resistor Rshunt, a differential operational amplifier circuit 6 and a MOS tube circuit. The sampling resistor Rshunt has a first end and a second end of the sampling resistor. The first end of the sampling resistor is used to connect the first end of the motor and to collect the motor current as a sampling voltage. An operational amplifier U14 may be provided in the differential operational amplifier circuit 6. The inverting input end of the operational amplifier U14 is connected to the first end of the sampling resistor, and the non-inverting input end of the operational amplifier is connected to the second end of the sampling resistor. The differential operational amplifier circuit 6 is used to collect and amplify the sampling voltage. The MOS tube circuit may include a first MOS tube circuit 2, a second MOS tube circuit 4, a third MOS tube circuit 3 and a fourth MOS tube circuit 5. The first MOS tube circuit 2 and the second MOS tube circuit 4 are connected to the second end of the sampling resistor. The third MOS tube circuit 3 and the fourth MOS tube circuit 5 are used to connect the second end of the motor.

[0028] In order to eliminate the influence of common mode voltage on current collection, it is necessary to perform a reference calibration on the voltage at both ends of the sampling resistor Rshunt before the motor is actuated. Before the motor M3 rotates from the first end of the motor to the second end of the motor, the first MOS tube circuit 2 and the third MOS tube circuit 3 are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be the first voltage, and before the motor M3 rotates from the second end of the motor to the first end of the motor, the second MOS tube circuit 4 and the fourth MOS tube circuit 5 are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be the second voltage.

[0029] In this embodiment, the sampling circuit further includes a first voltage source, a second voltage source and a control chip MCU (not shown in the figure), and the MOS tube circuit includes a MOS tube and a chip interface. One end of the chip interface is connected to the gate of the MOS tube, and the other end is connected to the control chip. Figure 2 The letters G, D and S in the figure represent the gate, drain and source of the MOS tube respectively. It should be noted that the first voltage source and the second voltage source of the present application can be Figure 2 VS in.

[0030] exist Figure 2 In the illustrated embodiment, the MOS tube may include a first MOS tube U10, a second MOS tube U11, a third MOS tube U12 and a fourth MOS tube U13, the chip interface includes a first chip interface GH1, a second chip interface GL1, a third chip interface GH2 and a fourth chip interface GL2, the drain of the first MOS tube U10 is connected to the first voltage source, the source of the second MOS tube U11 is grounded, the source of the first MOS tube U10 and the drain of the second MOS tube U11 are connected to the second end of the sampling resistor, the drain of the third MOS tube U12 is connected to the second voltage source, the source of the fourth MOS tube U13 is grounded, the source of the third MOS tube U12 and the drain of the fourth MOS tube U13 are connected to the second end of the motor, the control chip MCU is used to perform commutation control on the motor M3 through the first MOS tube U10 and the second MOS tube U11 respectively, and the control chip MCU is used to perform speed control on the motor M3 through the third MOS tube U12 and the fourth MOS tube U13 respectively.

[0031] The sampling resistor Rshunt is connected in series with the motor line. The sampling voltage across the sampling resistor is collected by the differential operational amplifier circuit 6. The motor current is obtained by dividing the voltage by the resistance value of the sampling resistor. The control chip MCU can calculate the motor current in the following way: Vout=A*U1+U2, U1=I*R, Wherein, Vout is the output voltage of the differential operational amplifier circuit 6, A is the amplification factor of the differential operational amplifier circuit 6, U1 is the voltage value of the sampling voltage, U2 is the reference voltage value, R is the resistance value of the sampling resistor, and I is the current value of the motor current. When the sampling circuit is interfered by the common mode voltage, the reference voltage value is not equal to the bias voltage value. In this embodiment, if there is no interference from the common mode voltage, the above formula can be embodied as: Vout=10*U1+2.5, U1=I*5mR.

[0032] When the motor is not moving, the voltage difference across the sampling resistor is 0, so the reference voltage U2 collected by the control chip MCU is a bias voltage of 2.5V, that is, 2.5V calculated by the voltage division of the third voltage source V3 that provides 5V voltage. This value can be used as a reference when the motor is not moving. When the motor M3 rotates from the "1" direction to the "2" direction, since the current flow direction is the same as the motor rotation direction, the voltage at the second end of the sampling resistor will be greater than the voltage at the first end of the sampling resistor, and the above U1 is positive, so the collected value will be greater than 2.5V; when the motor M3 rotates from the "2" direction to the "1" direction, since the current flow direction is the same as the motor rotation direction, the voltage at the second end of the sampling resistor will be less than the voltage at the first end of the sampling resistor, and the above U1 is negative, so the collected value will be less than 2.5V.

[0033] Subtract the collected value from 2.5, divide it by the amplification factor (10 times), and then divide it by the sampling resistor value (5mR), and you can get the current of the current running of the motor. However, due to the influence of the common-mode voltage, the reference voltage of the operational amplifier will have deviations, resulting in deviations in the final collected current. If the first voltage source and the second voltage source both provide a voltage of 12V, when the motor M3 rotates from the "1" direction to the "2" direction, the voltage at the input terminal of the differential operational amplifier circuit 6 is a high voltage, and when the motor M3 rotates from the "2" direction to the "1" direction, the voltage at the input terminal of the differential operational amplifier circuit 6 is a low voltage. The influence of the common-mode voltage is mainly related to the common-mode rejection ratio of the operational amplifier circuit.

[0034] The common mode rejection ratio is usually represented by the symbol CMRR, and the unit is dB. The common mode rejection ratio CMRR is defined as the absolute value of the ratio of the voltage gain of the operational amplifier circuit to the voltage gain of the differential mode signal to the common mode signal. The larger the CMRR, the better the performance of the differential operational amplifier circuit 6. The calculation formula of the common mode rejection ratio is CMRR=20lg│Adm / Acm│(dB), where Adm is the differential mode gain and Acm is the common mode gain.

[0035] Taking ST's LM2904 operational amplifier circuit as an example, the minimum CMRR parameter of the operational amplifier is 60dB. Ignoring the deviation of the accuracy of the peripheral resistors, it can be obtained that when the common-mode input voltage is 12V, the common-mode output voltage is 120mV, which is converted to a current value of 2.4A. When the influence of the accuracy of the peripheral resistors is ignored, the difference caused by the common-mode rejection ratio of the operational amplifier alone is very large.

[0036] The differential operational amplifier circuit 6 of the present application is a differential operational amplifier circuit 6, which also includes a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a bypass capacitor C1, an ADC port "MCU_ADC" of the control chip MCU and a third voltage source V3.

[0037] The first end of the sampling resistor, the first resistor R1 and the inverting input end of the operational amplifier U14 are connected in sequence, the second end of the sampling resistor, the second resistor R2 and the non-inverting input end of the operational amplifier U14 are connected in sequence, one end of the third resistor R3 is connected to the inverting input end, and the other end is connected to the output end of the operational amplifier U14, one end of the fourth resistor R4 is connected to the output end, and the other end is connected to MCU_ADC, one end of the bypass capacitor C1 is connected to the fourth resistor R4, and the other end is grounded, one end of MCU_ADC is connected to the fourth resistor R4, and the other end is connected to the control chip MCU, one end of the fifth resistor R5 is connected to the non-inverting input end, and the other end is grounded, and one end of the sixth resistor R6 is connected to the non-inverting input end, and the other end is grounded.

[0038] The first resistor R1 and the second resistor R2 are used to limit the input current of the differential operational amplifier circuit 6, the third resistor R3 is used to adjust the gain and amplification factor of the differential operational amplifier circuit 6, the fourth resistor R4 is used to limit the output current of the differential operational amplifier circuit 6, the fifth resistor R5 and the sixth resistor R6 have the same resistance value, the fifth resistor R5, the sixth resistor R6 and the third voltage source V3 are used to provide a bias voltage to the differential operational amplifier circuit 6, and MCU_ADC is used to collect the output voltage of the differential operational amplifier circuit 6.

[0039] The differential operational amplifier circuit 6 of the present application is a low-cost differential operational amplifier circuit 6 using a conventional operational amplifier, and the external resistor of the differential operational amplifier circuit 6 of the present application does not need to have a high precision of one thousandth. This is because the MOS tube current of the present application can eliminate the influence of the common mode voltage on the motor current collection.

[0040] Specifically, before the motor M3 rotates from the first end of the motor to the second end of the motor, the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor are controlled to be the first voltage 12V by pulling up the first MOS tube U10 and the third MOS tube U12, and the reference voltage value at this time is recorded. Before the motor M3 rotates from the second end of the motor to the first end of the motor, the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor are controlled to be the second voltage 0V by pulling down the second MOS tube U11 and the fourth MOS tube U13, and the reference voltage value at this time is recorded. When the sampling circuit is affected by the common mode voltage, the actual reference voltage value cannot be equal to the ideal reference voltage value (bias voltage value 2.5V) calculated above, and the subsequent calculation of the motor current will be based on the new reference voltage value, thereby eliminating the influence of the common mode voltage on the sampling circuit.

[0041] The present application also provides a sampling method for the above sampling circuit. Figure 3 FIG. 1 is a flow chart of an embodiment of a sampling method of a sampling circuit of the present application. Figure 3 It can be seen that the sampling method of the above sampling circuit may include the following steps: Step S1: The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be the first voltage through the first MOS tube circuit 2 and the third MOS tube circuit 3, and records the reference voltage value at this time. In step S1, before the motor rotates, by calibrating the voltage at both ends of the sampling resistor, a reference voltage value that is not interfered by the common mode voltage can be obtained. This value will be used as a reference in the subsequent calculation of the motor current to improve the accuracy of current sampling.

[0042] Step S2: The motor rotates from the first end of the motor to the second end of the motor, and the motor current is calculated. Step S2 can accurately calculate the current value of the motor when it rotates in a specific direction in real time, providing important data for monitoring and controlling the motor.

[0043] Step S3: The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be the second voltage through the second MOS tube circuit 4 and the fourth MOS tube circuit 5, and records the reference voltage value at this time. In step S3, before the motor rotates in the reverse direction, the voltage at both ends of the sampling resistor is calibrated to provide an accurate reference voltage value for current sampling during reverse rotation.

[0044] Step S4: The motor rotates from the second end of the motor to the first end of the motor, and the motor current is calculated. Step S4 can calculate the current value of the motor when it rotates in the reverse direction in real time and accurately, ensuring that the current sampling is accurate and reliable when the motor rotates in any direction.

[0045] This reference calibration method effectively eliminates the influence of common mode voltage on sampling accuracy, thereby ensuring the accuracy of motor phase current collected in different rotation directions. This method is not only simple and easy to implement, but also greatly improves the stability and reliability of the sampling results.

[0046] Figure 4 A curve diagram showing the relationship between the common mode rejection ratio and the current frequency of the sampling circuit of the present application. Figure 4 The horizontal axis represents the current frequency, and the vertical axis represents the common mode rejection ratio of the sampling circuit. Figure 4 It can be seen that the common mode rejection ratio is greatly affected by the current frequency. Since the MOS tube needs to be frequently turned on or off quickly when the motor is controlled, the speed control of the motor of this application is realized by U12 and U13 far away from the sampling resistor side, while the commutation control of the motor can be realized by U10 and U11 close to the sampling resistor side.

[0047] During the execution of the above sampling method, when the control chip controls the first MOS tube U10 to be turned on and the second MOS tube U11 to be turned off, the motor rotates from the first end of the motor to the second end of the motor; when the control chip controls the second MOS tube U11 to be turned on and the first MOS tube U10 to be turned off, the motor rotates from the second end of the motor to the first end of the motor, thereby realizing the commutation control of the motor through U10 and U11.

[0048] When the motor rotates, the control chip can control the speed of the motor through the third MOS tube U12 and the fourth MOS tube U13. When U10 and U13 are turned on, the motor will be in a speed regulation state, and when U10 and U12 are turned on, the motor will be in a freewheeling state. This speed control strategy not only meets the speed requirements of the motor under different working conditions, but also ensures the current sampling accuracy during the speed regulation process. By keeping away from the MOS tube for speed control and close to the MOS tube for commutation control, the common mode voltage interference that may be introduced during the speed regulation process is avoided, thereby ensuring the accuracy of the sampling results. It can be seen that the sampling circuit of the present application still has an inhibitory effect on the power supply voltage interference during the speed control process.

[0049] The present application also provides a motor sampling device, which includes the sampling circuit as described above. It should be noted that the motor sampling device can be used in automobiles, and the device can accurately collect motor phase currents, and the hardware cost is low and the application range is wide. By integrating the control chip and the MOS tube circuit, accurate control and sampling of the motor are achieved, which provides strong support for the intelligence and efficiency of the motor drive system.

[0050] In summary, the motor current sampling circuit of the present application achieves the goal of collecting motor phase current using ordinary operational amplifiers and conventional 1% precision resistors, reducing hardware costs. At the same time, by calibrating the reference voltage before the motor is actuated, the influence of the common mode voltage on current collection is effectively eliminated, and the collection accuracy is improved. In addition, by precisely controlling the MOS tube through the control chip, the commutation and speed regulation functions of the motor are realized, enhancing the flexibility and practicality of the system.

[0051] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A motor current sampling circuit, characterized in that: The motor has a first motor end and a second motor end, and the sampling circuit includes: A sampling resistor, wherein the sampling resistor has a first end and a second end of the sampling resistor, wherein the first end of the sampling resistor is used to connect to the first end of the motor and to collect the motor current as a sampling voltage, A differential operational amplifier circuit, wherein the differential operational amplifier circuit is provided with an operational amplifier, wherein the inverting input terminal of the operational amplifier is connected to the first terminal of the sampling resistor, and the non-inverting input terminal of the operational amplifier is connected to the second terminal of the sampling resistor, and the differential operational amplifier circuit is used to collect and amplify the sampling voltage. MOS tube circuit, the MOS tube circuit includes a first MOS tube circuit, a second MOS tube circuit, a third MOS tube circuit and a fourth MOS tube circuit, the first MOS tube circuit and the second MOS tube circuit are connected to the second end of the sampling resistor, the third MOS tube circuit and the fourth MOS tube circuit are used to connect the second end of the motor, Before the motor rotates from the first end of the motor to the second end of the motor, the first MOS tube circuit and the third MOS tube circuit are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be a first voltage, and before the motor rotates from the second end of the motor to the first end of the motor, the second MOS tube circuit and the fourth MOS tube circuit are used to control the voltage at the first end of the sampling resistor and the voltage at the second end of the sampling resistor to be a second voltage.

2. The sampling circuit according to claim 1, characterized in that: The sampling circuit also includes a first voltage source, a second voltage source and a control chip. The MOS tube circuit includes the MOS tube and a chip interface. One end of the chip interface is connected to the gate of the MOS tube, and the other end is connected to the control chip. The MOS tube includes a first MOS tube, a second MOS tube, a third MOS tube and a fourth MOS tube, the chip interface includes a first chip interface, a second chip interface, a third chip interface and a fourth chip interface, the drain of the first MOS tube is connected to the first voltage source, the source of the second MOS tube is grounded, the source of the first MOS tube and the drain of the second MOS tube are connected to the second end of the sampling resistor, the drain of the third MOS tube is connected to the second voltage source, the source of the fourth MOS tube is grounded, and the source of the third MOS tube and the drain of the fourth MOS tube are connected to the second end of the motor, The control chip is used to perform commutation control on the motor through the first MOS tube and the second MOS tube respectively, and the control chip is used to perform speed control on the motor through the third MOS tube and the fourth MOS tube respectively.

3. The sampling circuit according to claim 2, characterized in that: The differential operational amplifier circuit is a differential operational amplifier circuit, and the differential operational amplifier circuit further includes a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a bypass capacitor, an ADC port of the control chip, and a third voltage source. The first end of the sampling resistor, the first resistor and the inverting input end of the operational amplifier are connected in sequence, the second end of the sampling resistor, the second resistor and the non-inverting input end of the operational amplifier are connected in sequence, one end of the third resistor is connected to the inverting input end, and the other end is connected to the output end of the operational amplifier, one end of the fourth resistor is connected to the output end, and the other end is connected to the ADC port, one end of the bypass capacitor is connected to the fourth resistor, and the other end is grounded, one end of the ADC port is connected to the fourth resistor, and the other end is connected to the control chip, one end of the fifth resistor is connected to the non-inverting input end, and the other end is grounded, one end of the sixth resistor is connected to the non-inverting input end, and the other end is grounded, The first resistor and the second resistor are used to limit the input current of the differential operational amplifier circuit, the third resistor is used to adjust the gain and amplification factor of the differential operational amplifier circuit, the fourth resistor is used to limit the output current of the differential operational amplifier circuit, the fifth resistor, the sixth resistor and the third voltage source are used to provide a bias voltage to the differential operational amplifier circuit, and the ADC port is used to collect the output voltage of the differential operational amplifier circuit.

4. The sampling circuit according to claim 3, characterized in that: The control chip calculates the motor current in the following way: Vout=A*U1+U2, U1=I*R, Among them, Vout is the output voltage of the differential operational amplifier circuit, A is the amplification factor of the differential operational amplifier circuit, U1 is the voltage value of the sampling voltage, R is the resistance value of the sampling resistor, I is the current value of the motor current, and U2 is the reference voltage value. When the sampling circuit is interfered by the common mode voltage, the reference voltage value is not equal to the bias voltage value.

5. A sampling method of a sampling circuit as claimed in claim 4, characterized in that: The sampling method comprises the following steps: The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be a first voltage through the first MOS tube circuit and the third MOS tube circuit, and records the reference voltage value at this time. The motor rotates from the first end of the motor to the second end of the motor, and the motor current is calculated. The control chip controls the voltage at the first terminal of the sampling resistor and the voltage at the second terminal of the sampling resistor to be a second voltage through the second MOS tube circuit and the fourth MOS tube circuit, and records the reference voltage value at this time. The motor rotates from the second end of the motor to the first end of the motor, and the motor current is calculated.

6. The sampling method according to claim 5, characterized in that: In the sampling method, when the control chip controls the first MOS tube to be turned on and the second MOS tube to be turned off, the motor rotates from the first end of the motor to the second end of the motor; When the control chip controls the second MOS tube to be turned on and the first MOS tube to be turned off, the motor rotates from the second end of the motor to the first end of the motor.

7. The sampling method according to claim 5, characterized in that: When the motor rotates, the control chip controls the speed of the motor through the third MOS tube and the fourth MOS tube.

8. A motor sampling device, characterized in that: The motor sampling device comprises the sampling circuit according to any one of claims 1 to 4.