Mode calibration method and device of capacitance pen, capacitance pen and storage medium

By using 3D Hall switches and magnetic field strength detection technology in capacitance pens to calculate and calibrate the angle ranges of different modes, the problem of capacitance pens to achieve accurate switching of multiple working modes under the rotating appearance is solved, and the stability and user experience of the device are improved.

CN119668435AActive Publication Date: 2025-03-21MAXEYE SMART TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411741049.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the design of a capacitance pen, how to achieve accurate switching of multiple working modes within a limited PCB space and meeting the rotating appearance requirements is affected by the differences in rotation angle changes and angle jumps, resulting in malfunction of the switch or the inability to switch normally.

Method used

By obtaining the magnetic field intensity of the 3D Hall switch in different directions when the pen cap is rotated to different switch positions, the corresponding angle values ​​are calculated, and the angle ranges of different modes are determined based on these angle values ​​and preset calibration values, thereby achieving accurate calibration and switching of the capacitance pen mode.

Benefits of technology

It realizes that while ensuring the rotating appearance of the capacitor pen, the various working modes of the capacitor pen can be accurately switched, avoiding the problem of malfunctioning or inability to switch due to angle jumps, and improving the stability and user experience of the capacitor pen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668435A_ABST
    Figure CN119668435A_ABST
Patent Text Reader

Abstract

The invention discloses a capacitance pen mode calibration method and device, a capacitance pen and a storage medium, and relates to the technical field of capacitance pencils, and the capacitance pen mode calibration method comprises the steps: respectively obtaining the magnetic field intensity of a 3D Hall switch in a first direction and a second direction when a pen cap rotates to a first switch position and a second switch position; respectively calculating a first angle value and a second angle value of the 3D Hall switch when the pen cap rotates to a first switch position and a second switch position according to the magnetic field intensity; the sum of the first angle value and a preset calibration value is stored as a first threshold angle, and the difference between the second angle value and the preset calibration value is stored as a second threshold angle; updating a first mode angle range smaller than or equal to the first threshold angle, updating a second mode angle range larger than the first threshold angle and smaller than the second threshold angle, and updating a third mode angle range larger than or equal to the second threshold angle; according to the technical scheme provided by the invention, multiple modes of the capacitance pen can be accurately switched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of capacitive pens, and in particular to a mode calibration method and device for a capacitive pen, a capacitive pen, and a storage medium. Background Art

[0002] With the continuous advancement of electronic technology and the popularization of smart devices, capacitive pens, as an important input tool, have gained widespread application in a variety of fields, including drawing, handwriting, and gaming. To meet diverse user needs, capacitive stylus designs are increasingly becoming multifunctional, with the ability to switch between three or more operating modes becoming a key design direction. However, designers face numerous challenges in the field of capacitive stylus design, particularly how to implement mode switching within limited PCB (printed circuit board) space and maintain a rotary design while meeting user demands for switching between three different operating modes. This requires not only advanced circuit design skills but also ingenious structural design.

[0003] A key step in switching modes for a capacitive stylus is rotating the pen cap to change the state of an internal switch, thereby switching between different operating modes. However, due to the varying rotation angles and the presence of certain angle jumps, precise control at the hardware level is extremely difficult. This angle uncertainty can cause the switch to accidentally trigger when it shouldn't, or malfunction when it should, severely impacting the stability and user experience of the capacitive stylus. Specifically, when rotating the pen cap to switch modes, if the angle jump exceeds the designed range, the internal switch may malfunction, causing the capacitive stylus to switch to the incorrect operating mode. Conversely, if the angle jump is insufficient, the switch may not be triggered, preventing the capacitive stylus from switching to the desired mode. Both of these situations can cause unnecessary inconvenience to the user and reduce the effectiveness of the capacitive stylus.

[0004] Therefore, how to accurately switch between multiple working modes of a capacitive stylus while maintaining its rotatable appearance has become a technical problem that needs to be solved urgently in the current field of capacitive pens. Summary of the Invention

[0005] The main purpose of the present invention is to provide a mode calibration method and device for a capacitive stylus, a capacitive stylus and a storage medium, aiming to achieve accurate switching of multiple working modes of the capacitive stylus.

[0006] To achieve the above-mentioned object, the present invention provides a capacitive stylus mode calibration method, comprising:

[0007] obtaining a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and obtaining a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction;

[0008] calculating a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position according to the first magnetic field strength and the second magnetic field strength, and calculating a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position according to the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is smaller than the second angle value;

[0009] Calculating the sum of the first angle value and the preset calibration value and saving it as the first threshold angle; calculating the difference between the second angle value and the preset calibration value and saving it as the second threshold angle, wherein the first threshold angle is smaller than the second threshold angle;

[0010] An angle less than or equal to the first threshold angle is updated to the first mode angle range, an angle greater than the first threshold angle and less than the second threshold angle is updated to the second mode angle range, and an angle greater than or equal to the second threshold angle is updated to the third mode angle range.

[0011] In one embodiment, the step of calculating a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position based on the first magnetic field strength and the second magnetic field strength, and calculating a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position based on the third magnetic field strength and the fourth magnetic field strength, includes:

[0012] Calculate a first angle parameter based on the first magnetic field strength and the second magnetic field strength, and calculate a second angle parameter based on the third magnetic field strength and the fourth magnetic field strength;

[0013] Perform inverse trigonometric function calculations on the first angle parameter and the second angle parameter respectively to obtain the first angle value and the second angle value.

[0014] In one embodiment, the steps of calculating the sum of the first angle value and the preset calibration value and saving the sum as the first threshold angle, and calculating the difference between the second angle value and the preset calibration value and saving the sum as the second threshold angle include:

[0015] Acquire a plurality of first angle values ​​and a plurality of second angle values ​​a preset number of times;

[0016] Comparing a plurality of the first angle values ​​to obtain a maximum first angle value, and comparing a plurality of the second angle values ​​to obtain a minimum second angle value;

[0017] Calculate the sum of the maximum first angle value and the preset calibration value and save it as the first threshold angle; calculate the difference between the minimum second angle value and the preset calibration value and save it as the second threshold angle, wherein the first threshold angle is smaller than the second threshold angle.

[0018] In one embodiment, the preset calibration value includes a first calibration value and a second calibration value that increase in sequence, and after the step of obtaining a plurality of first angle values ​​and a plurality of second angle values ​​a preset number of times, the step includes:

[0019] Comparing a plurality of the first angle values ​​to obtain the maximum first angle value and the minimum first angle value, and comparing a plurality of the second angle values ​​to obtain the maximum second angle value and the minimum second angle value;

[0020] Calculating a difference between the maximum first angle value and the minimum first angle value to obtain a first angle difference, and calculating a difference between the maximum second angle value and the minimum second angle value to obtain a second angle difference;

[0021] The larger of the first angle difference and the second angle difference is used as the deviation value. If the deviation value is less than the preset deviation threshold, the first calibration value is updated to the preset calibration value. If the deviation value is greater than or equal to the preset deviation threshold, the second calibration value is updated to the preset calibration value.

[0022] In one embodiment, the operating modes of the capacitive stylus include an air mouse mode, a laser mode, and a writing mode.

[0023] In one embodiment, after the steps of updating the first mode angle range with an angle less than or equal to the first threshold angle, updating the second mode angle range with an angle greater than the first threshold angle and less than the second threshold angle, and updating the third mode angle range with an angle greater than or equal to the second threshold angle, the method further includes:

[0024] Based on user settings, the first mode angle range, the second mode angle range, and the third mode angle range correspond to one of the air mouse mode, the laser mode, and the writing mode, respectively.

[0025] The present invention further provides a mode calibration device for a capacitive stylus, the mode calibration device for a capacitive stylus comprising:

[0026] an acquisition module, configured to acquire a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and acquire a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction;

[0027] a calculation module, configured to calculate a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position based on the first magnetic field strength and the second magnetic field strength, and calculate a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position based on the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is less than the second angle value; calculate the sum of the first angle value and a preset calibration value, and save it as a first threshold angle; calculate the difference between the second angle value and the preset calibration value, and save it as a second threshold angle, wherein the first threshold angle is less than the second threshold angle;

[0028] The calibration module is used to update the first mode angle range when the angle is less than or equal to the first threshold angle, update the second mode angle range when the angle is greater than the first threshold angle and less than the second threshold angle, and update the third mode angle range when the angle is greater than or equal to the second threshold angle.

[0029] The present invention further provides a capacitive stylus, comprising:

[0030] pen cap and pen body;

[0031] A 3D Hall switch, comprising a permanent magnet and a sensing portion. The permanent magnet is mounted on the pen cap, while the sensing portion is mounted on the pen body. The switch senses the magnetic field changes generated by rotating the pen cap and outputs a magnetic field detection signal.

[0032] A controller is used to execute the steps of the capacitive stylus mode calibration method as described in any one of the above.

[0033] The present invention also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the mode calibration method of the capacitive stylus as described in any one of the above are implemented.

[0034] The technical solution of the present invention obtains the magnetic field strength of the 3D Hall switch in different directions when the pen cap is rotated to different switch positions, calculates the corresponding angle values, and determines the angle ranges of different modes based on these angle values ​​and preset calibration values, thereby accurately calibrating the capacitive pen mode and achieving precise switching of multiple working modes of the capacitive pen while ensuring the rotary appearance of the capacitive pen. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0036] Figure 1 A schematic flow chart of a first embodiment of a capacitive stylus mode calibration method according to the present invention;

[0037] Figure 2 A schematic flow chart of a second embodiment of a capacitive stylus mode calibration method according to the present invention;

[0038] Figure 3 A schematic flow chart of a third embodiment of a capacitive stylus mode calibration method according to the present invention;

[0039] Figure 4 A schematic flow chart of a fourth embodiment of a capacitive stylus mode calibration method according to the present invention;

[0040] Figure 5 A flowchart illustrating an implementation of a fifth embodiment of a capacitive stylus mode calibration method according to the present invention is provided;

[0041] Figure 6 Schematic diagram of the mode angle range of the mode calibration method of the capacitive stylus according to the present invention;

[0042] Figure 7 Schematic diagram of the module structure of the mode calibration device of the capacitive stylus according to an embodiment of the present invention.

[0043] Description of Figure Numbers:

[0044] O, initial angle; E, final angle; D1, first threshold angle; D2, second threshold angle; R1, first mode angle range; R2, second mode angle range; R3, third mode angle range;

[0045] 10. Acquisition module; 20. Calculation module; 30. Calibration module.

[0046] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0048] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture. If the specific posture changes, the directional indications will also change accordingly.

[0049] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features limited to "first" and "second" may explicitly or implicitly include at least one of such features. In addition, if "and / or" or "and / or" appears in the full text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or solutions that satisfy both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0050] With the continuous advancement of electronic technology and the popularization of smart devices, capacitive pens, as an important input tool, have gained widespread application in a variety of fields, including drawing, handwriting, and gaming. To meet diverse user needs, capacitive stylus designs are increasingly becoming multifunctional, with the ability to switch between three or more operating modes becoming a key design direction. However, designers face numerous challenges in the field of capacitive stylus design, particularly how to implement mode switching within limited PCB (printed circuit board) space and maintain a rotary design while meeting user demands for switching between three different operating modes. This requires not only advanced circuit design skills but also ingenious structural design.

[0051] A key step in switching modes for a capacitive stylus is rotating the pen cap to change the state of the internal switch, thereby switching between different operating modes. However, due to the varying rotation angles and the presence of certain angle jumps, precise control at the hardware level is extremely difficult. This angle uncertainty can cause the switch to accidentally trigger when it shouldn't, or malfunction when it should, seriously affecting the stability of the capacitive stylus and the user experience. Specifically, when rotating the pen cap to switch modes, if the angle jump exceeds the designed range, it may cause the internal switch to malfunction, preventing the capacitive stylus from switching to the user's desired operating mode. This can cause unnecessary trouble for the user and reduce the user experience of the capacitive stylus.

[0052] In order to overcome the above problems, the present invention proposes a mode calibration method for a capacitive stylus.

[0053] See also Figure 1 and Figure 6 In the first embodiment of the present invention, the capacitive stylus mode calibration method includes steps S10 to S40:

[0054] Step S10, obtaining a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and obtaining a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction;

[0055] It's important to note that a capacitive pen includes a cap, pen body, controller, and 3D Hall effect switch. Detecting the magnetic field strength of the 3D Hall effect switch is crucial to the calibration process. Specifically, the 3D Hall effect switch consists of a permanent magnet and a sensor. The permanent magnet is located in the cap, while the sensor is located in the pen body. The sensor senses the magnetic field changes generated by the synchronous rotation of the permanent magnet when the cap is rotated, and outputs a magnetic field detection signal. By detecting the magnetic field strength at different switch positions and calculating the corresponding angle values, precise positioning of the pen cap at different rotation angles can be ensured.

[0056] The cap of the capacitive stylus can be rotated to switch between a first switch position, a second switch position, and a third switch position, wherein the third switch position is located between the first switch position and the second switch position, corresponding to the second mode angle range R2; the first switch position is the switch position corresponding to when the cap of the capacitive stylus is rotated to the extreme position on the first side of the pen body, corresponding to the first mode angle range R1 of the capacitive stylus; the second switch position is the switch position corresponding to when the cap of the capacitive stylus is rotated to the extreme position on the second side of the pen body, corresponding to the third mode angle range R3 of the capacitive stylus.

[0057] Step S20, calculating a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position based on the first magnetic field strength and the second magnetic field strength, and calculating a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position based on the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is smaller than the second angle value;

[0058] It should be noted that the correspondence between magnetic field strength and angle in the first and second directions is used to obtain the first angle value of the 3D Hall switch in the first switch position and the second angle value in the second switch position. The first and second angle values ​​are angle values ​​calculated based on magnetic field strength, not the actual physical angle values ​​of the pen cap rotation. This correspondence can be obtained through trigonometric functions or calibration, and is not specifically limited in this embodiment.

[0059] Step S30, calculating the sum of the first angle value and the preset calibration value and saving it as the first threshold angle D1, calculating the difference between the second angle value and the preset calibration value and saving it as the second threshold angle D2, wherein the first threshold angle D1 is smaller than the second threshold angle D2;

[0060] It should be noted that the preset calibration value is an angle value greater than the pen cap rotation jump angle, and the first threshold angle D1 is the sum of the first angle value and the preset calibration value. The first threshold angle D1 must be greater than the angle when the pen cap is rotated to the first switch position, and there is space reserved for angle jump, so that when the pen cap is rotated to the first switch position, even if an angle jump occurs, the first angle value is always less than the first threshold angle D1; similarly, by subtracting the second angle value from the preset calibration value, the second threshold angle D2 is obtained, so that when the pen cap is rotated to the second switch position, its second angle value is always greater than the second threshold angle D2.

[0061] In addition, the preset calibration value should be set so that the first threshold angle D1 is smaller than the second threshold angle D2 to ensure that the first mode angle range R1 and the third mode angle range R3 do not overlap, and the second mode angle range R2 can be reserved.

[0062] Step S40: updating the first mode angle range R1 with a value less than or equal to the first threshold angle D1, updating the second mode angle range R2 with a value greater than the first threshold angle D1 and less than the second threshold angle D2, and updating the third mode angle range R3 with a value greater than or equal to the second threshold angle D2.

[0063] It should be noted that if Figure 6As shown, the first mode angle range R1, the second mode angle range R2 and the third mode angle range R3 are divided by the first threshold angle D1, the second threshold angle D2 and the initial angle O and the final angle E of the 3D Hall switch, wherein each angle range corresponds to a switch position of the capacitive stylus, so that when the capacitive stylus ...

[0064] In this embodiment, by obtaining the magnetic field strength of the 3D Hall switch in different directions when the pen cap is rotated to different switch positions, the corresponding angle values ​​are calculated, and the angle ranges of different modes are determined based on these angle values ​​and preset calibration values, thereby accurately calibrating the capacitive pen mode. This achieves the precise switching of multiple working modes of the capacitive pen while ensuring the rotating appearance of the capacitive pen.

[0065] Based on the first embodiment of the present invention, in the second embodiment of the present invention, the same or similar contents as those in the above-mentioned first embodiment can be referred to the above introduction and will not be described in detail later. Figure 2 In the second embodiment of the present invention, step S20 may include steps S21 to S22:

[0066] Step S21, calculating a first angle parameter based on the first magnetic field strength and the second magnetic field strength, and calculating a second angle parameter based on the third magnetic field strength and the fourth magnetic field strength;

[0067] In an embodiment of the present invention, the first angle parameter is a ratio of the first magnetic field strength to the second magnetic field strength, and the second angle parameter is a ratio of the third magnetic field strength to the fourth magnetic field strength.

[0068] Step S22: performing inverse trigonometric function calculation on the first angle parameter and the second angle parameter respectively to obtain the first angle value and the second angle value.

[0069] It should be noted that the controller of the capacitive stylus calculates the arctangent value of the first angle parameter to obtain the first angle value, and similarly, the arctangent value of the second angle parameter is calculated to obtain the second angle value. This allows the accurate calculation of the angle values ​​of the capacitive stylus's 3D Hall switch at different switch positions when the pen cap is rotated. The first and second angle parameters are both calculated based on the magnetic field strength in the mutually orthogonal first and second directions, expanding the detectable angle value to 360°.

[0070] This application uses 3D Hall effect switches and inverse trigonometric function calculation methods to accurately measure the angle values ​​of 3D Hall effect switches at different switch positions. This application can more accurately calculate the switch position angle value of a capacitive stylus, thereby improving the stability and accuracy of the capacitive stylus when switching between different operating modes, ensuring that the capacitive stylus accurately switches to the intended operating mode when operated by the user.

[0071] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments above can be referred to above and will not be described in detail later. Figure 3 In the third embodiment of the present invention, step S30 may include steps S31 to S33:

[0072] Step S31, obtaining a plurality of first angle values ​​and a plurality of second angle values ​​a preset number of times;

[0073] It should be noted that obtaining multiple first angle values ​​and multiple second angle values ​​at a preset number of times can reduce the error of a single measurement through multiple measurements, thereby improving data accuracy. In an embodiment of the present invention, the preset number of times can be set to 5. A greater number of preset times will increase the reliability of the obtained data results, but will also increase the time required for the calibration process. The setting of the preset number of times needs to be selected based on actual calibration requirements and is not specifically limited in this embodiment.

[0074] Step S32, comparing a plurality of the first angle values ​​to obtain a maximum first angle value, and comparing a plurality of the second angle values ​​to obtain a minimum second angle value;

[0075] Step S33, calculate the sum of the maximum first angle value and the preset calibration value, save it as the first threshold angle D1, calculate the difference between the minimum second angle value and the preset calibration value, save it as the second threshold angle D2, wherein the first threshold angle D1 is smaller than the second threshold angle D2.

[0076] It should be noted that, calculation with the maximum first angle value can make the final first threshold angle D1 the maximum value, so that the first threshold angle D1 is greater than all first angle values, so that when the pen cap is rotated to the first switch position, even if an angle jump occurs, the first angle value is always less than the first threshold angle D1. Similarly, calculation with the minimum first angle value can make the final second threshold angle D2 the minimum value, so that the second threshold angle D2 is less than all second angle values, so that when the pen cap is rotated to the second switch position, even if an angle jump occurs, the second angle value is always greater than the second threshold angle D2.

[0077] In the embodiments of the present application, by acquiring and comparing multiple first angle values ​​and multiple second angle values ​​a predetermined number of times, and selecting the maximum first angle value and the minimum second angle value to calculate the first threshold angle D1 and the second threshold angle D2, the accuracy and reliability of the data can be effectively improved. This ensures that the mode switching of the capacitive stylus is not affected by angle jumps during rotation, further ensuring that the capacitive stylus can accurately switch between different modes.

[0078] Based on the above embodiments of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to the above introduction and will not be described in detail later. Figure 4 In the fourth embodiment of the present invention, the preset calibration value includes a first calibration value and a second calibration value that increase in sequence. After step S31, steps A10 to A30 may be further included:

[0079] Step A10, comparing a plurality of first angle values ​​to obtain a maximum first angle value and a minimum first angle value, and comparing a plurality of second angle values ​​to obtain a maximum second angle value and a minimum second angle value;

[0080] Step A20, calculating the difference between the maximum first angle value and the minimum first angle value to obtain a first angle difference, and calculating the difference between the maximum second angle value and the minimum second angle value to obtain a second angle difference;

[0081] In step A30, the larger of the first angle difference and the second angle difference is used as the deviation value. If the deviation value is less than the preset deviation threshold, the first calibration value is updated to the preset calibration value. If the deviation value is greater than or equal to the preset deviation threshold, the second calibration value is updated to the preset calibration value.

[0082] It should be noted that by comparing multiple first angle values ​​with multiple second angle values ​​and calculating the range of the multiple first angle values ​​and the multiple second angle values, the larger of the two values ​​can be used as the deviation value to characterize the angle jump when the capacitive stylus switches the working mode. The preset standard value is determined according to the deviation value. When the deviation value is less than the preset deviation threshold, it means that the angle jump amplitude is small, and the calibration requirement can be met by using the first calibration value as the preset calibration value. When the deviation value is greater than the preset deviation threshold, it means that the angle jump amplitude is large, and the calibration requirement can be met by using a second calibration value greater than the first calibration value as the preset calibration value. In an embodiment of the present application, the first calibration value can be set to 15°, the second calibration value can be set to 20°, and the preset deviation threshold can be set to 6°. The settings of the first calibration value, the second calibration value, and the preset deviation threshold need to be matched and set according to the actual test situation to meet the calibration requirement. This embodiment does not specifically limit this.

