Electronic equipment, control method and device of electronic equipment and readable storage medium

By designing magnets and Hall sensors evenly distributed on the annular shell, the problem of inaccurate rotation angle detection caused by high-order harmonic interference is solved, and high-precision rotation angle detection is achieved.

CN120897005APending Publication Date: 2025-11-04VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510993486.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

When electronic devices detect the rotation angle of the housing, the accuracy of the detection results is low due to high-order harmonic interference.

Method used

The design employs N magnets and M Hall sensors evenly distributed on a ring-shaped shell to ensure that the ratio of the angle covered by the magnets to the distance between the center points of adjacent magnets is greater than 0.4, thereby reducing high-order harmonic interference and improving detection accuracy.

Benefits of technology

By reducing high-order harmonic interference, the accuracy of the rotation angle detection results is improved, and the accuracy error of the mechanical rotation angle is kept within 1°.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120897005A_ABST
    Figure CN120897005A_ABST
Patent Text Reader

Abstract

The invention discloses electronic equipment, a control method and device of the electronic equipment, a readable storage medium and the electronic equipment, the electronic equipment comprises an annular shell, M Hall sensors and N magnets, the annular shell defines a containing cavity, the M Hall sensors are arranged in the containing cavity, the annular shell can rotate relative to the M Hall sensors, and the N magnets are arranged in the containing cavity. The N magnets are fixedly connected to the annular shell, and any two adjacent magnets in the N magnets are arranged at intervals; wherein the ratio of the covering angle of one magnet to the distance covering angle between the central point positions of any two adjacent magnets in the N magnets is larger than 0.4, M is an integer larger than or equal to 3, and N is an integer larger than M. Therefore, the accuracy of the detection result of the rotation angle is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of electronics, and particularly relates to an electronic device, a control method and device of the electronic device, and a readable storage medium. BACKGROUND

[0002] With the continuous development of electronic technology, electronic devices play an increasingly important role in people's lives, and the functions that can be realized by electronic devices are also increasing. In actual use, the shell of an electronic device can be rotated, and a corresponding operation is performed by detecting the rotation angle of the shell. However, due to the interference of high-order harmonics, the accuracy of the detection result of the rotation angle is low. SUMMARY

[0003] The present application aims to provide an electronic device, a control method and device of the electronic device, and a readable storage medium, which can solve one of the problems of low accuracy of the detection result of the rotation angle.

[0004] To solve the above technical problems, the present application is implemented as follows:

[0005] In a first aspect, an electronic device is provided, which comprises a ring-shaped shell, M Hall sensors, and N magnets. The ring-shaped shell encloses a receiving cavity. The M Hall sensors are arranged in the receiving cavity. The ring-shaped shell is rotatable relative to the M Hall sensors. The N magnets are fixedly connected to the ring-shaped shell. Any two adjacent magnets among the N magnets are arranged at intervals.

[0006] The ratio of the angle covered by one magnet to the angle covered by the interval between the center points of any two adjacent magnets among the N magnets is greater than 0.4. M is an integer greater than or equal to 3, and N is an integer greater than M.

[0007] In a second aspect, a control method of an electronic device is provided, which is applied to the electronic device of the first aspect. The control method comprises the following steps.

[0008] In the case where the ring-shaped shell of the electronic device drives the N magnets to rotate, M Hall signal values detected by the M Hall sensors of the electronic device are acquired.

[0009] The rotation angle of the ring-shaped shell is determined according to the M Hall signal values.

[0010] A target operation is performed according to the rotation angle.

[0011] In a third aspect, an electronic device control device is provided, which is applied to the electronic device of the first aspect. The electronic device control device comprises the following steps.

[0012] an acquisition module, configured to acquire M Hall signal values detected by M Hall sensors of the electronic device in a case that the annular shell drives N magnets to rotate;

[0013] a determination module, configured to determine a rotation angle of the annular shell according to the M Hall signal values;

[0014] an execution module, configured to execute a target operation according to the rotation angle.

[0015] In a fourth aspect, an electronic device is provided, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method in the third aspect.

[0016] In a fifth aspect, a readable storage medium is provided, which stores a program or instructions, and the program or instructions, when executed by a processor, implement the steps of the method in the third aspect.

[0017] In a sixth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or instructions to implement the method in the third aspect.

[0018] In the embodiments of the present application, since the ratio of the angle covered by one magnet to the angle covered by the interval between the center points of any two adjacent magnets in the N magnets is greater than 0.4, when the annular shell drives the N magnets to rotate relative to the M Hall sensors, the 5th harmonic component in the magnetic field generated by the rotation of the N magnets can be less than 5% of the fundamental harmonic component, that is, the interference of the high-order harmonic is reduced, thereby improving the accuracy of the detection result of the rotation angle.

[0019] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.

[0021] Figure 1 is one of the structural schematic diagrams of the electronic device provided by the embodiments of the present application;

[0022] Figure 2 is another structural schematic diagram of the electronic device provided by the embodiments of the present application;

[0023] Figure 3 FIG. 3 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0024] Figure 4A FIG. 4 is a signal comparison schematic diagram of an electronic device according to an embodiment of the present application;

[0025] Figure 4B FIG. 5 is a harmonic signal schematic diagram of an electronic device according to an embodiment of the present application;

