A step motor non-inductive locked-rotor detection method and device for opening and closing of a garbage can cover

CN122652285APending Publication Date: 2026-08-28TAIZHOU ZUOTING PLASTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611043597.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

传统方案多依赖霍尔传感器、光电编码器或复杂的电流相位检测电路,不仅硬件成本高、结构复杂,且对微控制器的运算能力要求较高

Benefits of technology

[0024] When addressing anti-pinch and limit issues, the conventional approach is to add Hall switches, photoelectric pairs, or encoders to directly detect the movement position. This invention completely eliminates all external position sensors. Based on the motor current formula I=(U−E)/R, it keenly captures and utilizes the phenomenon that the back electromotive force E disappears and the current tends to be constant when the motor is stalled. Combined with the momentary stagnation phenomenon caused by the trash can lid clamping onto a hand or trash, it can be seen that: during normal operation, the feedback waveform is approximately a sine wave, with a large difference between two points at fixed intervals; during stall, the feedback waveform becomes a flat straight line, and the difference between two points decreases sharply. Utilizing the inherent characteristic that the single step time t of a stepper motor is constant after selecting the stepping frequency, the representation of the slope K of the current waveform is directly reduced to a subtraction operation (ΔV1 or ΔV2) that only requires calculating the difference between adjacent sampling points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122652285A_ABST
    Figure CN122652285A_ABST
Patent Text Reader

Abstract

The application provides a step motor non-inductive locked-rotor detection method and device for opening and closing of a garbage can cover, comprising the following steps: collecting a voltage signal at both ends of a sampling resistor in series in a step motor power supply loop; amplifying the voltage signal to obtain an amplified voltage signal; in a predetermined step period, performing analog-digital conversion sampling on the amplified voltage signal at fixed time intervals to obtain at least three sampling values V1, V2 and V3; calculating a first sampling difference AV1 and / or a second sampling difference AV2, comparing the first sampling difference AV1 and / or the second sampling difference AV2 with a preset locked-rotor threshold value, determining whether the step motor is in a locked-rotor or overload state, and performing a clamping prevention or position limiting protection action. The application indirectly identifies the mechanical state of the motor blocked by analyzing the total current waveform form change of the power supply loop through a sampling resistor in series in the power supply loop, greatly reduces the hardware cost and assembly complexity, and is especially suitable for the narrow and compact structure of a garbage can.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart home technology, and in particular relates to a method and device for detecting stepper motor stall in the opening and closing of trash can lids. Background Technology

[0002] The smart trash can uses a stepper motor to automatically open and close the lid. During the closing process, if a hand or object obstructs the movement, the motor needs to be detected promptly to prevent stalling or overload, and to stop or reverse the motor to prevent pinching. Traditional solutions often rely on Hall effect sensors, photoelectric encoders, or complex current phase detection circuits, which are not only costly and complex in structure but also require high processing power from the microcontroller. Traditional contactless detection solutions, which rely on complex current vector calculations, phase-locked loops, or numerous floating-point multiplication and division operations, cannot be implemented on such demanding platforms. Furthermore, the stepper motor driving the trash can lid is a low-power 5V motor with a 20Ω internal resistance. Its operating current is small, and the current change when stalled is extremely weak (only tens of milliamps), easily drowned out by noise, leading to unreliable stall detection. Summary of the Invention

[0003] To address the shortcomings of the existing technology, the present invention aims to provide a stepper motor-based sensorless stall detection method and device for opening and closing trash can lids, in order to meet user needs.

[0004] To achieve the above objectives, the present invention provides a method for detecting stepper motor stall in the opening and closing of a trash can lid, comprising the following steps:

[0005] The voltage signal across a sampling resistor connected in series in the power supply circuit of the stepper motor is acquired; the voltage signal is amplified to obtain an amplified voltage signal.

[0006] Within a predetermined step cycle, the amplified voltage signal is sampled by analog-to-digital conversion at fixed time intervals to obtain at least three sampled values ​​V1, V2, and V3. One of the sampled values ​​V2 is the sampled value corresponding to the point near the peak or valley of the waveform, and the other two sampled values ​​V1 and V3 are the sampled values ​​obtained at the sampling times adjacent to the sampled value V2 on both sides.

[0007] Calculate the first sampling difference ΔV1 = V2 - V1, and / or the second sampling difference ΔV2 = V2 - V3;

[0008] The first sampling difference ΔV1 and / or the second sampling difference ΔV2 are compared with a preset stall threshold.

[0009] When the first sampling difference ΔV1 and / or the second sampling difference ΔV2 is less than the stall threshold, the stepper motor is determined to be in a stall or overload state, and anti-pinch or limit protection actions are executed.

[0010] When the motor is rotating normally, the change in back electromotive force makes the current waveform approximately sinusoidal, with large slopes between V1 and V2, and between V3 and V2, resulting in a large sampling difference. When the motor stalls or is overloaded, causing the speed to decrease or even stop, the back electromotive force decreases sharply or even disappears, the rate of change of current drops significantly, the waveform tends to be flat and straight, and the sampling difference decreases sharply. By comparing only this difference, the motor status can be quickly identified.

[0011] Preferably, the stall threshold is set to 0.2V; when the sampling difference is less than 0.2V, the corresponding current change in the power supply circuit is less than 50mA, and the motor is determined to be stalled.

[0012] Preferably, the sampling resistor has a resistance of 0.2Ω and is connected to the ground terminal of the power supply circuit of the stepper motor.

[0013] Preferably, the operational amplifier is adapted to form a non-inverting amplifier circuit;

[0014] The non-inverting input of the operational amplifier is connected to the voltage signal terminal of the sampling resistor through a current-limiting resistor. The inverting input of the operational amplifier is grounded through a first resistor R45 and connected to the output terminal of the operational amplifier through a feedback resistor R46. The amplification factor A = 1 + R46 / R45.

[0015] A stepper motor stall detection device for opening and closing trash can lids, employing the stepper motor stall detection method for opening and closing trash can lids as described above, includes:

[0016] A sampling resistor (R29) connected in series in the power supply circuit of the stepper motor.

[0017] An operational amplifier (U13A) electrically connected to the sampling resistor is used to amplify the sampling voltage;

[0018] A microcontroller, whose ADC pin receives the output voltage of the operational amplifier, is configured to execute stall detection logic and output control signals.

[0019] Preferably, the first resistor R45 has a resistance of 2kΩ, the resistor R46 has a resistance of 39kΩ, and the amplification factor is 20.5 times; the maximum voltage difference across the sampling resistor is 0.05V, and the maximum voltage input to the microcontroller after amplification is 1.0V.

[0020] Preferably, the non-inverting input of the operational amplifier is connected to the node between the sampling resistor and the motor winding via a second resistor R42.

[0021] Preferably, the power supply pin of the operational amplifier is connected in parallel with a filter capacitor C43 and a second filter capacitor C44.

[0022] Preferably, the reference voltage of the microcontroller is configured to be 1.5V, 2V, or 3V to accommodate the amplified voltage range.

[0023] The beneficial effects of this invention are:

[0024] When addressing anti-pinch and limit issues, the conventional approach is to add Hall switches, photoelectric pairs, or encoders to directly detect the movement position. This invention completely eliminates all external position sensors. Based on the motor current formula I=(U−E) / R, it keenly captures and utilizes the phenomenon that the back electromotive force E disappears and the current tends to be constant when the motor is stalled. Combined with the momentary stagnation phenomenon caused by the trash can lid clamping onto a hand or trash, it can be seen that: during normal operation, the feedback waveform is approximately a sine wave, with a large difference between two points at fixed intervals; during stall, the feedback waveform becomes a flat straight line, and the difference between two points decreases sharply. Utilizing the inherent characteristic that the single step time t of a stepper motor is constant after selecting the stepping frequency, the representation of the slope K of the current waveform is directly reduced to a subtraction operation (ΔV1 or ΔV2) that only requires calculating the difference between adjacent sampling points.