[0083] The embodiments of the present invention obtain the maximum angle deviation value by acquiring multiple angle values ​​a preset number of times, and then determine the preset calibration value that best meets the standard between the first and second calibration values ​​for calibration. This effectively adjusts and optimizes the calibration accuracy of the capacitive stylus's mode switching, resolving the issue of the calibration level not matching the deviation level during calibration. This improves the stability and user experience of the capacitive stylus, making the switching of the capacitive stylus between various operating modes more accurate and reliable.

[0084] Based on the above embodiments of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the above embodiments can be referred to above and will not be described in detail. On this basis, in the fifth embodiment of the present invention, the operating modes of the capacitive stylus include air mouse mode, laser mode, and writing mode.

[0085] Specifically, the three working modes can be achieved by setting different circuit modules and sensors inside the capacitive pen. For example, in the air mouse mode, the movement of the pen can be detected by the built-in gyroscope and acceleration sensor, thereby realizing the movement of the mouse pointer. In the laser mode, the laser pointing function can be realized by integrating a laser emitter at the pen tip. In the writing mode, the contact between the pen tip and the screen can be detected by a capacitive sensor, thereby realizing the writing function. Furthermore, in an embodiment of the present invention, the pen cap is rotated to switch between different working modes, and each working mode corresponds to a different mode angle range, thereby realizing precise switching of modes.

[0086] This application improves the practicality and user experience of the capacitive pen by designing it to be able to switch between air mouse mode, laser mode and writing mode, and meets the diverse needs of users in different application scenarios.

[0087] See also Figure 5 In a feasible implementation manner, after step S40, step B10 may be included:

[0088] B10: Based on user settings, the first mode angle range R1, the second mode angle range R2, and the third mode angle range R3 correspond to one of the air mouse mode, the laser mode, and the writing mode, respectively.

[0089] Specifically, users can use the settings interface to define the operating modes corresponding to the first mode angle range R1, the second mode angle range R2, and the third mode angle range R3. For example, users can choose to set the range less than or equal to the first threshold angle D1 to air mouse mode, the range greater than the first threshold angle D1 and less than the second threshold angle D2 to laser mode, and the range greater than or equal to the second threshold angle D2 to writing mode. This setting method allows users to flexibly adjust the corresponding angle ranges of each mode according to their usage habits and needs.

[0090] By user-configuring the first mode angle range R1, the second mode angle range R2, and the third mode angle range R3 to correspond to one of the air mouse mode, laser mode, and writing mode, respectively, this solves the problem of capacitive stylus modes being limited to a single fixed angle range, preventing user-defined control. By mapping different angle ranges to different operating modes based on user-defined settings, the pen cap can be precisely switched to the desired mode when it is rotated, thereby enhancing the diversity of capacitive stylus usage and user experience.

[0091] Through user-defined settings, the capacitive stylus can precisely switch to the desired operating mode when the pen cap is rotated, avoiding issues such as malfunction or failure to trigger due to angle fluctuations. This not only improves the stability and accuracy of the capacitive stylus, but also enhances the user experience, allowing the capacitive stylus to perform optimally in different application scenarios.

[0092] In summary, this application proposes a mode calibration method for a capacitive stylus. This method obtains the magnetic field strength of the 3D Hall switch in the orthogonal direction when the pen cap is rotated to different switch positions, calculates the corresponding angle value, and adjusts it according to the preset calibration value to determine different threshold angles and different mode angle ranges, thereby achieving accurate switching between different modes of the capacitive stylus. This method can effectively solve the problem of malfunction or failure to switch normally due to rotation angle jumps, and ensure the stability and accuracy of the capacitive stylus when switching between different working modes.

[0093] See also Figure 7 The present invention further provides a mode calibration device for a capacitive stylus, the mode calibration device for a capacitive stylus comprising:

[0094] an acquisition module 10, configured to acquire a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and to acquire a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction;

[0095] a calculation module 20, configured to calculate a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position based on the first magnetic field strength and the second magnetic field strength, and calculate a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position based on the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is less than the second angle value; calculate the sum of the first angle value and a preset calibration value, and save it as a first threshold angle D1; calculate the difference between the second angle value and the preset calibration value, and save it as a second threshold angle D2, wherein the first threshold angle D1 is less than the second threshold angle D2;