[0026] Figure 5 FIG. 6 is a detection schematic diagram of a rotation angle in the related art;

[0027] Figure 6 FIG. 7 is a detection schematic diagram of a rotation angle according to an embodiment of the present application;

[0028] Figure 7 FIG. 8 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0029] Figure 8 FIG. 9 is a flowchart of an electronic device control method according to an embodiment of the present application;

[0030] Figure 9 FIG. 10 is a H2 inversion processing schematic diagram according to an embodiment of the present application;

[0031] Figure 10 FIG. 11 is a schematic diagram of multiple parameters according to an embodiment of the present application;

[0032] Figure 11 FIG. 12 is a comparison schematic diagram of adding external interference and not adding external interference according to an embodiment of the present application;

[0033] Figure 12 FIG. 13 is an application scenario schematic diagram of an electronic device according to an embodiment of the present application;

[0034] Figure 13 FIG. 14 is a comparison schematic diagram of a detection result of a rotation angle with and without interference according to an embodiment of the present application;

[0035] Figure 14 FIG. 15 is an application scenario schematic diagram of an electronic device according to an embodiment of the present application;

[0036] Figure 15 FIG. 16 is a structural schematic diagram of an electronic device control apparatus according to an embodiment of the present application;

[0037] Figure 16 FIG. 17 is a structural schematic diagram of an electronic device according to an embodiment of the present application;

[0038] Figure 17 FIG. 18 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] The embodiments of the present application will be described below in detail with examples shown in the accompanying drawings, in which the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary only for the purpose of explanation and are not to be understood as limiting the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative work fall within the scope of the present application.

[0040] The terms "first", "second" in the specification and claims of the present application can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally means that the front and rear associated objects are in an "or" relationship.

[0041] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0042] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium; it can be the communication inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0043] As shown in Figure 1 and Figure 2 , respectively, a structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in Figure 1 and Figure 2 , respectively, a structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in Figure 1 and Figure 2As shown, the electronic device comprises a ring-shaped shell 10, M Hall sensors 20 and N magnets 30, the ring-shaped shell 10 encloses a receiving cavity 11, the M Hall sensors 20 are arranged in the receiving cavity 11, the ring-shaped shell 10 can rotate relative to the M Hall sensors 20, and the N magnets 30 are fixedly connected to the ring-shaped shell 10, and any two adjacent magnets 30 among the N magnets 30 are arranged at intervals.

[0044] The ratio of the angle covered by one magnet 30 to the angle covered by the interval between the center points of any two adjacent magnets 30 among the N magnets 30 is greater than 0.4, M is an integer greater than or equal to 3, and N is an integer greater than M.

[0045] Optionally, N can be an integer greater than or equal to 8, so that the distribution of the magnets 30 on the ring-shaped shell 10 is more uniform, and the change of the magnetic field is also more uniform.

[0046] In the embodiments of the present application, since the ratio of the angle covered by one magnet 30 to the angle covered by the interval between the center points of any two adjacent magnets 30 among the N magnets 30 is greater than 0.4, when the ring-shaped shell 10 drives the N magnets 30 to rotate relative to the M Hall sensors 20, the 5th harmonic component in the magnetic field generated by the rotation of the N magnets 30 can be less than 5% of the fundamental harmonic component, that is, the interference of the high-order harmonic is reduced, thereby improving the accuracy of the detection result of the rotation angle.

[0047] It should be noted that the above rotation angle can also be referred to as a mechanical angle.

[0048] The above content can also be understood as follows: Figure 2 When the ring-shaped shell 10 drives the N magnets 30 to rotate relative to the M Hall sensors 20, the rotation direction of the ring-shaped shell 10 can be as shown in direction A in Figure 2 The magnetic field generated by the rotation of the N magnets 30 generally includes a fundamental wave and a high-order odd harmonic, and the fundamental wave can be used to measure the rotation angle of the ring-shaped shell 10, and the existence of the high-order odd harmonic will interfere with the measurement result of the rotation angle of the ring-shaped shell 10. Optionally, as shown in Figure 5 The measurement result of the rotation angle after the interference is shown in the dashed box in Figure 5 Figure 5 ​B1 is a real angle, and B2 is a calculated angle; in addition, the high odd harmonics usually can include 3rd harmonic, 5th harmonic and 7th harmonic, etc., in the embodiment of the application, by the ratio of the angle covered by the magnet 30 and the spacing between the center point positions of any two adjacent magnets 30 in the N magnets 30 is greater than 0.4, so that the 5th harmonic can be less than 5% of the base harmonic component, that is, the interference of the 5th harmonic in the high odd harmonics is reduced, thereby improving the accuracy of the detection result of the rotation angle. For details, see Figure 4A 、 Figure 4B and Figure 6 H1, H2 and H3 in Figure 4A may respectively refer to the Hall electric signals detected by the Hall sensor, and Figure 6 the detection result of the rotation angle after reducing the interference of the 5th harmonic and the 3rd harmonic in the high odd harmonics is shown in the dashed box.

[0049] It should be noted that the number of 7th harmonic can be ignored, so the high odd harmonics that interfere with the accuracy of the detection result of the rotation angle usually include 3rd harmonic and 5th harmonic, and in the embodiment of the application, by controlling the ratio of the angle covered by the magnet 30 and the spacing between the center point positions of any two adjacent magnets 30 in the N magnets 30 to be greater than 0.4, the interference of the 5th harmonic on the detection result of the rotation angle can be reduced. For details of the specific way to reduce the interference of the 5th harmonic on the detection result of the rotation angle, see the description hereinafter.

[0050] Optionally, as shown in Figure 7 , the accommodating cavity 11 is a circular accommodating cavity, the radius of the accommodating cavity 11 is 29mm, the magnet 30 is an arc-shaped magnet, the length of the magnet 30 is 10mm, the distance from the center of the accommodating cavity 11 to the flexible circuit board 40 is 28mm, then the angle covered by the magnet 30 can be 19.8 degrees, the spacing between the center point positions of any two adjacent magnets 30 can be 45 degrees, then 19.8 / 45≈0.44, and obviously 0.44 is greater than 0.4.

[0051] It should be noted that since the N magnets 30 are fixedly connected to the annular shell 10, when the annular shell 10 rotates relative to the M Hall sensors 20, the N magnets 30 will also rotate with the annular shell 10 relative to the M Hall sensors 20, and since the N magnets 30 rotate relative to the M Hall sensors 20, the magnetic field generated by the N magnets 30 will also change, thereby causing the Hall signal value detected by the M Hall sensors 20 to also change accordingly. Thus, the rotation angle of the annular shell 10 can be determined by the Hall signal value detected by the M Hall sensors 20.

[0052] The angle covered by one magnet 30 can be understood as follows: a first line segment is obtained by connecting the first end of the magnet 30 with the center point of the accommodating cavity 11, a second line segment is obtained by connecting the second end of the magnet 30 with the center point of the accommodating cavity 11, and the included angle between the first line segment and the second line segment is the angle covered by one magnet 30. The angle covered by the distance between the center points of any two adjacent magnets 30 can be understood as follows: a third line segment is obtained by connecting the center point of one of the any two adjacent magnets 30 with the center point of the accommodating cavity 11, a fourth line segment is obtained by connecting the center point of the other of the any two adjacent magnets 30 with the center point of the accommodating cavity 11, and the included angle between the third line segment and the fourth line segment is the angle covered by the distance between the center points of the any two adjacent magnets 30.

[0053] In the embodiments of the present application, the specific type of the electronic device is not limited herein, and the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application are not limited specifically.

[0054] Optionally, referring to Figure 3 When the electronic device is a mobile phone, the annular shell 10 can be the shell of the camera module of the mobile phone. Alternatively, when the electronic device is a wearable device, the annular shell 10 can be the shell of the watch face of the wearable device.

[0055] It should be noted that the specific structure of the magnet 30 is not limited herein.

[0056] As an optional implementation, the magnet 30 is an arc-shaped magnet or a strip-shaped magnet. In this way, the angle covered by the magnet 30 is wider, and it is easier to achieve that the ratio of the angle covered by the magnet 30 to the angle covered by the distance between the center points of any two adjacent magnets 30 is greater than 0.4, thereby reducing the process difficulty.

[0057] Optionally, the shape of the cross section of the magnet 30 can be circular or square, and the specific shape is not limited herein.

[0058] As an optional implementation, one magnetic pole of each of the N magnets 30 is arranged towards the center point position of the accommodating cavity 11.

[0059] Optionally, when the accommodating cavity 11 is a circular accommodating cavity, the center point position of the accommodating cavity 11 can be understood as the center position of the accommodating cavity 11.

[0060] In the embodiments of the present application, one magnetic pole of each of the N magnets 30 is arranged towards the center point position of the accommodating cavity 11, so that each of the N magnets 30 can be polarized towards the direction pointing to the center point position of the accommodating cavity 11.

[0061] It should be noted that the polarity of the magnetic pole of each of the N magnets 30 arranged towards the center point position of the accommodating cavity 11 is not limited herein.

[0062] As an optional implementation, as shown in Figure 2 the polarities of the magnetic poles of any two adjacent magnets 30 arranged towards the center point position of the accommodating cavity 11 are opposite. In this way, the proportion of high-order odd harmonics can be better reduced, that is, the accuracy of the detection result of the rotation angle is further improved.

[0063] As another optional implementation, the polarity of the magnetic pole of any one of the N magnets 30 arranged towards the center point position of the accommodating cavity 11 is opposite to the polarity of the magnetic pole of the magnet 30 adjacent to the magnet 30, and the polarity of the magnetic pole of another magnet 30 adjacent to the magnet 30 is the same as the polarity of the magnetic pole of the magnet 30 arranged towards the center point position of the accommodating cavity 11. In this way, the diversity and flexibility of the arrangement of the polarity of the magnetic pole of the magnet 30 arranged towards the center point position of the accommodating cavity 11 are increased.

[0064] As an optional implementation, as shown in Figure 2 the accommodating cavity 11 is a circular accommodating cavity, the M Hall sensors 20 are uniformly arranged on a first circle with the center point position of the accommodating cavity 11 as the center, and the central angle R between the center point positions of any two adjacent Hall sensors 20 is 120 / (N / 2) degrees, or 60 / (N / 2) degrees.

[0065] In the embodiments of the present application, the center angle R between the center point positions of any two adjacent Hall sensors 20 is 120 / (N / 2) degrees or 60 / (N / 2) degrees, so that the phase difference of the Hall signal values detected by any two adjacent Hall sensors 20 is 120 degrees or 60 degrees, thereby reducing the interference of the 3rd harmonic on the detection result of the rotation angle of the annular shell 10, and further improving the accuracy of the detection result of the rotation angle of the annular shell 10.

[0066] It should be noted that, in order to facilitate the description of the above embodiments, two specific examples are used for illustration below. The magnet 30 can be an arc-shaped magnet, and the polarities of the magnetic poles of any two adjacent magnets 30 arranged towards the center point position of the accommodating cavity 11 are opposite, that is, the polarities of the magnetic poles of the N magnets 30 arranged towards the center point position of the accommodating cavity 11 are alternately distributed as N poles and S poles, and M is an integer greater than or equal to 3.

[0067] Alternatively, when N = 16, that is, the number of magnets 30 is 16, R = 120 / (16 / 2) = 15°, so that the phase difference of the Hall signal values detected by any two adjacent Hall sensors 20 is 120°, or R = 60 / (16 / 2) = 7.5°, so that the phase difference of the Hall signal values detected by any two adjacent Hall sensors 20 is 60°.

[0068] Alternatively, when N = 8, that is, the number of magnets 30 is 8, after the 8 magnets 30 rotate 360 degrees with the annular shell 10, the period of the Hall electrical signal detected by the Hall sensor 20 is 4 periods, so that there is a 4-fold relationship between the change value corresponding to the rotation angle of the annular shell 10 per 1 degree and the angle change value corresponding to the Hall electrical signal, and this 4-fold relationship is usually obtained by dividing the number of magnets 30 by 2, so that when N = 8, R = 120 / (8 / 2) = 30°, so that the phase difference of the Hall signal values detected by any two adjacent Hall sensors 20 is 120°, or R = 60 / (8 / 2) = 15°, so that the phase difference of the Hall signal values detected by any two adjacent Hall sensors 20 is 60°.

[0069] It should be noted that the above Hall electrical signal is the signal corresponding to the Hall signal value detected by the Hall sensor 20.

[0070] As an optional embodiment, the N magnets 30 are uniformly spaced on a second circle with the center point position of the accommodating cavity 11 as the center;

[0071] The second circle is located in the first circle, and the distance between the second circle and the first circle is greater than or equal to 0.5 mm and less than or equal to 1.5 mm.

[0072] The second circumference is located within the first circumference, and a distance between the second circumference and the first circumference is greater than or equal to 0.5 millimeters and less than or equal to 1.5 millimeters. It can be understood that there is a gap between the Hall sensor 20 and the magnet 30, that is, the Hall sensor 20 and the magnet 30 are arranged in a spaced manner.

[0073] In the embodiment, the accuracy of the detection result of the Hall sensor 20 on the change of the magnetic field caused by the rotation of the magnet 30 is high, and the blocking or interference phenomenon caused by the rotation of the magnet 30 is reduced, so that the magnet 30 is more convenient to rotate with the ring-shaped shell 10.

[0074] As an optional embodiment, as shown in Figure 1 The M Hall sensors 20 are electrically connected to the flexible circuit board 40.

[0075] The flexible circuit board 40 can be referred to as a flexible printed circuit (FPC), and the flexible circuit board 40 can be attached to the inner wall of the accommodating cavity 11, thereby enhancing the fixing effect and the limiting effect of the flexible circuit board 40.

[0076] In the embodiment, the M Hall sensors 20 are electrically connected to the flexible circuit board 40, so that the flexible circuit board 40 can be connected to the M Hall sensors 20, that is, the flexible circuit board 40 can enhance the connection effect and the fixing effect of the M Hall sensors 20, and reduce the phenomenon of the Hall sensor 20 moving randomly in the accommodating cavity 11.

[0077] Referring to Figure 8 The electronic device control method is applied to the electronic device in the above embodiment, as shown in Figure 8 The electronic device control method includes the following steps:

[0078] Step 801: In a case where the ring-shaped shell of the electronic device drives N magnets to rotate, M Hall signal values detected by M Hall sensors of the electronic device are acquired;

[0079] Step 802: A rotation angle of the ring-shaped shell is determined according to the M Hall signal values;

[0080] Step 803: A target operation is performed according to the rotation angle.

[0081] It should be noted that the electronic control method in the embodiments of the present application can be applied to the electronic device in the above embodiments, and thus the technical features in the embodiments of the present application can refer to the corresponding descriptions in the above embodiments and have the same beneficial technical effects, which will not be described in detail here.

[0082] The rotation angle can correspond to the target operation, and the target operation can include at least one of the following: photograph zoom adjustment, volume adjustment, video playback progress adjustment, function switching, and the like.

[0083] Optionally, when the target operation includes video playback progress adjustment, the video playback progress is adjusted by 1% for each 1 degree of rotation of the rotation angle. Alternatively, when the target operation includes function switching, the current control function of the electronic device is switched once for each 1 degree of rotation of the rotation angle.

[0084] In the embodiments of the present application, the rotation angle of the annular shell is determined according to the M Hall signal values, and the target operation is performed according to the rotation angle, thereby providing a blind operation mode for controlling the execution of the target operation, i.e., the user can manually control the rotation of the annular shell to control the execution of the target operation, thereby improving the accuracy of the target operation.