[0025] This invention utilizes only a sampling resistor connected in series in the power supply circuit. By analyzing the changes in the waveform of the total current in the power supply circuit, it indirectly identifies the mechanical state of the motor being obstructed, greatly reducing hardware costs and assembly complexity. It is particularly suitable for the small and compact structure of trash cans. Furthermore, by setting up a non-inverting amplifier circuit, the minute slope changes at the millivolt level are amplified to above 0.2V, reaching a range that a low-cost MCU can stably resolve. Moreover, its maximum value of 1.0V falls entirely within the sampling range of various commonly used internal reference voltages such as 1.5V, 2V, and 3V. Attached Figure Description

[0026] Figure 1 The diagram shows a block diagram of a stepper motor-based sensorless stall detection device for opening and closing trash can lids, provided by the present invention.

[0027] Figure 2 The present invention provides a flowchart of a stepper motor sensorless stall detection method for opening and closing trash can lids.

[0028] Figure 3 This is a schematic diagram of the power supply circuit of the stepper motor provided by the present invention.

[0029] Figure 4This is a schematic diagram of the operational amplifier provided by the present invention.

[0030] Figure 5 The waveform diagram of the circuit current when the stepper motor is working normally is provided by the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] It should also be noted that, in order to avoid obscuring the present invention with unnecessary details, only the structures and / or processing steps closely related to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0033] Additionally, it should be noted that the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0034] like Figure 1-5 As shown, this invention discloses a stepper motor stall detection device for opening and closing trash can lids, comprising a sampling resistor R29 connected in series in the stepper motor power supply circuit, an operational amplifier electrically connected to the sampling resistor R29, and a microcontroller. The microcontroller is configured to execute stall detection logic and output control signals.

[0035] In this embodiment, the sampling resistor R29 is located at the lower end of the stepper motor power supply circuit, specifically between the power ground and one end of the stepper motor winding. In this embodiment, the stepper motor is powered by 5V, and its internal resistance is approximately 20Ω. The specific resistance value of the sampling resistor R29 is chosen to be 0.2Ω. A resistance value that is too small will result in an excessively weak voltage signal, making it difficult to separate from system noise; a resistance value that is too large will occupy an excessively high loop voltage drop, affecting the effective drive voltage of the motor and generating unnecessary power loss. The 0.2Ω resistance value achieves the best balance between signal measurability and power consumption. The package specification of resistor R29 is selected as 0805 to provide sufficient power dissipation margin and ensure long-term reliability. Its rated power is much greater than the actual power consumption under the maximum loop current (I²R = 0.25² × 0.2 = 0.0125W). The total current of the motor power supply circuit flows through the sampling resistor R29. According to Ohm's law, the voltage difference (voltage divider) generated across the sampling resistor R29 is proportional to the loop current. This voltage difference signal will be referred to as V_sample (corresponding to the circuit network label MOTOI_ADC) in the following text.