[0096] The calibration module 30 is configured to update the first mode angle range R1 when the angle is less than or equal to the first threshold angle D1, update the second mode angle range R2 when the angle is greater than the first threshold angle D1 and less than the second threshold angle D2, and update the third mode angle range R3 when the angle is greater than or equal to the second threshold angle D2.

[0097] The capacitive stylus mode calibration device provided in an embodiment of the present invention utilizes the capacitive stylus mode calibration method described in the aforementioned embodiment to address the technical problem of accurately switching between multiple operating modes of a capacitive stylus while maintaining its rotatable appearance. Compared to the prior art, the capacitive stylus mode calibration device provided in an embodiment of the present application has the same beneficial effects as the capacitive stylus mode calibration method described in the aforementioned embodiment. Other technical features of the capacitive stylus mode calibration device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0098] The present invention further provides a capacitive stylus, comprising:

[0099] pen cap and pen body;

[0100] A 3D Hall switch, comprising a permanent magnet and a sensing portion. The permanent magnet is mounted on the pen cap, while the sensing portion is mounted on the pen body. The switch senses the magnetic field changes generated by rotating the pen cap and outputs a magnetic field detection signal.

[0101] A controller is used to execute the steps of the capacitive stylus mode calibration method as described in any one of the above.

[0102] The capacitive stylus provided in the embodiments of the present invention solves the technical problem of accurately switching between multiple operating modes while maintaining a rotatable stylus design. Compared to the prior art, the capacitive stylus provided in the embodiments of this application has the same beneficial effects as the capacitive stylus mode calibration method provided in the aforementioned embodiments, and will not be further elaborated here.

[0103] The present invention further provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the capacitive stylus mode calibration method in the above embodiment.

[0104] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0105] The computer-readable storage medium may be included in the capacitive stylus, or may exist independently without being assembled into the capacitive stylus.

[0106] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the capacitive stylus, the capacitive stylus: obtains the first magnetic field strength of the 3D Hall switch in the first direction and the second magnetic field strength in the second direction when the pen cap is rotated to the first switch position, and obtains the third magnetic field strength of the 3D Hall switch in the first direction and the fourth magnetic field strength in the second direction when the pen cap is rotated to the second switch position, wherein the first direction is orthogonal to the second direction; calculates the first angle of the 3D Hall switch when the pen cap is rotated to the first switch position based on the first magnetic field strength and the second magnetic field strength. value, calculate the second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position according to the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is less than the second angle value; calculate the sum of the first angle value and the preset calibration value, save it as the first threshold angle, calculate the difference between the second angle value and the preset calibration value, save it as the second threshold angle, wherein the first threshold angle is less than the second threshold angle; update to the first mode angle range with less than or equal to the first threshold angle, update to the second mode angle range with greater than the first threshold angle and less than the second threshold angle, and update to the third mode angle range with greater than or equal to the second threshold angle.

[0107] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0108] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0109] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of the module does not, in some cases, constitute a limitation on the unit itself.

[0110] The computer-readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned capacitive stylus mode calibration method. This computer-readable storage medium solves the technical problem of accurately switching between multiple operating modes of a capacitive stylus while maintaining its rotatable appearance. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the capacitive stylus mode calibration method provided in the aforementioned embodiment, and are not further elaborated here.

[0111] The above description is merely an exemplary embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformation made by utilizing the contents of the present invention's description and drawings under the technical concept of the present invention, or directly / indirectly applied in other related technical fields, is included in the patent protection scope of the present invention.

Claims

1. A method for calibrating a capacitive stylus pen mode, characterized in that: The method comprises: Acquire a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and acquire a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction; Calculating a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position according to the first magnetic field strength and the second magnetic field strength, and calculating a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position according to the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is smaller than the second angle value; Calculate the sum of the first angle value and the preset calibration value, save it as the first threshold angle, calculate the difference between the second angle value and the preset calibration value, save it as the second threshold angle, wherein the first threshold angle is smaller than the second threshold angle; An angle less than or equal to the first threshold angle is updated to the first mode angle range, an angle greater than the first threshold angle and less than the second threshold angle is updated to the second mode angle range, and an angle greater than or equal to the second threshold angle is updated to the third mode angle range.

2. The capacitive stylus pen mode calibration method according to claim 1, characterized in that: The step of calculating the first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position according to the first magnetic field strength and the second magnetic field strength, and calculating the second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position according to the third magnetic field strength and the fourth magnetic field strength, comprises: Calculate a first angle parameter according to the first magnetic field strength and the second magnetic field strength, and calculate a second angle parameter according to the third magnetic field strength and the fourth magnetic field strength; Perform inverse trigonometric function calculation on the first angle parameter and the second angle parameter respectively to obtain the first angle value and the second angle value.