[0085] As an optional implementation, the determination of the rotation angle of the annular shell according to the M Hall signal values includes:

[0086] The M Hall signal values are subjected to matrix transformation to obtain a value of a first signal and a value of a second signal,

[0087] The first signal and the second signal are orthogonal signals.

[0088] The value of the first signal and the value of the second signal are calculated by an arctangent function to obtain the rotation angle of the annular shell.

[0089] In the embodiments of the present application, the accuracy of the obtained rotation angle of the annular shell can be further improved.

[0090] Optionally, the value of the first signal can be represented by α, the value of the second signal can be represented by β, the rotation angle of the annular shell can be represented by θ, and when M is 3, the three Hall signal values can be represented by H1, H2, and H3, respectively. Thus, the calculation of the value of the first signal and the value of the second signal by the arctangent function to obtain the rotation angle of the annular shell can be understood as the following formula:

[0091] θ=arctan2(α,β);

[0092] The calculation of the value of the first signal can refer to the following expression: a = H1-1 / 2*H2-1 / 2*H3;

[0093] The calculation of the value of the second signal can refer to the following expression:

[0094] It should be noted that H1 = A*sin(theta) + A1*sin(3*theta) + A2*sin(5*theta), H2 = H1(theta-120°), and H3 = H1(theta+120°). Since alpha and beta are orthogonal signals, and since the 3rd harmonic value of the 3 Hall signals is the same under the condition of a 120-degree phase difference, i.e., (sin(3*theta+360°) = sin(3*theta)). Therefore, when calculating alpha and beta according to the above formula, i.e., when performing H1-1 / 2*H2-1 / 2*H3 processing, the 3rd harmonic interference to the rotation angle of the annular shell is directly eliminated, leaving only the 5th and higher harmonics. However, since the ratio of the angle covered by the magnet to the distance between the center points of any two adjacent magnets in the N magnets is greater than 0.4, the 5th harmonic accounts for less than 5%, and the interference is small, so that the calculation accuracy of the rotation angle of the annular shell can achieve a mechanical rotation angle of <1° accuracy error. The above mechanical rotation angle can be understood as the rotation angle of the annular shell.

[0095] Alternatively, referring to Figure 10 , Figure 10 is a test result diagram of the harmonic component ratio of the high harmonic and the angle error in the embodiment of the application, as Figure 10 shown, the 5th harmonic in the embodiment of the application accounts for 0.21 / 5.26≈4%, and after eliminating the 3rd harmonic, the Hall electric signal detected by the Hall sensor is calculated, so that the final calculated rotation angle of the annular shell is within 1° under the interference of the 5th harmonic, which can be seen that the detection accuracy of the rotation angle is improved.

[0096] Alternatively, referring to Figure 11 , a = H1-1 / 2*H2-1 / 2*H3, According to the calculation characteristics of the embodiment, the common mode signal superimposed on H1, H2, and H3 will be differentiated in the calculation process, thereby improving the anti-interference ability of the rotation angle calculation result. Referring to Figure 11 , Figure 11 B1 in the above formula is the true angle, B2 is the calculated angle, and B3 is the incremental angle error.

[0097] As shown in the formula, H1=A*sin(θ)+A1*sin(3*θ)+B, H2=A*sin(θ-120°)+A1*sin(3*θ-360°)+B, H3=A*sin(θ+120°)+A1*sin(3*θ+360°)+B. After calculation, α=A*sin(θ)-1 / 2*A*sin(θ-120°)-1 / 2*A*sin(θ+120°), and β, the third harmonic and the common mode component B are eliminated. As shown in the figure, after the external magnetic field interference of the three Hall elements is superimposed, the signal is seriously distorted, but the distorted signal does not affect the calculation accuracy after angle calculation, that is, the calculation result of the rotation angle is more accurate. Figure 11

[0098] As an optional implementation, the target operation performed according to the rotation angle includes:

[0099] calculating the square sum of the value of the first signal and the value of the second signal;

[0100] calculating the arithmetic square root of the square sum;

[0101] in a case where a difference between the arithmetic square root and a preset threshold is less than a first preset difference, performing a target operation according to the rotation angle.

[0102] wherein the arithmetic square root can be represented as , and the preset threshold can be In this way, when the difference between the arithmetic square root and the preset threshold is less than the first preset difference, it can be considered that the value of the first signal and the value of the second signal are less interfered, and thus the rotation angle of the annular shell can be calculated according to the value of the first signal and the value of the second signal, so as to ensure that the accuracy of the calculated rotation angle of the annular shell is higher. In addition, if the difference between the arithmetic square root and the preset threshold is greater than or equal to the first preset difference, it can be considered that the value of the first signal and the value of the second signal are greatly interfered and have low accuracy, and thus the rotation angle of the annular shell can not be calculated according to the value of the first signal and the value of the second signal.

[0103] In the embodiment of the application, in a case where the difference between the arithmetic square root and the preset threshold is less than the first preset difference, it is considered that the interference degree is small at this time, and thus the target operation can be performed according to the rotation angle, so as to improve the accuracy of the target operation.

[0104] Optionally, the specific application scenario of the embodiment of the application can be referred to as Figure 12 , and Figure 13 ​The detection result of the rotation angle is shown in the contrast diagram with and without interference.

[0105] As an optional implementation, referring to Figure 9 , the determining the rotation angle of the annular shell according to the M Hall signal values comprises:

[0106] inverting the target Hall signal value in the M Hall signal values to obtain a corrected target Hall signal value, the phase difference between the target Hall signal value and other Hall signal values is equal, and the other Hall signal values are the Hall signal values in the M Hall signal values except the target Hall signal value;

[0107] determining the rotation angle of the annular shell according to the corrected target Hall signal value and the Hall signal values in the M Hall signal values except the target Hall signal value.

[0108] In the embodiments of the present application, as Figure 9 shown, when the phase difference between the target Hall signal value and other Hall signal values is equal, it can be determined that the phase difference between the target Hall signal value and other Hall signal values is 60°, and after inverting the target Hall signal value, the phase difference between the corrected target Hall signal value and other Hall signal values is 120°, so that the Hall sensors corresponding to the target Hall signal value and the Hall sensors corresponding to other Hall signal values adopt a distribution mode with a phase difference of 60°, and when calculating, the target Hall signal value can be inverted to achieve the effect of a phase difference of 120°, which is convenient for calculation, and at the same time, the distribution mode with a phase difference of 60° can make the spacing between the Hall sensors smaller, saving the setting volume of the Hall sensors. In addition, when the Hall sensors are electrically connected with the flexible circuit board, the volume of the flexible circuit board can also be reduced.

[0109] As an optional implementation, the M Hall signal values include a first Hall signal value, a second Hall signal value, a third Hall signal value and a fourth Hall signal value, and the phase difference between the first Hall signal value and the fourth Hall signal value is 360 degrees.

[0110] The determining the rotation angle of the annular shell according to the M Hall signal values comprises:

[0111] determining a first rotation angle of the annular shell according to the first Hall signal value, the second Hall signal value and the third Hall signal value, and determining a second rotation angle of the annular shell according to the second Hall signal value, the third Hall signal value and the fourth Hall signal value;

[0112] The target operation according to the rotation angle includes:

[0113] In a case where a difference between the first rotation angle and the second rotation angle is less than a second preset difference, a target operation is performed according to at least one of the first rotation angle and the second rotation angle.

[0114] Wherein, the first Hall signal value can be represented by H1, the second Hall signal value can be represented by H2, the third Hall signal value can be represented by H3, and the fourth Hall signal value can be represented by H4.

[0115] It should be noted that the phase difference between the first Hall signal value and the fourth Hall signal value is 360 degrees, and the phase difference between any two adjacent ones of the first Hall signal value, the second Hall signal value, the third Hall signal value, and the fourth Hall signal value is 120 degrees. When the number of Hall sensors is 3 and the common mode feature of external interference is not obvious, it is not possible to distinguish whether the external interference is the external interference superimposed by the change of the magnetic field when the magnet rotates or the external interference existing by itself when the magnet is stationary.

[0116] Optionally, the specific application scenarios of the embodiments of the present application can be referred to Figure 14 as shown.

[0117] In the embodiments of the present application, by comparing the first rotation angle θ1 calculated by H1, H2, and H3 with the second rotation angle θ2 calculated by H4, H2, and H3, when the difference between the first rotation angle and the second rotation angle is less than a second preset difference, it can be considered that the external interference is mainly the external interference superimposed by the change of the magnetic field when the magnet rotates, and when the difference between the first rotation angle and the second rotation angle is greater than or equal to the second preset difference, it indicates that the external interference existing by itself when the magnet is stationary accounts for the main component, so that the external interference can be accurately distinguished, thereby preventing the function of the electronic device from being triggered by mistake.

[0118] It should be noted that the electronic device control method provided by the embodiments of the present application can be executed by an electronic device control device or a control module in the electronic device control device for loading the electronic device control method. In the embodiments of the present application, the electronic device control device is taken as an example to illustrate the electronic device control method provided by the embodiments of the present application.

[0119] Referring to Figure 15 , Figure 15 is a structural diagram of the electronic device control device provided by the embodiments of the present application, as Figure 15 shown, the electronic device control device 1500 includes:

[0120] The acquisition module 1501 is configured to acquire M Hall signal values detected by M Hall sensors of the electronic device in a case where the annular shell of the electronic device drives N magnets to rotate.

[0121] The determination module 1502 is configured to determine a rotation angle of the annular shell according to the M Hall signal values.

[0122] The execution module 1503 is configured to perform a target operation according to the rotation angle.

[0123] As an optional implementation, the determination module 1502 comprises:

[0124] The matrix transformation submodule is configured to perform matrix transformation on the M Hall signal values to obtain a value of a first signal and a value of a second signal, the first signal and the second signal being orthogonal signals.

[0125] The first calculation submodule is configured to calculate the value of the first signal and the value of the second signal by an inverse tangent function to obtain the rotation angle of the annular shell.

[0126] As an optional implementation, the execution module 1503 comprises:

[0127] The second calculation submodule is configured to calculate a square sum of the value of the first signal and the value of the second signal.

[0128] The third calculation submodule is configured to calculate an arithmetic square root of the square sum.

[0129] The execution submodule is configured to perform the target operation according to the rotation angle in a case where a difference between the arithmetic square root and a preset threshold is less than a first preset difference.

[0130] As an optional implementation, the determination module 1502 comprises:

[0131] The negation processing module is configured to perform negation processing on a target Hall signal value in the M Hall signal values to obtain a corrected target Hall signal value, a phase difference between the target Hall signal value and other Hall signal values being equal, the other Hall signal values being Hall signal values in the M Hall signal values except the target Hall signal value.

[0132] The determination submodule is configured to determine the rotation angle of the annular shell according to the corrected target Hall signal value and the Hall signal values in the M Hall signal values except the target Hall signal value.

[0133] As an optional implementation, the M Hall signal values include a first Hall signal value, a second Hall signal value, a third Hall signal value, and a fourth Hall signal value, and a phase difference between the first Hall signal value and the fourth Hall signal value is 360 degrees.

[0134] The determining module 1502 is further configured to determine a first rotation angle of the ring-shaped shell according to the first Hall signal value, the second Hall signal value, and the third Hall signal value, and determine a second rotation angle of the ring-shaped shell according to the second Hall signal value, the third Hall signal value, and the fourth Hall signal value.

[0135] The executing module 1503 is further configured to execute a target operation according to at least one of the first rotation angle and the second rotation angle in a case where a difference between the first rotation angle and the second rotation angle is less than a second preset difference.

[0136] The electronic device control apparatus in the embodiments of the present applicationapplicationbe an apparatus having an operating system. The operating systemapplicationbe an Android operating system, an ios operating system, or other possible operating systems, which are not limited in the embodiments of the present application.

[0137] The electronic device control apparatus provided in the embodiments of the present applicationapplicationachieve the method embodiments. Figure 8 The electronic device control apparatus achieving each process in the method embodiments is not repeated here.

[0138] Optionally, referring to Figure 16 The embodiments of the present application further provide an electronic device, which includes a processor 1602, a memory 1601, a program or instruction stored in the memory 1601 and executable on the processor 1602, the program or instruction is executed by the processor 1602 to implement each process of the above-mentioned electronic device control method embodiments and achieve the same technical effects, which are not repeated here.

[0139] It should be noted that the electronic device in the embodiments of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.

[0140] Figure 17 A hardware structure schematic diagram of an electronic device for implementing various embodiments of the present application.

[0141] The electronic device 1700 includes but is not limited to a radio frequency unit 1701, a network module 1702, an audio output unit 1703, an input unit 1704, a sensor 1705, a display unit 1706, a user input unit 1707, an interface unit 1708, a memory 1709, and a processor 1710, etc.

[0142] Those skilled in the art can understand that the electronic device 1700 can further include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1710 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. Figure 17 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than those shown, or combine certain components, or different component arrangements, which are not described here.

[0143] The processor 1710 is configured to:

[0144] In the case that the ring-shaped shell of the electronic device drives the N magnets to rotate, M Hall signal values detected by M Hall sensors of the electronic device are acquired;

[0145] The rotation angle of the ring-shaped shell is determined according to the M Hall signal values;

[0146] A target operation is performed according to the rotation angle.

[0147] As an optional implementation, the processor 1710 performs the determining the rotation angle of the ring-shaped shell according to the M Hall signal values, including:

[0148] The M Hall signal values are subjected to matrix transformation to obtain a value of a first signal and a value of a second signal, the first signal and the second signal being orthogonal signals;

[0149] The value of the first signal and the value of the second signal are calculated by an inverse tangent function to obtain the rotation angle of the ring-shaped shell.

[0150] As an optional implementation, the processor 1710 performs the performing the target operation according to the rotation angle, including:

[0151] The square sum of the value of the first signal and the value of the second signal is calculated;

[0152] The arithmetic square root of the square sum is calculated;

[0153] In the case that the difference between the arithmetic square root and a preset threshold value is less than a first preset difference value, the target operation is performed according to the rotation angle.

[0154] As an optional implementation, the processor 1710 performs the determining the rotation angle of the ring-shaped shell according to the M Hall signal values, including:

[0155] inverting a target Hall signal value in the M Hall signal values to obtain a corrected target Hall signal value, the target Hall signal value having equal phase differences with other Hall signal values, the other Hall signal values being Hall signal values in the M Hall signal values except the target Hall signal value;

[0156] determining a rotation angle of the annular shell according to the corrected target Hall signal value and the Hall signal values except the target Hall signal value in the M Hall signal values.

[0157] As an optional implementation, the M Hall signal values include a first Hall signal value, a second Hall signal value, a third Hall signal value and a fourth Hall signal value, the first Hall signal value and the fourth Hall signal value having a phase difference of 360 degrees.

[0158] The processor 1710 performs the determining the rotation angle of the annular shell according to the M Hall signal values, including:

[0159] determining a first rotation angle of the annular shell according to the first Hall signal value, the second Hall signal value and the third Hall signal value, and determining a second rotation angle of the annular shell according to the second Hall signal value, the third Hall signal value and the fourth Hall signal value.

[0160] The processor 1710 performs the performing a target operation according to the rotation angle, including:

[0161] performing a target operation according to at least one of the first rotation angle and the second rotation angle in a case where a difference between the first rotation angle and the second rotation angle is less than a second preset difference.

[0162] The electronic device provided by the embodiments of the present application can have the same beneficial technical effects as the above embodiments.

[0163] The embodiments of the present application further provide a readable storage medium, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement each process of the above electronic device control method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0164] The processor is the processor in the electronic device in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.