[0036] Because the V_sample signal is extremely weak (maximum only about 0.05V under normal operating current), it cannot be directly and accurately acquired by the ADC of a general-purpose microcontroller. Therefore, a signal amplification circuit is needed to condition it. The signal amplification circuit uses one of the LM358 dual op-amps (U13A) to form a non-inverting proportional amplifier. The voltage signal V_sample (i.e., MOTOI_ADC) across the sampling resistor R29 is connected to the non-inverting input (pin 3) of op-amp U13A through the current-limiting resistor R42 (2kΩ). The inverting input (pin 2) of the op-amp is grounded through the first resistor R45 (2kΩ) to provide a bias reference, and is also connected to the output (pin 1) of the op-amp through the feedback resistor R46 (39kΩ). According to the non-inverting amplification formula, the voltage amplification factor A = 1 + R46 / R45 = 1 + 39 / 2 = 20.5 times. A filter capacitor C43 (0.1uF, 0402 package) and an energy storage capacitor C44 (10μF, 0603 package) are connected in parallel between the power supply pin MOTO_VCC (pin 8) and ground (pin 4) to filter out noise interference on the power supply line. The amplified voltage signal is output from pin 1, defined as MOTOI_OUT, and directly connected to the ADC acquisition pin of the microcontroller MCU. A low-cost industrial-grade MCU can be selected, whose internal ADC reference voltage configuration of 1.5V, 2V, or 3V can meet the requirements. In this embodiment, a BYD industrial-grade MCU is used, which has a built-in analog-to-digital converter (ADC) module and a general-purpose input / output (GPIO) interface. The amplified voltage signal MOTOI_OUT is directly connected to one of the ADC acquisition pins of this microcontroller MCU. The ADC reference voltage inside the microcontroller (MCU) is configured to 2V, which is much higher than the maximum value of MOTOI_OUT (approximately 1.0V). This ensures that the signal does not exceed its range and saturate, while also allowing sufficient dynamic range for signal fluctuations. The MCU, as the main executor of the entire detection method, is responsible for completing the entire process from signal digitization, numerical calculation, logical judgment to the final protection command output. The stepper motor drive unit specifically uses the L9110 motor driver chip, a low-cost integrated H-bridge driver chip widely used in small DC / stepper motor drives. The L9110 receives logic level signals (forward, reverse, stop, brake) from the MCU and converts them into a current with sufficient driving capability to directly drive the stepper motor.

[0037] This invention also discloses a stepper motor contactless stall detection method for opening and closing trash can lids. The microcontroller (MCU) executes the stepper motor contactless stall detection method according to the following fixed-cycle steps to achieve the anti-pinch and limit protection functions of the intelligent trash can lid, including:

[0038] Step S1: Acquire the voltage signal across the sampling resistor R29.

[0039] When the stepper motor is running, the current I in the power supply circuit changes. Current I flows through the sampling resistor R29, generating a small voltage signal V_sample = I × 0.2Ω across it. (This signal is also labeled MOTOI_ADC in the circuit.) This voltage signal directly reflects the instantaneous magnitude of the circuit current. Under normal operating current, this voltage is extremely weak, with a maximum of only about 0.05V. This step involves acquiring the voltage signal across the sampling resistor for subsequent processing.

[0040] Step S2: Amplify the small voltage signal V_sample to obtain an amplified voltage signal.

[0041] The weak voltage signal V_sample acquired in step S1 is fed into a non-inverting amplifier circuit composed of LM358, where it is precisely amplified by 20.5 times. The amplified voltage signal MOTOI_OUT is output from the op-amp output terminal, with a voltage range from 0V to a maximum of approximately 1.0V. This voltage falls entirely within the effective sampling range of the microcontroller's built-in ADC at reference voltages of 1.5V, 2V, or 3V, eliminating the risk of saturation.

[0042] Step S3: Within a predetermined step period, perform analog-to-digital conversion sampling on the amplified voltage signal at fixed time intervals to obtain at least three sampled values ​​V1, V2, and V3; calculate the first sampling difference ΔV1 and the second sampling difference ΔV2.