3. The capacitive stylus pen mode calibration method according to claim 1, characterized in that: The steps of calculating the sum of the first angle value and the preset calibration value and saving it as the first threshold angle, and calculating the difference between the second angle value and the preset calibration value and saving it as the second threshold angle include: Acquire a plurality of first angle values ​​and a plurality of second angle values ​​a preset number of times; Compare a plurality of the first angle values ​​to obtain a maximum first angle value, and compare a plurality of the second angle values ​​to obtain a minimum second angle value; The sum of the maximum first angle value and the preset calibration value is calculated and saved as the first threshold angle, and the difference between the minimum second angle value and the preset calibration value is calculated and saved as the second threshold angle, wherein the first threshold angle is smaller than the second threshold angle.

4. The capacitive stylus pen mode calibration method according to claim 3, characterized in that: The preset calibration value includes a first calibration value and a second calibration value that increase in sequence, and after the step of obtaining a plurality of the first angle values ​​and a plurality of the second angle values ​​for a preset number of times, the step includes: Compare a plurality of the first angle values ​​to obtain the maximum first angle value and the minimum first angle value, and compare a plurality of the second angle values ​​to obtain the maximum second angle value and the minimum second angle value; Calculate the difference between the maximum first angle value and the minimum first angle value to obtain a first angle difference, and calculate the difference between the maximum second angle value and the minimum second angle value to obtain a second angle difference; The larger of the first angle difference and the second angle difference is taken as the deviation value. If the deviation value is less than a preset deviation threshold, the first calibration value is updated to the preset calibration value. If the deviation value is greater than or equal to the preset deviation threshold, the second calibration value is updated to the preset calibration value.

5. The capacitive stylus pen mode calibration method according to any one of claims 1 to 4, characterized in that: The working modes of the capacitive stylus pen include air mouse mode, laser mode and writing mode.

6. The capacitive stylus pen mode calibration method according to claim 5, characterized in that: After the steps of updating the first mode angle range with an angle less than or equal to the first threshold angle, updating the second mode angle range with an angle greater than the first threshold angle and less than the second threshold angle, and updating the third mode angle range with an angle greater than or equal to the second threshold angle, the method further comprises: Based on user settings, the first mode angle range, the second mode angle range, and the third mode angle range correspond to one of the air mouse mode, the laser mode, and the writing mode, respectively.

7. A mode calibration device for a capacitive stylus, characterized in that: The mode calibration device of the capacitive stylus pen comprises: an acquisition module, used for acquiring a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of the 3D Hall switch when the pen cap is rotated to a first switch position, and acquiring a third magnetic field strength in the first direction and a fourth magnetic field strength in the second direction of the 3D Hall switch when the pen cap is rotated to a second switch position, wherein the first direction is orthogonal to the second direction; a calculation module, configured to calculate a first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position according to the first magnetic field strength and the second magnetic field strength, and calculate a second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position according to the third magnetic field strength and the fourth magnetic field strength, wherein the first angle value is less than the second angle value; calculate the sum of the first angle value and a preset calibration value, and save it as a first threshold angle, calculate the difference between the second angle value and the preset calibration value, and save it as a second threshold angle, wherein the first threshold angle is less than the second threshold angle; The calibration module is used to update the first mode angle range when the angle is less than or equal to the first threshold angle, update the second mode angle range when the angle is greater than the first threshold angle and less than the second threshold angle, and update the third mode angle range when the angle is greater than or equal to the second threshold angle.

8. A capacitive stylus pen, characterized in that: include: The cap and pen body; The 3D Hall switch includes a permanent magnet part and a sensing part, wherein the permanent magnet part is arranged on the pen cap, and the sensing part is arranged on the pen body, and is used to sense the magnetic field change generated when the pen cap is rotated and output a magnetic field detection signal; A controller, wherein the controller is used to execute the steps of the mode calibration method of the capacitive stylus according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the mode calibration method of the capacitive stylus pen according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Active touch pen and operation method thereof

    CN105573529A

  • Electro-permanent magnet-based force distribution of input element on input device

    CN116414227A

  • Touch pen

    CN118655992A

  • Electronic pen detection method, electronic device and computer program product

    CN118964108A