Window cleaning robot
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WINDOW CLEAN TECHNOLOGY (SUZHOU) CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-23
Smart Images

Figure CN122250828A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of window cleaning robot technology, and more particularly to a window cleaning robot. Background Technology
[0002] Window cleaning robots are intelligent cleaning devices widely used in high-rise buildings, commercial complexes, and residential glass curtain walls. They are used for automated cleaning of glass surfaces. Their core function is to use a drive system to move the cleaning device across vertical or inclined glass surfaces and complete the cleaning task.
[0003] Existing window cleaning robots rarely detect the speed and direction of rotation of their internal motors, resulting in low motion control accuracy. If Hall effect sensors were directly used to detect these parameters, significant errors would occur due to their susceptibility to electromagnetic interference. Furthermore, Hall effect sensors are mechanically complex to install, making them unsuitable for the control and installation requirements of window cleaning robots, thus limiting their adaptability to various scenarios.
[0004] Therefore, existing window cleaning robots suffer from insufficient control precision and difficulty in adapting to diverse usage scenarios. Summary of the Invention
[0005] This application provides a window cleaning robot to solve the problems of insufficient control precision and difficulty in adapting to diverse usage scenarios of existing window cleaning robots.
[0006] This application provides a window cleaning robot, which includes a drive system, a photoelectric sensor, and a controller. The controller is connected to both the drive system and the photoelectric sensor. The photoelectric sensor includes a grating disk, a transmitter, and a receiver opposite to the transmitter.
[0007] The drive system includes a motor, which includes an output shaft. The output shaft of the motor is connected to the grating disk of the photoelectric sensor, and the grating disk rotates synchronously with the output shaft.
[0008] The grating disk is provided with a light-transmitting part and a light-blocking part. During synchronous rotation, the light-transmitting part transmits the light signal between the transmitter and receiver of the photoelectric sensor, while the light-blocking part blocks the light signal between the transmitter and receiver.
[0009] The photoelectric sensor generates pulse signals based on the transmission and blocking of light signals during the synchronous rotation of the grating disk, and then inputs the pulse signals to the controller.
[0010] The controller receives pulse signals and determines the motor speed based on the pulse signals. The controller also controls the movement of the window cleaning robot based on the motor speed.
[0011] In one possible implementation, the photoelectric sensor is a single-phase photoelectric sensor;
[0012] After receiving the pulse signal, the controller also determines the rotation direction of the motor's output shaft based on the pulse signal;
[0013] The controller controls the movement of the window cleaning robot based on the motor speed and the rotation direction of the output shaft.
[0014] In one possible implementation, the grating disk includes a plurality of light-transmitting portions and a plurality of light-shielding portions, the plurality of light-transmitting portions and the plurality of light-shielding portions being arranged alternately in the circumferential direction of the grating disk;
[0015] Based on the transmission and blocking of light signals by multiple light-transmitting parts and multiple light-blocking parts, the pulse signal exhibits a first signal arrangement characteristic when the output shaft rotates in the forward direction, and a second signal arrangement characteristic when the output shaft rotates in the reverse direction. The first signal arrangement characteristic and the second signal arrangement characteristic are opposite to each other.
[0016] In one possible implementation, the widths of a plurality of light-transmitting portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different; and / or, the widths of a plurality of light-blocking portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different.
[0017] In one possible implementation, the photoelectric sensor is a single-phase photoelectric sensor, and the drive system also includes a reducer connected to the output shaft. The reducer is used to provide a reduction ratio for the drive system. The input end of the reducer is connected to the output shaft, and the output end of the reducer is connected to the load of the drive system.
[0018] In one possible implementation, the reduction ratio of the reducer is configured as a preset reduction ratio, which is used to control the motor to reverse self-locking.
[0019] The controller determines the rotation direction of the motor's output shaft based on the direction control command that controls the rotation direction of the motor.
[0020] The controller controls the movement of the window cleaning robot based on the motor speed and the rotation direction of the output shaft.
[0021] In one possible implementation, the photoelectric sensor is a dual-phase photoelectric sensor, which includes a first transmitter and its corresponding first receiver, and also includes a second transmitter and its corresponding second receiver.
[0022] In one possible implementation, the photoelectric sensor generates a first pulse signal based on the optical signal received by the first receiving end; the photoelectric sensor generates a second pulse signal based on the optical signal received by the second receiving end.
[0023] The controller receives the first and second pulse signals from the photoelectric sensor.
[0024] The controller determines the rotation direction of the motor's output shaft based on the phase relationship between the first and second pulse signals, and controls the movement of the window cleaning robot based on the motor's speed and the rotation direction of the output shaft.
[0025] In one possible implementation, the photoelectric sensor is surface-mounted on the controller, the motor's output shaft passes through a pre-drilled hole in the controller, and the photoelectric sensor's grating disk is coaxially fixed to the motor's output shaft.
[0026] In one possible implementation, the transmitting and receiving ends of the photoelectric sensor are arranged along a first direction, which is perpendicular to the output shaft of the motor. The surfaces containing the light-transmitting and light-shielding portions of the grating disk are the same curved surface, which surrounds the output shaft of the motor, and a portion of the curved surface lies between the transmitting and receiving ends of the photoelectric sensor. Alternatively, the transmitting and receiving ends of the photoelectric sensor are arranged along a second direction, which is parallel to the output shaft of the motor. The surfaces containing the light-transmitting and light-shielding portions of the grating disk are the same plane, which is perpendicular to the output shaft of the motor, and a portion of the plane lies between the transmitting and receiving ends of the photoelectric sensor.
[0027] The window cleaning robot provided in this application overcomes the problems of electromagnetic interference, poor environmental adaptability, and complex installation of Hall sensors by using a coordinated setup of photoelectric sensors and a drive system. The photoelectric sensor, based on the non-contact detection principle of light signals, avoids interference from the motor's magnetic field on signal acquisition, improving signal stability in complex electromagnetic environments. The synchronous rotation of the light-transmitting and light-shielding parts of the grating disk with the motor's output shaft generates pulse signals. The controller calculates the motor speed using the frequency of these pulse signals, eliminating the need for magnets or magnetic shielding structures and reducing mechanical installation complexity. Furthermore, the physical characteristics of the grating disk and photoelectric sensor enable stable operation in extreme environments such as high temperature and high humidity, adapting to diverse application scenarios. This window cleaning robot, through a combination of structural simplification and signal processing algorithms, achieves high-precision and high-reliability motor detection, while also improving long-term maintenance convenience and environmental adaptability. Attached Figure Description
[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0029] Figure 1 A schematic diagram of the window cleaning robot provided in an embodiment of this application;
[0030] Figure 2 A schematic cross-sectional view of the mounting positions of the photoelectric sensor and controller provided in the embodiments of this application. Figure 1 ;
[0031] Figure 3 A schematic cross-sectional view of the mounting positions of the photoelectric sensor and controller provided in the embodiments of this application. Figure 2 ;
[0032] Figure 4 A schematic diagram of a pulse signal provided in an embodiment of this application;
[0033] Figure 5 A schematic diagram of a first signal arrangement feature and a second signal arrangement feature provided for embodiments of this application;
[0034] Figure 6 A schematic diagram of another first signal arrangement feature and a second signal arrangement feature provided in the embodiments of this application;
[0035] Figure 7 A flowchart illustrating the window cleaning robot control method provided in this application embodiment;
[0036] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0037] Explanation of reference numerals in the attached figures:
[0038] 100 - Window cleaning robot; 101 - Drive system; 1011 - Motor; 10111 - Output shaft; 102 - Photoelectric sensor; 1021 - Transmitter; 1022 - Receiver; 1023 - Grating disk; 103 - Controller; 801 - Processor; 802 - Memory.
[0039] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0041] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0042] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0043] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0044] In the embodiments of this application, the use of terms such as "first" and "second" is to distinguish between identical or similar items that have essentially the same function and effect. For example, "first electronic device" and "second electronic device" are merely used to distinguish different electronic devices and do not limit their order of execution. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different.
[0045] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0046] For example, due to the special nature of the working environment of window cleaning robots, they need to operate stably under complex conditions such as strong electromagnetic interference (e.g., the magnetic field generated by the motor during operation), extreme temperatures (e.g., high temperatures in summer or low temperatures in winter), and high humidity (e.g., rainy days or coastal areas). In such scenarios, the motor, as the core component of the drive system, directly affects the robot's movement trajectory, cleaning efficiency, and safety through precise control of its speed and direction.
[0047] For example, when the glass surface is tilted at a large angle, inaccurate motor speed control may cause the robot to slip; incorrect direction detection may cause deviation from the cleaning path. Furthermore, users have high requirements for the ease of maintenance, long-term reliability, and cost control of window cleaning robots. Due to considerations such as design complexity and investment costs, most existing window cleaning robots omit motor speed detection, making it difficult to accurately control the robot based on motor speed during the control process, resulting in low motion accuracy.
[0048] In other fields, Hall effect sensors are often used to detect motor speed. However, due to limitations in their working principle and hardware characteristics, Hall effect sensors are susceptible to electromagnetic interference and are difficult to adapt to the complex working environment of window cleaning robots. Therefore, they cannot meet the high-precision and high-reliability control requirements in such scenarios, necessitating a better motor detection solution.
[0049] Specifically, when relying on Hall effect sensors to detect the motor's speed and direction of rotation, pulse signals are generated by detecting changes in the magnetic field of the magnets on the motor rotor, which are then used to calculate the motor's speed and direction of rotation. A typical structure includes magnets, Hall effect elements, and signal processing circuitry. However, this approach presents several technical challenges when applied to window cleaning robots.
[0050] For example, detection based on Hall sensors suffers from high sensitivity to electromagnetic interference. The magnetic field generated by a motor during operation may interfere with the signal acquisition of the Hall sensor, leading to misjudgments, especially when the motor is running at high speed or in a strong magnetic field environment.
[0051] Furthermore, Hall effect sensors are sensitive to magnet quality, installation location, and ambient temperature, exhibiting poor environmental adaptability. For example, the magnet in a Hall effect sensor needs to be precisely aligned with the motor rotor; installation misalignment or magnet demagnetization due to aging can lead to signal distortion and decreased detection accuracy. Window cleaning robots may operate within a wide temperature range of -40 degrees Celsius to 85 degrees Celsius; high temperature or high humidity environments may accelerate magnet aging or degrade sensor performance.
[0052] For example, high-precision Hall sensors require high-quality magnets and precision circuit design, which increases costs; while low-cost Hall sensors may sacrifice accuracy, making it difficult to find a balance in cost-sensitive applications such as window cleaning robots. Therefore, there is a contradiction between cost and accuracy.
[0053] Furthermore, Hall effect sensors require the use of magnets, increasing the complexity of the mechanical structure design and installation. Long-term use of the magnets can also lead to demagnetization, increasing maintenance difficulty. For example, during the cleaning of glass curtain walls in high-rise buildings, if a Hall effect sensor misinterprets the motor direction, the robot may deviate from the cleaning path or even fall, severely impacting safety and cleaning efficiency.
[0054] The inventors discovered from practical applications of window cleaning robots that Hall effect sensors lack reliability in complex electromagnetic environments and extreme weather conditions, necessitating a motor speed measurement and control solution that is interference-resistant and environmentally adaptable. By analyzing the non-contact detection principle of photoelectric sensors, they found that they can detect rotational speed through periodic changes in light signals without the need for magnets, and are unaffected by magnetic field interference. Further research into the grating disk structure design led to the proposal of generating pulse signals through the regular arrangement of light-transmitting / shielding parts, and determining the motor direction by combining the signal timing characteristics or phase difference.
[0055] For example, single-phase photoelectric sensors distinguish between forward and reverse rotation based on the increasing / decreasing pulse width, while dual-phase photoelectric sensors determine direction through the phase difference between two signals. Ultimately, the inventors optimized the combination of photoelectric sensors and grating disk structures to create a magnet-free, simplified, and environmentally adaptable motor detection solution. This solution was applied to the control process of window cleaning robots, resolving the contradiction between detection accuracy, reliability, and deployment complexity in existing technologies.
[0056] In view of this, this application provides a window cleaning robot. This robot uses a photoelectric sensor to measure motor speed and utilizes the light transmission / blocking characteristics of the photoelectric sensor's grating disk to detect motor speed and direction. Specifically, the window cleaning robot employs a non-contact detection method using a photoelectric sensor, completely avoiding interference from the motor's magnetic field. Pulse signals are generated through the periodic light transmission / blocking pattern of the grating disk, and accurate determination of speed and direction is achieved by combining signal timing characteristics or phase differences. Different detection logics are designed for single-phase and dual-phase photoelectric sensors to adapt to the accuracy and complexity requirements of different application scenarios. This window cleaning robot achieves high-precision and high-reliability detection of motor motion parameters by replacing magnetic signal detection with optical signal detection, and through the combination of grating disk structure design and signal processing logic.
[0057] The window cleaning robot provided in this application embodiment can meet the application scenarios with high requirements for motor control precision and complex working environments. The window cleaning robot needs to operate stably in environments such as glass curtain walls of high-rise buildings and inclined surfaces. Its drive system needs to monitor the motor speed and direction in real time to ensure the accuracy of the cleaning path, anti-slip capability, and energy efficiency.
[0058] For example, the window cleaning robot of this application includes a motor, a photoelectric sensor, and a controller. The photoelectric sensor's grating disk rotates synchronously with the motor's output shaft. The photoelectric sensor generates pulse signals by detecting the light transmission / blocking pattern of the grating disk. The controller calculates the rotational speed based on the pulse signals and determines the rotation direction of the motor's output shaft. Finally, the drive system adjusts the window cleaning robot's motion state. This solution is suitable for extreme environments such as high temperature, high humidity, and strong electromagnetic interference, and can simultaneously meet various application requirements in diverse scenarios.
[0059] The technical solutions of this application will be described in detail below with reference to specific embodiments. The specific embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0060] Figure 1 This is a schematic diagram of the window cleaning robot provided in the embodiments of this application, as shown below. Figure 1 As shown, the window cleaning robot 100 includes a drive system 101, a photoelectric sensor 102, and a controller 103, which is connected to the drive system 101 and the photoelectric sensor 102 respectively.
[0061] Figure 2 A schematic cross-sectional view of the mounting positions of the photoelectric sensor and controller provided in the embodiments of this application. Figure 1 ; Figure 3 A schematic cross-sectional view of the mounting positions of the photoelectric sensor and controller provided in the embodiments of this application. Figure 2 .like Figure 1 , Figure 2 and Figure 3 As shown, the photoelectric sensor 102 includes a transmitter 1021 and a receiver 1022 opposite to the transmitter 1021, and also includes a grating disk 1023. The placement of the transmitter 1021 and the receiver 1022 is not limited to... Figure 2 and Figure 3 The deployment locations shown are as follows. Figure 2 and Figure 3 The locations of the transmitter 1021 and receiver 1022 can be interchanged.
[0062] The controller 103 can be understood as an electronic device with corresponding data storage and computing capabilities, such as a control module or a control chip. The controller 103 can be an electronic control unit used to receive pulse signals and calculate motor speed, and can be integrated into the main control module of the window cleaning robot 100, such as a microcontroller or microprocessor in the main control module of the window cleaning robot 100.
[0063] like Figure 1 , Figure 2 and Figure 3 As shown, the drive system 101 includes a motor 1011, which includes an output shaft 10111. The output shaft 10111 of the motor 1011 is connected to the grating disk 1023 of the photoelectric sensor 102, and the grating disk 1023 rotates synchronously with the output shaft 10111. The grating disk 1023 is provided with a light-transmitting part and a light-blocking part. During synchronous rotation, the light-transmitting part transmits the light signal between the transmitting end 1021 and the receiving end 1022 of the photoelectric sensor 102, and the light-blocking part blocks the light signal between the transmitting end 1021 and the receiving end 1022.
[0064] The photoelectric sensor 102 generates pulse signals based on the transmission and blocking of light signals during the synchronous rotation of the grating disk 1023, and inputs the pulse signals to the controller 103. The controller 103 receives the pulse signals and determines the rotation speed of the motor 1011 based on the pulse signals. The controller 103 also controls the movement of the window cleaning robot 100 based on the rotation speed of the motor 1011.
[0065] For example, motor 1011 can be a motor of any power and structure, such as a DC motor. The output shaft 10111 of motor 1011 is the main shaft of the motor rotor and can output mechanical energy. Photoelectric sensor 102 can be understood as a sensor used to detect motion parameters by the transmission and obstruction of light signals, and can include through-beam or reflective photoelectric sensors. For example, a through-beam photoelectric sensor consists of a transmitter 1021 and a receiver 1022, and the light signal propagates between the transmitter 1021 and the receiver 1022.
[0066] The photoelectric sensor 102 can be, for example, an infrared photoelectric sensor, with the transmitter 1021 being an infrared emitting diode and the receiver 1022 being a photosensitive element. Of course, the photoelectric sensor 102 can also be a photoelectric sensor using visible light, laser, or other types of light sources, but this application embodiment does not limit this.
[0067] The grating disk 1023 is a component of the photoelectric sensor 102. The grating disk 1023 can be understood as a disk structure that rotates synchronously with the output shaft 10111 of the motor 1011. Its surface can be provided with light-transmitting and light-blocking portions to periodically change the transmission state of the light signal. For example, the grating disk 1023 can be a ring-shaped or disk-shaped structure, with the light-transmitting portion being an opening and the light-blocking portion being an opaque material. The light-transmitting portion can be the area on the grating disk 1023 that allows the light signal to pass through, and its shape and arrangement can be flexibly designed. For example, the light-transmitting portion can be a circular, rectangular, or trapezoidal opening. The light-blocking portion can be the area on the grating disk 1023 that blocks the light signal from passing through, and its shape and arrangement can be flexibly designed. For example, the light-blocking portion can be solid metal or opaque plastic.
[0068] In one possible implementation, the photoelectric sensor is surface-mounted on the controller, the motor's output shaft passes through a pre-drilled hole in the controller, and the photoelectric sensor's grating disk is coaxially fixed to the motor's output shaft.
[0069] For example, surface mounting can be understood as directly attaching one component to the surface of another component. For instance, a photoelectric sensor is fixed to the surface of a controller using screws. The pre-drilled holes are specifically designed for the output shaft, allowing the controller to be fitted around the motor's output shaft. This results in a compact and rational layout of the motor, controller, and photoelectric sensor, saving internal space in the window cleaning robot.
[0070] like Figure 2 As shown, the transmitter 1021 and receiver 1022 of the photoelectric sensor 102 are surface-mounted on the surface of the controller 103. The output shaft 10111 of the motor 1011 passes through a pre-drilled hole in the controller 103. The grating disk 1023 is coaxially fixed to the output shaft 10111. The transmitter 1021 and receiver 1022 of the photoelectric sensor are aligned along a first direction ( Figure 2 The direction shown by the dashed line is arranged such that the first direction is perpendicular to the output shaft 10111 of the motor 1011. The light-transmitting part and the light-shielding part of the grating disk 1023 are on the same curved surface. This curved surface is arranged around the output shaft 10111 of the motor 1011, and a part of this curved surface is located between the transmitting end 1021 and the receiving end 1022 of the photoelectric sensor 102.
[0071] For example, when the output shaft 10111 rotates, the grating disk 1023 rotates synchronously, and the light-transmitting part and the light-blocking part periodically transmit or block the light signal path of the photoelectric sensor 102. For example, when the light-transmitting part of the grating disk 1023 rotates to the space between the transmitting end 1021 and the receiving end 1022 of the photoelectric sensor 102, the light signal is transmitted, and an effective level can be formed; when the light-blocking part rotates to the light signal path, the light signal between the transmitting end 1021 and the receiving end 1022 is blocked by the light-blocking part, and an invalid level can be formed.
[0072] like Figure 3 As shown, the receiving end 1022 of the photoelectric sensor 102 is surface-mounted on the surface of the controller 103, the output shaft 10111 of the motor 1011 passes through the reserved hole in the controller 103, and the grating disk 1023 is coaxially fixed to the output shaft 10111. The transmitting end 1021 and the receiving end 1022 of the photoelectric sensor are along the second direction ( Figure 3 The light-transmitting and light-shielding parts of the grating disk 1023 are arranged in the direction indicated by the dashed line. The second direction is parallel to the output shaft 10111 of the motor 1011. The surfaces containing the light-transmitting and light-shielding parts of the grating disk 1023 are on the same plane, which is perpendicular to the output shaft 10111 of the motor 1011. A portion of this plane lies between the transmitting end 1021 and the receiving end 1022 of the photoelectric sensor 102. Of course, in this solution, the transmitting end 1021 of the photoelectric sensor 102 can also be surface-mounted on the surface of the controller 103 to achieve the same technical effect.
[0073] For example, when the output shaft 10111 rotates, the grating disk 1023 rotates synchronously, and the light-transmitting part and the light-blocking part periodically transmit or block the light signal path of the photoelectric sensor 102. For example, when the light-transmitting part of the grating disk 1023 rotates to the space between the transmitting end 1021 and the receiving end 1022 of the photoelectric sensor 102, the light signal is transmitted, and an effective level can be formed; when the light-blocking part rotates to the light signal path, the light signal between the transmitting end 1021 and the receiving end 1022 is blocked by the light-blocking part, and an invalid level can be formed.
[0074] In this embodiment, a surface-mount design for the photoelectric sensor and controller achieves both structural compactness and reliable signal transmission. Specifically, the surface-mount design reduces the number of connecting cables between the photoelectric sensor and the controller, lowering signal transmission loss. Simultaneously, the grating disk is coaxially fixed to the output shaft, ensuring synchronization during rotation. For example, when the window cleaning robot climbs the glass surface, the compact design reduces interference from the external environment on signal transmission, thereby maintaining the stability of the pulse signal. This design, through structural integration and process optimization, enables the window cleaning robot to operate with high reliability in complex environments.
[0075] It should be understood that the installation positions of the photoelectric sensor, controller and motor are not limited to the layout of the above embodiments, and can be adjusted according to the needs of specific application scenarios. This application embodiment does not limit this.
[0076] For example, the window cleaning robot 100 drives the grating disk 1023 to rotate synchronously via the motor 1011 in the drive system 101. During the rotation, the light-transmitting part and the light-blocking part of the grating disk 1023 periodically transmit or block the light signal between the transmitter 1021 and the receiver 1022 of the photoelectric sensor 102.
[0077] When the light-transmitting part is in the optical signal path, the optical signal between the transmitting end 1021 and the receiving end 1022 can propagate normally, and the receiving end 1022 can receive the optical signal emitted by the transmitting end 1021, thus forming an effective or ineffective level at the receiving end 1022. When the light-blocking part is in the optical signal path, the optical signal between the transmitting end 1021 and the receiving end 1022 is blocked and cannot propagate normally, and the receiving end 1022 cannot receive the optical signal emitted by the transmitting end 1021, thus forming a level at the receiving end 1022 that is opposite to that during normal propagation.
[0078] Valid and invalid voltage levels can be understood as an opposite pair of voltage levels. For example, if a high voltage level is preset as the valid level, then a low voltage level is the invalid level; conversely, if a high voltage level is preset as the invalid level, then a low voltage level is the valid level. If the optical signal path is blocked and the voltage level is valid, then it is invalid when the optical signal path is not blocked; conversely, if the optical signal path is blocked and the voltage level is invalid, then it is valid when the optical signal path is not blocked.
[0079] The photoelectric sensor 102 generates pulse signals based on the transmission and blocking of light signals, and can input the pulse signals to the controller 103. For example, when the pulse signals generated by the photoelectric sensor 102 are alternating high and low levels, the high level can be preset as the effective level and the low level as the ineffective level; or the low level can be preset as the effective level and the high level as the ineffective level.
[0080] After generating alternating high and low level pulse signals, they can be synchronously input to the controller 103 for analysis and processing. For example, the controller 103 calculates the rotational speed of the motor 1011 by analyzing the frequency (number of pulses per unit time) of the pulse signal, and adjusts the working state of the drive system 101 according to the rotational speed to control the movement of the window cleaning robot 100.
[0081] After receiving the pulse signal, the controller 103 can determine the rotational speed of the motor 1011 based on the pulse signal. For example, based on the pulse signal, the number of unit pulse groups per unit time is counted, and then the rotational speed of the motor 1011 can be calculated based on the number of unit pulse groups per unit time. The unit time can be any preset duration, such as 1 second, 2 seconds, etc. A unit pulse group can be understood as a collection of pulses generated when the grating disk 1023 completes one revolution. A unit pulse group can include at least one active level and one inactive level.
[0082] Figure 4 A schematic diagram of the pulse signal provided in the embodiments of this application, as shown below. Figure 4 The image shows a received pulse signal, consisting of multiple high and low levels. If the pulse generated when the grating disk completes one full rotation consists of 5 high levels (active levels) and 5 low levels (inactive levels), then one pulse unit can represent one full rotation of the grating disk. Therefore, it can be understood that every 5 high and 5 low levels represent one full rotation of the grating disk, which is also one full rotation of the output shaft.
[0083] If the controller performs counting and statistical analysis based on the received pulse signals and determines that there is one unit pulse group within one second, it means that the output shaft rotates one revolution per second. Therefore, the motor speed can be expressed as 1 revolution per second (rpm), or equivalent to 60 revolutions per minute (rpm). Conversely, if the pulse signal contains 5 unit pulse groups within one second, it means that the output shaft rotates 5 revolutions per second. Therefore, the motor speed can be expressed as 5 revolutions per second (rpm), or equivalent to 300 revolutions per minute (rpm).
[0084] Of course, the motor speed can also be determined in other ways. For example, the light-transmitting and light-blocking parts in the grating disk can be set to be equal in number and evenly spaced, so that the effective and ineffective levels in the obtained pulse signal will also be evenly distributed. Furthermore, since the light-transmitting and light-blocking parts are equal and evenly arranged, the rotation angle corresponding to the interval between the previous and next effective levels can be known in advance. The angular velocity of the grating disk, i.e., the angular velocity of the motor output shaft, can be calculated from the rotation angle and the rotation time interval between those rotation angles. The motor speed can also be calculated from the angular velocity. Besides the methods mentioned above, other methods can also be used to determine the motor speed based on the pulse signal; this application does not limit these methods.
[0085] For example, when the load of the drive system 101 is the walking part (track or wheels), the motor speed can be determined based on the pulse signal, and the controller can control the speed of the walking part of the window cleaning robot 100 based on the motor speed to realize the start, stop, acceleration, and deceleration of the walking part. As another example, when the load of the drive system 101 is the cleaning part (rotating cleaning disc, moving scraper), the motor speed can be determined based on the pulse signal, and the controller can control the operation frequency and speed of the cleaning part of the window cleaning robot 100 based on the motor speed. Yet another example, when the load of the drive system 101 is the negative pressure fan impeller, the motor speed can be determined based on the pulse signal, and the controller can control the speed of the negative pressure fan impeller based on the motor speed, thereby increasing or decreasing the adhesion of the window cleaning robot 100 to the surface of the object being cleaned.
[0086] The window cleaning robot provided in this application, through the coordinated setup of photoelectric sensors and drive system, can overcome the problems of Hall sensors such as electromagnetic interference, poor environmental adaptability, and complex installation.
[0087] Specifically, the photoelectric sensor, based on the non-contact detection principle of light signals, avoids interference from the motor's magnetic field on signal acquisition, thus improving signal stability in complex electromagnetic environments for the window cleaning robot. The light-transmitting and light-shielding parts of the grating disk rotate synchronously with the motor's output shaft to generate pulse signals. The controller calculates the motor speed using the frequency of these pulse signals, eliminating the need for magnets or magnetic shielding structures and reducing mechanical installation complexity. Furthermore, the physical characteristics of the grating disk and photoelectric sensor enable stable operation even in extreme environments such as high temperature and high humidity, adapting to diverse application scenarios for the window cleaning robot. This window cleaning robot, through a combination of structural simplification and signal processing algorithms, achieves high-precision and high-reliability motor detection, while also improving long-term maintenance convenience and environmental adaptability.
[0088] In one possible implementation, the photoelectric sensor is a single-phase photoelectric sensor; after receiving the pulse signal, the controller also determines the rotation direction of the motor's output shaft based on the pulse signal; the controller controls the movement of the window cleaning robot based on the motor's speed and the rotation direction of the output shaft.
[0089] For example, a single-phase photoelectric sensor can be understood as a photoelectric sensor with only one set of transmitter and receiver. Single-phase photoelectric sensors have advantages such as simple structure, low deployment complexity, and low material cost. After receiving the pulse signal, the controller can also determine the rotation direction of the motor's output shaft based on the pulse signal, for example, by determining the order in which the effective and ineffective levels appear in the initial stage of the pulse signal.
[0090] Since the distribution of the light-transmitting and light-blocking parts in the grating disk is fixed during installation, the order in which the first effective level and the first invalid level appear are completely opposite when the motor output shaft rotates forward and in reverse, respectively. Thus, the rotation direction of the output shaft can be determined by judging the order in which the levels appear.
[0091] For example, it can be predefined that if the first valid level in the pulse signal appears before the first invalid level, the rotation direction of the motor's output shaft is forward (i.e., clockwise); and predefined that if the first valid level in the pulse signal appears after the first invalid level, the rotation direction of the motor's output shaft is reverse (i.e., counterclockwise). Which direction represents clockwise rotation and which represents counterclockwise rotation can be set according to the requirements of the application scenario.
[0092] This method allows for determining the rotation direction of the motor's output shaft based on pulse signals. However, it has certain limitations. For example, it is suitable for determining the rotation direction during the motor's startup phase (when the speed increases from zero). Furthermore, during startup, the path of the light signal is precisely at the boundary between the light-transmitting and light-blocking parts, ensuring a relatively accurate determination of the output shaft's rotation direction based on the sequence of effective and ineffective levels in the pulse signal.
[0093] To overcome the shortcomings of the above method, the layout of the light-transmitting and light-blocking parts in the grating disk can be specifically configured to achieve a low-restriction determination of the rotation direction of the motor's output shaft based on the pulse signal.
[0094] In one possible implementation, the grating disk includes multiple light-transmitting portions and multiple light-blocking portions, which are staggered in the circumferential direction of the grating disk. Based on the transmission and blocking of light signals by the multiple light-transmitting portions and the multiple light-blocking portions, the pulse signal exhibits a first signal arrangement characteristic when the output shaft rotates in the forward direction, and a second signal arrangement characteristic when the output shaft rotates in the reverse direction. The first signal arrangement characteristic and the second signal arrangement characteristic are opposite to each other.
[0095] For example, the alternating arrangement in the circumferential direction can be understood as the light-transmitting parts and the light-blocking parts being arranged alternately along the circumference of the grating disk. For instance, the light-transmitting parts and the light-blocking parts are distributed alternately along the circumference in a 1:1 ratio. In addition to the multiple light-transmitting parts and multiple light-blocking parts being arranged alternately in the circumferential direction of the grating disk, the multiple light-transmitting parts and multiple light-blocking parts also need to have the ability to generate mutually opposite signal arrangement characteristics when rotating clockwise and counterclockwise.
[0096] The signal arrangement characteristics of a pulse signal can be understood as the pulse arrangement characteristics of the pulse signal in the dimensions of time and pulse amplitude. For example, a pulse signal may include multiple identical unit pulse groups. In any unit pulse group, the durations of the successively arranged effective levels (and / or ineffective levels) are not exactly the same, thus giving the unit pulse group a unique pulse arrangement characteristic. As another example, a pulse signal may include multiple identical unit pulse groups. In any unit pulse group, the durations of the successively arranged effective levels (and / or ineffective levels) are not only different, but the pulse amplitudes are also different, thus giving the unit pulse group its own unique pulse arrangement characteristic.
[0097] Figure 5 A schematic diagram of a first signal arrangement feature and a second signal arrangement feature provided in an embodiment of this application is shown below. Figure 5 As shown, for the pulse signal with the first signal arrangement characteristic, looking at the time axis from 0 forward, the high-level width (representing the duration of the high level) in each unit pulse group is arranged as 1 millisecond (ms), 5 ms, 3 ms, and 2 ms; the low-level width (representing the duration of the low level) is arranged as 1 ms, 5 ms, 3 ms, and 2 ms. To obtain such a pulse signal, it is only necessary to pre-set the dimensions of multiple light-transmitting parts and multiple light-blocking parts.
[0098] For example, four light-transmitting sections and four light-blocking sections are arranged alternately along the circumference of the grating disk, respectively: a light-transmitting section 1 mm wide, a light-blocking section 1 mm wide, a light-transmitting section 5 mm wide, a light-blocking section 5 mm wide, a light-transmitting section 3 mm wide, a light-blocking section 3 mm wide, a light-transmitting section 2 mm wide, and a light-blocking section 2 mm wide. It should be understood that this is merely an example; in practical applications, the ratio between the width of the light level and the size of the light-transmitting / light-blocking section can be other ratios, and is not limited to 1:1.
[0099] Overall, the pulse signal with the first signal arrangement characteristic presents the following pattern within a single pulse group: 1ms, 1ms, 5ms, 5ms, 3ms, 3ms, 2ms, 2ms. This pulse signal with the first signal arrangement characteristic can be the pulse signal generated when the output shaft rotates forward, causing the grating disk to transmit / block the light signal. When the output shaft rotates in the reverse direction, the signal arrangement characteristic of the pulse signal generated after the output shaft drives the grating disk to transmit / block the light signal will be exactly the opposite of the first signal arrangement characteristic, resulting in a pulse signal with the signal arrangement characteristic of 2ms, 2ms, 3ms, 3ms, 5ms, 5ms, 1ms, 1ms, as shown in the image. Figure 5 The pulse signal is a second signal arrangement feature shown in the figure.
[0100] It is evident that when the controller receives either of two pulse signals with opposite signal arrangement characteristics, the rotation direction of the grating disk can be determined based on the pulse arrangement characteristics, thus determining the rotation direction of the motor output shaft. Furthermore, through... Figure 5 It is also known that the duration of one pulse group of the pulse signal is 22ms. Therefore, it takes 22ms for the output shaft to rotate one revolution. Through calculation, it can be known that the output shaft rotates about 45.5 revolutions per second, so the speed of the output shaft can be calculated to be about 2730rpm.
[0101] In this embodiment, the signal arrangement characteristics of the pulse signal can also be understood as the timing characteristics of the pulse signal. Since the grating disk in this solution includes multiple light-transmitting parts and multiple light-blocking parts, and these parts are staggered in the circumferential direction of the grating disk; based on the transmission and blocking of the light signal by the multiple light-transmitting parts and the multiple light-blocking parts, the pulse signal exhibits a first signal arrangement characteristic when the output shaft rotates in the forward direction, and a second signal arrangement characteristic when the output shaft rotates in the reverse direction. The first signal arrangement characteristic and the second signal arrangement characteristic are opposite to each other.
[0102] In this way, based on the fixed arrangement of multiple light-transmitting parts and multiple light-blocking parts of the grating disk, two pulse signals with completely opposite timing characteristics can be generated when the output shaft rotates in the forward and reverse directions. This allows the controller of the window cleaning robot to determine both the motor speed and the rotation direction of the output shaft with only a single-phase photoelectric sensor. This not only reduces the number of sensors required but also reduces the complexity of the sensor layout and the direction judgment logic, thereby improving the self-testing and self-control capabilities of the window cleaning robot.
[0103] Furthermore, in one possible implementation, the widths of the plurality of light-transmitting portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different; and / or, the widths of the plurality of light-blocking portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different.
[0104] For example, when the widths of multiple light-transmitting parts increase sequentially in the circumferential direction of the grating disk, this is reflected in the generated pulse signal as a sequential increase in pulse width. This makes it easier for the controller to determine the rotation direction through the signal arrangement characteristics of the pulse signal.
[0105] Figure 6 A schematic diagram illustrating another first signal arrangement feature and a second signal arrangement feature provided in an embodiment of this application, as shown below. Figure 6As shown, for the pulse signal with the first signal arrangement characteristic, looking at the time axis extending backward from 0, the width arrangement characteristics of the high level in each unit pulse group are 1ms, 2ms, 3ms, and 4ms; the width arrangement characteristics of the low level are 1ms, 2ms, 3ms, and 4ms. The overall signal arrangement characteristics of the pulse signal with the first signal arrangement characteristic are 1ms, 1ms, 2ms, 2ms, 3ms, 3ms, 4ms, and 4ms.
[0106] To obtain such a pulse signal, it is only necessary to pre-set four light-transmitting parts and four light-blocking parts to be arranged alternately along the circumference of the grating disk, with the width of the four light-transmitting parts increasing sequentially along the circumference of the grating disk. Each increment is, for example, 1mm. For instance, setting four light-transmitting parts and four light-blocking parts, respectively, with widths of 1mm, 1mm, 2mm, 2mm, 3mm, 3mm, 4mm, and 4mm respectively. This will allow the output shaft to generate a pulse signal as it rotates. Figure 6 The pulse signal is shown as the first signal arrangement characteristic.
[0107] If the aforementioned grating disk, when rotating in the forward direction, produces pulse signals with signal arrangement characteristics of 1ms, 1ms, 2ms, 2ms, 3ms, 3ms, 4ms, and 4ms, then when the grating disk rotates in the reverse direction with the output shaft, it can produce pulse signals with opposite signal arrangement characteristics. For example... Figure 6 The pulse signal with the second signal arrangement characteristic in the pulse signal, the signal arrangement characteristic presented in a unit pulse group of the pulse signal is 4ms, 4ms, 3ms, 3ms, 2ms, 2ms, 1ms, 1ms.
[0108] As can be seen, when the controller receives either a pulse signal with a gradually increasing or decreasing pulse width, the rotation direction of the grating disk can be determined based on the pulse arrangement characteristics, which in turn determines the rotation direction of the motor output shaft. Similarly, the rotational speed of the output shaft can be calculated from the pulse signal; further examples will not be provided here.
[0109] It should be noted that, regarding the incremental increase, the incremental increase in the width of multiple light-transmitting portions in the circumferential direction of the grating disk can reflect the increasing trend of the pulse width of the pulse signal. Therefore, the incremental increase of the light-transmitting portions is not limited; for example, they can be at least partially the same or at least partially different. In short, as long as it reflects the increasing trend of the pulse width of each adjacent pulse, it is acceptable.
[0110] When the increment magnitudes are at least partially the same, this is reflected in the signal arrangement characteristics of the pulse signals, including: all pulses have the same increment magnitude (e.g., Figure 6The pulse widths all increase by one width unit, including cases where the increments are the same or different.
[0111] The increment magnitude can be either the same or partially different. For example, the width of the (n+1)th high level is increased by 1 unit based on the width of the nth high level, and the width of the (n+2)th high level is also increased by 1 unit based on the width of the (n+1)th high level. The increment magnitude of subsequent high levels can be 2 units, 3 units, or other values, without restriction.
[0112] When the increment magnitudes are at least partially different, the signal arrangement characteristics reflected in the pulse signals include: the case where the increment magnitudes of all pulses are different, as well as the case where the increment magnitudes are partially the same and partially different.
[0113] In cases where the increments of all pulses are not the same, for example, the width of the (n+1)th high level increases by 1 unit based on the width of the nth high level, the width of the (n+2)th high level also increases by 2 units based on the width of the (n+1)th high level, the width of the (n+3)th high level also increases by 3 units based on the width of the (n+2)th high level, and each subsequent high level increases by 1 unit compared to the previous high level, and so on.
[0114] It is evident that regardless of how the increment of multiple light-transmitting parts changes, as long as it reflects the gradual increase in the pulse width of adjacent effective levels in the pulse signal, the controller can determine the rotation direction of the output shaft through the pulse signal.
[0115] The arrangement of multiple light-blocking parts follows a similar pattern to the arrangement of multiple light-transmitting parts, as long as it achieves a signal arrangement characteristic with gradually increasing or decreasing pulse widths during forward or reverse transmission. It should be noted that the increment of the multiple light-blocking parts can be the same as or different from the increment of the multiple light-transmitting parts.
[0116] For example, a grating disk may have three light-transmitting parts and three light-blocking parts arranged alternately. The circumferential widths of the three light-transmitting parts are 1mm, 2mm, and 3mm respectively; the circumferential widths of the three light-blocking parts are 5mm, 9mm, and 20mm respectively. Therefore, the overall width arrangement is 1mm, 5mm, 2mm, 9mm, 3mm, and 20mm. In this way, the controller can determine the rotation direction by analyzing the increasing patterns of each effective or ineffective voltage level individually; or by analyzing both the increasing patterns of the effective and ineffective voltage levels.
[0117] It should be noted that, in one specific implementation, if the scheme includes: the widths of multiple light-transmitting parts increasing sequentially in the circumferential direction of the grating disk, with the increments being at least partially the same or at least partially different, then it can be understood that the arrangement of the multiple light-shielding parts is unrestricted. This is because the rotation direction can be determined simply by analyzing the pulse width timing characteristics of the pulses generated by the multiple light-transmitting parts, and the arrangement of the light-shielding parts will not affect the accuracy of the rotation direction determination.
[0118] Similarly, in one specific embodiment, if the scheme includes: the widths of multiple light-blocking parts increasing sequentially in the circumferential direction of the grating disk, with the increments being at least partially the same or at least partially different, then it can be understood that the arrangement of the multiple light-transmitting parts is unrestricted. This is because the rotation direction can be determined simply by analyzing the pulse width timing characteristics of the pulses generated by the multiple light-blocking parts, and the arrangement of the light-transmitting parts will not affect the accuracy of the rotation direction determination.
[0119] In this embodiment, since the widths of multiple light-transmitting parts in the circumferential direction of the grating disk increase sequentially, and / or the widths of multiple light-blocking parts in the circumferential direction of the grating disk increase sequentially, the pulse signal obtained through the grating disk will also have a pattern of sequentially increasing pulse width. Compared with the pulse signal of the first signal arrangement feature and the pulse signal of the second signal arrangement feature, which do not have an increasing pattern, the pulse signal of the grating disk based on this scheme can quickly determine the rotation direction by analyzing less pulse width.
[0120] For example, in a pulse signal with no increasing pattern in its first signal arrangement, the pulse widths of each high level in a single pulse group are 1ms, 5ms, 3ms, 2ms, and 3ms respectively (the pulse width variation pattern is not uniform). To determine the direction of rotation, the entire pulse group needs to be analyzed; it is impossible to accurately determine the direction of rotation by analyzing only a portion of the pulse width variations. For instance, analyzing only "3ms, 2ms" and only "2ms, 3ms" will yield completely opposite results regarding the direction of rotation.
[0121] In pulse signals with an increasing pattern of first signal arrangement, the pulse widths of each high level in a unit pulse group are 1ms, 2ms, 3ms, 4ms, and 5ms respectively (the pulse width variation pattern is uniform). Therefore, when determining the rotation direction, it is not necessary to analyze the entire unit pulse group; analyzing only a portion of it is sufficient to accurately determine the rotation direction. For example, analyzing only "2ms, 3ms" and only "3ms, 4ms" will yield the same result regarding the rotation direction.
[0122] As can be seen, since the width settings of multiple light-transmitting parts and / or multiple light-shielding parts in the embodiments of this application have a uniform variation law (increasing), the risk of misjudgment when determining the rotation direction is lower, and the amount of data required to determine the selected direction can also be less, so that the rotation direction of the output shaft can be determined more quickly, conveniently and accurately.
[0123] For example, when the controller controls the movement of the window cleaning robot based on the motor speed and the rotation direction of the output shaft, it can perform multi-faceted control. The following example illustrates this by adjusting the walking speed and direction of the walking unit.
[0124] When adjusting the walking speed of the walking unit according to the motor speed and the rotation direction of the output shaft, the controller can adjust the motor output power according to the difference between the current motor speed and the target speed, so that the window cleaning robot can maintain a constant speed. When an abnormal speed is detected, the speed is reduced or increased in time to avoid slipping or hitting the window frame too fast.
[0125] When adjusting the walking direction of the walking unit according to the speed of the motor and the rotation direction of the output shaft, the controller can determine whether the window cleaning robot is moving forward, backward or turning according to the rotation direction of the motor output shaft. When it is necessary to change the travel route, the controller controls the window cleaning robot to complete left turn, right turn or change direction by switching the rotation direction of the motor output shaft.
[0126] In this embodiment, since the photoelectric sensor is a single-phase photoelectric sensor, it has a simple structure, low deployment complexity, and is less susceptible to electromagnetic interference or other environmental factors. Therefore, it can conveniently and accurately detect the speed and rotation direction of the motor. After receiving the pulse signal, the controller determines the rotation direction of the motor's output shaft based on the pulse signal, and controls the movement of the window cleaning robot based on the motor's speed and the rotation direction of the output shaft.
[0127] Based on this, the high precision requirements of motor control for window cleaning robots can be met, and the objective challenges of complex working environments such as high altitude and high / low temperature can be reliably addressed. This enables window cleaning robots to operate stably in environments such as high-rise building glass curtain walls and inclined surfaces, and ensures the accuracy of the cleaning path executed by the window cleaning robot, while improving anti-slip capability and energy efficiency.
[0128] For example, installation misalignment or mechanical vibration between the grating disk and the motor output shaft can cause the grating disk to shift, affecting the alignment of the optical signal path of the photoelectric sensor and resulting in pulse signal loss or distortion. To address this, a floating connection structure (such as a flexible coupling or floating bearing) can be introduced between the grating disk and the motor output shaft, allowing the grating disk to float slightly in the axial and radial directions to maintain alignment with the optical signal path of the photoelectric sensor.
[0129] In one possible implementation, a floating connection structure is provided between the grating disk and the output shaft of the motor, which allows the grating disk to float slightly in the axial and radial range.
[0130] For example, a floating connection structure can be understood as a connection device that allows components to move freely within a defined range. Examples include flexible couplings or floating bearings. A floating connection structure (such as a flexible coupling) is positioned between a grating disk and the output shaft of a DC motor, allowing the grating disk to float slightly within axial and radial ranges.
[0131] When the motor output shaft shifts due to vibration, the floating connection structure absorbs the vibration energy through elastic deformation, ensuring that the grating disk remains aligned with the optical signal path of the photoelectric sensor. For example, an elastic coupling compensates for axial misalignment through compression / tension deformation, while a floating bearing compensates for radial misalignment through sliding friction.
[0132] Floating connection structures can automatically adjust the position of the grating disk when the motor output shaft vibrates by utilizing the deformation absorption capacity of elastic materials (such as rubber or silicone) or low-friction bearings. For example, flexible couplings absorb vibration energy through compression / tension deformation, ensuring that the light-transmitting part of the grating disk is always in the optical signal path of the photoelectric sensor, avoiding signal loss or distortion due to mechanical misalignment.
[0133] This improves the signal stability of the photoelectric sensor during long-term operation, while reducing the precision requirements for the motor output shaft machining, further simplifying the mechanical assembly process. Furthermore, the adaptive characteristics of the floating structure allow the system to maintain dynamic alignment between the grating disk and the photoelectric sensor even under complex operating conditions (such as tilted or bumpy glass surfaces), thus ensuring detection accuracy and reliability.
[0134] Based on this, dynamic alignment between the grating disk and the photoelectric sensor is achieved. Specifically, the floating connection structure absorbs the vibration energy of the motor, ensuring that the light-transmitting part of the grating disk is always in the optical signal path of the photoelectric sensor, avoiding signal loss or distortion due to mechanical misalignment. For example, when a window cleaning robot climbs an inclined glass surface, the motor output shaft may vibrate due to load changes. The floating connection structure can adjust the position of the grating disk in real time, thereby maintaining the stability of the pulse signal and improving the robustness of the window cleaning robot under complex working conditions.
[0135] In one possible implementation, the floating connection structure is a flexible coupling, which includes an elastic material layer sandwiched between the grating disk and the output shaft of the motor.
[0136] For example, a flexible coupling can be understood as a device that achieves connection through an elastic material. For instance, the elastic material layer can be rubber or silicone. The elastic material layer of the flexible coupling is sandwiched between the grating disk and the motor output shaft. When the motor output shaft vibrates, the elastic material layer absorbs vibration energy through compression / tension deformation, causing the grating disk to float slightly in the axial and radial directions. For example, the elastic material layer compresses 0.5 mm in the axial direction to compensate for the axial offset of the motor output shaft and deforms 0.2 mm in the radial direction to compensate for the radial offset.
[0137] Based on this, the dynamic response of the floating connection is optimized through the elastic material layer of the flexible coupling. Specifically, the deformation characteristics of the elastic material layer allow the grating disk to adjust its position in real time during motor vibration, thereby maintaining the alignment of the optical signal path between the grating disk and the photoelectric sensor. For example, when the motor is running at high speed, the elastic material layer can quickly absorb high-frequency vibrations, preventing signal loss due to vibration of the grating disk. This design, through the combination of material properties and structural design, significantly improves the long-term stability and anti-interference capability of the system.
[0138] In one possible implementation, the photoelectric sensor is a single-phase photoelectric sensor, and the drive system also includes a reducer connected to the output shaft. The reducer is used to provide a reduction ratio for the drive system. The input end of the reducer is connected to the output shaft, and the output end of the reducer is connected to the load of the drive system.
[0139] For example, a speed reducer, also known as a gearbox or reducer, is a mechanical transmission device installed between a motor and a load. A speed reducer can reduce the motor's speed and increase torque output. Examples of speed reducers include planetary speed reducers, gear reducers, worm gear reducers, or harmonic reducers.
[0140] The input end of the speed reducer is connected to the output shaft, and the output end is connected to the load of the drive system. The speed reducer provides a reduction ratio to the drive system. The reduction ratio can be understood as the ratio between the speed of the motor's output shaft (i.e., the speed at the input end of the speed reducer) and the speed at the output end of the speed reducer. It represents the ratio of the input speed to the output speed of the speed reducer, and thus the factor by which the speed is reduced and the torque is amplified. For example, if the speed of the motor's output shaft is 3000 rpm, and after being reduced by the speed reducer, the speed at the output end of the speed reducer is 100 rpm, then the reduction ratio is 3000:100 = 30.
[0141] In this embodiment of the application, by setting a speed reducer between the motor and the load, the output speed of the motor can be reduced, the output torque can be increased, and the equivalent inertia can be reduced, making the motor of the window cleaning robot easier to control, more stable in operation, and improving the load driving capability.
[0142] In one possible implementation, the reduction ratio of the reducer is configured to a preset reduction ratio, which is used to control the motor to reverse self-lock; the controller determines the rotation direction of the motor's output shaft according to the direction control command that controls the rotation direction of the motor; the controller controls the movement of the window cleaning robot according to the motor's speed and the rotation direction of the output shaft.
[0143] For example, the preset reduction ratio is used to control the motor's reverse self-locking. The preset reduction ratio can be determined based on parameters such as the motor's output power and output torque. After determining the preset reduction ratio, a reducer with that preset reduction ratio can be installed on the motor. For example, the preset reduction ratio can be a reduction ratio of 100 or higher, meaning it can reduce the motor's output shaft speed by more than 100 times (e.g., a reduction ratio of 140). For instance, if the motor's output shaft speed is 3000 rpm, the speed at the reducer's output end should be controlled below 30 rpm.
[0144] Motor reverse self-locking can be understood as allowing the motor to actively drive the load to rotate, but not allowing the load to drive the motor to rotate in the opposite direction. When the reduction ratio of the reducer is configured to a preset reduction ratio, the motor can achieve reverse self-locking capability. In this way, the motor can stop rotating immediately when it needs to stop or reverse, which makes it easier for the controller to determine the rotation direction of the motor's output shaft based on the directional control command that controls the rotation direction of the motor.
[0145] In this embodiment, the reduction ratio of the reducer connected to the motor is configured to a preset reduction ratio, which is the reduction ratio that controls the motor to reverse self-lock. This allows the motor to immediately rotate forward upon receiving a forward rotation direction control command and immediately reverse upon receiving a reverse rotation direction control command. Based on this, the controller can promptly and accurately determine the rotation direction of the motor output shaft according to the direction control command that controls the rotation direction of the motor.
[0146] In one possible implementation, the photoelectric sensor is a dual-phase photoelectric sensor, which includes a first transmitter and its corresponding first receiver, and also includes a second transmitter and its corresponding second receiver.
[0147] For example, a dual-phase photoelectric sensor can be understood as a photoelectric sensor comprising two independent transmitters and receivers. For instance, the first transmitter and receiver detect phase A light signals, and the second transmitter and receiver detect phase B light signals. A dual-phase photoelectric sensor can be a single, independent sensor, or it can be composed of two independent single-phase photoelectric sensors combined.
[0148] Based on a dual-phase photoelectric sensor, the rotation direction of the motor output shaft can be detected quickly and accurately, improving the accuracy of rotation direction determination.
[0149] In one possible implementation, the photoelectric sensor generates a first pulse signal based on the light signal received by the first receiving end; the photoelectric sensor generates a second pulse signal based on the light signal received by the second receiving end; the controller receives the first and second pulse signals input by the photoelectric sensor; the controller determines the rotation direction of the motor's output shaft based on the phase relationship between the first and second pulse signals, and controls the movement of the window cleaning robot based on the motor's speed and the rotation direction of the output shaft.
[0150] For example, the phase relationship can be understood as the phase difference between the corresponding pulse signals of the two optical signals. The first transmitter and the first receiver of the dual-phase photoelectric sensor can detect the A-phase optical signal and generate the first pulse signal; the second transmitter and the second receiver can detect the B-phase optical signal and generate the second pulse signal.
[0151] When the grating disk rotates, the phase difference between phase A and phase B signals reflects the motor direction. For example, phase A leads phase B during forward rotation, and phase B leads phase A during reverse rotation. The controller can determine the selected motor direction by analyzing the phase difference between the two pulse signals. This method does not rely on the special layout of the light-transmitting and / or light-blocking parts of the grating disk.
[0152] In this embodiment, the phase difference detection using a dual-phase photoelectric sensor enables high-precision determination of the rotation direction of the motor output shaft. Specifically, the phase difference between the two pulse signals directly reflects the rotation direction of the motor, and the stability of the phase difference is unaffected by the arrangement of the light-transmitting portion of the grating disk. For example, even if the grating disk experiences a slight shift due to mechanical vibration, the phase difference between phase A and phase B signals remains stable, thereby improving the reliability of direction determination. Furthermore, the design of the dual-phase photoelectric sensor does not rely on the increasing / decreasing width pattern of the grating disk.
[0153] In one possible implementation, the first transmitter and the second transmitter are offset by a preset angle in the circumferential direction of the grating disk. The preset angle is the preset central angle between the two transmitters of the dual-phase photoelectric sensor.
[0154] For example, the preset angle can be 90°, indicating that the two transmitting ends are spaced 90° apart circumferentially on the grating disk. When the two transmitting ends of the dual-phase photoelectric sensor are offset by a preset angle circumferentially on the grating disk, the phase difference between phase A and phase B signals is determined by this preset angle as the grating disk rotates. For instance, if the DC motor has two pole pairs, the preset angle can be set to 90°, ensuring a 90° phase difference between phase A and phase B signals, thereby guaranteeing the uniqueness of the direction determination.
[0155] Based on this, the stability of the phase difference is enhanced by optimizing the preset angle. The preset angle setting ensures that the phase difference between phase A and phase B signals always meets the direction determination requirements; for example, phase A leads by 90° during forward rotation, and phase B leads by 90° during reverse rotation. This reduces phase difference distortion caused by grating disk misalignment or mechanical vibration, thereby improving the robustness of direction determination. Furthermore, the dynamic adaptation of the preset angle allows the system to maintain high-precision direction detection capabilities under different motor specifications.
[0156] Below, in conjunction with Figure 7 The window cleaning robot of the present application embodiment will be further described. Figure 7 This is a flowchart illustrating the window cleaning robot control method provided in an embodiment of this application. The executing entity of this control method can be an electronic device, such as a controller. Figure 7 As shown, after the window cleaning robot system is started, the photoelectric sensor initialization step can be performed first. In addition, changes in ambient light can be detected to perform ambient light detection and adaptive adjustment.
[0157] For example, parameters of a photoelectric sensor include photoelectric pulse count, sensor brightness (adjustable), and sensor health status (e.g., a Boolean value of 1 indicating health and a Boolean value of 0 indicating a fault). Motor control parameters include, for example, set speed (target speed), actual speed, Pulse Width Modulation (PWM) duty cycle, and rotation direction. When initializing the photoelectric sensor, the controller pin connected to the sensor can be configured as a pull-up input to reduce interference signals.
[0158] It detects ambient light intensity and can automatically adjust the sensitivity of the sensor receiver based on the ambient light intensity. For example, if a strong light environment is detected, the sensor sensitivity can be increased; if a weak light environment is detected, the sensitivity can be decreased to avoid false triggering; if a normal environment is detected, the photoelectric sensor receiver can be controlled according to a preset value.
[0159] During the initialization and subsequent stages of the photoelectric sensor, its health status can also be monitored. For example, before officially starting the motor, a first speed signal can be given to the motor, causing it to rotate several revolutions at the known first speed. During this process, the photoelectric sensor receives a pulse signal. The motor speed can be calculated based on this pulse signal. If the difference between the tested speed and the first speed is within a preset error range, the photoelectric sensor is considered to be in a healthy state. If the difference is not within the preset error range, the photoelectric sensor is considered to be in an unhealthy state, i.e., a faulty state, which may affect the accuracy of speed measurement.
[0160] After performing health checks and parameter configuration on the photoelectric sensor, the main control loop can be entered. Once in the main control loop, the photoelectric sensor detects and generates pulse signals, and the quality of these pulse signals can be verified at this point. This quality verification of the photoelectric sensor's pulse signals can be implemented using a quality verification algorithm. For example, it can check the reasonableness of the interval between any two pulses in the pulse signal to eliminate interfering pulses.
[0161] For example, if the interval between any two pulses is too short, it may be due to motor vibration or signal interference; if the interval between any two pulses is too long, it may be due to sensor malfunction. If the current pulse quality is low (e.g., the pulse interval is significantly too high or too low), the rotational speed can be calculated using a valid pulse signal from the previous cycle that meets the preset conditions, in order to avoid excessive error.
[0162] When calculating rotational speed, the pulse width of the pulse signal can be recorded for calculation. Alternatively, the calculation can be based on the interrupt handling function of the photoelectric sensor. For example, an interruption (such as a light signal being blocked once) indicates the acquisition of a valid level, and the width of the valid level can be used to calculate the rotational speed. Alternatively, the angular velocity corresponding to the pulse interval width between two pulse signals can be calculated, thereby determining the motor's rotational speed. After verifying the pulse signal quality, compensation can be made based on environmental factors, such as compensating the calculated rotational speed with a preset supplementary coefficient based on the intensity of ambient light.
[0163] When processing pulse signals, anti-interference filtering can also be performed. For example, updating the historical records of pulse signals and filtering them by taking the median value can eliminate abnormal pulses. Alternatively, pulse signals within a sliding window period can be sorted, and the median value can be determined; this median value serves as the basis for filtering. When the difference between the value of a pulse signal and the median value is greater than a preset high-value threshold, the pulse signal is considered an interference signal and can be replaced by the median value. Conversely, when the difference between the value of a pulse signal and the median value is less than a preset low-value threshold, the pulse signal can also be considered an interference signal and can be replaced by the median value. Here, the pulse signal value can be understood as the pulse width, and the median value can be understood as the median of the pulse width.
[0164] After speed calculation, the rotation direction of the output shaft can be determined. Motion control can then be implemented based on the speed and direction determination results. For example, if the speed is ≥0 m / s, forward rotation PWM can be set; if the speed is <0 m / s, reverse rotation PWM can be set; and if the speed is 0 m / s, braking control can be implemented.
[0165] When controlling the motor, Proportional-Integral-Derivative (PID) control can be used, or other control methods can be employed. For example, the PWM output can be updated based on PID speed adjustment. During the control process, continuous monitoring of the photoelectric sensor's health status can be performed in conjunction with sensor contamination (affected by ambient light, etc.) to determine if the photoelectric sensor is malfunctioning. If so, fault handling and degraded control are implemented, the controller can report the current status, and wait for the next cycle to jump to the main control loop execution flow; if not, the mileage and position calculations for the traveling mechanism can continue, and the controller waits for the next cycle to jump to the main control loop execution flow.
[0166] The window cleaning robot provided in this application embodiment has strong anti-electromagnetic interference capabilities due to the use of photoelectric sensors. It is completely unaffected by the magnetic field of the motor and its stability is improved in strong electromagnetic environments. The window cleaning robot has stronger environmental adaptability, a wider operating temperature range (e.g., -40 degrees Celsius to 85 degrees Celsius), and better humidity adaptability, making it suitable for diverse working environments.
[0167] Because the accuracy of photoelectric sensors is unaffected by the quality of magnets or their installation location, the consistency of mass production of window cleaning robots can be improved, resulting in higher accuracy uniformity. The absence of magnet demagnetization issues extends the lifespan of photoelectric sensors several times over, extending maintenance cycles and improving maintenance convenience. Furthermore, the non-magnetic nature of photoelectric sensors prevents interference with other electronic equipment, enhancing safety. The use of photoelectric sensors also reduces the cost of magnetic shielding and magnets, lowering the overall system cost and offering significant potential for cost optimization in window cleaning robots.
[0168] The window cleaning robot of this application embodiment achieves a good balance in terms of cost, accuracy and reliability by combining a single-phase photoelectric sensor with an innovative environmental adaptation algorithm and mechanical characteristics, making it suitable for scenarios that are sensitive to electromagnetic interference and have variable working environments.
[0169] The executing entity that performs the control method provided in the embodiments of this application can be any kind of electronic device, such as a controller.
[0170] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device of this embodiment may include: at least one processor 801; and a memory 802 communicatively connected to the at least one processor; wherein the memory 802 stores instructions that can be executed by the at least one processor 801, and the instructions are executed by the at least one processor 801 to cause the electronic device to perform the method as described in any of the above embodiments.
[0171] Optionally, the memory 802 can be either standalone or integrated with the processor 801.
[0172] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.
[0173] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the control method of any of the foregoing embodiments.
[0174] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the method of any of the foregoing embodiments.
[0175] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.
[0176] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0177] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU) or other general-purpose processors. The processor can also be a Digital Signal Processor (DSP) or an Application Specific Integrated Circuit (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0178] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device, and may also be various media that can store program code, such as USB flash drives, portable hard drives, read-only memory (ROM), disks or optical discs.
[0179] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Examples of storage media include Static Random-Access Memory (SRAM) or Electrically Erasable Programmable Read Only Memory (EEPROM).
[0180] Storage media can be, for example, erasable programmable read-only memory (EPROM) or programmable read-only memory (PROM). Storage media can also be read-only memory (ROM), magnetic storage, flash memory, magnetic disks, or optical disks. Storage media can be any available medium accessible to general-purpose or special-purpose computers.
[0181] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. The processor and storage medium can reside within an application-specific integrated circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components within an electronic device or host device.
[0182] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0183] The sequence numbers of the embodiments in this application are merely for description and do not represent the superiority or inferiority of the embodiments. Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0184] Based on this understanding, the technical solution of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0185] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0186] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0187] It should be further noted that although the steps in the flowchart are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated in this document, there is no strict order requirement for the execution of these steps, and they can be executed in other orders.
[0188] Furthermore, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0189] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0190] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0191] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A window cleaning robot, characterized in that, The window cleaning robot includes a drive system, a photoelectric sensor, and a controller. The controller is connected to the drive system and the photoelectric sensor respectively. The photoelectric sensor includes a grating disk, a transmitter, and a receiver opposite to the transmitter. The drive system includes a motor, the motor includes an output shaft, the output shaft of the motor is connected to the grating disk of the photoelectric sensor, and the grating disk rotates synchronously with the output shaft; The grating disk is provided with a light-transmitting part and a light-blocking part. During the synchronous rotation, the light-transmitting part transmits the light signal between the transmitting end and the receiving end of the photoelectric sensor, and the light-blocking part blocks the light signal between the transmitting end and the receiving end. The photoelectric sensor generates a pulse signal based on the transmission and blocking of light signals by the grating disk during the synchronous rotation, and the photoelectric sensor inputs the pulse signal to the controller; The controller receives the pulse signal and determines the speed of the motor based on the pulse signal. The controller also controls the movement of the window cleaning robot based on the speed of the motor.
2. The window cleaning robot according to claim 1, characterized in that, The photoelectric sensor is a single-phase photoelectric sensor; After receiving the pulse signal, the controller also determines the rotation direction of the motor's output shaft based on the pulse signal; The controller controls the movement of the window cleaning robot based on the speed of the motor and the rotation direction of the output shaft.
3. The window cleaning robot according to claim 2, characterized in that, The grating disk includes a plurality of light-transmitting portions and a plurality of light-shielding portions, the plurality of light-transmitting portions and the plurality of light-shielding portions being arranged alternately in the circumferential direction of the grating disk; Based on the transmission and blocking of light signals by the plurality of light-transmitting parts and the plurality of light-blocking parts, the pulse signal exhibits a first signal arrangement characteristic when the output shaft rotates in the forward direction, and exhibits a second signal arrangement characteristic when the output shaft rotates in the reverse direction. The first signal arrangement characteristic and the second signal arrangement characteristic are opposite to each other.
4. The window cleaning robot according to claim 3, characterized in that, The widths of the plurality of light-transmitting portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different; and / or, the widths of the plurality of light-blocking portions in the circumferential direction of the grating disk increase sequentially, with the increments being at least partially the same or at least partially different.
5. The window cleaning robot according to claim 1, characterized in that, The photoelectric sensor is a single-phase photoelectric sensor. The drive system also includes a reducer connected to the output shaft. The reducer is used to provide a reduction ratio for the drive system. The input end of the reducer is connected to the output shaft, and the output end of the reducer is connected to the load of the drive system.
6. The window cleaning robot according to claim 5, characterized in that, The reduction ratio of the reducer is configured to a preset reduction ratio, which is used to control the reverse self-locking of the motor; The controller determines the rotation direction of the motor's output shaft based on the direction control command that controls the rotation direction of the motor. The controller controls the movement of the window cleaning robot based on the speed of the motor and the rotation direction of the output shaft.
7. The window cleaning robot according to claim 1, characterized in that, The photoelectric sensor is a dual-phase photoelectric sensor, which includes a first transmitter and its corresponding first receiver, and also includes a second transmitter and its corresponding second receiver.
8. The window cleaning robot according to claim 7, characterized in that, The photoelectric sensor generates a first pulse signal based on the optical signal received by the first receiving end. The photoelectric sensor generates a second pulse signal based on the optical signal received by the second receiving end. The controller receives the first pulse signal and the second pulse signal input from the photoelectric sensor; The controller determines the rotation direction of the motor's output shaft based on the phase relationship between the first pulse signal and the second pulse signal, and controls the movement of the window cleaning robot based on the motor's rotation speed and the rotation direction of the output shaft.
9. The window cleaning robot according to any one of claims 1-8, characterized in that, The photoelectric sensor is surface-mounted on the controller, the output shaft of the motor passes through the reserved hole in the controller, and the grating disk of the photoelectric sensor is coaxially fixed to the output shaft of the motor.
10. The window cleaning robot according to claim 9, characterized in that, The transmitting and receiving ends of the photoelectric sensor are arranged along a first direction, which is perpendicular to the output shaft of the motor. The light-transmitting and light-shielding surfaces of the grating disk are the same curved surface, which surrounds the output shaft of the motor, and a portion of the curved surface lies between the transmitting and receiving ends of the photoelectric sensor. Alternatively, the transmitting and receiving ends of the photoelectric sensor are arranged along a second direction, which is parallel to the output shaft of the motor. The light-transmitting and light-shielding surfaces of the grating disk are the same plane, which is perpendicular to the output shaft of the motor, and a portion of the plane lies between the transmitting and receiving ends of the photoelectric sensor.