[0043] During the controlled closing of the trash can lid, the microcontroller (MCU) continuously reads the voltage value on the ADC pin using its internal timer at a fixed sampling frequency synchronized with the stepper motor drive pulses. A digital sample value is obtained in each sampling cycle, corresponding to the amplified loop current at that moment. The MCU temporarily stores the continuous sample values ​​in an internal register, preparing for subsequent difference calculations. Within a predetermined stepping cycle, at least three sample values ​​are acquired, denoted as V1, V2, and V3. Sample value V2 is the sample value corresponding to the point adjacent to the waveform peak or valley, while the other two sample values ​​V1 and V3 are the sample values ​​obtained at adjacent sampling times on either side of V2. Subsequently, the MCU obtains the first sampling difference ΔV1 = V2 – V1 and / or the second sampling difference ΔV2 = V2 – V3 through subtraction. The fixed time interval t is calibrated based on the maximum no-load pull-out frequency of the stepper motor under the trash can lid opening and closing load, after repeated adjustments to the inertia and damping characteristics of the lid mechanism. An excessively large t will reduce the distinguishability of the difference between normal and stalled states, while an excessively small t will be easily interfered with by ADC quantization noise. The calibrated t ensures that the sampling difference is much greater than the stall threshold under normal operating conditions, and consistently lower than the stall threshold under stalled conditions. Since the sampling interval t is constant, the magnitude of this sampling difference directly and linearly characterizes the instantaneous rate of change of the current waveform near point V2, i.e., the absolute value of the slope. This invention cleverly reduces the complex "slope calculation" and "division operation" to the subtraction operation that microcontrollers (MCUs) excel at, which is the fundamental reason why this solution can run smoothly on low-cost, low-computing-power microcontrollers (MCUs).

[0044] Step S4: Compare the first sampling difference ΔV1 or the second sampling difference ΔV2 with a fixed stall threshold pre-programmed into the program memory.

[0045] In this embodiment, the preset stall threshold is set to 0.2V. This threshold is set based on the following: when the change in motor current between characteristic points drops to approximately 50mA, the voltage difference across the 0.2Ω sampling resistor R29 is 0.01V, which, after being amplified by 20.5 times, is exactly approximately 0.2V. Therefore, the 0.2V sampling difference threshold corresponds to the 50mA current change rate boundary.

[0046] Reference Figure 5When the motor operates normally, driving the lid to open and close, a rotational back electromotive force (EMF) E exists, and the current waveform is approximately sinusoidal. At fixed intervals, the sampling differences between V2 and V1, and between V2 and V3, are both large, far exceeding 0.2V. When the lid is caught in a person's hand or a foreign object during the closing process, or when it reaches the mechanical limit, the motor speed drops sharply or even stops, and the back EMF E approaches zero. According to the motor current formula I=(U−E) / R, the current quickly stabilizes, with an extremely low rate of change, and the feedback waveform is almost a flat straight line. At this time, both the first and second sampling differences decrease sharply.

[0047] Step S5: When the first sampling difference ΔV1 or the second sampling difference ΔV2 is less than the stall threshold, the stepper motor is determined to be in a stall or overload state, and anti-pinch or limit protection actions are executed.

[0048] If the microcontroller (MCU) determines that the sampling difference ΔV is less than 0.2V, it assumes that the current rate of change is below the normal operating level, and the motor is inevitably in a stalled or overloaded state. At this time, the MCU immediately stops outputting drive pulses to the stepper motor via the motor driver chip (specifically, the L9110 driver chip in this embodiment), or outputs a reverse pulse to reverse the motor, thereby achieving the anti-pinch function of the lid, or serving as a limit stop signal to reliably keep the lid in the fully open or fully closed position. If the event is a pinching incident during the lid closing process, a reverse drive is executed, causing the motor to reverse and open the lid, achieving the anti-pinch function; if it is a mechanical contact when the lid is fully open or fully closed, a stop drive is executed, reliably keeping the lid in the limit position, achieving the limit function. The entire process, from signal acquisition to the completion of the protection action, takes microseconds, ensuring the timeliness and reliability of the anti-pinch protection. After executing the protection action, the MCU will maintain a braking or waiting time. Once the stall is cleared (e.g., the foreign object is removed), or after a preset time, the microcontroller (MCU) can resume normal operation according to the program logic, such as retrying to close the lid or responding to the next lid-opening command.