[0165] The chip provided by the embodiment of the present application also can be called a system chip, a system on chip, a chip system, or a system on chip, etc.

[0166] It should be understood that the chip mentioned in the embodiment of the present application can also be called a system chip, a system on chip, a chip system, or a system on chip, etc.

[0167] It should be understood that the chip mentioned in the embodiment of the present application can also be called a system chip, a system on chip, a chip system, or a system on chip, etc.

[0168] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and a necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0169] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the protection scope of the claims.

Claims

1. An electronic device, characterized in that, include: The device comprises an annular housing, M Hall sensors, and N magnets. The annular housing forms a receiving cavity, and the M Hall sensors are disposed within the receiving cavity. The annular housing is rotatable relative to the M Hall sensors. The N magnets are fixedly connected to the annular housing, and any two adjacent magnets among the N magnets are spaced apart. Wherein, the ratio of the angle covered by one magnet to the angle covered by the distance between the center points of any two adjacent magnets among the N magnets is greater than 0.4, M is an integer greater than or equal to 3, and N is an integer greater than M.

2. The electronic device according to claim 1, characterized in that, The magnet is an arc-shaped magnet or a bar magnet.

3. The electronic device according to claim 1, characterized in that, One magnetic pole of each of the N magnets is positioned facing the center point of the accommodating cavity.

4. The electronic device according to claim 3, characterized in that, The magnetic poles of any two adjacent magnets among the N magnets are opposite in polarity and are positioned toward the center point of the accommodating cavity.

5. The electronic device according to any one of claims 1 to 4, characterized in that, The accommodating cavity is a circular cavity, and the M Hall sensors are evenly spaced on a first circle with the center point of the accommodating cavity as the center. The central angle between the center points of any two adjacent Hall sensors is 120 / (N / 2) degrees or 60 / (N / 2) degrees.

6. The electronic device according to claim 5, characterized in that, The N magnets are evenly spaced on a second circle centered at the center point of the accommodating cavity. The second circumference is located within the first circumference, and the distance between the second circumference and the first circumference is greater than or equal to 0.5 mm and less than or equal to 1.5 mm.

7. The electronic device according to any one of claims 1 to 4, characterized in that, A flexible circuit board is also provided inside the accommodating cavity, and all M Hall sensors are electrically connected to the flexible circuit board.

8. A method for controlling an electronic device, characterized in that, The electronic device control method, applied to any one of claims 1 to 7, comprises: When the annular housing of the electronic device drives N magnets to rotate, the M Hall signal values ​​detected by the M Hall sensors of the electronic device are obtained; The rotation angle of the annular housing is determined based on the M Hall signal values; Perform the target operation based on the rotation angle.

9. The method according to claim 8, characterized in that, Determining the rotation angle of the annular housing based on the M Hall signal values ​​includes: A matrix transformation is performed on the M Hall signal values ​​to obtain the values ​​of a first signal and a second signal, wherein the first signal and the second signal are orthogonal signals. The rotation angle of the annular shell is obtained by calculating the values ​​of the first signal and the second signal using the arctangent function.

10. The method according to claim 9, characterized in that, The step of performing the target operation based on the rotation angle includes: Calculate the sum of the squares of the values ​​of the first signal and the second signal; Calculate the arithmetic square root of the sum of squares; If the difference between the arithmetic square root and the preset threshold is less than the first preset difference, the target operation is performed according to the rotation angle.

11. The method according to claim 8, characterized in that, Determining the rotation angle of the annular housing based on the M Hall signal values ​​includes: The target Hall signal value among the M Hall signal values ​​is inverted to obtain a corrected target Hall signal value. The phase difference between the target Hall signal value and the other Hall signal values ​​is equal. The other Hall signal values ​​are Hall signal values ​​other than the target Hall signal value among the M Hall signal values. The rotation angle of the annular housing is determined based on the corrected target Hall signal value and the Hall signal values ​​other than the target Hall signal value among the M Hall signal values.

12. The method according to claim 8, characterized in that, The M Hall signal values ​​include a first Hall signal value, a second Hall signal value, a third Hall signal value, and a fourth Hall signal value, and the phase difference between the first Hall signal value and the fourth Hall signal value is 360 degrees; Determining the rotation angle of the annular housing based on the M Hall signal values ​​includes: A first rotation angle of the annular housing is determined based on the first Hall signal value, the second Hall signal value, and the third Hall signal value; and a second rotation angle of the annular housing is determined based on the second Hall signal value, the third Hall signal value, and the fourth Hall signal value. The step of performing the target operation based on the rotation angle includes: If the difference between the first rotation angle and the second rotation angle is less than a second preset difference, the target operation is performed based on at least one of the first rotation angle and the second rotation angle.

13. An electronic device control apparatus, characterized in that, The electronic device control device, applicable to any one of claims 1 to 7, comprises: The acquisition module is used to acquire M Hall signal values ​​detected by M Hall sensors of the electronic device when the annular housing of the electronic device drives N magnets to rotate; The determining module is used to determine the rotation angle of the annular housing based on the M Hall signal values; An execution module is used to perform the target operation according to the rotation angle.

14. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the electronic device control method as described in any one of claims 8 to 12.

15. A readable storage medium storing a program or instructions, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the electronic device control method according to any one of claims 8 to 12.

16. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the electronic device control method as described in any one of claims 8 to 12.