Method for detecting the direction of rotation of a window-cleaning robot motor and related device
By using single-phase Hall sensors and/or single-phase photoelectric sensors to replace traditional sensors and analyzing the timing characteristics of pulse signals, the problem of high cost and low efficiency in detecting the motor rotation direction of window cleaning robots is solved, achieving high-precision and low-cost motor direction detection.
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-05-29
AI Technical Summary
Current methods for detecting the motor rotation direction of window cleaning robots rely on complex sensors and detection algorithms, resulting in high costs and low efficiency.
The rotation direction of the motor is determined by analyzing the timing characteristics of the pulse signal, replacing the traditional dual-phase Hall sensor or dual-phase photoelectric sensor with a single-phase Hall sensor and/or a single-phase photoelectric sensor.
It achieves high-precision and high-reliability detection of the motor's rotation direction, reducing the system's complexity and cost.
Smart Images

Figure CN122109575A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cleaning technology, and in particular to a method and related device for detecting the rotation direction of a window cleaning robot motor. Background Technology
[0002] Window cleaning robots, as a typical example of cleaning tools, are widely used in homes, office buildings, shopping malls and other scenarios.
[0003] The control system of the window cleaning robot needs to detect the rotation direction of the motor in real time. Through precise direction adjustment, it can ensure that the window cleaning robot maintains balance in complex environments, avoids slipping, and achieves accurate path planning and cleaning coverage.
[0004] Currently, control systems rely heavily on complex sensors and detection algorithms to detect the rotation direction of motors, resulting in high costs and low efficiency in motor direction detection. Summary of the Invention
[0005] This application provides a method and related apparatus for detecting the rotation direction of a window cleaning robot motor, which can improve the efficiency of the window cleaning robot motor rotation direction and reduce the detection cost.
[0006] In a first aspect, embodiments of this application provide a method for detecting the rotation direction of a window cleaning robot motor, including:
[0007] Acquire the pulse signal from the detection sensor; the detection sensor includes a single-phase Hall sensor and / or a single-phase photoelectric sensor;
[0008] The rotation direction of the motor is determined based on the characteristics of the pulse signal.
[0009] In some embodiments, determining the rotation direction of the motor based on the characteristics of the pulse signal includes:
[0010] Obtain the order of high and low levels in the pulse signal;
[0011] The rotation direction of the motor is determined according to the arrangement order.
[0012] In some embodiments, the detection sensor is a single-phase Hall sensor, and the magnetic ring configured in the single-phase Hall sensor includes multiple south and north poles, which are non-uniformly arranged circumferentially on the magnetic ring; determining the rotation direction of the motor based on the pulse signal includes:
[0013] Determine the first signal arrangement characteristics presented by the pulse signal;
[0014] The rotation direction of the motor is determined based on the first signal arrangement feature and the predefined Hall signal arrangement feature.
[0015] In some embodiments, the detection sensor is a single-phase photoelectric sensor, and the grating disk of the single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-blocking parts, the multiple light-transmitting parts and the multiple light-blocking parts being non-uniformly arranged in the circumferential direction of the grating disk. Determining the rotation direction of the motor based on the pulse signal includes:
[0016] Determine the second signal arrangement characteristics presented by the pulse signal;
[0017] The rotation direction of the motor is determined based on the second signal arrangement feature and the predefined photoelectric signal arrangement feature.
[0018] In some embodiments, the detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor, and determining the rotation direction of the motor based on the pulse signal includes:
[0019] Determine whether the first rotation direction of the motor determined based on the pulse signal of the single-phase Hall sensor is consistent with the second rotation direction of the motor determined based on the pulse signal of the single-phase photoelectric sensor;
[0020] If not, the motor is stopped and an alarm message is output; or, the environmental information of the window cleaning robot is obtained, and the first rotation direction or the second rotation direction is used as the rotation direction of the motor according to the environmental information.
[0021] In some embodiments, the detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor; the mounting positions of the single-phase Hall sensor and the single-phase photoelectric sensor are at an angle of the target angle in the circumferential direction;
[0022] The magnetic ring configured in the single-phase Hall sensor includes multiple south and north poles, which are evenly and alternately arranged in the circumferential direction of the magnetic ring.
[0023] The grating disk of the single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-shielding parts, which are evenly staggered in the circumferential direction of the grating disk.
[0024] In some embodiments, determining the rotation direction of the motor based on the pulse signal includes:
[0025] The phase difference between the first pulse signal of the single-phase Hall sensor and the second pulse signal of the single-phase photoelectric sensor is obtained;
[0026] The rotation direction of the motor is determined based on the phase difference.
[0027] Secondly, embodiments of this application provide an electronic device, including a processor, a transceiver, and a memory; the processor is communicatively connected to both the transceiver and the memory.
[0028] The memory stores computer-executed instructions;
[0029] The transceiver communicates and interacts with external devices.
[0030] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0031] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method of any of the first aspects.
[0032] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method of any one of the first aspects.
[0033] This application provides a method and related apparatus for detecting the rotation direction of a window cleaning robot motor. The method acquires pulse signals from a detection sensor, which includes a single-phase Hall sensor and / or a single-phase photoelectric sensor. The rotation direction of the motor is determined based on the characteristics of the pulse signals. This method replaces traditional dual-phase Hall sensors or dual-phase photoelectric sensors with single-phase Hall sensors and / or single-phase photoelectric sensors. By utilizing the timing characteristics of the pulse signals output by the single-phase Hall sensors and / or single-phase photoelectric sensors, high-precision and high-reliability detection of the motor rotation direction is achieved. This effectively reduces the cost and system complexity of the window cleaning robot. Attached Figure Description
[0034] 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.
[0035] Figure 1 A schematic diagram of the architecture of a window cleaning robot provided in this application embodiment. Figure 1 ;
[0036] Figure 2 A schematic diagram of a pulse signal provided in an embodiment of this application;
[0037] Figure 3 A schematic diagram of the architecture of a window cleaning robot provided in this application embodiment. Figure 2 ;
[0038] Figure 4A schematic diagram of signal arrangement feature 1 and signal arrangement feature 2 provided in the embodiments of this application. Figure 1 ;
[0039] Figure 5 A schematic diagram of signal arrangement feature 1 and signal arrangement feature 2 provided in the embodiments of this application. Figure 2 ;
[0040] Figure 6 A schematic diagram of signal arrangement feature 3 and signal arrangement feature 4 provided for embodiments of this application;
[0041] Figure 7 A schematic diagram showing the installation positions of the single-phase photoelectric sensor and the single-phase Hall sensor provided in the embodiments of this application;
[0042] Figure 8 A flowchart illustrating a method for detecting the rotation direction of a window cleaning robot motor, provided in an embodiment of this application;
[0043] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0044] 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
[0045] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, without limiting their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0047] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0048] Window cleaning robots are widely used in home and commercial settings for cleaning glass surfaces in high-rise buildings, office buildings, and glass curtain walls. Their core function is to move autonomously and slide on the glass surface using a suction device, employing brush heads and cleaning fluid for efficient cleaning.
[0049] As the core component of window cleaning robots, the precise control of the motor's rotation direction directly affects the robot's movement trajectory, cleaning efficiency, and safety.
[0050] For example, if the direction detection is incorrect when the glass surface is tilted at a large angle, it may cause the cleaning path to deviate. In addition, users also have high requirements for the ease of maintenance, long-term reliability, and cost control of window cleaning robots.
[0051] In related technologies, window cleaning robots often use AB dual-phase Hall sensors or dual-phase photoelectric sensors to detect the rotation direction of the motor for precise control. However, such solutions require additional dual-phase sensors, leading to a significant increase in hardware costs.
[0052] In addition, using AB phase detection requires two MCU pins, which increases the complexity of PCB routing and software processing.
[0053] To address the aforementioned issues, this application provides a method and related apparatus for detecting the motor rotation direction of a window cleaning robot. It replaces traditional dual-phase Hall sensors or dual-phase photoelectric sensors with single-phase Hall sensors and / or single-phase photoelectric sensors, utilizing the timing characteristics of the pulse signals output by the single-phase Hall sensors and / or single-phase photoelectric sensors to achieve high-precision and high-reliability detection of the motor rotation direction. This effectively reduces the cost and system complexity of the window cleaning robot.
[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0055] Figure 1 This is a schematic diagram of the architecture of a window cleaning robot provided in an embodiment of this application, as shown below. Figure 1 As shown:
[0056] The window cleaning robot 100 includes a drive system 101, a single-phase Hall sensor 102, and a controller 103, which is connected to the drive system 101 and the single-phase Hall sensor 102 respectively.
[0057] like Figure 1 As shown, the drive system 101 includes a motor 1011, the output shaft of which is connected to the magnetic ring 1022 of the single-phase Hall sensor 102, and the magnetic ring 1022 rotates synchronously with the output shaft of the motor 1011. For example, the magnetic ring 1022 can be fixed on the output shaft of the motor 1011.
[0058] The magnetic ring 1022 has a south pole (S pole) and a north pole (N pole). During synchronous rotation of the magnetic ring 1022 and the output shaft of the motor 1011, when the S pole on the magnetic ring 1022 approaches the Hall element 1021 in the single-phase Hall sensor 102, the Hall element 1021 generates a Hall voltage. The magnitude of the Hall voltage generated by the Hall element 1021 continuously varies with the magnetic field strength. The stronger the magnetic field, the higher the Hall voltage; the weaker the magnetic field, the lower the Hall voltage.
[0059] When the signal trigger 1023 in the single-phase Hall sensor 102 detects that the Hall element 1021 generates a Hall voltage, it generates a pulse signal according to the magnitude of the Hall voltage and sends the pulse signal to the controller 103.
[0060] After receiving the pulse signal, the controller 103 can determine the rotation direction of the motor 1011 (also known as the rotation direction of the motor output shaft) based on the pulse signal. Then, the controller 103 can control the movement of the window cleaning robot 100 based on the rotation direction of the motor 1011.
[0061] For example, motor 1011 can be a motor of any power and structure, such as a DC motor. The output shaft of motor 1011 is the main shaft of the motor rotor and can output mechanical energy.
[0062] The single-phase Hall sensor 102 can refer to a unipolar Hall effect sensor (also known as a unipolar Hall switch). It is a magnetically sensitive electronic component based on the Hall effect, whose output state is determined solely by the magnetic field strength of a single magnetic pole (such as the S pole).
[0063] The magnetic ring 1022 (also known as a magnetic code disk) can be a component of the single-phase Hall sensor 102 or a part that works in conjunction with the single-phase Hall sensor 102. The magnetic ring 1022 can be understood as a disk or ring structure that rotates synchronously with the output shaft of the motor 1011, in which S poles and N poles can be provided to change the output state of the single-phase Hall sensor 102.
[0064] The controller 103 can be an electronic control unit for receiving pulse signals and determining the direction of motor rotation, and can be integrated into the main control module of the window cleaning robot 100. For example, the controller 103 can be a microcontroller or a microprocessor.
[0065] For example, the window cleaning robot 100 drives the magnetic ring 1022 to rotate synchronously via the motor 1011 in the drive system 101. The S pole and N pole on the magnetic ring 1022 periodically approach the Hall element 1021 of the Hall sensor 102 to change the output state of the single-phase Hall sensor 102.
[0066] For example, when the S pole is close to the Hall element 1021, the magnetic field strength increases, and the Hall element 1021 generates a gradually increasing Hall voltage. When the S pole is away from the Hall element 1021 (and the N pole is close), the generated Hall voltage gradually decreases.
[0067] When the signal trigger 1023 detects that the Hall voltage is higher than the preset signal turn-on voltage, it generates an active or inactive level. When the signal trigger 1023 detects that the Hall voltage is lower than the preset signal turn-off voltage, it generates a level opposite to the level when the Hall voltage is higher than the preset signal turn-on voltage.
[0068] 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 voltage level is valid when the source (S) terminal is close to the Hall element 1021, then it is invalid when the source (S) terminal is far away from the Hall element 1021; conversely, if the voltage level is invalid when the source (S) terminal is close to the Hall element 1021, then it is valid when the source (S) terminal is far away from the Hall element 1021.
[0069] The signal trigger 1023 can generate a pulse signal based on whether the source (S) terminal is close to or far from the Hall element 1021. For example, when the pulse signal generated by the signal trigger 1023 is an alternating high level and low level, the high level can be preset as the active level and the low level as the inactive level; or the low level can be preset as the active level and the high level as the inactive level.
[0070] After the signal trigger 1023 generates a pulse signal with alternating high and low levels, it can be synchronously input to the controller 103 for analysis and processing. For example, the controller 103 can determine the direction of the motor 1011 by analyzing the arrangement or sequence of high and low levels in the pulse signal, and adjust the working state of the drive system 101 according to the direction of the motor 101 to control the movement of the window cleaning robot 100.
[0071] Figure 2 This is a schematic diagram of a pulse signal provided in an embodiment of this application, as shown below. Figure 2The image shows a received pulse signal, consisting of multiple high and low levels. If the pulse generated by the magnetic ring 1022 rotating completely once includes 5 high levels (active levels) and 5 low levels (inactive levels), then one pulse unit can represent the magnetic ring rotating completely once. Therefore, it can be understood that every 5 high levels and 5 low levels represent the magnetic ring rotating completely once, which is also the output shaft rotating once.
[0072] In some embodiments, since the distribution of the N and S poles in the magnetic ring 1022 is fixed during installation, the order in which the first valid level and the first invalid level appear are completely opposite when the motor output shaft rotates forward and in reverse, respectively. Therefore, after the controller 103 receives the pulse signal sent by the single-phase Hall sensor 102, it can obtain the order of high and low levels in the pulse signal; and determine the rotation direction of the motor according to the order of high and low levels and a predefined level sequence. The order of high and low levels can refer to the order in which high and low levels appear in the pulse signal.
[0073] For example, the controller predefines that the first high level in the pulse signal appears before the first low level, which corresponds to the rotation direction of the motor's output shaft being forward (i.e., rotating in the forward direction); the first low level in the pulse signal appears before the first high level, which corresponds to the rotation direction of the motor's output shaft being reverse (i.e., rotating in the reverse direction).
[0074] After receiving the pulse signal sent by the single-phase Hall sensor 102, the controller can analyze the order in which the high and low levels appear in the pulse signal. If the first high level appears before the first low level, the rotation direction of the motor's output shaft is determined to be forward rotation; if the first high level appears after the first low level, the rotation direction of the motor's output shaft is determined to be reverse rotation.
[0075] After determining the speed and direction of the motor 1011, the controller 103 can adjust the working state of the drive system 101 to control the movement of the window cleaning robot 100.
[0076] For example, when the load of the drive system 101 is the walking part (track or wheel), the rotation direction of the motor can be determined according to the pulse signal, and the controller 103 can control the direction of the walking part of the window cleaning robot 100 according to the rotation direction of the motor 1011 to achieve the turning of the walking part.
[0077] The window cleaning robot provided in this application replaces the original dual-phase sensor with a single-phase Hall sensor and a coordinated drive system, achieving high-precision and high-reliability detection of motor speed and direction. This effectively reduces the cost and system complexity of the window cleaning robot.
[0078] Figure 3 A schematic diagram of the architecture of a window cleaning robot provided in this application embodiment. Figure 2 ,like Figure 3 As shown:
[0079] The window cleaning machine 100 also includes a single-phase photoelectric sensor 104, which is connected to the controller 103. The single-phase photoelectric sensor 104 can be, for example, an infrared photoelectric sensor, with the transmitter 1041 being an infrared emitting diode and the receiver 1042 being a photosensitive element. Of course, the single-phase photoelectric sensor 104 can also be a photoelectric sensor using visible light, laser, or other light sources; this embodiment does not limit its application to this type.
[0080] The single-phase photoelectric sensor 104 includes a transmitter 1041, a receiver 1042, and a grating disk 1043. The output shaft of the motor 1011 is connected to the grating disk 1043 of the single-phase photoelectric sensor 104, and the grating disk 1043 rotates synchronously with the output shaft.
[0081] The grating disk 1043 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 1041 and the receiving end 1042 of the single-phase photoelectric sensor 104, while the light-blocking part blocks the light signal between the transmitting end 1041 and the receiving end 1042. The single-phase photoelectric sensor 104 generates a pulse signal based on the transmission and blocking of the light signal during the synchronous rotation of the grating disk 1043, and inputs the pulse signal to the controller 103.
[0082] The controller 103 receives pulse signals and can determine the rotation direction of the motor 1011 based on the pulse signals. Then, the controller 103 can control the movement of the window cleaning robot 100 based on the rotation direction of the motor 1011.
[0083] The grating disk 1043 is a component of the single-phase photoelectric sensor 104. The grating disk 1043 can be understood as a disk structure that rotates synchronously with the output shaft 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 1043 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 1043 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 1043 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.
[0084] The window cleaning robot 100 drives the grating disk 1043 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 1043 periodically transmit or block the light signal between the transmitter 1041 and the receiver 1042 of the single-phase photoelectric sensor 104.
[0085] When the light-transmitting part is in the optical signal path, the optical signal between the transmitting end 1041 and the receiving end 1042 can propagate normally, and the receiving end 1042 can receive the optical signal emitted by the transmitting end 1041, thus forming an effective or ineffective level at the receiving end 1042. When the light-blocking part is in the optical signal path, the optical signal between the transmitting end 1041 and the receiving end 1042 is blocked and cannot propagate normally, and the receiving end 1042 cannot receive the optical signal emitted by the transmitting end 1041, thus forming a level at the receiving end 1042 that is opposite to that during normal propagation.
[0086] After generating alternating high and low level pulse signals based on the transmission and blocking of light signals, the single-phase photoelectric sensor 104 can synchronously input the pulse signals to the controller 103 for analysis and processing. For example, the controller 103 determines the direction of the motor 1011 by analyzing the arrangement characteristics or sequence of high and low levels in the pulse signals, and adjusts the working state of the drive system 101 according to the direction of the motor 1011 to control the movement of the window cleaning robot 100.
[0087] In some embodiments, since the distribution of the light-transmitting and light-blocking portions of the grating disk 1043 is fixed during installation, after the controller 103 receives the pulse signal sent by the single-phase photoelectric sensor 104, it can obtain the order of high and low levels in the pulse signal; and determine the rotation direction of the motor according to the order of high and low levels and a predefined level sequence. The order of high and low levels can refer to the sequential order in which high and low levels appear in the pulse signal.
[0088] For example, the controller predefines that the first high level in the pulse signal appears before the first low level, which corresponds to the rotation direction of the motor's output shaft being forward (i.e., rotating in the forward direction); the first low level in the pulse signal appears before the first high level, which corresponds to the rotation direction of the motor's output shaft being reverse (i.e., rotating in the reverse direction).
[0089] After receiving the pulse signal sent by the single-phase photoelectric sensor 104, the controller can analyze the order in which the high and low levels appear in the pulse signal. If the first high level appears before the first low level, the rotation direction of the motor's output shaft is determined to be forward rotation; if the first high level appears after the first low level, the rotation direction of the motor's output shaft is determined to be reverse rotation.
[0090] After determining the speed and direction of the motor 1011, the controller 103 can adjust the working state of the drive system 101 to control the movement of the window cleaning robot 100.
[0091] In some embodiments, when determining the motor direction based on the order of the first high level and the first low level in the pulse signal, this method is suitable for determining the rotational direction during the motor startup phase (when the speed increases from zero). Furthermore, the Hall element should be positioned precisely at the boundary between the N and S poles during startup, or the path of the light signal should be precisely at the boundary between the light-transmitting and light-blocking parts. This ensures a more accurate determination of the output shaft's rotational direction based on the order of the effective and ineffective levels in the pulse signal.
[0092] To overcome the shortcomings of the above method, the layout of the south and north poles in the magnetic ring or the layout of the light-transmitting and light-blocking parts in the grating disk can be specifically configured to better determine the rotation direction of the motor's output shaft based on the pulse signal.
[0093] First, the arrangement of the south and north poles in the magnetic ring, and how to determine the rotation direction of the motor's output shaft based on the pulse signal in this case, will be explained.
[0094] For example, a magnetic ring configured as a single-phase Hall sensor includes multiple south and north poles, which are non-uniformly arranged in the circumferential direction of the magnetic ring.
[0095] In the first possible implementation, the non-uniform arrangement of the south and north poles in the circumference of the magnetic ring can be such that the widths of the south and north poles are the same, but the south and north poles are not spaced apart.
[0096] For example, there are a total of 8 magnetic poles on the magnetic ring, including 5 N poles and 3 S poles. The order of the N poles and S poles is S pole, N pole, N pole, S pole, N pole, N pole, S pole, N pole.
[0097] In the second possible implementation, the non-uniform arrangement of the south and north poles in the circumference of the magnetic ring can refer to the spacing between the south and north poles, but with different magnetic pole widths.
[0098] For example, the magnetic ring has a total of 8 magnetic poles, including 4 N poles and 4 S poles. The order of the N and S poles is as follows: S pole (pole width 2), N pole (pole width 3), S pole (pole width 1), N pole (pole width 3), S pole (pole width 3), N pole (pole width 2), S pole (pole width 2), N pole (pole width 3). Here, pole width 1 can refer to a pole width of 1 unit width, pole width 2 can refer to a pole width of 2 units width, and pole width 3 can refer to a pole width of 3 units width. The specific data for the unit width can be set based on practical experience, and this embodiment does not limit this.
[0099] In some embodiments, when the north and south poles are non-uniformly arranged in the circumferential direction of the magnetic ring, the pulse signal exhibits signal arrangement feature 1 when the output shaft rotates in the forward direction; and the pulse signal exhibits signal arrangement feature 2 when the output shaft rotates in the reverse direction; signal arrangement feature 1 and signal arrangement feature 2 are opposite to each other.
[0100] The signal arrangement characteristics of a pulse signal can be understood as the pulse arrangement features 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.
[0101] Figure 4 The diagram shows signal arrangement feature 1 and signal arrangement feature 2 under the magnetic ring structure shown in the first possible implementation, as follows: Figure 4 As shown, for the pulse signal with signal arrangement characteristic 1, looking at the time axis extending backward from 0, the high-level widths (representing the duration of the high level) in each unit pulse group are arranged as 1 millisecond (ms), 1 ms, 1 ms; the low-level widths (representing the duration of the low level) are arranged as 2 ms, 2 ms, 1 ms. That is, signal arrangement characteristic 1 is 1 ms, 2 ms, 1 ms, 2 ms, 1 ms, 1 ms.
[0102] For the pulse signal with signal arrangement characteristic 2, looking at the time axis from 0 forward, in each unit pulse group, the width arrangement of the high level is 1ms, 1ms, 1ms; the width arrangement of the low level is 1ms, 2ms, 2ms. That is, signal arrangement characteristic 2 is 1ms, 1ms, 2ms, 1ms, 2ms, 1ms.
[0103] Figure 5 The diagram shows signal arrangement feature 1 and signal arrangement feature 2 under the magnetic ring structure shown in the second possible implementation, as follows: Figure 5 As shown, for the pulse signal with signal arrangement characteristic 1, looking at the time axis extending backward from 0, the width arrangement characteristics of the high level in each unit pulse group are 2ms, 1ms, 3ms, 2ms; the width arrangement characteristics of the low level are 3ms, 3ms, 2ms, 3ms. That is, signal arrangement characteristic 1 is 2ms, 3ms, 1ms, 3ms, 3ms, 2ms, 2ms, 3ms.
[0104] For the pulse signal with signal arrangement characteristic 2, looking at the time axis extending backward from 0, the width arrangement of the high level in each unit pulse group is 2ms, 3ms, 1ms, 2ms; the width arrangement of the low level is 3ms, 2ms, 3ms, 3ms. That is, signal arrangement characteristic 2 is 3ms, 2ms, 2ms, 3ms, 3ms, 1ms, 3ms, 2ms.
[0105] Depend on Figure 4 and Figure 5 It is known that when the north and south poles of the magnetic ring are non-uniformly arranged circumferentially, the pulse signals output by the single-phase Hall sensor exhibit opposite signal arrangement characteristics when the output shaft rotates in the forward and reverse directions. Therefore, after receiving the pulse signal sent by the single-phase Hall sensor, the controller can read the first signal arrangement characteristic presented by the pulse signal; based on the first signal arrangement characteristic and the predefined Hall signal arrangement characteristic, the rotation direction of the motor is determined. The predefined Hall signal arrangement characteristic may include signal arrangement characteristic 1 and signal arrangement characteristic 2.
[0106] For example, after the controller receives the pulse signal sent by the single-phase Hall sensor, it can analyze the signal arrangement characteristics of the pulse signal. If the signal arrangement characteristics of the pulse signal are signal arrangement characteristics 1, then the rotation direction of the motor output shaft is determined to be forward rotation; if the signal arrangement characteristics are 2, then the rotation direction of the motor output shaft is determined to be reverse rotation.
[0107] In this way, based on the arrangement of the N and S poles on the magnetic ring, 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 the rotation direction of the motor with only a single-phase Hall sensor, which 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.
[0108] The layout of the light-transmitting and light-blocking parts in the grating disk, and the determination of the rotation direction of the motor's output shaft based on the pulse signal in this case, will be explained below.
[0109] For example, the grating disk of a single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-shielding parts, which are non-uniformly arranged in the circumferential direction of the grating disk.
[0110] In the first possible implementation, the non-uniform arrangement of multiple light-transmitting parts and multiple light-blocking parts in the circumferential direction of the grating disk can mean that the light-transmitting parts and the light-blocking parts are the same size, but not spaced apart.
[0111] For example, five light-transmitting parts and three light-blocking parts are arranged in the circumferential direction of the grating disk, which are respectively a light-transmitting part with a width of 1 mm, a light-blocking part with a width of 1 mm, a light-transmitting part with a width of 1 mm, a light-transmitting part with a width of 1 mm, a light-transmitting part with a width of 1 mm, a light-blocking part with a width of 1 mm, a light-blocking part with a width of 1 mm, and a light-transmitting part with a width of 1 mm.
[0112] In the second possible implementation, the non-uniform arrangement of multiple light-transmitting parts and multiple light-shielding parts in the circumferential direction of the grating disk can refer to the light-transmitting parts and the light-shielding parts being arranged at intervals, but the light-transmitting parts and the light-shielding parts being different in size.
[0113] For example, four light-transmitting parts and four light-blocking parts are arranged alternately in the circumferential direction of the grating disk, namely, a light-transmitting part 1 mm wide, a light-blocking part 1 mm wide, a light-transmitting part 5 mm wide, a light-blocking part 5 mm wide, a light-transmitting part 3 mm wide, a light-blocking part 3 mm wide, a light-transmitting part 2 mm wide, and a light-blocking part 2 mm wide.
[0114] In some embodiments, when the light-transmitting part and the light-blocking part are non-uniformly arranged in the circumferential direction of the grating disk, the pulse signal exhibits signal arrangement feature 3 when the output shaft rotates in the forward direction; and the pulse signal exhibits signal arrangement feature 4 when the output shaft rotates in the reverse direction; signal arrangement feature 3 and signal arrangement feature 4 are opposite to each other.
[0115] Figure 6 The diagram shows signal arrangement features 3 and 4 under the grating disk structure shown in the second possible implementation. Figure 6 As shown, for the pulse signal with signal arrangement characteristic 3, 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), 5ms, 3ms, 2ms; the low-level width (representing the duration of the low level) is arranged as 1ms, 5ms, 3ms, 2ms. That is, signal arrangement characteristic 3 is 1ms, 1ms, 5ms, 5ms, 3ms, 3ms, 2ms, 2ms.
[0116] For the pulse signal with signal arrangement characteristic 4, looking at the time axis extending backward from 0, the width arrangement characteristics of the high level in each unit pulse group are 2ms, 3ms, 5ms, and 1ms; the width arrangement characteristics of the low level are 2ms, 3ms, 5ms, and 1ms. That is, signal arrangement characteristic 4 is 2ms, 2ms, 3ms, 3ms, 5ms, 5ms, 1ms, and 1ms.
[0117] Depend on Figure 6 It is known that the grating disk includes multiple light-transmitting parts and multiple light-blocking parts arranged non-uniformly in the circumferential direction. When the output shaft rotates in the forward and reverse directions, the pulse signal output by the single-phase photoelectric sensor exhibits opposite signal arrangement characteristics. Therefore, after receiving the pulse signal sent by the single-phase photoelectric sensor, the controller can read the second signal arrangement characteristic presented by the pulse signal; based on the second signal arrangement characteristic and the predefined photoelectric signal arrangement characteristic, the rotation direction of the motor is determined. The predefined photoelectric signal arrangement characteristic may include signal arrangement characteristic 3 and signal arrangement characteristic 4.
[0118] For example, after the controller receives the pulse signal sent by the single-phase photoelectric sensor, it can analyze the signal arrangement characteristics of the pulse signal. If the signal arrangement characteristics of the pulse signal are signal arrangement characteristics 3, then the rotation direction of the motor output shaft is determined to be forward rotation; if the signal arrangement characteristics are 4, then the rotation direction of the motor output shaft is determined to be reverse rotation.
[0119] In this way, based on the arrangement of the light-transmitting and light-blocking parts on 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 the rotation direction of the motor with only a single-phase photoelectric sensor, which not only reduces the number of sensors required but also reduces the complexity of the sensor layout and the complexity of the direction judgment logic, thereby improving the self-testing and self-control capabilities of the window cleaning robot.
[0120] Furthermore, in the second possible implementation, the widths of the multiple 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 multiple 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.
[0121] 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.
[0122] For example, the grating disk has four light-transmitting parts and four light-blocking parts arranged around its circumference, which are respectively a light-transmitting part 1mm wide, a light-blocking part 1mm wide, a light-transmitting part 2mm wide, a light-blocking part 2mm wide, a light-transmitting part 3mm wide, a light-blocking part 3mm wide, a light-transmitting part 4mm wide, and a light-blocking part 4mm wide.
[0123] If the aforementioned grating disk obtains pulse signals with signal arrangement characteristics of 1ms, 1ms, 2ms, 2ms, 3ms, 3ms, 4ms, 4ms when rotating in the forward direction, then when the grating disk rotates in the reverse direction with the output shaft, it can obtain pulse signals with opposite signal arrangement characteristics. For example, the opposite signal arrangement characteristics are 4ms, 4ms, 3ms, 3ms, 2ms, 2ms, 1ms, 1ms.
[0124] It can be seen that when the controller receives either of the two pulse signals with gradually increasing or gradually decreasing pulse widths, the rotation direction of the grating disk can be determined based on the pulse arrangement characteristics, which can also determine the rotation direction of the motor output shaft.
[0125] When the increment magnitudes are at least partially the same, the signal arrangement characteristics reflected in the pulse signals include: the case where all pulses have the same increment magnitude, as well as the case where the increment magnitudes are partially the same and partially different.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] 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.
[0130] 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.
[0131] 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.
[0132] In some embodiments, to further improve the accuracy of determining the motor rotation direction and avoid direction detection errors caused by sensor malfunctions, the controller can also determine the motor rotation direction simultaneously based on the pulse signals sent by the single-phase Hall sensor and the single-phase photoelectric sensor.
[0133] For example, it is determined whether the first rotation direction of the motor, determined by a pulse signal from a single-phase Hall sensor, is consistent with the second rotation direction of the motor, determined by a pulse signal from a single-phase photoelectric sensor. If yes, the first or second rotation direction is taken as the rotation direction of the motor; if no, the motor is stopped and an alarm message is output; or, the environmental information of the window cleaning robot is acquired, and the first or second rotation direction is taken as the rotation direction of the motor based on the environmental information.
[0134] The specific implementation methods for determining the first rotation direction of the motor based on the pulse signal of the single-phase Hall sensor and the second rotation direction of the motor based on the pulse signal of the single-phase photoelectric sensor can refer to the implementation methods in the above embodiments, and will not be repeated here.
[0135] After the controller determines the first and second rotation directions, if the first and second rotation directions are consistent, it indicates that both the single-phase Hall sensor and the single-phase photoelectric sensor are normal, and either the first or second rotation direction can be used as the determined rotation direction of the motor. If the first and second rotation directions are inconsistent, it indicates that at least one of the single-phase Hall sensor and the single-phase photoelectric sensor has malfunctioned. In this case, to ensure the safety of the window cleaning robot, the controller can directly stop the motor and output an alarm message to avoid risks such as falls and equipment damage that may occur due to incorrect direction judgment.
[0136] In some embodiments, since the reliability of different sensors varies in different environments, after determining that the first rotation direction and the second rotation direction are inconsistent, the environmental information of the window cleaning robot can be obtained. Based on the environmental information, it can be determined whether there are factors affecting the reliability of the single-phase Hall sensor or the single-phase photoelectric sensor. If so, the detection result of the other sensor can be used as the rotation direction of the motor.
[0137] For example, if the environmental information indicates that the window cleaning robot is operating in a dusty or oily environment, the single-phase photoelectric sensor is prone to contamination and misjudgment. In this case, the direction detection result of the single-phase Hall sensor can be used as the rotation direction of the motor. Similarly, if the environmental information indicates that the window cleaning robot is operating in a strong magnetic field environment, the single-phase Hall sensor is prone to interference from stray magnetic fields and misjudgment. In this case, the direction detection result of the single-phase photoelectric sensor can be used as the rotation direction of the motor.
[0138] In some embodiments, the controller can acquire environmental information of the window cleaning robot based on environmental sensors or current location information. The environmental sensors can be sensors installed in the window cleaning robot or external sensors (such as environmental sensors in the user's home).
[0139] For example, the controller can communicate with external sensors to obtain environmental information collected by the external sensors, or the controller can query the current environmental information from the network based on the current positioning information.
[0140] The orientation detection method for the window cleaning robot provided in this application constitutes a redundant orientation detection system using a single-phase photoelectric sensor and a single-phase Hall sensor. By comparing the orientations detected by the single-phase photoelectric sensor and the single-phase Hall sensor, and performing a secondary orientation judgment based on environmental information when the comparison results are inconsistent, orientation misjudgments caused by sensor failure can be greatly avoided, effectively improving the fault tolerance and safety of orientation detection for the window cleaning robot.
[0141] In some embodiments, to further improve the accuracy of detecting the rotation direction of the motor 1011, the controller 103 may also determine the rotation direction of the motor 1011 based on the phase difference between the first pulse signal generated by the single-phase Hall sensor and the second pulse signal generated by the single-phase photoelectric sensor.
[0142] Figure 7 This is a schematic diagram showing the installation positions of the single-phase photoelectric sensor and the single-phase Hall sensor provided in the embodiments of this application, as shown below. Figure 7 As shown, the mounting positions of the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 are at a preset angle in the circumferential direction.
[0143] For example, when the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 are coaxially fixed to the motor output shaft 10111, there is a 90° angle between the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104.
[0144] When determining the rotation direction of motor 1011 using pulse signals generated by single-phase Hall sensor 102 and single-phase photoelectric sensor 104 respectively, the multiple south and north poles included on the magnetic ring 1022 of single-phase Hall sensor 102 need to be uniformly staggered in the circumferential direction of the magnetic ring. That is, the south and north poles have the same width and are spaced apart. The grating disk of single-phase photoelectric sensor 104 includes multiple light-transmitting parts and multiple light-blocking parts that are uniformly staggered in the circumferential direction of the grating disk. That is, the light-transmitting parts and the light-blocking parts are the same size and are spaced apart.
[0145] When the motor output shaft 10111 rotates, it can synchronously drive the magnetic ring 1022 of the single-phase Hall sensor 102 and the grating disk 1043 of the single-phase photoelectric sensor 104 to rotate synchronously.
[0146] During the rotation of the magnetic ring 1022, the single-phase Hall sensor 102 generates a first pulse signal and sends it to the controller 103. During the rotation of the grating disk 1043, the single-phase photoelectric sensor 104 generates a second pulse signal and sends it to the controller 103. The controller can determine the rotation direction of the motor 1011 based on the phase difference between the received first and second pulse signals, and control the window cleaning robot based on the determined rotation direction of the motor 1011.
[0147] For example, since there is a 90° angle between the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104, there is a corresponding 90° phase difference between the first pulse signal generated by the single-phase Hall sensor 102 and the second pulse signal generated by the single-phase photoelectric sensor 104. In this case, the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 can constitute a "pseudo-two-phase" system similar to a two-phase Hall sensor or a two-phase photoelectric sensor.
[0148] The first pulse signal generated by the single-phase Hall sensor 102 is denoted as phase A, and the second pulse signal generated by the single-phase photoelectric sensor 104 is denoted as phase B. Assuming that the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 are installed in the forward rotation position of the motor output shaft 10111, with the single-phase Hall sensor 102 leading the single-phase photoelectric sensor 104, then when the output shaft 10111 rotates forward, the phase A signal leads the phase B signal by 90°. That is, the rising edge of the phase A signal occurs 1 / 4 cycle earlier than the rising edge of the phase B signal.
[0149] Conversely, assuming the installation positions of the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 are such that when the motor output shaft 10111 rotates in the forward direction, the single-phase Hall sensor 102 lags behind the single-phase photoelectric sensor 104. Therefore, when the output shaft 10111 rotates in the forward direction, the A-phase signal lags behind the B-phase signal by 90°. That is, the rising edge of the A-phase signal lags behind the rising edge of the B-phase signal by 1 / 4 cycle.
[0150] Taking the installation positions of the single-phase Hall sensor 102 and the single-phase photoelectric sensor 104 as follows: when the motor output shaft 10111 rotates in the forward direction, the single-phase Hall sensor 102 leads the single-phase photoelectric sensor 104. When the controller receives the A-phase signal and the B-phase signal, if the rising edge of the A-phase signal occurs when the B-phase signal is at a low level, it can be determined that the output shaft 10111 is rotating in the forward direction. Alternatively, if the falling edge of the A-phase signal occurs when the B-phase signal is at a high level, it can be determined that the output shaft 10111 is rotating in the forward direction.
[0151] Conversely, when the controller receives the A-phase signal and the B-phase signal, if the B-phase signal is at a high level when the rising edge of the A-phase signal occurs, it can be determined that the output shaft 10111 is rotating in the reverse direction; or, if the B-phase signal is at a high level when the falling edge of the A-phase signal occurs, it can be determined that the output shaft 10111 is rotating in the reverse direction.
[0152] In this way, the controller can determine the motor's rotation direction by analyzing the phase difference between the two pulse signals. This method does not rely on the special arrangement of the light-transmitting and light-blocking parts of the grating disk, or the special arrangement of the N and S poles of the magnetic ring. Even if the grating disk and magnetic ring are slightly misaligned due to mechanical vibration, the phase difference between the A-phase and B-phase signals can remain stable, thereby improving the reliability of determining the motor's rotation direction.
[0153] Figure 8 This is a flowchart illustrating a method for detecting the rotation direction of a window cleaning robot motor, as provided in an embodiment of this application. Figure 8 As shown, it includes:
[0154] S801. Acquire the pulse signal from the detection sensor; the detection sensor includes a single-phase Hall sensor and / or a single-phase photoelectric sensor.
[0155] S802. Determine the rotation direction of the motor based on the characteristics of the pulse signal.
[0156] In some embodiments, determining the rotation direction of the motor based on a pulse signal includes:
[0157] Obtain the sequence of high and low levels in the pulse signal; determine the direction of motor rotation based on the sequence.
[0158] In some embodiments, the detection sensor is a single-phase Hall sensor, and the magnetic ring configured in the single-phase Hall sensor includes multiple south and north poles, which are non-uniformly arranged circumferentially around the magnetic ring; determining the rotation direction of the motor based on the pulse signal includes:
[0159] Determine the first signal arrangement characteristics of the pulse signal; determine the rotation direction of the motor based on the first signal arrangement characteristics and the predefined Hall signal arrangement characteristics.
[0160] In some embodiments, the detection sensor is a single-phase photoelectric sensor. The grating disk of the single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-blocking parts, which are non-uniformly arranged in the circumferential direction of the grating disk. Determining the rotation direction of the motor based on the pulse signal includes:
[0161] Determine the second signal arrangement characteristics presented by the pulse signal; determine the rotation direction of the motor based on the second signal arrangement characteristics and the predefined photoelectric signal arrangement characteristics.
[0162] In some embodiments, the detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor, and determines the rotation direction of the motor based on the pulse signal, including:
[0163] Determine whether the first rotation direction of the motor determined by the pulse signal of the single-phase Hall sensor is consistent with the second rotation direction of the motor determined by the pulse signal of the single-phase photoelectric sensor; if not, control the motor to stop running and output an alarm message; or, acquire the environmental information of the window cleaning robot and take the first rotation direction or the second rotation direction as the rotation direction of the motor according to the environmental information.
[0164] In some embodiments, the detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor; the mounting positions of the single-phase Hall sensor and the single-phase photoelectric sensor are at an angle of the target angle in the circumferential direction;
[0165] The magnetic ring configured in a single-phase Hall sensor includes multiple south and north poles, which are evenly staggered in the circumferential direction of the magnetic ring; the grating disk of a single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-shielding parts, which are evenly staggered in the circumferential direction of the grating disk.
[0166] In some embodiments, determining the rotation direction of the motor based on a pulse signal includes:
[0167] The phase difference between the first pulse signal of the single-phase Hall sensor and the second pulse signal of the single-phase photoelectric sensor is obtained; the rotation direction of the motor is determined based on the phase difference.
[0168] The specific implementation and technical effects of the window cleaning robot motor rotation direction detection method provided in this application embodiment can be found by referring to... Figures 1-7 The method for detecting the rotation direction of the window cleaning robot motor shown in the embodiment will not be described in detail here.
[0169] This application also provides an electronic device.
[0170] Figure 9 This is a schematic diagram of the structure of the electronic device 90 provided in the embodiments of this application, such as... Figure 9 As shown, the electronic device may include: a transceiver 901, a processor 902, and a memory 903. The electronic device may be a controller as described in any of the above embodiments.
[0171] Processor 902 executes computer execution instructions stored in memory, causing processor 902 to perform the scheme in the above embodiments. Processor 902 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0172] The memory 903 is connected to the processor 902 via the system bus and completes communication between them. The memory 903 is used to store computer program instructions.
[0173] The transceiver 901 can receive and send data and instructions.
[0174] Optionally, the electronic device 90 may also include a communication interface to communicate and interact with external or internal devices, such as client devices (e.g., mobile phones, tablets). In specific implementations, if the communication interface, memory 903, and processor 902 are implemented independently, they can be interconnected via a bus to complete communication with each other.
[0175] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Transceivers are used to enable communication between database access devices and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.
[0176] Optionally, in a specific implementation, if the communication interface, memory 903, and processor 902 are integrated on a single chip, then the communication interface, memory 903, and processor 902 can communicate through an internal interface.
[0177] This application also provides a chip for executing instructions, which is used to execute the monitoring method described in the above embodiments.
[0178] This application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.
[0179] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact discread-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0180] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the above method embodiments. Its implementation principle and technical effects are similar, and will not be repeated here.
[0181] In the specific implementation of the aforementioned terminal device or server, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0182] Those skilled in the art will understand that all or part of the steps in any of the above method embodiments can be implemented by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps in the above method embodiments are performed.
[0183] If the technical solution of this application is implemented in software form and sold or used as a product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product, which is stored in a storage medium and includes a computer program or several instructions. This computer software product enables a computer device (which may be a personal computer, server, network device, or similar electronic device) to execute all or part of the steps of the methods in the embodiments of this application.
[0184] 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.
[0185] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, 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 can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0186] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0187] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0188] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0189] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0190] 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.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting the rotation direction of a window cleaning robot motor, characterized in that, include: Acquire the pulse signal from the detection sensor; The detection sensor includes a single-phase Hall sensor and / or a single-phase photoelectric sensor; The rotation direction of the motor is determined based on the characteristics of the pulse signal.
2. The method according to claim 1, characterized in that, Determining the rotation direction of the motor based on the characteristics of the pulse signal includes: Obtain the order of high and low levels in the pulse signal; The rotation direction of the motor is determined according to the arrangement order.
3. The method according to claim 2, characterized in that, The detection sensor is a single-phase Hall sensor, and the magnetic ring configured in the single-phase Hall sensor includes multiple south and north poles, which are non-uniformly arranged circumferentially on the magnetic ring; determining the rotation direction of the motor based on the pulse signal includes: Determine the first signal arrangement characteristics presented by the pulse signal; The rotation direction of the motor is determined based on the first signal arrangement feature and the predefined Hall signal arrangement feature.
4. The method according to claim 2, characterized in that, The detection sensor is a single-phase photoelectric sensor. The grating disk of the single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-blocking parts. The multiple light-transmitting parts and the multiple light-blocking parts are non-uniformly arranged in the circumferential direction of the grating disk. Determining the rotation direction of the motor based on the pulse signal includes: Determine the second signal arrangement characteristics presented by the pulse signal; The rotation direction of the motor is determined based on the second signal arrangement feature and the predefined photoelectric signal arrangement feature.
5. The method according to claim 2, characterized in that, The detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor. Determining the rotation direction of the motor based on the pulse signal includes: Determine whether the first rotation direction of the motor determined based on the pulse signal of the single-phase Hall sensor is consistent with the second rotation direction of the motor determined based on the pulse signal of the single-phase photoelectric sensor; If not, the motor is stopped and an alarm message is output; or, the environmental information of the window cleaning robot is obtained, and the first rotation direction or the second rotation direction is used as the rotation direction of the motor according to the environmental information.
6. The method according to claim 2, characterized in that, The detection sensor includes a single-phase Hall sensor and a single-phase photoelectric sensor; the installation positions of the single-phase Hall sensor and the single-phase photoelectric sensor are at an angle to the target angle in the circumferential direction; The magnetic ring configured in the single-phase Hall sensor includes multiple south and north poles, which are evenly and alternately arranged in the circumferential direction of the magnetic ring. The grating disk of the single-phase photoelectric sensor includes multiple light-transmitting parts and multiple light-shielding parts, which are evenly staggered in the circumferential direction of the grating disk.
7. The method according to claim 6, characterized in that, Determining the rotation direction of the motor based on the pulse signal includes: The phase difference between the first pulse signal of the single-phase Hall sensor and the second pulse signal of the single-phase photoelectric sensor is obtained; The rotation direction of the motor is determined based on the phase difference.
8. An electronic device, characterized in that, include: The processor, transceiver, and memory are provided; the processor is communicatively connected to both the transceiver and the memory. The memory stores computer-executed instructions; The transceiver communicates and interacts with external devices. The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, It stores a computer program, which is executed by a processor to implement the method of any one of claims 1-7.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a controller, implements the method of any one of claims 1-7.