CN113273877A - Motor stroke reporting method and device, motor, electric curtain and storage medium - Google Patents

Motor stroke reporting method and device, motor, electric curtain and storage medium Download PDF

Info

Publication number
CN113273877A
CN113273877A CN202010102874.3A CN202010102874A CN113273877A CN 113273877 A CN113273877 A CN 113273877A CN 202010102874 A CN202010102874 A CN 202010102874A CN 113273877 A CN113273877 A CN 113273877A
Authority
CN
China
Prior art keywords
motor
current
preset
error
stroke
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010102874.3A
Other languages
Chinese (zh)
Other versions
CN113273877B (en
Inventor
廖钊堡
刘兵
廖瑞云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lutuo Technology Co Ltd
Original Assignee
Shenzhen Lutuo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lutuo Technology Co Ltd filed Critical Shenzhen Lutuo Technology Co Ltd
Priority to CN202010102874.3A priority Critical patent/CN113273877B/en
Publication of CN113273877A publication Critical patent/CN113273877A/en
Application granted granted Critical
Publication of CN113273877B publication Critical patent/CN113273877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47HFURNISHINGS FOR WINDOWS OR DOORS
    • A47H5/00Devices for drawing draperies, curtains, or the like
    • A47H5/02Devices for opening and closing curtains
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47HFURNISHINGS FOR WINDOWS OR DOORS
    • A47H5/00Devices for drawing draperies, curtains, or the like
    • A47H5/02Devices for opening and closing curtains
    • A47H2005/025Devices for opening and closing curtains controlled by electronic sensors

Abstract

The embodiment of the application provides a motor stroke reporting method and device, a motor, an electric curtain and a storage medium, wherein the motor stroke reporting method comprises the following steps: when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor; calculating a current travel error according to the current travel position and a preset travel position; and reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to the preset travel position. The motor travel reporting method provided by the embodiment of the application can avoid that a user judges the running state of the motor by mistake, and is further beneficial to intelligent control of a curtain.

Description

Motor stroke reporting method and device, motor, electric curtain and storage medium
Technical Field
The application relates to the field of smart homes, in particular to a motor stroke reporting method and device, a motor, an electric curtain and a storage medium.
Background
With the continuous development of science and technology and the continuous improvement of the living standard of people, modern people are not more and more satisfied with the current living situation, and instead, the urgent pursuit of more comfortable high-grade living environment is adopted, so that smart homes (home automation) also come with the urgent pursuit, so-called smart homes take homes as platforms, facilities related to home life are integrated by utilizing a comprehensive wiring technology, a network communication technology, a safety precaution technology, an automatic control technology and an audio and video technology, a high-efficiency management system of home facilities and home schedule affairs is constructed, the home safety, convenience, comfortableness and artistry are improved, and the environment-friendly and energy-saving living environment is realized.
The electric curtain is taken as a ring in the intelligent home system, and is popular among people due to the advantages of convenience in use and intelligence simplicity. The electric curtain controls the curtain motor in a wireless mode and drives the pulley to move, and then the opening and closing of the curtain are controlled. In the operation process of the curtain motor, the curtain motor usually operates to a specified stroke position according to a stroke set by a user, so that the pulley drives the curtain to open and close to the corresponding position. However, due to the loss of the conversion calculation accuracy of the curtain motor and the limited accuracy of the hall sensor, the last travel position of the curtain motor will often be different from the travel position specified by the user, and the last stop position of the curtain will also deviate from the set value of the user, and in fact, the deviation is normal, so that the user cannot correctly judge the state of the curtain, which is not beneficial to the intelligent control of the curtain.
Disclosure of Invention
In view of the above problems, embodiments of the present application provide a method and an apparatus for reporting a motor stroke, a motor, a motorized window treatment, and a storage medium, which can determine an operation result according to an actual position error of the motor, and report the operation result, thereby facilitating intelligent control of the window treatment and avoiding a user from erroneously determining an operation state of the motor.
In a first aspect, an embodiment of the present application provides a method for reporting a stroke of a motor, which is applied to a motorized window curtain, and includes acquiring a current stroke position of the motor when the motor runs to a stop according to a predetermined stroke; calculating a current travel error according to the current travel position and a preset travel position; and reporting a first travel message when the current travel error is less than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position.
In a second aspect, an embodiment of the present application provides a motor stroke reporting device, which is applied to an electric window curtain, and includes a position obtaining module, configured to obtain a current stroke position of a motor when the motor runs to a stop according to a predetermined stroke; the error calculation module is used for calculating the current travel error according to the current travel position and the preset travel position; and the reporting module is used for reporting a travel message when the current travel error is less than or equal to a preset error threshold, wherein the travel message is used for indicating that the motor runs to a preset travel position.
In a third aspect, embodiments of the present application provide an electrical machine, including a processor and one or more memories, where the one or more memories are used to store program instructions executed by the processor, and the processor executes the program instructions to implement the method described above.
In a fourth aspect, embodiments of the present application provide a motorized window treatment, which includes a rail and the motor as described above connected to the rail.
In a fifth aspect, the present application provides a computer-readable storage medium storing program instructions, where the program instructions are executed by a processor to implement the above method.
Compared with the prior art, the motor stroke reporting method provided by the embodiment of the application obtains the current stroke position of the motor when the motor runs to a stop according to the preset stroke position; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of a network system provided in an embodiment of the present application.
Fig. 2 shows a schematic structural diagram of a motorized window shade according to an embodiment of the present application.
Fig. 3 shows a flowchart of a motor stroke reporting method provided in an embodiment of the present application.
Fig. 4 is a flowchart illustrating another method for reporting a motor stroke according to an embodiment of the present application.
Fig. 5 is a flowchart illustrating another method for reporting a motor stroke according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating another method for reporting a motor stroke according to an embodiment of the present application.
Fig. 7 shows a block diagram of a device for reporting a motor stroke according to an embodiment of the present application.
Fig. 8 shows a block diagram of an electric machine provided in an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative and are only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the continuous development of science and technology and the continuous improvement of the living standard of people, modern people are not more and more satisfied with the current living situation, and instead, the urgent pursuit of more comfortable high-grade living environment is adopted, so that smart homes (home automation) also come with the urgent pursuit, so-called smart homes take homes as platforms, facilities related to home life are integrated by utilizing a comprehensive wiring technology, a network communication technology, a safety precaution technology, an automatic control technology and an audio and video technology, a high-efficiency management system of home facilities and home schedule affairs is constructed, the home safety, convenience, comfortableness and artistry are improved, and the environment-friendly and energy-saving living environment is realized.
The electric curtain is taken as a ring in the intelligent home system, and is popular among people due to the advantages of convenience in use and intelligence simplicity. The electric curtain controls the curtain motor in a wireless mode and drives the pulley to move, and then the opening and closing of the curtain are controlled. In the operation process of the curtain motor, the curtain motor usually operates to a specified stroke position according to a stroke set by a user, so that the pulley drives the curtain to open and close to the corresponding position. However, due to the loss of the conversion calculation accuracy of the curtain motor and the limited accuracy of the hall sensor, the stroke position where the curtain motor finally runs is often different from the stroke position specified by the user, and the position where the curtain finally stops is also deviated from the set value of the user, and the deviation is normal in fact. If the current position of the curtain is informed to the user at the moment, and the user does not know that the error is generated when the curtain motor normally operates, the user can mistakenly think that the curtain motor has a fault and does not operate to the specified stroke position, so that the operation state of the motor is judged mistakenly, and the intelligent control of the curtain is not facilitated.
Through research, the inventor provides a motor stroke reporting method, a motor-driven curtain and a storage medium, which are provided by the embodiment of the application, and the current stroke position of the motor is obtained when the motor runs to a stop according to the preset stroke position; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
First, a method and an apparatus for reporting a motor stroke, a motor, a motorized window shade, and an application environment related to a storage medium provided in the embodiment of the present application are introduced.
As shown in fig. 1, fig. 1 is a network system 10 to which the motor stroke reporting method provided in the embodiment of the present application is applied, where the network system 10 includes: terminal device 11, server 12, gateway 13, child device 14, and router 15. The terminal device 11 may be any device having communication and storage functions, for example: in the terminal device 11, a client (which may be an application client, such as a mobile phone APP; or a web page client) for managing the sub-devices and a user account that can log in at the client are stored. In addition, the terminal device 11 may also be an intelligent device with communication and voice control functions, such as a smart speaker, a smart television, and the like, and a voice assistant that receives a user instruction and controls the sub-device 14 to execute the corresponding instruction is stored in the terminal device 11. The server 21 may be a network access server, a database server, a cloud server, or the like.
Optionally, the gateway 13 is built based on a ZigBee (ZigBee peak) protocol, and the sub-device 14 may be a device that is added in the gateway 13 in advance, for example, the ZigBee device may be a device in a suite to which the gateway belongs when the gateway leaves a factory; or a device subsequently connected to the gateway 13 by a user operation. The sub-devices 14 may be physical intelligent devices, such as electric meters, door sensors, body sensors, door and window sensors, temperature and humidity sensors, water sensors, natural gas alarms, smoke alarms, wall switches, wall sockets, smart sockets, wireless switches, wireless wall switches, magic cube controllers, curtain motors, multifunctional gateways, air conditioner partners, smart speakers, smart televisions, cameras, and other intelligent devices, or may be virtual sensor devices, such as virtual body sensor devices, which are not limited herein.
It should be noted that, in the embodiment of the present application, the sub-device 14 includes at least a curtain motor.
Alternatively, one or more of the kid devices 14 may establish a network connection with the gateway 13 based on the ZigBee protocol, thereby joining the ZigBee network. Both the gateway 13 and the terminal device 11 can be connected to a router 15, and can be connected to the ethernet via the router 15, and the router 15 is connected to the server 12 in communication. For example, the gateway 13 and the terminal device 11 may store the acquired information in the server 12. Alternatively, the terminal device 11 may establish a network connection with the server 12, so as to obtain the data sent by the server 12.
Alternatively, the local area network path as shown in fig. 1 indicates that the terminal device 11 is in the same local area network as the router 15 and the gateway 13, and the wide area network path indicates that the terminal device 11 is not in the same local area network as the router 15 and the gateway 13. When the terminal device 11 is in the same local area network as the router 15 and the gateway 13, the terminal device 11 may interact with the gateway 13 and the sub-devices 14 connected to the gateway 13 through the local area network path as shown in fig. 1; it is also possible to interact with the gateway 13 and the sub-devices 14 connected to the gateway 13 via a wide area network path as shown in fig. 1. When the terminal device 11 is not in the same local area network as the router 15 and the gateway 13, the terminal device 11 may interact with the gateway 13 and the sub-devices 14 connected to the gateway 13 through a wide area network path as shown in fig. 1. Optionally, the terminal device 11 may also interact with the sub-device directly through a bluetooth or Zigbee network.
As shown in fig. 2, fig. 2 illustrates a motorized window treatment 20 provided by the embodiment of the present application, where the motorized window treatment 20 is a single-opening window treatment. The embodiment of the present application is only described by taking a single-opening type motorized window treatment as an example, and should not be construed as a limitation on the structure of the motorized window treatment. In some embodiments, the motorized window treatment may also be a double-open window treatment or a roller window treatment.
In this embodiment, the motorized window treatment 20 includes a motor 21, a rail 22, and a pulley 23. Wherein the motor 21 is disposed at an end of the guide rail 22, the trolley 23 is slidably disposed on the guide rail 22, and the motor 21 can drive the trolley 231 to move on the guide rail 22. Specifically, the motor 21 may drive the pulley 23 to move through a transmission mechanism such as a pulley. The pulley 23 is used for pulling the curtain to open and close, when the pulley 23 moves, the curtain is opened or closed correspondingly, and the position of the pulley 23 on the guide rail 22 determines the opening degree of the curtain.
As shown in fig. 3, fig. 3 is a flowchart illustrating a motor stroke reporting method 100 according to an embodiment of the present application, where the method 100 is applied to a motor 21 in the motorized window shade 20, and the motor 21 may serve as a sub-device in the network system 10 and interact with other devices through a communication path in the network system 10.
Further, the motor stroke reporting method 100 provided in the embodiment of the present application may include the following steps S110 to S130.
Step S110: and when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor.
In the motion control of the motor, the position of the motor is controlled by pulse, the PID position controller can calculate the target speed of the motor at the current position through the pulse signal fed back by the Hall sensor and feed back the speed to the PID speed controller, and the PID speed controller adjusts the current speed of the motor in real time according to the target speed, so that the double closed-loop control of the position and the speed of the PID is realized.
In the stroke control of the motor, the Hall sensor can feed back a plurality of pulse signals every time the motor rotates for one circle, so that the stroke of the motor can be calculated through the number of the pulse signals. In this embodiment, the current stroke position of the motor is determined according to the corresponding relationship between the motor stroke and the number of pulses. Firstly, the total pulse number corresponding to the total stroke of the motor can be obtained, then the current stroke of the motor can be calculated according to the conversion of the proportional relation between the current pulse number fed back by the Hall sensor and the total pulse number, and finally the current stroke position of the motor can be obtained according to the initial stroke position and the current stroke of the motor. The total pulse number corresponding to the total stroke of the motor can be measured when the motor is used for the first time. It should be noted that the starting stroke position of the motor is from zero, and after the motor completes the first stroke, the current stroke position of the motor is the starting stroke position of the next stroke, so the starting stroke position of the motor is always known.
In the embodiment of the application, the stroke of the motor represents the relative relation between the moving distance of the driving trolley and the length of the guide rail when the motor moves. For example, if the motor currently drives the trolley to move from the head end of the guide rail to the tail end of the guide rail, the stroke of the motor is 100%. It can be understood that the total stroke of the motor corresponds to the length of the whole guide rail, and when the total pulse number corresponding to the total stroke of the motor is measured, the motor can drive the pulley to move from the head end of the guide rail to the tail end of the guide rail, and then the total pulse number fed back by the hall sensor is detected. In the embodiment of the application, the stroke position of the motor represents the relative relation between the position of the motor for controlling the pulley to stop and the guide rail. For example, if the motor currently drives the trolley to stop at the end of the guide rail, the stroke position of the motor is 100%.
In an example, taking the starting stroke position of the motor as an example from zero, if the total stroke of the motor corresponds to 5000 pulses and the number of the current pulses fed back by the hall sensor is 3000, the current stroke of the motor can be calculated to be 60%, and since the starting stroke position of the motor is zero, the current stroke position of the motor is 60% at this time, that is, the motor drives the trolley to move to the position of 60% of the guide rail. In the next stroke of the motor, 60% is the initial stroke position of the motor.
In some embodiments, the stroke of the motor can also be directly expressed as the distance the drive trolley moves when the motor moves. Accordingly, the stroke position of the motor represents the position where the motor controls the tackle to stop.
The preset travel is issued by a user, the user can issue an instruction through terminal equipment such as an APP in the mobile terminal, a voice assistant in the mobile terminal, an intelligent sound box, an intelligent television and the like, and the instruction is transmitted to the motor through the wide area network path or the local area network path. For example, if the user issues a command "open the curtain by half", the corresponding predetermined stroke after the motor receives the command is to drive the pulley to move to 50% of the length of the guide rail.
And further, calculating the stroke of the motor according to the preset stroke and the initial stroke position, and controlling the motor to run to stop according to the pulse number corresponding to the stroke of the motor. For example, the predetermined stroke is 60%, the initial stroke is 0, then the stroke of the motor is 60%, the 60% stroke corresponds to 3000 pulses, and when the number of pulses fed back by the hall sensor is 3000, the motor is stopped.
After the motor completely stops, the current travel position of the motor can be obtained according to the pulse number fed back by the Hall sensor.
Step S120: and calculating the current travel error according to the current travel position and the preset travel position.
Under the ideal condition, when the motor is controlled according to the preset stroke, when the pulse number fed back by the Hall sensor is detected to reach the pulse number corresponding to the preset stroke, the motor reaches the preset stroke position and stops. This means that the speed of the motor is just zero when it is detected that the number of pulses fed back by the hall sensor reaches the corresponding number of pulses.
In practical situations, when the pulse number fed back by the hall sensor is detected to reach the pulse number corresponding to the preset stroke, the motor reaches the preset stroke position, the motor stops running at the moment, and the speed of the motor cannot be zero. The motor will also tend to continue to move due to inertia until the speed drops to zero, at which point the hall sensor will still feed back a pulse signal. After the motor is completely stopped, the current stroke position of the motor may deviate from the predetermined stroke position, thereby generating a stroke error. It should be noted that the stroke error does not accumulate with the operation of the motor, and only occurs when the operation of the motor is stopped. The reason is that the PID closed-loop control system can correct the stroke error at the next position even if the stroke error is generated while the motor is running, and cannot correct the stroke error at the next position by the PID closed-loop control system after the motor is stopped.
After the motor completely stops, the current stroke position of the motor can be obtained according to the current total pulse number fed back by the Hall sensor, and the stroke error is calculated according to the current stroke position and the preset stroke position of the motor, wherein the stroke error is the difference value between the current stroke position and the preset stroke position.
In this embodiment, the current stroke error is an absolute value of the stroke error. When the motor deviates from the preset stroke position, the PID closed-loop control system can control the motor to move back to enable the motor to be close to the preset stroke position as much as possible, so that when the motor stops completely, the current stroke position of the motor can be larger than the preset stroke position or smaller than the preset stroke position, and the motor generates a positive stroke error and a negative stroke error.
Step S130: and reporting the first travel message when the current travel error is less than or equal to a preset error threshold.
The preset error threshold is pre-stored and is used for indicating whether the current stroke error is in a normal state or not. When the current travel error is smaller than or equal to the preset error threshold, the current travel error can be considered to be in a normal state. The first trip message is used to indicate that the motor has been operated to a predetermined trip position.
Further, the preset error threshold range is equivalent to a dead zone, when the current stroke position of the motor deviates from the preset stroke position, the motor runs, and if the current stroke error of the motor is in a normal state, the PID closed-loop control system does not need to correct the stroke error, so that the system consumption is reduced.
Further, when the motor stops, if the current travel error of the motor is in a normal state, the first travel message can be reported to the user. And if the current travel error of the motor is in a normal state, informing a user that the motor reaches a preset travel position. The first trip message can directly display that the current trip position is the preset trip position or remind the user that the preset trip position is reached. For example, the predetermined stroke position is 60%, actually the current stroke position of the motor is 61% or 59%, the current stroke error is 1%, and if the previous stroke error is 1% smaller than the preset error threshold value or more, the first stroke message may be displayed as "the current stroke position is 60% or" the predetermined position has been reached "even if the current stroke position of the motor deviates from the predetermined stroke position.
Further, the first journey message may be sent to the mobile terminal of the user through the local area network path or the wide area network path of the network system, or may be displayed at the APP client.
It can be understood that, because the ideal state cannot be achieved, when the motor normally operates, a stroke error is inevitably generated. Under normal conditions, the stroke error is actually small, and the normal use experience of the user is not influenced at all. However, even if the travel error does not affect the normal use experience of the user, if the current travel position deviating from the preset travel position is reported to the user, the user does not know that the travel error is normal, and therefore the current travel position deviates from the preset travel position for the motor is in a fault, so that the running state of the motor is judged mistakenly, the intelligent control of the curtain is not facilitated, unnecessary trouble is brought to the user, and the user experience is affected. Therefore, the operation result of the motor is determined according to the actual position error of the motor, the operation result is reported, and when the current travel error is smaller than or equal to the preset error threshold, the preset travel position set by the user can be directly reported to the user, so that the user is prevented from judging the operation state of the motor by mistake, the user experience is improved, and the intelligent control of the curtain is facilitated. In addition, any hardware equipment does not need to be added or replaced, and better use experience can be provided for users while the production cost is not additionally increased.
According to the motor stroke reporting method provided by the embodiment of the application, when the motor runs to a stop according to a preset stroke position, the current stroke position of the motor is obtained; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
As shown in fig. 4, another method 200 for reporting a motor stroke is further provided in the embodiment of the present application, where the method 200 may include the following steps S210 to S260.
Step S210: and acquiring the total length of the current operation track.
The total length of the current running track is also the total length of the guide rail. In this embodiment, when the total pulse number corresponding to the total stroke of the motor is measured, since the pulse number fed back by the hall sensor per rotation of the motor is constant, and the distance that the pulley can be driven to move per rotation of the motor is also constant, the total length of the guide rail, that is, the total length of the current running track, can be calculated according to the total pulse number corresponding to the total stroke of the motor. Therefore, the length of the guide rail with any length can be calculated, so that the motor is suitable for guide rails with different lengths.
In some embodiment modes, the length of the guide rail can be actually measured manually, so that the length of the guide rail can be stored in a motor or a cloud terminal after being measured manually in advance, and then the stored length of the guide rail is read. Wherein, the motor can be stored in advance by manufacturer personnel before the motor leaves a factory; it can also be stored by the user himself, for example the user sets up through the APP client, to prevent the user from changing the guide rail.
After the length of the current operation track is obtained, a preset error threshold value can be determined according to the total length of the operation track.
Step S220: and determining a preset error threshold according to the total length of the current running track and the reference error distance.
The reference error distance is a pre-stored inherent error distance of the motor operation. According to the above, the stroke error always exists when the motor normally runs to stop. Specifically, the trolley always deviates from the target position by a certain distance from the normal running of the motor to the stop of the motor, and the always deviated distance is the inherent error distance of the motor. The intrinsic error distance is practically fixed and is determined by the precision of the hall sensor and the motor itself. Generally, the inherent error distance may be 2cm, i.e. the trolley will always be 2cm from the target position from the time the motor is running normally to the time it is stopped.
In some embodiments, the intrinsic error distance may be debugged and measured by a manufacturer before the motor leaves a factory, and the intrinsic error distance may be pre-stored in the motor or the cloud.
In this embodiment, after the inherent error distance is determined, a preset error threshold is calculated according to a scaling relationship between the inherent error distance and the total length of the guide rail, where the preset error threshold may be a ratio between the inherent error distance and the total length of the current guide rail. For example, if the length of the guide rail is 1m and the inherent error distance is 2cm, the preset error threshold is 2%. If the length of the guide rail is 2m and the inherent error distance is 2cm, the preset error threshold value is 1%. It will be appreciated that different rail lengths correspond to different preset error thresholds. After the guide rails are replaced, the preset error threshold value can be corrected.
In some embodiments, rounding up may be performed when the preset error threshold is too small or not an integer. For example, when the calculated preset error threshold is 0.5%, the preset error threshold may be 1%.
Step S230: and when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor.
Step S240: and calculating the current travel error according to the preset travel position of the current travel position.
Step S250: and reporting the first travel message when the current travel error is less than or equal to a preset error threshold.
Step S260: and reporting the second travel message when the current travel error is larger than a preset error threshold.
As can be seen from the above, when the current stroke error is less than or equal to the preset error threshold, the current stroke error is considered to be in the normal state. Then, when the current stroke error is greater than the preset error threshold, the current stroke error is considered to be in an abnormal state. At this time, the motor may have a large stroke error due to a fault, and therefore, a second stroke message is reported to the user at this time.
The second travel message is used to indicate the current travel position of the motor, i.e., the current actual travel position of the motor. For example, the predetermined stroke position is 60%, the current stroke position of the motor is 63% or 57%, the current stroke error is 3%, and the preset error threshold is 2%, and the current stroke error is greater than the preset error threshold, at this time, the second stroke message sent to the user may be "the current stroke position is 63%" or "the motor has deviated from the predetermined position", so as to alert the user that the motor may have a fault.
According to the motor travel reporting method provided by the embodiment of the application, the total length of the current running track is obtained, and then a preset error threshold value is determined according to the total length of the current running track and a reference error distance; then, when the motor runs to a stop according to the preset stroke position, the current stroke position of the motor is obtained; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
As shown in fig. 5, another method 300 for reporting a motor stroke is further provided in the embodiment of the present application, where the method 300 may include the following steps S310 to S370.
Step S310: and acquiring the total length of the current operation track.
After the total length of the current running track is obtained, a preset error threshold value can be determined according to the total length of the current running guide rail.
Step S320: and acquiring a preset stroke error comparison table.
In this embodiment, the travel error comparison table is used to indicate a corresponding relationship between the total length of the current operation track and a preset error threshold. That is, the travel error lookup table indicates different preset error thresholds for different rail lengths. The travel error map can be referred to in table 1.
Length of guide rail 0.5m 1m 1.5m 2m
Presetting an error threshold 4% 2% 2% 1%
TABLE 1
Further, the stroke error map may be stored in the motor in advance. As can be seen from the above table, the longer the length of the guide rail, the smaller the preset error threshold can be set.
Step S330: and acquiring a preset error threshold corresponding to the total length of the current running track by a table look-up method.
After the length of the guide rail is obtained, a preset error threshold corresponding to the length of the guide rail can be obtained through table lookup. Further, when the length of the guide rail is changed, a new preset error threshold value can still be obtained through table lookup. Through the table look-up method, the motor does not need to calculate the preset error threshold value by itself, so that the processing resource can be saved, and the response speed is improved.
Step S340: and when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor.
Step S350: and calculating the current travel error according to the preset travel position of the current travel position.
Step S360: and reporting the first travel message when the current travel error is less than or equal to a preset error threshold.
Step S370: and reporting the second travel message when the current travel error is larger than a preset error threshold.
The motor stroke reporting method provided by the embodiment of the application comprises the steps of firstly obtaining the total length of a current running track, and then obtaining a preset stroke error comparison table; then, acquiring a preset error threshold corresponding to the total length of the current running track by a table look-up method; then when the motor runs to a stop according to the preset stroke position, acquiring the current stroke position of the motor; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
As shown in fig. 6, an embodiment of the present application further provides another method 400 for reporting a motor stroke, where the method 400 may include the following steps S410 to S470.
Step S410: and acquiring the current curtain weight.
In practical situations, when the motor drives the pulley to move, the pulley simultaneously pulls the curtain. Because the curtain has a certain weight, the weight of the curtain can bring resistance to the movement of the motor, so that the stroke error generated by the motor is larger.
In this embodiment, the weight of the current curtain can be input by the user at the APP client and stored at the motor or the cloud. In some embodiments, the current shade weight may be acquired by a sensor and the acquired data transmitted to the motor.
Step S420: and acquiring a preset weight error comparison table.
In this embodiment, the weight error comparison table is used to indicate the corresponding relationship between the curtain weight and the preset error threshold. That is, the travel error lookup table indicates different preset error thresholds corresponding to different curtain weights. The weight error table can be referred to in table 2.
Curtain weight A B C D
Presetting an error threshold a b c d
TABLE 2
Further, the weight error look-up table is pre-stored in the motor. Specifically, before the motor leaves the factory, a preset error threshold corresponding to the weight of the other curtain can be determined according to the reference curtain weight, and a weight error comparison table is formed and prestored in the motor. Under the weight of the reference curtain, the resistance of the motor movement is most suitable, and the movement effect is best. The greater the deviation of the weight of the other shade from the reference shade weight, as compared to the reference shade weight, the greater the stroke error of the motor, and correspondingly, the greater the corresponding preset error threshold.
Step S430: and acquiring a preset error threshold corresponding to the current curtain weight through a table look-up method.
After the current curtain weight is obtained, a preset error threshold corresponding to the current curtain weight can be obtained through table lookup. Further, when the weight of the curtain changes, a new preset error threshold value can still be obtained through table lookup. Through the table look-up method, the motor does not need to calculate the preset error threshold value by itself, so that the processing resource can be saved, and the response speed is improved.
Step S440: and when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor.
Step S450: and calculating the current travel error according to the current travel position and the preset travel position.
Step S460: and reporting the first travel message when the current travel error is less than or equal to a preset error threshold.
Step S470: and reporting the second travel message when the current travel error is larger than a preset error threshold.
The motor travel reporting method provided by the embodiment of the application comprises the steps of firstly obtaining the current curtain weight; then obtaining a preset weight error comparison table; then, acquiring a preset error threshold corresponding to the current curtain weight through a table look-up method; then when the motor runs to a stop according to the preset stroke position, acquiring the current stroke position of the motor; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
As shown in fig. 7, an embodiment of the present application further provides a device 500 for reporting a motor stroke, where the device 500 includes a position obtaining module 501, an error calculating module 502, and a reporting module 503.
The position obtaining module 501 is configured to obtain a current stroke position of the motor when the motor runs to a stop according to a predetermined stroke; the error calculation module 502 is configured to calculate a current stroke error according to the current stroke position and the predetermined stroke position; the reporting module 503 is configured to report the first trip message when the current trip error is smaller than or equal to a preset error threshold.
In some embodiments, the apparatus 500 further includes a length obtaining module 504, a threshold calculating module 505, and an exception reporting module 506.
The length obtaining module 504 is configured to obtain a total length of the current running track; the threshold calculation module 505 is configured to determine a preset error threshold according to the total length of the current running track and the reference error distance; the exception reporting module 506 is configured to report the second trip message when the current trip error is greater than the preset error threshold.
In some embodiments, the apparatus 500 further comprises a first lookup table obtaining module 507 and a first lookup table module 508.
The first comparison table obtaining module 507 is configured to obtain a preset stroke error comparison table; the first table lookup module 508 is configured to obtain a preset error threshold corresponding to the total length of the current operation track through a table lookup method.
In some embodiments, the apparatus 500 further comprises a weight acquisition module 509, a second look-up table acquisition module 510, and a second look-up table module 511.
The weight obtaining module 507 is used for obtaining the current curtain weight; the second comparison table obtaining module 508 is configured to obtain a preset weight error comparison table; the second table lookup module 509 is configured to obtain a preset error threshold corresponding to the current curtain weight through a table lookup method.
The motor stroke reporting device provided by the application embodiment acquires the current stroke position of the motor when the motor runs to a stop according to the preset stroke position; calculating a current travel error according to the current travel position and a preset travel position; and finally, reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to a preset travel position. The method and the device for reporting the motor position error determine the operation result according to the actual position error of the motor and report the operation result. When the current travel error is smaller than or equal to the preset error threshold, the running state of the motor is normal, and at the moment, the motor is directly informed to a user that the motor runs to the preset travel position, so that the situation that the user judges the running state of the motor by mistake is avoided, and the intelligent control of the curtain is facilitated.
As shown in fig. 8, an embodiment of the present application further provides a motor 600, which is applied to the above-mentioned motor stroke reporting method. The motor 600 includes a processor 610 and one or more memories 620, where the one or more memories 620 are used for storing program instructions executed by the processor 610, and when the processor 610 executes the program instructions, the motor stroke reporting method is implemented.
Further, processor 610 may include one or more processing cores. The processor 610 executes or executes instructions, programs, sets of code or instructions stored in the memory 620 and invokes data stored in the memory 620. Alternatively, the processor 610 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 610 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is to be understood that the modem may be implemented by a communication chip without being integrated into the processor.
The embodiment of the application also provides an electric curtain which comprises a guide rail and the motor connected with the guide rail.
Embodiments of the present application also provide a storage medium storing program instructions that, when executed by a processor, implement the above-described method.
The storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the storage medium comprises a non-transitory computer-readable storage medium REC medium. The storage medium has a storage space for program code for performing any of the method steps of the above-described method. The program code can be read from or written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
Although the present application has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (11)

1. A motor stroke reporting method is characterized by comprising the following steps:
when the motor runs to a stop according to a preset stroke, acquiring the current stroke position of the motor;
calculating a current travel error according to the current travel position and a preset travel position; and
and reporting a first travel message when the current travel error is smaller than or equal to a preset error threshold, wherein the first travel message is used for indicating that the motor runs to the preset travel position.
2. The method of claim 1, wherein prior to obtaining the current travel position, further comprising:
acquiring the total length of a current running track; and
and determining the preset error threshold according to the total length of the current running track.
3. The method of claim 2, wherein determining the preset error threshold based on the total length of the current running track comprises:
determining the preset error threshold according to the total length of the current running track and a reference error distance; wherein the reference error distance is a pre-stored inherent error distance of the motor operation.
4. The method of claim 2, wherein determining the preset error threshold based on the total length of the current running track comprises:
acquiring a preset stroke error comparison table, wherein the stroke error comparison table is used for indicating the corresponding relation between the total length of the current running track and the preset error threshold; and
and acquiring the preset error threshold corresponding to the total length of the current running track by a table look-up method.
5. The method of claim 1, wherein prior to obtaining the current travel position, further comprising:
acquiring the current curtain weight; and
and determining the preset error threshold according to the current curtain weight.
6. The method of claim 5, wherein determining the preset error threshold based on the current shade weight comprises:
acquiring a preset weight error comparison table, wherein the weight error comparison table is used for indicating the corresponding relation between the curtain weight and the preset error threshold value; and
and acquiring the preset error threshold corresponding to the current curtain weight through a table look-up method.
7. The method of any one of claims 1-6, wherein after calculating a current travel error based on the current travel position and a predetermined travel position, further comprising:
and when the current travel error is larger than the preset error threshold, reporting a second travel message, wherein the second travel message is used for indicating the current travel position of the motor.
8. A stroke reporting device of a curtain motor is characterized by comprising:
the position acquisition module is used for acquiring the current stroke position of the motor when the motor runs to stop according to a preset stroke;
the error calculation module is used for calculating the current travel error according to the current travel position and the preset travel position; and
and the reporting module is used for reporting a travel message when the current travel error is less than or equal to a preset error threshold, wherein the travel message is used for indicating that the motor runs to the preset travel position.
9. An electrical machine comprising a processor and one or more memories for storing program instructions for execution by the processor, the processor when executing the program instructions implementing the method of any of claims 1 to 7.
10. A motorized window treatment comprising a rail and the motor of claim 9 connected to the rail.
11. A computer readable storage medium storing program instructions, which when executed by a processor implement the method of any of claims 1 to 7.
CN202010102874.3A 2020-02-19 2020-02-19 Motor travel reporting method and device, motor, electric curtain and storage medium Active CN113273877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010102874.3A CN113273877B (en) 2020-02-19 2020-02-19 Motor travel reporting method and device, motor, electric curtain and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010102874.3A CN113273877B (en) 2020-02-19 2020-02-19 Motor travel reporting method and device, motor, electric curtain and storage medium

Publications (2)

Publication Number Publication Date
CN113273877A true CN113273877A (en) 2021-08-20
CN113273877B CN113273877B (en) 2023-11-10

Family

ID=77274907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010102874.3A Active CN113273877B (en) 2020-02-19 2020-02-19 Motor travel reporting method and device, motor, electric curtain and storage medium

Country Status (1)

Country Link
CN (1) CN113273877B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115234123A (en) * 2022-07-04 2022-10-25 上海默控智能科技有限公司 Novel control method for automatic window position of fume hood

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255592A (en) * 2011-07-19 2011-11-23 上海中科深江电动车辆有限公司 Accurate positioning method for rotating position of direct-current motor and relevant positioning device
JP2013151823A (en) * 2012-01-25 2013-08-08 Aisin Seiki Co Ltd Controller for driving vehicular openable cover
CN106968588A (en) * 2017-03-16 2017-07-21 深圳市海浦蒙特科技有限公司 Quick rolling-door control system
CN108923128A (en) * 2018-06-29 2018-11-30 京信通信系统(中国)有限公司 A kind of electricity tune method and apparatus of antenna for base station
CN110174873A (en) * 2018-02-20 2019-08-27 发那科株式会社 Servocontrol device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255592A (en) * 2011-07-19 2011-11-23 上海中科深江电动车辆有限公司 Accurate positioning method for rotating position of direct-current motor and relevant positioning device
JP2013151823A (en) * 2012-01-25 2013-08-08 Aisin Seiki Co Ltd Controller for driving vehicular openable cover
CN106968588A (en) * 2017-03-16 2017-07-21 深圳市海浦蒙特科技有限公司 Quick rolling-door control system
CN110174873A (en) * 2018-02-20 2019-08-27 发那科株式会社 Servocontrol device
CN108923128A (en) * 2018-06-29 2018-11-30 京信通信系统(中国)有限公司 A kind of electricity tune method and apparatus of antenna for base station

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115234123A (en) * 2022-07-04 2022-10-25 上海默控智能科技有限公司 Novel control method for automatic window position of fume hood
CN115234123B (en) * 2022-07-04 2024-02-27 上海默控智能科技有限公司 Control method for automatic window position of fume hood

Also Published As

Publication number Publication date
CN113273877B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN105234952B (en) Household monitoring robot control system based on STM32
CN103389710B (en) A kind of environment of internet of things control method based on context aware and equipment
CN111965985B (en) Smart home equipment control method and device, electronic equipment and storage medium
US20160054017A1 (en) Air conditioning management device, air conditioning system, and program
CN112286150B (en) Intelligent household equipment management method, device and system and storage medium
CN109184536A (en) A kind of control method of electrically driven curtain
CN208186713U (en) A kind of domestic environment intelligence regulation and control system
CN109480592B (en) Intelligent curtain control system and method utilizing wind energy
CN112558491A (en) Home scene linkage intelligent home system based on voice recognition and control method and control device thereof
CN113273877B (en) Motor travel reporting method and device, motor, electric curtain and storage medium
KR20200092807A (en) smart window
CN110966733A (en) Intelligent control method and system for indoor environment and storage medium
CN111817936A (en) Control method and device of intelligent household equipment, electronic equipment and storage medium
CN110595003A (en) Fresh air ventilation device and control method and device of air conditioner
CN109032083A (en) Intelligent sound box and its control method, smart home system, storage medium
CN108894643B (en) A kind of general electric windowing machine controller and its control method
CN110290032A (en) A kind of intelligentized Furniture internet management system
CN215067771U (en) Intelligent panel based on knob switch and touch screen
CN112445193A (en) Method, device and equipment for predicting air conditioner fault and storage medium
CN114123873A (en) Brushless motor controller and control system
CN208337770U (en) A kind of based on WLAN monitoring system
CN111208787A (en) Device state determination method and device, electronic device and storage medium
CN108375916B (en) Use method of electric curtain based on Bluetooth module
WO2020059879A1 (en) Speech-generation device, server, control system, control method, and program
CN113883658B (en) Method for judging whether air conditioner is dirty or not, air conditioner and cloud platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant