Round number detection method and detection control circuit for direct-current brush motor
By using continuous sampling and inflection point recognition, the problem of insufficient accuracy in DC brushed motor revolution count detection is solved, achieving high-precision revolution count calculation and meeting the life test requirements of automotive motors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for detecting the number of revolutions in DC brushed motors suffer from insufficient detection accuracy, irregular current ripple leading to data loss, excessive current during motor startup accelerating winding aging, and difficulty in meeting the stringent requirements of automotive motors.
The method of continuous sampling and inflection point identification is adopted. The working current of the DC brushed motor is obtained and converted into an analog voltage signal. The DC component is filtered out and the signal is raised to a unipolar signal. The controller performs high-frequency sampling to identify the waveform inflection point and calculates the number of revolutions in combination with the motor structural parameters.
It enables accurate counting of motor commutation times without complex hardware modifications, improving detection accuracy and reliability, and is suitable for life testing scenarios of DC brushed motors used in automobiles.
Smart Images

Figure CN121656833A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control technology, and in particular to a method and control circuit for detecting the number of revolutions of a DC brushed motor. Background Technology
[0002] DC brushed motors are widely used in key actuators of cars, such as windshield wipers, window lifts, and seat adjustments, due to their simple structure and convenient control. The lifespan and operating accuracy of these motors directly affect the overall driving experience and reliability of the vehicle. Therefore, accurate detection of their rotation count is crucial in scenarios such as motor lifespan testing.
[0003] Current methods for detecting motor turns mostly involve obtaining the current waveform through a sampling resistor, filtering out the DC component, and then converting it into a square wave for counting. However, the current ripple is irregular when the motor brushes commutate, which can easily lead to data loss during square wave conversion and insufficient detection accuracy. At the same time, the back electromotive force is zero when the motor starts, and the armature current reaches several to more than ten times the rated value. Excessive or frequent starts will accelerate winding aging, impact the mechanical structure, and increase the power supply burden and energy loss.
[0004] The aforementioned problems make it difficult for existing technologies to meet the stringent requirements of automotive motors for detection accuracy and operational stability, necessitating an optimized rotation count detection and control solution. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a method and control circuit for detecting the number of revolutions of a DC brushed motor.
[0006] Firstly, this application provides a method for detecting the number of revolutions of a DC brushed motor, which adopts the following technical solution: A method for detecting the number of revolutions of a DC brushed motor includes the following steps: S1. Obtain the operating current of the DC brushed motor and convert it into an analog voltage signal that reflects the current ripple. S2. Adjust the analog voltage signal to output a unipolar analog voltage signal that matches the sampling requirements of the controller; S3. The controller continuously samples the unipolar analog voltage signal to obtain a sampling data sequence that changes over time. S4. Based on the size relationship between adjacent sampling points in the sampling data sequence, identify the rising and falling trends and inflection points of the waveform, and count the number of peaks and / or troughs that characterize the motor commutation. S5. Calculate the number of motor rotations based on the structural parameters of the DC brushed motor and the number of peaks and / or troughs during motor commutation.
[0007] By adopting the above technical solution, the traditional "waveform to square wave counting" method, which is prone to data loss, is abandoned. By continuously sampling and identifying inflection points, the current ripple characteristics are captured, and the number of commutations can be accurately counted even if the waveform is irregular. Combined with the motor structure parameters, the number of revolutions is calculated, which is suitable for the life test scenario of DC brushed motors used in automobiles. This solves the pain point of inaccurate data in traditional methods, and at the same time, no complex hardware modification is required, which significantly improves the detection accuracy and reliability.
[0008] Optionally, step S4 includes: S41. Compare the value of the current sampling point with the value of the previous sampling point. If the value of the current sampling point is greater than the value of the previous sampling point, the waveform is determined to be in the rising phase. If the value of the current sampling point is less than the value of the previous sampling point, and the waveform was in the rising phase at the previous moment, a peak inflection point is identified. If the value of the current sampling point is less than the value of the previous sampling point, the waveform is determined to be in the falling phase. If the value of the current sampling point is greater than the value of the previous sampling point, and the waveform was in the falling phase at the previous moment, a trough inflection point is identified. S42. The number of peaks or troughs identified is used as the number of reversals.
[0009] By adopting the above technical solution, the inflection point identification logic is clarified, and the switching of rising and falling trends is captured by comparing adjacent sampling points. Peaks and troughs are accurately identified, avoiding the loss of counts due to irregular waveforms, and further improving the accuracy of the commutation count.
[0010] Optionally, the formula for calculating the number of motor rotations in step S5 is: N=C / K, where N is the number of motor rotations, C is the sum of the number of peaks and / or troughs identified within the statistical time period, and K is the theoretical number of commutation cycles corresponding to one rotation of the motor. The theoretical number of commutation cycles K is preset based on the number of rotor slots or commutator segments of the motor.
[0011] By adopting the above technical solution, a quantitative formula for calculating the number of revolutions is established. Based on the inherent structural parameters of the motor, the theoretical commutation number K is set. The calculation logic is simple and intuitive, and the actual number of revolutions of the motor can be quickly calculated, which is suitable for the detection needs of DC brushed motors with different slot pole numbers.
[0012] Optionally, in step S3, the sampling frequency of the controller is at least N times the motor current ripple frequency, where N is greater than or equal to 4.
[0013] By adopting the above technical solution, the high sampling frequency ensures complete capture of high-frequency current ripple, avoids the omission of inflection points due to untimely sampling, and ensures that the sampled data sequence can truly reflect waveform changes, providing data support for accurate identification of inflection points and statistical counting of commutation times.
[0014] Optionally, step S2 includes: S21. Filter out the DC component in the analog voltage signal and retain the AC ripple signal that reflects the commutation characteristics of the motor. S22. Boost the AC ripple signal by superimposing a DC bias voltage, converting it into a unipolar analog voltage signal within the sampling range of the controller.
[0015] By adopting the above technical solution, the DC component is first filtered out to focus on the commutation characteristic ripple, and then the problem of positive and negative fluctuations of AC signal exceeding the sampling range is solved by voltage boosting, ensuring that the controller can effectively collect all ripple information, laying the foundation for subsequent processing.
[0016] Optionally, in step S22, the zero potential of the AC ripple signal is raised to 1 / 2 of the controller reference voltage or a preset positive voltage value by a bias circuit, so that the entire ripple waveform is located between 0V and the controller power supply voltage.
[0017] By adopting the above technical solution, the voltage rise amplitude can be precisely controlled, ensuring that the ripple waveform is completely within the controller's sampling range, avoiding signal clipping distortion, ensuring the integrity and accuracy of the sampled data, and adapting to controller usage scenarios with different power supply voltages.
[0018] Secondly, the DC brushed motor revolution detection and control circuit provided in this application adopts the following technical solution: A DC brushed motor revolution detection and control circuit includes: The current sampling module, connected in series between the DC brushed motor and the power supply, is used to convert the operating current of the DC brushed motor into an analog voltage signal that reflects the current ripple. The signal adjustment module, whose input terminal is connected to the output terminal of the current sampling module, is used to process the analog voltage signal and output a unipolar analog voltage signal; The controller includes an analog-to-digital conversion signal input pin, which is connected to the output of the signal conditioning module to receive a unipolar analog voltage signal; The signal adjustment module includes an AC coupling unit and a unipolar processing unit connected in sequence. The AC coupling unit is used to filter out the DC component in the analog voltage signal. The unipolar processing unit is used to level-bias the analog voltage signal to convert it into a unipolar analog voltage signal. The controller is configured to sample the unipolar analog voltage signal at a preset frequency to obtain a sampling data sequence that changes over time. Based on the size relationship between adjacent sampling points in the sampling data sequence, the controller identifies the rising and falling trends and inflection points of the waveform, counts the number of peaks and / or troughs that characterize the motor commutation, and calculates the number of motor rotations based on the structural parameters of the DC brushed motor.
[0019] By adopting the above technical solution, the current sampling module accurately captures the current ripple, the signal adjustment module processes the signal in a targeted manner to adapt to the sampling, and the controller realizes inflection point identification and revolution calculation through software algorithm. The overall circuit structure is simple and does not require complex waveform conversion hardware, which solves the problem of inaccurate counting caused by irregular waveforms in traditional circuits. It is suitable for scenarios such as life testing of DC brushed motors for automobiles, with high detection accuracy and strong stability.
[0020] Optionally, the controller's logic for counting the number of peaks and / or troughs representing motor commutation is as follows: compare the current sampling point value with the previous sampling point value; if the current sampling point value is greater than the previous sampling point value, determine that the waveform is in an upward phase; if the current sampling point value is less than the previous sampling point value, and the waveform was in an upward phase at the previous moment, then determine that a peak inflection point has been identified; if the current sampling point value is less than the previous sampling point value, determine that the waveform is in a downward phase; if the current sampling point value is greater than the previous sampling point value, and the waveform was in a downward phase at the previous moment, then determine that a trough inflection point has been identified; the controller is configured to count the number of peaks and / or troughs as the number of commutations.
[0021] By adopting the above technical solution, the controller has a clear inflection point recognition logic built in. It captures waveform changes by comparing sampled data in real time, accurately counts the number of peaks and troughs related to commutation, provides an accurate basis for the calculation of the number of revolutions, and avoids the loss or miscounting of counts.
[0022] Optionally, the unipolar processing unit includes a PNP transistor and a bias resistor. The base of the PNP transistor is connected to the output terminal of the AC coupling unit, the collector is grounded, and the emitter is connected to the power supply through the bias resistor. The connection node between the emitter and the bias resistor is connected to the analog-to-digital conversion signal input pin of the controller, which is used to output a unipolar analog voltage signal that is compatible with the sampling range of the controller.
[0023] By adopting the above technical solution, a simple voltage boosting circuit can be constructed using a PNP transistor and a bias resistor. This eliminates the need for complex chips and enables the conversion of AC signals to unipolar signals, reducing circuit cost and complexity while ensuring the stability and reliability of the signal boosting.
[0024] Optionally, a start-up protection unit may also be included, which includes a start-up capacitor connected in parallel across the DC brushed motor. The start-up capacitor is configured to smooth the start-up current in order to reduce interference with current ripple sampling during the start-up phase.
[0025] By adopting the above technical solution, the starting capacitor utilizes its capacitive reactance and energy storage characteristics to absorb the surge current at the moment of starting, which can reduce the starting current by 30%-50%, reduce the impact on the power supply and motor windings, delay the aging of insulation materials, suppress high-order harmonics, improve armature response, ensure smooth motor starting and long-term stable circuit operation. More importantly, the smoothed starting current can avoid the interference of surge signal on current ripple sampling, reduce sampling noise and distortion, and provide accurate raw data support for subsequent waveform recognition and revolution calculation.
[0026] In summary, this application includes at least one of the following beneficial technical effects: 1. By adopting the above technical solution, the traditional "waveform to square wave counting" method, which is prone to losing data, is abandoned. The current ripple characteristics are captured through continuous sampling and inflection point identification, and the number of commutations can be accurately counted even if the waveform is irregular. The number of revolutions is calculated by combining the motor structure parameters, which is suitable for the life test scenario of DC brushed motors for automobiles. This solves the pain point of inaccurate data in traditional methods, and at the same time, no complex hardware modification is required, which significantly improves the detection accuracy and reliability. 2. By adopting the above technical solution, the inflection point identification logic is clarified, and the switching of rising and falling trends is captured by comparing adjacent sampling points. Peaks and troughs are accurately identified, avoiding the loss of counts due to irregular waveforms, and further improving the accuracy of the commutation count. 3. A quantitative formula for calculating the number of revolutions is established. Based on the inherent structural parameters of the motor, the theoretical commutation number K is set. The calculation logic is simple and intuitive, and the actual number of revolutions of the motor can be quickly calculated, which is suitable for the testing needs of DC brushed motors with different slot pole numbers. Attached Figure Description
[0027] Figure 1 This is a system structure diagram of a DC brushed motor revolution detection and control circuit based on related technologies; Figure 2 It is a waveform diagram of the current ripple of a DC brushed motor detected by relevant technologies; Figure 3 This is a system structure diagram of the DC brushed motor revolution detection and control circuit provided in the embodiments of this application; Figure 4 This is a flowchart of the DC brushed motor revolution detection method provided in the embodiments of this application; Figure 5 This is a schematic diagram of the waveform characteristics of the DC brushed motor current ripple provided in the embodiments of this application; Figure 6 This is a flowchart of the logic for obtaining the timing time of a DC brushed motor provided in an embodiment of this application; Figure 7 This is a flowchart of the DC brushed motor revolution counting algorithm provided in an embodiment of this application; Figure 8 and Figure 9 This is a circuit diagram of the DC brushed motor revolution detection and control circuit provided in the embodiments of this application regarding the power supply module; Figure 10 This is a circuit diagram of the DC brushed motor revolution detection and control circuit provided in this application embodiment regarding the current sampling module and the motor power supply switch unit; Figure 11 This is a circuit diagram of the signal adjustment module of the DC brushed motor revolution detection and control circuit provided in the embodiments of this application.
[0028] Explanation of reference numerals in the attached figures: 1. Power supply module; 2. Current sampling module; 3. Signal adjustment module; 4. Controller; 5. Motor power supply switch unit; 6. DC motor drive unit. Detailed Implementation
[0029] The following is in conjunction with the appendix Figure 1-11 This application will be described in further detail.
[0030] In scenarios such as life testing of DC brushed motors (sometimes simply called motors) used in automobiles, accurate detection of the number of rotations of the motor is a key step in assessing the reliability of the motor. Figure 1 This is a system structure diagram of a DC brushed motor revolution detection and control circuit in related technologies. It mainly provides a stable voltage to the circuit through a power processing module, controls the DC motor drive module to work through an MCU chip, and obtains the motor current waveform through current sampling, amplification, and filtering. After square wave conversion, the MCU reads the waveform to realize the revolution count.
[0031] However, the existing solutions have obvious flaws, such as Figure 2 The figure shows the current ripple waveform of a DC brushed motor detected in related technologies. Different channels in the figure correspond to the current ripple waveform of the motor. The three curves at the bottom of the figure correspond to current ripples with different amplification factors from bottom to top. It can be clearly observed in the area marked by the box that the peak value of the current ripple is inconsistent and the waveform fluctuation is irregular when the motor brushes commutate. Some of the rising edge peaks that should correspond to the high level of the square wave are actually lower than the starting point of the adjacent rising edge. This causes the subsequent square wave conversion stage to mistakenly identify these high level areas as low level (the two curves at the top of the figure represent high level and low level signals from top to bottom). As a result, the number of revolutions is lost, and the detection accuracy is difficult to meet the requirements of automobile motor life test.
[0032] To address the issue of inaccurate testing, this application discloses a method for detecting the number of revolutions of a DC brushed motor. This method improves the accuracy of data acquisition by optimizing the signal processing logic and circuit structure to achieve a synergistic adaptation. Figure 3To meet the requirements of accurate rotation count detection, this application optimizes the circuit structure. Based on the existing circuit, the traditional square wave conversion module is eliminated, and instead, signal processing is achieved through an added AD conversion module and low-pass filter module in conjunction with an MCU chip. Power processing, current sampling, and multi-stage amplification modules are also included, allowing for more flexible continuous sampling and analysis of the current signal; see reference. Figure 4 The method for detecting the number of revolutions of a DC brushed motor provided in this application specifically includes the following steps: S1, acquiring the operating current of the DC brushed motor and converting it into an analog voltage signal reflecting the current ripple; S2, adjusting the analog voltage signal to output a unipolar analog voltage signal adapted to the sampling requirements of the controller 4; S3, continuously sampling the unipolar analog voltage signal through the controller 4 to obtain a sampling data sequence that changes over time; S4, identifying the rising and falling trends and inflection points of the waveform based on the size relationship between adjacent sampling points in the sampling data sequence, and statistically analyzing the number of peaks and / or troughs representing the commutation of the motor; S5, calculating the number of revolutions of the motor based on the structural parameters of the DC brushed motor and the number of peaks and / or troughs representing the commutation of the motor.
[0033] Understandably, by adopting the above technical solution to replace the traditional "waveform to square wave counting" method which is prone to data loss, the current ripple characteristics are captured through continuous sampling and inflection point identification, and the number of commutations can be accurately counted even if the waveform is irregular. Combined with the motor structure parameters to calculate the number of revolutions, it is suitable for the life test scenario of DC brushed motors for automobiles, solving the problem of inaccurate data in traditional methods. At the same time, no complex hardware modification is required, and the detection accuracy and reliability are significantly improved.
[0034] The specific execution steps and processing procedures of the lap count detection method in this embodiment are as follows: Reference Figure 5 The figure shows the ripple waveform with time t on the horizontal axis and voltage V on the vertical axis. First, step S1 is executed: the operating current of the DC brushed motor is obtained through the current sampling module 2 and converted into an analog voltage signal that reflects the current ripple (the basic signal of the initially acquired ripple waveform is not shown in the figure). Step S2: Adjust the analog voltage signal to output a unipolar analog voltage signal (corresponding to the waveform in the attached figure) that meets the sampling requirements of controller 4. Specifically, this includes step S21: Processing the initially acquired ripple, filtering out the DC component in the analog voltage signal, and retaining the AC ripple signal reflecting the commutation characteristics of the motor (i.e., the undulating waveform shown in the attached figure, the undulating part of which is the AC ripple generated by the motor commutation); S22: Boosting the AC ripple signal by superimposing a DC bias voltage, converting it into a unipolar analog voltage signal within the sampling range of controller 4, specifically corresponding to the waveform in the attached figure. The "zero potential rise" is achieved by using a bias circuit to raise the zero potential (the central axis of the sine wave) of the AC ripple signal to half the reference voltage of controller 4 (as shown by the 0.5V horizontal baseline in the attached diagram). This ensures that the entire ripple waveform (the fluctuation range from 0V to 1.0V in the attached diagram) is located between 0V and the supply voltage of controller 4 (for example, controller 4 is 0-2V). This precise control of the voltage rise ensures that the ripple waveform is completely within the sampling range of controller 4, avoiding signal clipping distortion and guaranteeing the integrity and accuracy of the sampled data. It also adapts to different supply voltage scenarios of controller 4.
[0035] Understandably, the DC component is first filtered out to focus on the commutation characteristic ripple, and then the problem of positive and negative fluctuations of the AC signal exceeding the sampling range is solved by voltage boosting (corresponding to the waveform in the attached figure being limited to the unipolar range above 0V), ensuring that the controller 4 can effectively collect all ripple information, laying the foundation for subsequent processing.
[0036] In step S3, the sampling frequency of controller 4 is preferably at least 4 times the motor current ripple frequency, and preferably 6 times the motor current ripple frequency. This corresponds to the dense acquisition of continuous sampling points from t1 to t6 in the attached figure. The high sampling frequency can ensure the complete capture of the motor current ripple, avoid the omission of inflection points due to untimely sampling, and ensure that the sampling data sequence can truly reflect the fluctuations of the waveform in the attached figure, providing data support for accurate identification of inflection points and statistical counting of commutation times.
[0037] The inflection point identification process in step S4 corresponds to the waveform fluctuations in the attached figure. Specifically, S41, the value of the current sampling point is compared with the value of the previous sampling point. If the value of the current sampling point is greater than the value of the previous sampling point, it is determined to be an upward phase (as shown in the t2 to t3 segment in the attached figure). If the value of the current sampling point is less than the value of the previous sampling point, and the previous moment was in an upward phase, then one peak inflection point is identified (as shown in the t4 to t5 segment in the attached figure). If the value of the current sampling point is less than the value of the previous sampling point, it is determined to be a downward phase (as shown in the t4 to t5 segment or t5 to t6 segment in the attached figure). If the value of the current sampling point is greater than the value of the previous sampling point, and the previous moment was in a downward phase, then one trough inflection point is identified (not shown in the figure). S42, the number of identified peaks or troughs is counted as the number of commutation times (each peak / trough in the attached figure corresponds to one motor commutation).
[0038] Understandably, by clearly defining the inflection point identification logic and capturing the rising and falling trend of the waveform in the attached figure through comparison of adjacent sampling points, the peaks and troughs can be accurately identified, avoiding the loss of counts due to waveform irregularities and further improving the accuracy of the commutation count.
[0039] In step S5, based on the commutation count statistics, the formula for calculating the number of motor rotations is: N=C / K, where N is the number of motor rotations, C is the total number of peaks and troughs identified within the statistical time period, and K is the theoretical number of commutations corresponding to one rotation of the motor, which is preset based on the number of motor rotor slots or commutator segments.
[0040] Specifically, the calculation logic is as follows: Each time the rotor passes through a slot, the contact position between the winding and the brush changes once (i.e., one commutation), corresponding to a peak or trough representing the commutation. First, step S4 calculates the sum of all peaks and troughs representing commutation within the time period (i.e., the total number of commutations, corresponding to the C value). Then, the C value is divided by the fixed number of commutations per revolution of the motor (i.e., the preset K value) to obtain the actual number of revolutions of the motor (i.e., the N value). Taking a DC brushed motor for automobiles as an example, first determine the inherent structural parameters of the motor. If the number of rotor slots corresponds to K=12 (i.e., the motor generates 12 commutations per revolution, therefore K is preset to 12), in actual testing, for example, step S4 calculates the total number of peaks and troughs within the statistical time period as C=24 (i.e., the software identifies 24 peaks and troughs of the current ripple within this time period). Substituting the parameters into the formula N=24 / 12=2, the final result is the number of revolutions of the motor within this time period, N=2 revolutions.
[0041] Understandably, by adopting the above technical solution, a quantitative formula for calculating the number of revolutions is established. Based on the inherent structural parameters of the motor, the theoretical commutation number K is set. The calculation logic is simple and intuitive, and the actual number of revolutions of the motor can be quickly calculated, which is suitable for the detection needs of DC brushed motors with different slot pole numbers.
[0042] It should be noted that in another embodiment, only the peaks or troughs can be counted. In this case, the number of peaks (or troughs) obtained by counting is directly multiplied by 2 to obtain the total number of reversals C (e.g., if 12 peaks are counted, then C=12×2=24). This method can simplify the software's waveform recognition logic, reduce the amount of data processing, and avoid the error of repeated counting of peaks and troughs, thereby improving detection efficiency and stability.
[0043] It should be noted that the inherent structural parameters of a motor are not limited to the number of rotor slots. They can also include the number of commutator segments, the number of commutating pole pairs in the armature winding, and the number of stator pole and rotor coil pairings. Among these, the number of commutator segments refers to the number of contact copper plates when the motor brushes commutate, and it usually corresponds to the number of rotor slots. The number of commutating pole pairs in the armature winding is directly related to the number of ripples per revolution in some multi-pole brushed DC motors. The number of stator pole and rotor coil pairings will form a fixed number of current fluctuations per revolution depending on the pairing of poles / coil groups. These parameters can all be used as the basis for setting the theoretical commutation number K to further adapt to different structural types of brushed DC motors.
[0044] It should be noted that, to ensure the integrity and accuracy of ripple signal acquisition within the statistical time period and to prevent missed or redundant sampling due to unreasonable timing, this application also optimizes the sampling sequence by dynamically adjusting the timing. The specific logic is as follows: (Refer to...) Figure 6 In one embodiment, a timing logic for a DC brushed motor is disclosed. First, the motor is started based on a preset timing count value, and then a timing process begins. The system continuously checks if the timer has expired; if not, the timing continues. If the time has expired, an AD conversion is performed to acquire the signal, and it is determined whether the current sampled signal has flipped (i.e., whether there is an alternation between peaks and troughs). If it has not flipped, the sample count is incremented by 1, and the system returns to the timing loop. If it has flipped, the sample count is further determined: if the sample count > 4, it indicates that the current timing time is too long, resulting in redundant sampling, and the timing count value needs to be increased to extend the sampling interval; if the sample count < 3, it indicates that the current timing time is too short, potentially leading to missed sampling, and the timing count value needs to be decreased to shorten the sampling interval; preferably, if the sample count is between 3 and 4, it indicates that the sampling interval matches the ripple period, and the current timing count value is saved, completing a dynamic adjustment of the timing time.
[0045] Understandably, the above timing acquisition logic achieves adaptive optimization of the sampling timing through a closed-loop control process of "timing start-signal sampling-flip judgment-count value dynamic adjustment". This ensures that the sampling interval is always accurately matched with the period of the motor current ripple, thereby guaranteeing complete, non-redundant and non-missing effective sampling of the motor current ripple signal, providing reliable support for the accuracy of subsequent peak and valley identification and revolution calculation.
[0046] It should be noted that the timing acquisition logic in the above embodiments is used to optimize the sampling interval (i.e., by dynamically adjusting the timing count value, the sampling frequency is adapted to the ripple period to avoid missed or redundant sampling). To provide a complete revolution count detection and control scheme, this application also discloses an algorithm logic flowchart for achieving coordinated control of revolution count statistics and motor action based on the optimized sampling signal. To ensure the coordination between revolution count statistics and motor action control, refer to... Figure 7 In one embodiment, a logic flowchart of a DC brushed motor revolution counting algorithm is also disclosed, the process of which is as follows: First, enter a loop and continuously judge whether the timer time has been reached (the timer time has been optimized by logic to ensure that the sampling interval is adapted to the ripple period); if it has not been reached, wait; if the time has been reached, perform AD conversion to collect the signal and judge whether the signal has flipped (i.e., the alternation of peaks and troughs, corresponding to the peak and trough identification in the above embodiment): if it has not flipped, return to the timer judgment stage to continue the loop; if it has flipped, increment the flip count by 1 (the flip count is the real-time statistical value of the sum of the number of peaks and troughs C), and judge whether the flip count has reached the preset number of tooth slots (corresponding to the theoretical commutation number K, i.e. the number of ripples per revolution of the motor): if it has not reached, return to the timer judgment stage; if it has reached, it means that the motor has rotated 1 revolution, increment the revolution count by 1, and clear the flip count (re-count the number of ripples for the next revolution). Then, it is determined whether the number of revolutions is ≥3 (this threshold can be adjusted according to actual test requirements): if it is not reached, return to the timer judgment stage to continue counting; if it is reached, control the motor to stop for 1.5 seconds (to meet the scenario requirements in life test), then clear the number of revolutions to zero, perform the reversing start operation (to realize the motor forward and reverse rotation cycle test), and then enter the next cycle.
[0047] This logic, through a closed-loop process of "timed sampling - flip counting - tooth cogging number matching - revolution accumulation", combined with stop and reversal control triggered by the revolution threshold, not only achieves accurate statistics of motor revolutions, but also achieves automated closed-loop control of motor cycle testing.
[0048] Reference Figure 3 This application also discloses a DC brushed motor revolution detection and control circuit, including a power supply module 1, a current sampling module 2, a signal adjustment module 3, a controller 4, a motor power supply switch unit 5, and a DC motor drive unit 6. These modules work together to achieve functions such as power supply assurance, signal acquisition, signal processing, logic control, and motor drive. Their specific structure and functions are as follows: The power module 1 specifically includes a power processing unit, an input voltage sampling unit, a +5V voltage signal generation unit, and a -5V voltage signal generation unit. The +5V voltage signal generation unit is used to provide the working power supply voltage for the controller 4 (such as an MCU chip), the -5V voltage signal generation unit is used to coordinate with the voltage bias adjustment of the signal processing stage, the input voltage sampling unit is used to monitor the voltage status of the power input in real time, and the power processing unit performs voltage regulation and filtering on the external power input to provide stable power support for the entire circuit. The controller 4 controls the DC motor drive unit 6 to drive the motor through the motor power supply switch unit 5. The DC motor drive unit 6 is used to receive the command signal from the controller 4 and output the drive current adapted to the operation of the motor. The current sampling module 2, connected in series between the DC brushed motor and the power supply, is used to convert the operating current of the DC brushed motor into an analog voltage signal reflecting the current ripple. The signal adjustment module 3, with its input terminal connected to the output terminal of the current sampling module 2, is used to process the analog voltage signal to output a unipolar analog voltage signal that is compatible with the sampling of the controller 4. The controller 4 (e.g., an MCU chip, DSP chip, ASIC patented chip, etc., which have data acquisition, signal processing, logic operation, and instruction execution functions) includes an AD conversion unit with an analog-to-digital conversion signal input pin, which is connected to the output terminal of the signal adjustment module 3 to receive the unipolar analog voltage signal. The signal adjustment module 3 specifically includes a first-stage amplification unit, an AC coupling unit (direct component removal unit), a unipolar processing unit (voltage adjustment to positive unit), a high-frequency filtering unit, a second-stage amplification unit, and a low-pass filtering unit connected in series. The unipolar processing unit is used to convert the AC signal (analog voltage signal) into a unipolar analog voltage signal. The other units cooperate with each other to filter out the DC component and noise signal in the analog voltage signal to obtain a unipolar analog voltage signal that meets the sampling requirements of the controller 4. The controller 4 is configured to sample the unipolar analog voltage signal at a preset frequency to obtain a sampling data sequence that changes over time. Based on the size relationship between adjacent sampling points in the sampling data sequence, the controller identifies the rising and falling trend and inflection points of the waveform, counts the number of peaks and / or troughs that characterize the motor commutation, and calculates the number of motor rotations based on the structural parameters of the DC brushed motor.
[0049] Understandably, the current sampling module 2 accurately captures the current ripple, the signal adjustment module 3 processes the signal specifically to adapt to the sampling, and the controller 4 realizes inflection point recognition and revolution calculation through software algorithms. The overall circuit structure is simple and does not require complex waveform conversion hardware, solving the problem of inaccurate counting caused by irregular waveforms in traditional circuits. It is suitable for scenarios such as life testing of DC brushed motors used in automobiles, with high detection accuracy and strong stability.
[0050] like Figure 8 As shown, in one embodiment, the power processing unit includes a resistor R1, a capacitor C1, and a diode D1. An external power supply is connected through interface P1. Diode D1 is connected in series in the circuit to provide reverse connection protection. Resistor R1 and capacitor C1 are connected in parallel between the input line and ground to decouple the input voltage, reducing voltage fluctuation interference under switching power supply and plugging / unplugging conditions, and providing stable input power for subsequent circuits. The +5V voltage signal generation unit includes an LDO chip U1, capacitors C8, C3, C4, and C5, and resistors R2 and R12. The external input voltage is initially filtered by C8, then divided by R2 and R12, and further decoupled by C3 before being input to the Vin terminal of the LDO chip U1. The Vout terminal of U1 outputs a stable +5V voltage, which, together with C4 and C5, achieves decoupling and bypass filtering at the output terminal, providing a stable +5V power supply for subsequent circuits.
[0051] like Figure 9 As shown, in one embodiment, the -5V voltage signal generation unit includes U5, capacitors C20, C18, C19, and C15. The +5V voltage is connected to the IN terminal and CFLY+ and CFLY- terminals of U5 via C20 and C18, serving as the input power supply for the charge pump and the energy storage element of the capacitor. The OUT terminal of U5 outputs a -5V voltage, which, together with C19 and C15, achieves decoupling and bypass filtering at the output terminal, providing a stable -5V power supply for subsequent circuits and ensuring the dual power supply operation requirements of the operational amplifier circuit.
[0052] like Figure 10 As shown, in one embodiment, the current sampling module 2 includes a resistor R20 and a capacitor C21. R20 is connected in series in the motor power supply circuit to collect the current signal when the motor is working (the corresponding signal is transmitted to the controller 4 through the ADC12 interface). C21 is connected in parallel across R20 to filter and denoise the sampled signal. The motor power supply switching unit 5 includes a switching transistor Q3 and a switching transistor Q4. The controller 4 controls the on / off state of Q3 through the PWOFF signal, and Q3 drives the switching state of Q4, thereby controlling the on / off state of the motor power supply circuit. At the same time, resistors R19, R21, and R23 are bias resistors for the switching transistors, and together with capacitors C17 and C2, they realize voltage filtering and stabilization during the switching process to ensure the reliability of power supply control.
[0053] like Figure 11As shown, in one embodiment, the signal adjustment module 3 includes a first-stage amplification unit, an AC coupling unit, a unipolar processing unit (voltage adjustment to positive unit), a second-stage amplification unit, and a low-pass filter unit. The first-stage amplification unit, composed of operational amplifier U4A and resistors R6, R8, and R10, initially amplifies the input current ripple signal. TP2 is the signal test point after amplification by this unit. Subsequently, the signal enters the AC coupling unit (which removes the DC component), composed of capacitor C6, filtering out the DC component and retaining only the AC ripple reflecting the motor's commutation characteristics. Then, the unipolar... The processing unit (composed of PNP transistor Q1 and bias resistor R13) boosts the DC-blocked AC signal, converting it into a unipolar signal suitable for sampling by controller 4. The signal is then amplified a second time by a two-stage amplification unit consisting of operational amplifier U4B and resistors R27 and R24 to further match the sampling range of controller 4. Finally, a low-pass filter unit consisting of resistor R5 and capacitor C7 filters out residual high-frequency noise, and finally outputs a stable unipolar analog voltage signal through TP6, providing a reliable signal source for subsequent sampling and processing by controller 4.
[0054] In one embodiment, the DC brushed motor revolution detection control circuit further includes a start-up protection unit. The start-up protection unit includes a start-up capacitor (not shown in the figure) connected in parallel across the DC brushed motor. The start-up capacitor is configured to smooth the start-up current to reduce interference with current ripple sampling during the start-up phase. This can reduce the start-up current by 30%–50%, reducing the impact on the power supply and motor windings, delaying the aging of insulation materials, suppressing high-order harmonics, improving armature response, ensuring smooth motor start-up and long-term stable circuit operation. More importantly, the smoothed start-up current can avoid the interference of surge signals on current ripple sampling, reducing sampling noise and distortion, and providing accurate raw data support for subsequent waveform recognition and revolution calculation.
[0055] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for detecting the number of revolutions of a DC brushed motor, characterized in that, Includes the following steps: S1. Obtain the operating current of the DC brushed motor and convert it into an analog voltage signal that reflects the current ripple; S2. Adjust the analog voltage signal and output a unipolar analog voltage signal that adapts to the sampling requirements of the controller (4); S3. The controller (4) continuously samples the unipolar analog voltage signal to obtain a sampling data sequence that changes over time; S4. Based on the size relationship between adjacent sampling points in the sampling data sequence, identify the rising and falling trend and inflection points of the waveform, and count the number of peaks and / or troughs that characterize the motor commutation. S5. Calculate the number of motor rotations based on the structural parameters of the DC brushed motor and the number of peaks and / or troughs that characterize the motor commutation.
2. The method for detecting the number of revolutions of a DC brushed motor according to claim 1, characterized in that, Step S4 includes: S41. Compare the value of the current sampling point with the value of the previous sampling point. If the value of the current sampling point is greater than the value of the previous sampling point, the waveform is determined to be in the rising phase. If the value of the current sampling point is less than the value of the previous sampling point, and the previous moment was in the rising phase, a peak inflection point is identified. If the value of the current sampling point is less than the value of the previous sampling point, the waveform is determined to be in the falling phase. If the value of the current sampling point is greater than the value of the previous sampling point, and the previous moment was in the falling phase, a trough inflection point is identified. S42. The number of peaks and / or troughs identified are counted as the number of reversals.
3. The method for detecting the number of revolutions of a DC brushed motor according to claim 1, characterized in that, The formula for calculating the number of motor rotations in step S5 is: N=C / K, where N is the number of motor rotations, C is the sum of the number of peaks and troughs identified within the statistical time period, and K is the theoretical number of commutation cycles corresponding to one rotation of the motor. The theoretical number of commutation cycles K is preset based on the number of rotor slots or commutator segments of the motor.
4. The method for detecting the number of revolutions of a DC brushed motor according to claim 1, characterized in that, In step S3, the sampling frequency of the controller (4) is at least N times the motor current ripple frequency, where N is greater than or equal to 4.
5. The method for detecting the number of revolutions of a DC brushed motor according to claim 1, characterized in that, Step S2 includes: S21. Filter out the DC component in the analog voltage signal and retain the AC ripple signal that reflects the commutation characteristics of the motor; S22. The AC ripple signal is voltage boosted to convert it into a unipolar analog voltage signal within the sampling range of the controller (4).
6. The method for detecting the number of revolutions of a DC brushed motor according to claim 5, characterized in that, In step S22, the zero potential of the AC ripple signal is raised to 1 / 2 of the reference voltage of the controller (4) or a preset positive voltage value by the bias circuit, so that the AC ripple waveform is located between 0V and the power supply voltage of the controller (4).
7. A DC brushed motor revolution detection and control circuit, characterized in that, include: A current sampling module (2) is connected in series between the DC brushed motor and the power supply to convert the operating current of the DC brushed motor into an analog voltage signal that reflects the current ripple. The signal adjustment module (3) has its input end connected to the output end of the current sampling module (2) and is used to process the analog voltage signal and output a unipolar analog voltage signal. The controller (4) includes an analog-to-digital conversion signal input pin, which is connected to the output of the signal adjustment module (3) and receives the unipolar analog voltage signal; The signal adjustment module (3) includes an AC coupling unit and a unipolar processing unit connected in sequence; the AC coupling unit is used to filter out the DC component in the analog voltage signal; the unipolar processing unit is used to level bias the analog voltage signal to convert it into the unipolar analog voltage signal; the controller (4) is configured to sample the unipolar analog voltage signal at a preset frequency to obtain a sampling data sequence that changes over time, identify the rising and falling trend and inflection point of the waveform according to the size relationship of adjacent sampling points in the sampling data sequence, count the number of peaks and / or valleys that characterize the commutation of the motor, and calculate the number of rotations of the motor based on the structural parameters of the DC brushed motor.
8. The DC brushed motor revolution detection and control circuit according to claim 7, characterized in that, The logic of the controller (4) to count the number of peaks and / or troughs representing the commutation of the motor is as follows: compare the current sampling point value with the previous sampling point value. If the current sampling point value is greater than the previous sampling point value, the waveform is determined to be in the rising phase. If the current sampling point value is less than the previous sampling point value and the waveform was in the rising phase at the previous moment, a peak inflection point is identified. If the current sampling point value is less than the previous sampling point value, the waveform is determined to be in the falling phase. If the current sampling point value is greater than the previous sampling point value and the waveform was in the falling phase at the previous moment, a trough inflection point is identified. The controller (4) is configured to count the number of peaks and / or troughs as the number of commutation times.
9. The DC brushed motor revolution detection and control circuit according to claim 7, characterized in that, The unipolar processing unit includes a PNP transistor and a bias resistor. The base of the PNP transistor is connected to the output terminal of the AC coupling unit, the collector is grounded, and the emitter is connected to the power supply through the bias resistor. The connection node between the emitter and the bias resistor is connected to the analog-to-digital conversion signal input pin of the controller (4) to output the unipolar analog voltage signal adapted to the sampling range of the controller (4).
10. The DC brushed motor revolution detection and control circuit according to claim 7, characterized in that, It also includes a startup protection unit, which includes a startup capacitor connected in parallel across the DC brushed motor. The startup capacitor is configured to smooth the startup current to reduce interference with current ripple sampling during the startup phase.