Method for detecting current of direct-current low-voltage pump
By initializing the single-chip microcomputer and setting the cache area in the DC low-voltage pump, combined with filtering and extreme value removal methods, accurate and rapid detection of current values is achieved, solving the problem of inaccurate detection in the existing technology and improving the driving performance and efficiency of the water pump.
Patent Information
- Application Number
- CN202510832032.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-20
AI Technical Summary
In DC low-pressure pump applications, existing technologies have difficulty in accurately and quickly detecting current values, which affects the driving performance and overall performance of the water pump.
By initializing the microcontroller to set constants and buffer length, sampling the current and performing filtering, using the formula to calculate the window size, taking the average value after removing the extreme values, and combining the Hall sensor and frequency conversion board to measure the speed, accurate and fast current detection can be achieved.
It realizes accurate and rapid detection of current values under different speed conditions, improving the driving performance and overall efficiency of the water pump.
Smart Images

Figure CN120594932A_ABST
Abstract
Description
Technical field:
[0001] The present invention belongs to the technical field of water pumps, and in particular relates to a current detection method for a DC low-voltage pump. Background technology:
[0002] In DC low-pressure pump applications, the accuracy of current detection directly affects the driving performance of the pump and affects the overall performance and efficiency of the pump. Therefore, the current needs to be obtained as accurately as possible. Summary of the invention:
[0003] The object of the present invention is to provide a method for detecting current of a DC low-voltage pump, which can obtain the current value accurately and as quickly as possible.
[0004] The present invention is achieved in that:
[0005] A method for detecting current of a DC low-voltage pump comprises the following steps:
[0006] S1. Initialize the MCU, set constant A, buffer length N, and rated speed value S0;
[0007] S2, handle other processes;
[0008] S3. Sample the current, remove the oldest data from the cache, and put the latest current value into the cache;
[0009] S4, measure the current output speed S i , and according to the formula W=A+N*(1-S i / S0), calculate the window size W;
[0010] S5. Retrieve the maximum and minimum values of W latest current value data and accumulate them;
[0011] S6, subtracting the maximum value and the minimum value from the accumulated value in step S5;
[0012] S7. Obtain the current current value by taking the average, and return to step S2.
[0013] In the above-mentioned method for detecting the current of a DC low-voltage pump, in step S4, when the current output speed S i When the speed is greater than the rated speed value S0, the rated speed value S0 is assigned to the current output speed S i Perform calculations.
[0014] In the above-mentioned method for detecting the current of a DC low-voltage pump, in step S4 , when the calculated window size W is greater than the buffer length N, the buffer length N is assigned to the window size W.
[0015] In the above-mentioned DC low-voltage pump current detection method, in step S3, the current is sampled by resistor R1, filtered by resistor R2 and capacitor C1, and sent to the microcontroller, and converted by ADC (analog-to-digital converter) to form a current value.
[0016] In the above-mentioned method for detecting the current of a DC low-voltage pump, in step S3, the current filtered by the resistor R2 and the capacitor C1 is sent to the microcontroller after passing through the operational amplifier.
[0017] In the above-mentioned method for detecting the current of a DC low-voltage pump, in step S4, the current output speed S i It is read by the frequency converter board or measured by the Hall sensor connected to the DC low-voltage pump motor.
[0018] In the above-mentioned method for detecting the current of a DC low-voltage pump, in step S4, the value calculated according to the formula needs to be an integer.
[0019] In the above-mentioned DC low-voltage pump current detection method, the window size W may be rounded to an integer by rounding the calculated value, discarding the decimal places of the calculated value, or discarding the decimal places of the calculated value and adding 1 to the integer value of the calculated value.
[0020] The advantages of the present invention compared to the prior art are:
[0021] The current sampled by the present invention is stored in a cache area in order, and the current processing window size is determined according to the current output speed. When the deviation between the current output speed and the rated speed is greater, the window size is larger, the more current is involved in the calculation, and the current current value obtained by averaging is more accurate; when the deviation between the current output speed and the rated speed is smaller, the window size is smaller, the less current is involved in the calculation, and the required current current value can be obtained more quickly, that is, the response is fast, that is, the present invention can obtain the current value accurately and as quickly as possible. Description of the drawings:
[0022] Figure 1 It is a control flow chart of the present invention;
[0023] Figure 2 It is a circuit diagram of the present invention. Specific implementation method:
[0024] The present invention will be further described below with reference to specific embodiments. Figure 1 —2:
[0025] A method for detecting current of a DC low-voltage pump comprises the following steps:
[0026] S1. Initialize the MCU, set constant A, buffer length N, and rated speed value S0;
[0027] S2, handle other processes;
[0028] S3. Sample the current, remove the oldest data from the cache, and put the latest current value into the cache;
[0029] S4, measure the current output speed S i , and according to the formula W=A+N*(1-S i / S0), calculate the window size W;
[0030] S5. Retrieve the maximum and minimum values of W latest current value data and accumulate them;
[0031] S6, subtracting the maximum value and the minimum value from the accumulated value in step S5;
[0032] S7. Obtain the current current value by taking the average, and return to step S2.
[0033] When taking the average, the dividend is the accumulated value and the divisor is W-2, which is the number of data finally involved in the accumulation.
[0034] like Figure 1 As shown, the current sampled by the present invention is stored in the buffer area in order, and the current is output according to the current speed S i Determine the current processing window size W, when the current output speed S i The greater the deviation from the rated speed S0, the larger the window size W, the more currents involved in the calculation, and the more accurate the current value obtained by averaging. When the current output speed S i The smaller the deviation from the rated speed S0, the smaller the window size W, the less current involved in the calculation, and the faster the required current value can be obtained, that is, the faster the response. The present invention can accurately and as quickly as possible obtain the current value.
[0035] Numerical filtering uses the method of removing extreme values and accumulating and averaging. The calculated values are accurate and are not affected by maximum and minimum values.
[0036] The constant A represents a fixed number of values involved in the calculation. In this embodiment, the constant A is 5.
[0037] In this embodiment, the buffer length N is 20.
[0038] The hardware circuit used in the present invention is the same as that of a conventional variable frequency drive, and the single chip microcomputer is an existing single chip microcomputer. In this embodiment, the single chip microcomputer adopts ES32h0283.
[0039] Since the DC low-pressure pump itself will limit the speed to exceed the rated speed, and even if it exceeds, it will not exceed much, and the impact on the current is very small, there is no need to change the window size W. In step S4, when the current output speed Si When the speed is greater than the rated speed value S0, the rated speed value S0 is assigned to the current output speed S i Perform calculations.
[0040] Furthermore, in step S4, when the calculated window size W is greater than the buffer length N, the buffer length N is assigned to the window size W.
[0041] Current sampling method: In step S3, the current is sampled by resistor R1, filtered by resistor R2 and capacitor C1, and sent to the microcontroller, and converted by ADC (analog-to-digital converter) to form a current value. The circuit principle is as follows Figure 2 shown.
[0042] Preferably, in step S3, the current filtered by the resistor R2 and the capacitor C1 is sent to the microcontroller after passing through the operational amplifier.
[0043] Current output speed S i Measurement method: In step S4, the current output speed S i It is read by the frequency conversion board or measured by the Hall sensor connected to the DC low-voltage pump motor. In this embodiment, the current output speed S i Read through the frequency converter board.
[0044] Furthermore, in step S4, the value calculated according to the formula needs to be an integer.
[0045] The window size W may be rounded to an integer by rounding off the calculated value, discarding the decimal places of the calculated value, or discarding the decimal places of the calculated value and then adding 1 to the integer value of the calculated value. In this embodiment, the window size W is rounded to an integer by discarding the decimal places of the calculated value.
[0046] The above embodiment is only one of the preferred embodiments of the present invention and is not intended to limit the scope of implementation of the present invention. Therefore, any equivalent changes made based on the shape, structure, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting current of a DC low-voltage pump, characterized in that: The following steps are involved: S1. Initialize the MCU, set constant A, buffer length N, and rated speed value S0; S2, handle other processes; S3. Sample the current, remove the oldest data from the cache, and put the latest current value into the cache; S4, measure the current output speed S i , and according to the formula W=A+N*(1-S i / S0), calculate the window size W; S5. Retrieve the maximum and minimum values of W latest current value data and accumulate them; S6, subtracting the maximum value and the minimum value from the accumulated value in step S5; S7. Obtain the current current value by taking the average, and return to step S2.
2. A DC low-voltage pump current detection method according to claim 1, characterized in that: In step S4, when the current output speed S i When the speed is greater than the rated speed value S0, the rated speed value S0 is assigned to the current output speed S i Perform calculations.
3. The method for detecting current of a DC low-voltage pump according to claim 1, wherein: In step S4, when the calculated window size W is greater than the buffer length N, the buffer length N is assigned to the window size W.
4. A method for detecting current of a DC low-voltage pump according to claim 1, characterized in that: In step S3, the current is sampled by resistor R1, filtered by resistor R2 and capacitor C1, and sent to the microcontroller, and converted by ADC to form a current value.
5. A method for detecting current of a DC low-voltage pump according to claim 4, characterized in that: In step S3, the current filtered by the resistor R2 and the capacitor C1 is sent to the microcontroller after passing through the operational amplifier.
6. A method for detecting current of a DC low-voltage pump according to claim 1, characterized in that: In step S4, the current output speed S i It is read through the frequency conversion board or detected by the Hall sensor connected to the DC low-voltage pump motor.
7. A DC low-voltage pump current detection method according to claim 1, characterized in that: In step S4, the value calculated according to the formula needs to be an integer.
Citation Information
Patent Citations
DC switch oscillation loop parameter measuring system based on MATLAB and calculating method
CN109541450A
Method for estimating oil temperature of oil-cooled motor by using electronic oil pump
CN119469470A
Circuit and method for driving stepping motor
US20220294318A1
Method and system for detecting DC zero bias of inverter output current
WO2017139926A1