Drive mechanism, control method, controller, device, and toilet lid
By using a stepper motor and a position sensing mechanism in the toilet seat drive mechanism, combined with an adaptive control strategy, the problem of easy damage to the drive mechanism under human interference is solved, achieving low noise, high torque output and extended lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN BA DA WEI TECH CO LTD
- Filing Date
- 2024-09-30
- Publication Date
- 2026-06-09
AI Technical Summary
Existing toilet seat drive mechanisms are easily damaged by human interference, and multi-speed reduction mechanisms are noisy, have high damping force, and have limited lifespan.
It employs a stepper motor, a position sensing mechanism, and a reduction mechanism, combined with an adaptive control strategy. Position signals are detected by magnets and Hall sensors, and the controller monitors current and position changes in real time to protect the drive mechanism.
It achieves stable and reliable low-speed, high-torque output, reduces noise, extends the service life of the drive mechanism, and avoids damage caused by human interference.
Smart Images

Figure CN122178630A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of toilet seat technology, and in particular to a drive mechanism, control method, controller, device, and toilet seat. Background Technology
[0002] In some rotatable mechanisms that are mounted by hinges, such as doors and door frames, toilet seats and mounting bases, an electric drive mechanism is usually added at the hinge to drive and control the opening and closing rotation of the rotatable mechanism within a certain angle range.
[0003] In existing technologies, electric motors are typically used as the drive source, and multi-speed reduction mechanisms are employed to convert the motor's output speed and torque to achieve the desired low-speed, high-torque driving effect. However, multi-speed reduction mechanisms generate significant noise during operation, and due to the large reduction ratio, they also exhibit substantial damping forces and slow stress release during reversal. If the drive mechanism is subjected to manual interference during normal operation, it can easily damage a gear and consequently the entire drive mechanism. Existing technologies also incorporate mechanical clutch mechanisms to protect the multi-speed reduction mechanism, which increases costs. Furthermore, the consistency of mechanical clutch structures is difficult to control, and their lifespan is limited, typically only a few hundred cycles, resulting in poor durability and susceptibility to damage. Summary of the Invention
[0004] This invention provides a drive mechanism, control method, controller, device, and toilet seat to solve the problem that the drive mechanism is easily damaged under human interference.
[0005] This invention provides a driving mechanism, including a stepper motor, a position sensing mechanism, and a reduction mechanism; The stepper motor is mounted on the first workpiece, and the first end of the output shaft of the stepper motor is connected to the reduction mechanism, which is used to connect to the second workpiece. The second end of the output shaft of the stepper motor is connected to the position sensing mechanism, which is used to connect to the controller and output a position signal to the controller.
[0006] Preferably, the position sensing mechanism includes a magnet and a Hall sensor; The magnet is mounted at the second end of the output shaft of the stepper motor and is used to rotate with the output shaft of the stepper motor to generate an induced magnetic field; The Hall sensor is positioned opposite the magnet and is used to connect to the controller. Based on the alternating changes in the sensed magnetic field, the Hall sensor outputs a position signal to the controller.
[0007] Preferably, the deceleration mechanism includes a primary deceleration structure and a secondary deceleration structure; The first-stage reduction structure is connected to the output shaft of the stepper motor; One end of the secondary reduction structure is connected to the primary reduction structure for transmission, and the other end of the secondary reduction structure is connected to the second workpiece.
[0008] Preferably, the first-stage reduction structure includes a first-stage driving gear and a first-stage driven gear; The first-stage driving gear is sleeved on the output shaft of the stepper motor and rotates synchronously with the output shaft of the stepper motor; the first-stage driven gear meshes with the first-stage driving gear. The two-stage reduction structure includes a two-stage drive gear, planetary gears, a planetary carrier, and an output spindle; The secondary driving gear is coaxially connected to the primary driven gear and rotates synchronously with the primary driven gear; The planetary gear is rotatably mounted on the planet carrier, and the planetary gear meshes with the secondary drive gear; The first end of the output spindle is connected to the planetary carrier, and the second end of the output spindle is connected to the second workpiece.
[0009] Preferably, the drive mechanism further includes a mounting housing and encapsulation end caps disposed at both ends of the mounting housing; The stepper motor, position sensing mechanism, and reduction mechanism are assembled inside the mounting housing; A sealing structure is provided between the encapsulation end cap and the mounting housing.
[0010] This invention also provides a control method for a drive mechanism, comprising: Acquire the position signal collected by the position sensing mechanism and the current current of the stepper motor; If the position signal or the current current meets the preset protection conditions, the stepper motor is controlled to stop working; If the position signal and the current do not meet the preset protection conditions, the stepper motor is controlled to operate based on the target current according to the adaptive control strategy.
[0011] Preferably, the preset protection conditions are: The current position change rate is not within the first preset change rate range, or the target position deviation is less than the preset deviation, or the current current is not within the preset current range; The rate of change of the current position is determined based on the position signal at the current moment and the position signal at the previous moment; The target position deviation is the position deviation determined based on the current position signal and the target position signal.
[0012] Preferably, the target position signal includes a measured starting point position signal and a measured ending point position signal; The control method for the drive mechanism includes: After the stepper motor is powered on for the first time, the stepper motor is controlled to rotate in the first direction, and the first sampling position signal is obtained based on the preset sampling frequency; The difference between the first sampling position signal at the current time and the first sampling position signal at the previous time is compared to obtain the first sampling distance difference. If the first sampling distance difference is less than the preset sampling difference, the first sampling position signal at the current time is taken as the measured starting point position signal. Control the stepper motor to rotate in the second direction, and acquire the second sampling position signal based on the preset sampling frequency; The difference between the second sampling position signal at the current moment and the second sampling position signal at the previous moment is compared to obtain the second sampling distance difference; if the second sampling distance difference is less than the preset sampling difference, the second sampling position signal at the current moment is taken as the measured endpoint position signal.
[0013] Preferably, after the stepper motor is stopped, the control method for the drive mechanism further includes: Continue acquiring position signals collected by the position sensing mechanism; If the position signal is within the preset damping position range, then the current operating current of the stepper motor is controlled to be the preset damping current.
[0014] Preferably, the adaptive control strategy for controlling the stepper motor to operate based on the target current includes: If the rate of change of the current position is greater than the second preset rate of change range, the first current is reduced to determine the target current and the stepper motor is controlled to work based on the target current. If the rate of change of the current position is less than the second preset rate of change range, the first current is increased to determine the target current, and the stepper motor is controlled to work based on the target current.
[0015] This invention also provides a controller, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the motor control method as described in any of the preceding embodiments.
[0016] This invention also provides a driving device, including the driving mechanism described in any one of the above claims and the controller described above; The controller is connected to the stepper motor and the position sensing mechanism, and is used to control the stepper motor to work according to the position signal.
[0017] This invention also provides a toilet seat, including a fixing base, a toilet seat plate, a toilet seat ring, and at least one of the above-described driving devices; The toilet seat and the toilet seat ring are rotatably mounted on the fixed base; The drive device is fixedly installed on the fixed base. One end of the drive device is connected to the toilet seat and is used to obtain the position signal of the toilet seat when it rotates and control the rotation of the toilet seat. Alternatively, one end of the drive device is connected to the toilet seat ring to obtain the position signal of the toilet seat ring when it rotates, and to control the rotation of the toilet seat ring.
[0018] The present invention provides a driving mechanism, control method, controller, device, and toilet seat. The driving mechanism uses a stepper motor as the power output source, enabling stable and reliable output of a relatively low speed and a large torque. Combined with a reduction gear mechanism, it achieves a balance between a low reduction ratio and high torque output. The gear structure is less prone to damage, resulting in a longer service life. The controller, by collecting position signals and the stepper motor's operating current, can determine the stepper motor's operating state and control it to stop working. This identifies abnormal states of the stepper motor, promptly shuts it down, and protects both the stepper motor and the reduction gear mechanism in the driving mechanism. Furthermore, the controller can control the stepper motor's operation according to an adaptive control strategy based on the position signal and the current current, ensuring the driving device maintains a uniform rotation speed and avoiding speed changes caused by torque variations during rotation. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the drive mechanism in one embodiment of the present invention; Figure 2 This is a flowchart of a control method for a drive mechanism according to an embodiment of the present invention; Figure 3 This is another flowchart of the control method of the drive mechanism in one embodiment of the present invention; Figure 4 This is another flowchart of the control method of the drive mechanism in one embodiment of the present invention; Figure 5 This is another flowchart of the control method of the drive mechanism in one embodiment of the present invention.
[0021] In the diagram: 1. Stepper motor; 2. Position sensing mechanism; 21. Magnet; 3. Reduction mechanism; 31. First-stage reduction structure; 311. First-stage drive gear; 312. First-stage driven gear; 32. Second-stage reduction structure; 321. Second-stage drive gear; 322. Planetary gear; 323. Planetary carrier; 324. Output spindle; 325. Internal gear ring; 4. Mounting housing; 5. Encapsulation end cap; 6. Sealing structure; 61. Waterproof rubber ring; 62. Sealing ring; 7. PCB board. Detailed Implementation
[0022] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0023] In the description of this invention, it should be understood that the terms "longitudinal," "radial," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0024] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0025] This invention provides a driving mechanism, including a stepper motor 1, a position sensing mechanism 2, and a reduction mechanism 3; the stepper motor 1 is mounted on a first workpiece, and the first end of the output shaft of the stepper motor 1 is connected to the reduction mechanism 3, which is used to connect to a second workpiece; the second end of the output shaft of the stepper motor 1 is connected to the position sensing mechanism 2, which is used to connect to a controller and output a position signal to the controller.
[0026] As an example, the drive mechanism includes a stepper motor 1, a position sensing mechanism 2, and a reduction mechanism 3. The stepper motor 1 is mounted on a first workpiece, and the first end of the output shaft of the stepper motor 1 is connected to the reduction mechanism 3. The reduction mechanism 3 is used to connect a second workpiece. When the output shaft of the stepper motor 1 rotates, it can drive the second workpiece to rotate relative to the first workpiece. The reduction mechanism 3 can be a two-stage reduction structure, including a single-stage reduction structure and a two-stage reduction structure, to achieve two-stage reduction. According to a relatively small reduction ratio, such as 30~60, the speed and torque output by the stepper motor 1 are converted to achieve the required driving effect. The second workpiece is a rotating component, and the first workpiece is a fixed component. For example, the second workpiece is a toilet seat and / or a toilet seat ring, and the first workpiece is a mounting base for hinged installation of the toilet seat and toilet seat ring. The drive mechanism is mounted on the mounting base and fixedly connected to it. The reduction mechanism 3 is connected to the toilet seat or toilet seat ring. The second end of the output shaft of the stepper motor 1 is connected to the position sensing mechanism 2 and is used to connect to the controller. The position sensing mechanism 2 can output a corresponding position signal to the controller according to the rotation of the output shaft of the stepper motor 1. Each position signal corresponds to a rotation position of the output shaft of the stepper motor 1, so that the controller can accurately control the stepper motor 1 according to the position signal.
[0027] In this example, by selecting stepper motor 1 as the power output source, it can stably and reliably output a small speed and a large torque. Combined with reduction mechanism 3, it can achieve both low reduction ratio and large torque output effect. The gear structure is not easily damaged and has a longer service life.
[0028] In one embodiment, the position sensing mechanism 2 includes a magnet 21 and a Hall sensor; the magnet 21 is mounted on the second end of the output shaft of the stepper motor 1 and is used to rotate with the output shaft of the stepper motor 1 to generate an induced magnetic field; the Hall sensor is disposed opposite to the magnet 21 and is used to connect to the controller and output a position signal to the controller according to the alternating changes of the induced magnetic field.
[0029] As an example, the position sensing mechanism 2 includes a magnet 21 and a Hall sensor. The magnet 21 is mounted on the second end of the output shaft of the stepper motor 1 and rotates with the rotation of the output shaft of the stepper motor 1. The Hall sensor is disposed opposite to the magnet 21 and can be mounted on the PCB board 7 together with the controller. The PCB board 7 is mounted on one end of the stepper motor 1. When the magnet 21 rotates with the output shaft of the stepper motor 1, the magnetic induction intensity detected by the Hall sensor will change. According to different magnetic induction intensities, the Hall sensor can output different electrical signals, i.e., position signals, to the controller to realize the detection of the rotational position of the drive mechanism and the second workpiece connected to the drive mechanism. For example, the orientation of the two poles of the magnet 21 can be the same as the radial direction of the output shaft of the stepper motor 1, and the magnet 21 is located at the axis of the output shaft of the stepper motor 1. When the stepper motor 1 rotates, the induced magnetic field generated by the magnet 21 also rotates around the axis of the output shaft of the stepper motor 1. At this time, the relative position between the induced magnetic field generated by magnet 21 and the Hall sensor changes, causing the magnetic induction intensity that the Hall sensor can detect to change, thereby determining the rotation of the output shaft of stepper motor 1. By detecting the rotation position of the output shaft of stepper motor 1, the rotation position of the drive mechanism and the second workpiece connected to the drive mechanism can be obtained.
[0030] In this example, by using a magnet 21 and a Hall sensor, which can be a linear Hall sensor, the rotation of the output shaft of the stepper motor 1 can be measured non-contactly. Compared with conventional detection methods such as potentiometers, using a magnet 21 and a linear Hall sensor to form magnetic induction detection can effectively improve detection accuracy and reliability.
[0031] In one embodiment, the reduction mechanism 3 includes a primary reduction structure 31 and a secondary reduction structure 32; the primary reduction structure 31 is connected to the output shaft of the stepper motor 1; one end of the secondary reduction structure 32 is connected to the primary reduction structure 31 in a transmission connection, and the other end of the secondary reduction structure 32 is connected to the second workpiece.
[0032] As an example, the reduction mechanism 3 includes a primary reduction structure 31 and a secondary reduction structure 32. The primary reduction structure 31 is connected to the output shaft of the stepper motor 1, one end of the secondary reduction structure 32 is connected to the primary reduction structure 31, and the other end of the secondary reduction structure 32 is connected to the second workpiece. The primary reduction structure 31 is used to convert the speed and torque output from the output shaft of the stepper motor 1, and the secondary reduction structure 32 is used to further convert the speed and torque output from the primary reduction structure 31 to ultimately achieve the desired speed and torque conversion effect. In this example, the stepper motor 1 can output a large torque. With the two-stage reduction structure, the required torque and speed can be obtained while minimizing the noise during the rotation of the drive mechanism. The two-stage reduction structure has a small transmission ratio and generates low damping force. When the rotation of the second workpiece is manually intervened, the adverse effects on the stepper motor 1 and the reduction mechanism 3 are minimal, ensuring the service life of the drive mechanism.
[0033] In one embodiment, the first-stage reduction structure 31 includes a first-stage driving gear 311 and a first-stage driven gear 312; the first-stage driving gear 311 is sleeved on the output shaft of the stepper motor 1 and rotates synchronously with the output shaft of the stepper motor 1, and the first-stage driven gear 312 meshes with the first-stage driving gear 311; the second-stage reduction structure 32 includes a second-stage driving gear 321, planetary gears 322, a planetary carrier 323, and an output spindle 324; the second-stage driving gear 321 is coaxially connected to the first-stage driven gear 312 and rotates synchronously with the first-stage driven gear 312; the planetary gears 322 are rotatably mounted on the planetary carrier 323 and mesh with the second-stage driving gear 321; the first end of the output spindle 324 is connected to the planetary carrier 323, and the second end of the output spindle 324 is connected to the second workpiece.
[0034] As an example, the first-stage reduction structure 31 includes a first-stage driving gear 311 and a first-stage driven gear 312. The first-stage driving gear 311 is mounted on the output shaft of the stepper motor 1 and rotates synchronously with the output shaft of the stepper motor 1. The first-stage driven gear 312 meshes with the first-stage driving gear 311 and is used to perform the first-stage conversion of the torque and speed output by the output shaft of the stepper motor 1 according to a preset transmission ratio. The two-stage reduction structure 32 includes a two-stage driving gear 321, planetary gears 322, a planetary carrier 323, and an output spindle 324. The two-stage driving gear 321 is coaxially connected to the first-stage driven gear 312 and rotates synchronously with it. The planetary gears 322 are mounted on the planetary carrier 323 via planetary shaft pins. The planetary gears 322 are arranged around the two-stage driving gear 321 and mesh with it. They also mesh with the internal gear ring 325 fixedly mounted on the inner wall of the mounting housing 4 of the drive mechanism. When the two-stage driving gear 321 rotates, the planetary gears 322 rotate around the two-stage driven gear and drive the planetary carrier 323 to rotate. The planetary carrier 323 is connected to the first end of the output spindle 324, and the second end of the output spindle 324 is connected to the second workpiece. As the output end of the two-stage reduction structure 32, it performs a second-stage conversion on the torque and speed output by the output shaft of the stepper motor 1 to achieve the required speed and torque conversion effect.
[0035] In one embodiment, the drive mechanism further includes a mounting housing 4 and encapsulation end caps 5 disposed at both ends of the mounting housing 4; the stepper motor 1, the position sensing mechanism 2, and the reduction mechanism 3 are assembled inside the mounting housing 4; a sealing structure 6 is provided between the encapsulation end caps 5 and the mounting housing 4.
[0036] As an example, the drive mechanism also includes a mounting housing 4 and encapsulated end caps 5 disposed at both ends of the mounting housing 4. The mounting housing 4 is used to mount on the first workpiece. The stepper motor 1, the position sensing mechanism 2, and the reduction mechanism 3 are assembled inside the mounting housing 4. An opening is provided on the encapsulated end cap 5 at the first end of the mounting housing 4. The second end of the output spindle 324 extends out of the opening and is used to connect with the second workpiece. A waterproof rubber ring 61 is provided between the opening and the output spindle 324 to form a waterproof seal at the output shaft. A sealing ring 62 is provided between the encapsulated end cap 5 at the second end of the mounting housing 4 and the mounting housing 4 to prevent moisture from entering the interior of the mounting housing 4 and affecting the normal operation of the stepper motor 1 and the position sensing mechanism 2.
[0037] This invention also provides a control method for a drive mechanism, which will be described in the context of applying the method to a controller and applying the controller to the drive mechanism in the above embodiments. Figure 2 As shown, the control method of the drive mechanism includes: S201: Acquire the position signal collected by the position sensing mechanism and the current current of the stepper motor; S202: If the position signal or the current current of the stepper motor meets the preset protection conditions, control the stepper motor to stop working; S203: If the position signal and the current current of the stepper motor do not meet the preset protection conditions, the stepper motor will be controlled to operate based on the target current according to the adaptive control strategy.
[0038] The position signal is a induced pulse signal collected by the position sensing mechanism 2 based on the rotational position of the output shaft of the stepper motor 1. When the output shaft of the stepper motor 1 rotates, the induced pulse signal collected by the position sensing mechanism 2 also changes accordingly, so that each position signal corresponds to a rotational position of the output spindle 324 in the drive mechanism. After the drive mechanism is powered on, the position sensing mechanism 2 can collect the position signal according to a preset sampling frequency.
[0039] As an example, in step S201, after the drive mechanism is powered on, the position sensing mechanism 2 collects position signals according to a preset sampling frequency and sends them to the controller. The controller receives the position signals collected by the position sensing mechanism 2. At the same time, the controller can also obtain the current of the stepper motor 1. Based on the position signal and the current current of the stepper motor 1, the controller determines the operating state of the stepper motor 1 and controls the stepper motor 1 to work based on the control strategy corresponding to the operating state.
[0040] Among them, the preset protection conditions are pre-set and used to determine the operating status of stepper motor 1, so as to determine whether stepper motor 1 needs to stop working.
[0041] As an example, in step S202, the controller acquires the real-time position signal and the current current of stepper motor 1, and determines whether the position signal or the current current of stepper motor 1 meets the preset protection conditions to determine whether stepper motor 1 is in an abnormal operating state, or whether the drive mechanism has reached the target position. When the position signal or the current current of stepper motor 1 meets the preset protection conditions, it indicates that stepper motor 1 is in an abnormal operating state, such as a stalled state or an overcurrent state, or that the drive mechanism has reached the target position. The controller then controls stepper motor 1 to stop working.
[0042] The adaptive control strategy is a pre-set control strategy used to keep the rotation speed of the drive mechanism in a uniform rotation state. Specifically, it is used to adaptively adjust the operating current of the stepper motor 1 according to the torque change of its output shaft during the rotation process, so as to keep the stepper motor 1 in a uniform rotation state.
[0043] As an example, in step S203, when the controller detects that the position signal and the current current of the stepper motor 1 do not meet the preset protection conditions, it indicates that the current stepper motor 1 is not in an abnormal operating state and the drive mechanism has not moved to the target position. The controller controls the stepper motor 1 to work according to the preset adaptive control strategy, and adjusts the output speed and torque of the stepper motor 1 in real time to keep the drive mechanism in a uniform rotation state.
[0044] In this example, the controller can determine the working state of the stepper motor 1 by collecting the position signal and the operating current of the stepper motor 1, and then control the stepper motor 1 to stop working. This is to identify the abnormal state of the stepper motor 1, shut down the stepper motor 1 in time, and protect the stepper motor 1 and the reduction mechanism 3 in the drive mechanism. The controller can also control the stepper motor 1 to work according to the position signal and the current current of the stepper motor 1, so that the drive device can maintain a uniform rotation state and avoid the change in rotation speed caused by the change in torque during the rotation process.
[0045] In one embodiment, the preset protection conditions are: the current position change rate is not within the range of a first preset change rate, or the target position deviation is less than a preset deviation, or the current current is not within the range of a preset current; the current position change rate is the change rate determined based on the position signal at the current time and the position signal at the previous time; the target position deviation is the position deviation determined based on the position signal at the current time and the target position signal.
[0046] The first preset rate of change range is determined by the first preset rate of change and the second preset rate of change. If the current position rate of change is not within the first preset rate of change range, it indicates that the current position rate of change is greater than the first preset rate of change or less than the second preset rate of change.
[0047] The preset deviation is a pre-set deviation value used to determine whether the drive mechanism has rotated to its limit position or to the set hovering position.
[0048] The preset current range is determined by the first current value and the second current value. If the current is not within the preset current range, it means that the current current is greater than the first current or less than the second current.
[0049] As an example, the controller determines the current position change rate based on the current position signal and the previous position signal. If the current position change rate of the drive mechanism is greater than a first preset change rate, it indicates that the current rotational position of the drive mechanism is changing too rapidly. This could mean the drive mechanism is rotating rapidly under human intervention, or that stepper motor 1 has malfunctioned, causing the drive mechanism to rotate rapidly under gravity. In this case, the controller shuts down stepper motor 1 to prevent adverse effects on stepper motor 1 or the reduction mechanism 3 in the drive mechanism. If the current position change rate of the drive mechanism is less than a second preset change rate, it indicates that the current rotational position of the drive mechanism is changing too slowly. This could mean the drive mechanism is stalled under human intervention, or that stepper motor 1 has malfunctioned and cannot rotate. In this case, the controller shuts down stepper motor 1 to prevent adverse effects on stepper motor 1 or the reduction mechanism 3 in the drive mechanism.
[0050] As another example, the controller first acquires the target position signal. This target position signal can be a preset limit position signal, a measured limit position signal, or a preset hovering position signal. The preset limit position signal corresponds to two pre-set extreme rotational positions. The measured limit position signal corresponds to two actual extreme rotational positions measured during the initial power-on debugging of the drive mechanism, and may include a measured start position signal and a measured end position signal. The preset hovering position signal corresponds to a hovering position set according to user requirements. When a preset hovering position signal exists, the controller prioritizes controlling stepper motor 1 based on this signal. The controller calculates the target position deviation based on the current position signal and the target position signal. If the target position deviation is less than the preset deviation, it indicates that the drive mechanism has rotated to or is close to its limit position, or has rotated to or is close to the preset hovering position. The controller then shuts off stepper motor 1 to prevent it from continuing to operate when the drive mechanism reaches its limit position, which could cause overheating or other adverse phenomena.
[0051] As another example, the controller acquires the current current of stepper motor 1. If the current current of stepper motor 1 is greater than a first preset current, it indicates that stepper motor 1 is in an overcurrent state, and the controller shuts down stepper motor 1. If the current current of stepper motor 1 is less than a second preset current, it indicates that the current of stepper motor 1 is too low, possibly indicating a fault state, and the controller shuts down stepper motor 1. By detecting the current current of stepper motor 1, it is possible to determine whether stepper motor 1 is in an overcurrent or other abnormal operating state, and to shut down stepper motor 1 in a timely manner.
[0052] In one embodiment, the target position signal includes a measured start-point position signal and a measured end-point position signal; such as Figure 3 As shown, the control method of the drive mechanism includes: S301: After the stepper motor is powered on for the first time, control the stepper motor to rotate in the first direction and obtain the first sampling position signal based on the preset sampling frequency; S302: Compare the difference between the first sampling position signal at the current time and the first sampling position signal at the previous time to obtain the first sampling distance difference. If the first sampling distance difference is less than the preset sampling difference, then the first sampling position signal at the current time is taken as the measured starting point position signal. S303: Control the stepper motor to rotate in the second direction and acquire the second sampling position signal based on the preset sampling frequency; S304: Compare the difference between the second sampling position signal at the current time and the second sampling position signal at the previous time to obtain the second sampling distance difference. If the second sampling distance difference is less than the preset sampling difference, then the second sampling position signal at the current time is taken as the measured endpoint position signal.
[0053] The first direction refers to the direction in which the stepper motor 1 drives the second workpiece to rotate towards the starting position after the drive mechanism is first powered on. Correspondingly, the second direction is the opposite direction to the first direction, used to drive the stepper motor 1 to rotate the second workpiece towards the ending position. For example, when this drive mechanism is applied to a toilet seat, the operator first controls the stepper motor 1 to rotate the toilet seat or toilet seat ring in the direction of closing, so that the closed position of the toilet seat or toilet seat ring can be marked as the starting position. Then, the operator controls the stepper motor 1 to rotate the toilet seat or toilet seat ring in the direction of opening, so that the open position of the toilet seat or toilet seat ring can be marked as the ending position. The first sampled position signal is the position signal collected in real time by the position sensing mechanism 2 according to a preset sampling frequency after the stepper motor 1 is first powered on and rotates along the first direction.
[0054] As an example, in step S301, when the stepper motor 1 is powered on for the first time, or when it is powered on for the first time after pressing the reset button, the controller controls the stepper motor 1 to rotate along the first direction at a preset speed to detect the starting position of the drive mechanism. The controller controls the position sensing mechanism 2 to collect the first sampling position signal at a preset sampling frequency, and determines whether the drive mechanism has reached the limit rotation position in the first direction, i.e., the starting position, based on the first sampling position signal.
[0055] As an example, in step S302, the controller compares the difference between the first sampling position signal acquired at the current moment and the first sampling position signal acquired at the previous moment to obtain the first sampling distance difference. If the first sampling distance difference is less than the preset sampling difference, it proves that the drive mechanism has reached the limit rotation position in the first direction, that is, the starting position. The first sampling position signal acquired at the current moment is used as the measured starting position signal. The measured starting position signal corresponds to the starting position. For example, when the drive mechanism is applied to a toilet seat, the measured starting position signal corresponds to the 0-degree closed position of the toilet seat or toilet seat ring.
[0056] As an example, in step S303, the controller controls the stepper motor 1 to rotate along the second direction at a preset speed, and controls the position sensing mechanism 2 to collect the second sampling position signal at a preset sampling frequency. Based on the second sampling position signal, the controller determines whether the drive mechanism has reached the limit rotation position in the second direction, that is, the end position.
[0057] As an example, in step S304, the controller compares the difference between the second sampling position signal acquired at the current moment and the second sampling position signal acquired at the previous moment to obtain the second sampling distance difference. If the second sampling distance difference is less than the preset sampling difference, it proves that the drive mechanism has reached the limit rotation position in the second direction, that is, the endpoint position. The second sampling position signal acquired at the current moment is used as the measured endpoint position signal. The measured endpoint position signal corresponds to the endpoint position. For example, when the drive mechanism is applied to a toilet seat, the measured endpoint position signal corresponds to the 120-degree opening position of the toilet seat or toilet seat ring.
[0058] In this example, the controller can automatically calibrate the limit rotation positions, i.e., the start and end positions, in the first and second directions while controlling the stepper motor 1 to rotate. This overcomes the problem in the prior art where the left and right installation orientation of the motor in the drive mechanism needs to be distinguished due to the fixed start and end positions of the motor. This eliminates the need to distinguish the left and right orientation during installation of the stepper motor 1, making assembly more convenient. By marking the start and end positions in real time, the drive mechanism can also flexibly adjust the limit rotation angle according to different rotation environments, which is beneficial for adapting to various application environments and usage requirements.
[0059] In one embodiment, such as Figure 4 As shown, after the stepper motor stops working, the control method for the drive mechanism also includes: S401: Continue to acquire the position signal collected by the position sensing mechanism; S402: If the position signal is within the preset damping position range, the current operating current of the stepper motor is controlled to be the preset damping current.
[0060] The preset damping position range is a range between the first preset damping position signal and the second preset damping position signal. The rotational position corresponding to the first preset damping position signal is close to the starting position, such as the 0-degree closed position of a toilet seat or toilet seat ring. Specifically, the deviation between the first preset damping position signal and the measured starting position signal is a preset deviation, so that when the stepper motor 1 exceeds the preset damping position range and approaches the starting position, it can smoothly stop working according to step S202 to prevent overheating. The second preset damping position signal corresponds to a rotational position in the rotational stroke of the drive mechanism, such as the 30-degree open position of a toilet seat or toilet seat ring. This rotational position is used to determine whether the current stepper motor 1 needs to enter the damping state to prevent the second workpiece connected to the stepper motor 1, such as the toilet seat or toilet seat ring, from quickly falling back to the starting position under gravity.
[0061] As an example, in step S401, after the controller shuts off the stepper motor 1, the controller continues to acquire the position signal collected by the position sensing mechanism 2, detects the position signal, and determines whether the current stepper motor 1 needs to enter the damping state based on the current position signal, so as to prevent the second workpiece connected to the stepper motor 1, such as a toilet seat or toilet seat ring, from falling back to the starting position quickly under the action of gravity.
[0062] As an example, in step S402, if the rotation position corresponding to the current position signal is between the rotation position corresponding to the first preset damping position signal and the rotation position corresponding to the second preset damping position signal, it indicates that the current stepper motor 1 needs to enter the damping state. The controller controls the current operating current of the stepper motor 1 to remain at the preset damping current, so that the stepper motor 1 can continuously output a fixed torque to resist the gravity of the second workpiece, such as the toilet seat or toilet seat ring, simulating the deceleration effect of the damper, and preventing the toilet seat or toilet seat ring from falling rapidly under the action of gravity and hitting other workpieces, causing noise or pinching the user.
[0063] In one embodiment, such as Figure 5 As shown, step S203, which is to control the stepper motor 1 to operate based on the target current according to the adaptive control strategy, includes: S501: If the current position change rate is greater than the second preset change rate range, the first current is reduced, the target current is determined, and the stepper motor is controlled to work based on the target current. S502: If the current position change rate is less than the second preset change rate range, the first current is increased to determine the target current and control the stepper motor to work based on the target current.
[0064] The second preset rate of change is determined by the third and fourth preset rates of change. The third and fourth preset rates of change are pre-set values used to determine whether the current stepper motor 1 is within a preset rotational speed range. The first preset rate of change is greater than the third preset rate of change, the third preset rate of change is greater than the fourth preset rate of change, and the fourth preset rate of change is greater than the second preset rate of change.
[0065] As an example, when the current position change rate of the drive mechanism is not greater than the first preset change rate and not less than the second preset change rate, it indicates that the drive mechanism is in normal working condition, and the controller performs adaptive control on stepper motor 1. Specifically, if the current position change rate of the drive mechanism is greater than the third preset change rate, it indicates that the current rotation speed of the drive mechanism exceeds the preset rotation speed range. During rotation, the load torque of stepper motor 1 decreases, resulting in an increased rotation speed of the drive mechanism. Therefore, the operating current of stepper motor 1 needs to be reduced to slow down the rotation speed of the drive mechanism. If the current position change rate of the drive mechanism is less than the fourth preset change rate, it indicates that the current rotation speed of the drive mechanism is less than the preset rotation speed range. During rotation, the load torque of stepper motor 1 increases, resulting in a decreased rotation speed of the drive mechanism. Therefore, the operating current of stepper motor 1 needs to be increased to enhance the driving force and accelerate the rotation speed of the drive mechanism.
[0066] In this example, by setting a second preset rate of change range and adjusting the operating current of stepper motor 1 according to the comparison between the current position rate of change and the second preset rate of change, the current position rate of change of the drive mechanism is kept within the second preset rate of change range. This allows the drive mechanism to maintain a uniform rotation speed as much as possible at each angle stage of rotation, thus preventing abnormal acceleration or deceleration caused by changes in load torque during rotation.
[0067] This invention also provides a controller, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the motor control method as described in any of the above embodiments. For example... Figure 2 As shown in S201-S203.
[0068] This invention also provides a driving device, including the driving mechanism and the controller described in the above embodiments; the controller is connected to the stepper motor 1 and the position sensing mechanism 2, and is used to control the stepper motor 1 to work according to the position signal.
[0069] As an example, the drive device includes the drive mechanism and controller described in the previous example. The controller can be mounted on the PCB board 7 along with the Hall sensor, and is electrically connected to the stepper motor 1 and the Hall sensor. Based on the position signal output by the Hall sensor and the operating current of the stepper motor 1, the controller controls the stepper motor 1 to operate. In this example, by acquiring the position signal and the operating current of the stepper motor 1, the controller can identify abnormal states of the stepper motor 1 and then control the stepper motor 1 to stop operating according to a protection control strategy, thus timely shutting down the stepper motor 1 and protecting the stepper motor 1 and the reduction mechanism 3 in the drive device. The controller can also control the stepper motor 1 to operate according to an adaptive control strategy based on the position signal and the operating current of the stepper motor 1, so that the second workpiece connected to the drive mechanism can maintain a uniform rotation speed, avoiding changes in rotation speed caused by changes in torque during rotation.
[0070] This invention also provides a toilet seat, including a fixed base, a toilet seat plate, a toilet seat ring, and at least one driving device as described in the above embodiments; the toilet seat plate and the toilet seat ring are rotatably mounted on the fixed base; the driving device is fixedly mounted on the fixed base, one end of the driving device is connected to the toilet seat plate, and is used to acquire the position signal of the toilet seat plate when rotating, and control the rotation of the toilet seat plate; or, one end of the driving device is connected to the toilet seat ring, and is used to acquire the position signal of the toilet seat ring when rotating, and control the rotation of the toilet seat ring.
[0071] As an example, the toilet seat includes a fixed base, a toilet seat plate, a toilet seat ring, and at least one drive device as described in the example above. The toilet seat plate and toilet seat ring are rotatably mounted on the fixed base, and the drive device is fixedly mounted on the fixed base. The output spindle 324 of the drive mechanism in the drive device is connected to the toilet seat plate or toilet seat ring. The controller in the drive device can acquire the position signal of the toilet seat plate or toilet seat ring when rotating, and determine the rotation state of the toilet seat plate or toilet seat ring based on the position signal. According to the corresponding control strategy, the controller in the drive device can acquire the position signal of the toilet seat plate or toilet seat ring when rotating, combine it with the operating current of the stepper motor, identify the abnormal state of the drive mechanism, and control the stepper motor 1 to stop working, so as to shut down the stepper motor 1 in time and protect the stepper motor 1 and the reduction mechanism 3 in the drive mechanism. The controller can also control the stepper motor 1 to work according to the position signal and the working current of the stepper motor 1, so that the drive device and the toilet seat or toilet seat ring connected to the drive device can maintain a uniform rotation speed, avoiding changes in rotation speed caused by changes in torque during rotation.
[0072] The above-described 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A control method for a drive mechanism, characterized in that, include: Acquire the position signal collected by the position sensing mechanism and the current current of the stepper motor; If the position signal or the current current meets the preset protection conditions, the stepper motor is controlled to stop working; If the position signal and the current do not meet the preset protection conditions, the stepper motor is controlled to operate based on the target current according to the adaptive control strategy.
2. The control method for the drive mechanism according to claim 1, characterized in that, The preset protection conditions are: The current position change rate is not within the first preset change rate range, or the target position deviation is less than the preset deviation, or the current current is not within the preset current range; The rate of change of the current position is determined based on the position signal at the current moment and the position signal at the previous moment; The target position deviation is the position deviation determined based on the current position signal and the target position signal.
3. The control method for the drive mechanism according to claim 2, characterized in that, The target position signal includes the measured starting point position signal and the measured ending point position signal; The control method for the drive mechanism includes: After the stepper motor is powered on for the first time, the stepper motor is controlled to rotate in the first direction, and the first sampling position signal is obtained based on the preset sampling frequency; The difference between the first sampling position signal at the current time and the first sampling position signal at the previous time is compared to obtain the first sampling distance difference. If the first sampling distance difference is less than the preset sampling difference, the first sampling position signal at the current time is taken as the measured starting point position signal. Control the stepper motor to rotate in the second direction, and acquire the second sampling position signal based on the preset sampling frequency; The difference between the second sampling position signal at the current moment and the second sampling position signal at the previous moment is compared to obtain the second sampling distance difference; if the second sampling distance difference is less than the preset sampling difference, the second sampling position signal at the current moment is taken as the measured endpoint position signal.
4. The control method for the drive mechanism according to claim 2, characterized in that, After the stepper motor is stopped, the control method for the drive mechanism further includes: Continue acquiring position signals collected by the position sensing mechanism; If the position signal is within the preset damping position range, then the current operating current of the stepper motor is controlled to be the preset damping current.
5. The control method for the drive mechanism according to claim 2, characterized in that, The adaptive control strategy, which controls the stepper motor to operate based on the target current, includes: If the rate of change of the current position is greater than the second preset rate of change range, the first current is reduced to determine the target current and the stepper motor is controlled to work based on the target current. If the rate of change of the current position is less than the second preset rate of change range, the first current is increased to determine the target current, and the stepper motor is controlled to work based on the target current.
6. A controller comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the motor control method as described in any one of claims 1 to 5.
7. A driving device, characterized in that, Includes a drive mechanism and the controller as described in claim 6; The controller is connected to the stepper motor and the position sensing mechanism, and is used to control the stepper motor to work according to the position signal.
8. A toilet seat, characterized in that, Includes a mounting base, a toilet seat, a toilet seat ring, and at least one drive device as described in claim 7; The toilet seat and the toilet seat ring are rotatably mounted on the fixed base; The drive device is fixedly installed on the fixed base. One end of the drive device is connected to the toilet seat and is used to obtain the position signal of the toilet seat when it rotates and control the rotation of the toilet seat. Alternatively, one end of the drive device is connected to the toilet seat ring to obtain the position signal of the toilet seat ring when it rotates, and to control the rotation of the toilet seat ring.