[0049] It needs to be clarified that the "sampling difference" referred to in this specification specifically refers to the difference between V2 and V1, and between V2 and V3 calculated in step S3. It represents the change in the amplified voltage signal at adjacent sampling times, that is, the slope of the loop current change in the time dimension. This "sampling difference" and the "voltage signal" that directly reflects the instantaneous magnitude of the current across the sampling resistor described in step S1 belong to different physical levels, and those skilled in the art can clearly distinguish them in context.

[0050] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for detecting stepper motor stall during the opening and closing of a trash can lid using a sensorless method, characterized in that, Includes the following steps: The voltage signal across a sampling resistor connected in series in the power supply circuit of the stepper motor is acquired; the voltage signal is amplified to obtain an amplified voltage signal. Within a predetermined step cycle, the amplified voltage signal is sampled by analog-to-digital conversion at fixed time intervals to obtain at least three sampled values ​​V1, V2, and V3. One of the sampled values ​​V2 is the sampled value corresponding to the point near the peak or valley of the waveform, and the other two sampled values ​​V1 and V3 are the sampled values ​​obtained at the sampling times adjacent to the sampled value V2 on both sides. Calculate the first sampling difference ΔV1 = V2 - V1, and / or the second sampling difference ΔV2 = V2 - V3; The first sampling difference ΔV1 and / or the second sampling difference ΔV2 are compared with a preset stall threshold. When the first sampling difference ΔV1 and / or the second sampling difference ΔV2 is less than the stall threshold, the stepper motor is determined to be in a stall or overload state, and anti-pinch or limit protection actions are executed.

2. The method for detecting stepper motor stall in the opening and closing of a trash can lid according to claim 1, characterized in that, The stall threshold is set to 0.2V; when the sampling difference is less than 0.2V, the corresponding current change in the power supply circuit is less than 50mA, and the motor is determined to be stalled.

3. The method for detecting stepper motor stall in the opening and closing of a trash can lid according to claim 2, characterized in that, The sampling resistor has a resistance of 0.2Ω and is connected to the ground terminal of the power supply circuit of the stepper motor.

4. The method for detecting stepper motor stall in the opening and closing of a trash can lid according to claim 3, characterized in that, The operational amplifier is suitable for constructing a non-inverting amplifier circuit; The non-inverting input of the operational amplifier is connected to the voltage signal terminal of the sampling resistor through a current-limiting resistor. The inverting input of the operational amplifier is grounded through a first resistor R45 and connected to the output terminal of the operational amplifier through a feedback resistor R46. The amplification factor A = 1 + R46 / R45.

5. A stepper motor stall detection device for opening and closing trash can lids, employing the stepper motor stall detection method for opening and closing trash can lids as described in claim 4, characterized in that... include: A sampling resistor connected in series in the power supply circuit of the stepper motor; An operational amplifier electrically connected to the sampling resistor is used to amplify the sampling voltage; A microcontroller, whose ADC pin receives the output voltage of the operational amplifier, is configured to execute stall detection logic and output control signals.

6. The stepper motor stall detection device for opening and closing a trash can lid according to claim 5, characterized in that, The first resistor R45 has a resistance of 2kΩ, the resistor R46 has a resistance of 39kΩ, and the amplification factor is 20.5 times; the maximum voltage difference across the sampling resistor is 0.05V, and the maximum voltage input to the microcontroller after amplification is 1.0V.

7. The stepper motor stall detection device for opening and closing a trash can lid according to claim 5, characterized in that, The non-inverting input of the operational amplifier is connected to the node between the sampling resistor and the motor winding via a second resistor R42.

8. The stepper motor stall detection device for opening and closing a trash can lid according to claim 5, characterized in that, The operational amplifier's power supply pin is connected in parallel with a filter capacitor C43 and an energy storage capacitor C44.

9. A stepper motor stall detection device for opening and closing a trash can lid according to claim 5, characterized in that, The reference voltage of the microcontroller is configured to be 1.5V, 2V, or 3V to accommodate the amplified voltage range.