Capacitive pen mode calibration method, device, capacitive pen and storage medium

By acquiring the magnetic field strength and angle value of the 3D Hall switch when the cap of the capacitive pen rotates, the mode switching range of the capacitive pen is calculated and calibrated, solving the uncertainty problem of multiple mode switching of the capacitive pen under the rotating appearance, and realizing accurate switching and improved stability.

CN119668435BActive Publication Date: 2025-10-28MAXEYE SMART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In capacitive pen design, how can we achieve precise switching between multiple working modes within limited PCB space and a rotating appearance, avoiding problems such as malfunctions or failure to trigger due to uncertain rotation angles?

Method used

By acquiring the magnetic field strength of the 3D Hall switch in the orthogonal direction when the pen cap is rotated to different switch positions, calculating the angle value, and determining the angle range of different modes according to the preset calibration value, the capacitive pen mode switching is accurately calibrated by using the 3D Hall switch and inverse trigonometric function calculation method.

Benefits of technology

It enables precise switching between multiple working modes of the capacitive stylus under a rotating design, improving stability and user experience, avoiding malfunctions caused by sudden changes in angle, and ensuring accurate mode switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668435B_ABST
    Figure CN119668435B_ABST
Patent Text Reader

Abstract

This invention discloses a mode calibration method, device, pen, and storage medium for a capacitive pen, relating to the field of capacitive pen technology. The mode calibration method includes: acquiring the magnetic field strength of a 3D Hall switch in a first direction and a second direction when the pen cap is rotated 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 is rotated to the first switch position and the second switch position, respectively, based on the magnetic field strength; saving the sum of the first angle value and a preset calibration value as a first threshold angle, and saving the difference between the second angle value and the preset calibration value as a second threshold angle; updating angles less than or equal to the first threshold angle as a first mode angle range, updating angles greater than the first threshold angle and less than the second threshold angle as a second mode angle range, and updating angles greater than or equal to the second threshold angle as a third mode angle range. The technical solution provided by this invention enables precise switching between multiple modes of the capacitive pen.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of capacitive pen technology, and in particular to a capacitive pen mode calibration method, apparatus, capacitive pen, and storage medium. Background Technology

[0002] With the continuous advancement of electronic technology and the widespread adoption of smart devices, capacitive pens, as an important input tool, have been widely used in various fields such as drawing, handwriting recording, and gaming. To meet diverse user needs, capacitive pen designs are increasingly trending towards multi-functionality, with the ability to switch between three or more working modes becoming a key design direction. However, designers face numerous challenges in the field of capacitive pen design, particularly in achieving mode switching within limited PCB (printed circuit board) space and while maintaining a rotating appearance, while simultaneously meeting users' requirements for switching between three different working modes. This demands not only advanced circuit design skills but also ingenious structural design concepts.

[0003] A crucial step in switching modes on a capacitive stylus involves rotating the cap to change the state of an internal switch, thus enabling the transition between different operating modes. However, the varying rotation angles, including abrupt changes, pose significant challenges to precise hardware control. This angular uncertainty can cause the switch to trigger unexpectedly when it shouldn't, or malfunction when it should, severely impacting the stylus's stability and user experience. Specifically, if the angle change exceeds the design range when rotating the cap for mode switching, it may cause the internal switch to misoperate, resulting in the stylus switching to the wrong mode. Conversely, insufficient angle change may prevent the switch from triggering, preventing the stylus from switching to the user's desired mode. Both scenarios cause unnecessary user frustration and reduce the stylus's usability.

[0004] Therefore, how to enable precise switching between multiple working modes of a capacitive pen while maintaining its rotating appearance has become a pressing technical challenge in the current capacitive pen industry. Summary of the Invention

[0005] The main objective of this invention is to provide a mode calibration method, device, pen, and storage medium for a capacitive pen, aiming to achieve precise switching between multiple working modes of the capacitive pen.

[0006] To achieve the above objectives, the present invention proposes a capacitive pen mode calibration method, comprising:

[0007] The system acquires 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 acquires 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;

[0008] The first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position is calculated based on the first magnetic field strength and the second magnetic field strength, and the second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position is calculated 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;

[0009] Calculate the sum of the first angle value and the preset calibration value, and save it as the first threshold angle. Calculate the difference between the second angle value and the preset calibration value, and save it as the second threshold angle. The first threshold angle is less than the second threshold angle.

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

[0011] In one embodiment, the steps of calculating the 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 the 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, include:

[0012] The first angle parameter is calculated based on the first magnetic field strength and the second magnetic field strength, and the second angle parameter is calculated based on the third magnetic field strength and the fourth magnetic field strength.

[0013] The first angle parameter and the second angle parameter are calculated by performing inverse trigonometric functions respectively to obtain the first angle value and the second angle value.

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

[0015] Multiple first angle values ​​and multiple second angle values ​​are obtained a preset number of times;

[0016] The maximum first angle value is obtained by comparing multiple first angle values, and the minimum second angle value is obtained by comparing multiple second angle values;

[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 less 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 sequentially. After the step of obtaining a plurality of first angle values ​​and a plurality of second angle values ​​a preset number of times, the method includes:

[0019] The maximum first angle value and the minimum first angle value are obtained by comparing multiple first angle values, and the maximum second angle value and the minimum second angle value are obtained by comparing multiple second angle values.

[0020] Calculate the difference between the maximum first angle value and the minimum first angle value to obtain the first angle difference; calculate the difference between the maximum second angle value and the minimum second angle value to obtain the second angle difference.

[0021] 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.

[0022] In one embodiment, the capacitive pen's operating modes include air mouse mode, laser mode, and writing mode.

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

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

[0025] The present invention also proposes a mode calibration device for a capacitive pen, the mode calibration device comprising:

[0026] The acquisition module is used to acquire 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 to acquire 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;

[0027] The calculation module is used 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 to 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 angle range to a first mode with an angle less than or equal to a first threshold angle, to a second mode angle range with an angle greater than the first threshold angle and less than a second threshold angle, and to a third mode angle range with an angle greater than or equal to the second threshold angle.

[0029] The present invention also proposes a capacitive pen, comprising:

[0030] Pen cap and pen body;

[0031] A 3D Hall switch includes a permanent magnet part and a sensing part. The permanent magnet part is disposed on the pen cap, and the sensing part is disposed on the pen body. It is used to sense the change in magnetic field generated when the pen cap is rotated and output a magnetic field detection signal.

[0032] A controller for performing the steps of the capacitive pen mode calibration method as described in any of the preceding claims.

[0033] The present invention also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the capacitive pen mode calibration method as described in any of the preceding claims.

[0034] The technical solution of this invention uses the magnetic field strength of the 3D Hall switch in different directions when the pen cap is rotated to different switch positions to calculate the corresponding angle value, and determines the angle range of different modes based on these angle values ​​and preset calibration values, thereby accurately calibrating the capacitive pen mode and enabling precise switching of multiple working modes of the capacitive pen while maintaining the rotating appearance of the capacitive pen. Attached Figure Description

[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 flowchart illustrating an embodiment of the capacitive pen mode calibration method of the present invention;

[0037] Figure 2 A flowchart illustrating a second embodiment of the capacitive pen mode calibration method of the present invention;

[0038] Figure 3 A flowchart illustrating a third embodiment of the capacitive pen mode calibration method of the present invention;

[0039] Figure 4 A flowchart illustrating the fourth embodiment of the capacitive pen mode calibration method of the present invention;

[0040] Figure 5 This is a flowchart illustrating one embodiment of the capacitive pen mode calibration method of the present invention.

[0041] Figure 6 This is a schematic diagram illustrating the mode angle range of the mode calibration method for the capacitive pen of the present invention.

[0042] Figure 7 This is a schematic diagram of the module structure of the mode calibration device for the capacitive pen according to an embodiment of the present invention.

[0043] Explanation of icon 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 realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[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 widespread adoption of smart devices, capacitive pens, as an important input tool, have been widely used in various fields such as drawing, handwriting recording, and gaming. To meet diverse user needs, capacitive pen designs are increasingly trending towards multi-functionality, with the ability to switch between three or more working modes becoming a key design direction. However, designers face numerous challenges in the field of capacitive pen design, particularly in achieving mode switching within limited PCB (printed circuit board) space and while maintaining a rotating appearance, while simultaneously meeting users' requirements for switching between three different working modes. This demands not only advanced circuit design skills but also ingenious structural design concepts.

[0051] A crucial step in switching modes on a capacitive stylus involves rotating the cap to change the state of an internal switch, thus enabling the transition between different operating modes. However, the varying rotation angles, including abrupt changes, pose significant challenges to precise hardware control. This angular uncertainty can cause the switch to trigger unexpectedly when it shouldn't, or malfunction when it should, severely impacting the stylus's stability and user experience. Specifically, if the angle change during mode switching exceeds the design range, it may cause malfunctions in the internal switch, preventing the stylus from switching to the desired mode. This leads to unnecessary user frustration and diminishes the overall user experience.

[0052] To overcome the above problems, this invention proposes a mode calibration method for a capacitive pen.

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

[0054] Step S10: Obtain 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 obtain 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.

[0055] It should be noted that the capacitive pen includes a cap, a body, a controller, and a 3D Hall switch. The detection of the magnetic field strength of the 3D Hall switch is crucial to the calibration process. Specifically, the 3D Hall switch includes a permanent magnet and a sensing element. The permanent magnet is located in the cap, and the sensing element is located in the body. It senses the change in the magnetic field 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, accurate positioning of the cap at different rotation angles can be ensured.

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

[0057] Step S20: Calculate the 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; calculate the 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.

[0058] It should be noted that the first angle value of the 3D Hall switch in the first switching position and the second angle value in the second switching position are obtained by utilizing the correspondence between the magnetic field strength and angle in the first and second directions. These first and second angle values ​​are angle values ​​calculated from the magnetic field strength, not the actual physical angle values ​​of the pen cap's rotation. The correspondence can be obtained through trigonometric functions or calibration; this embodiment does not specifically limit this.

[0059] Step S30: Calculate the sum of the first angle value and the preset calibration value, and save it as the first threshold angle D1; calculate the difference between the second angle value and the preset calibration value, and save it as the second threshold angle D2; wherein the first threshold angle D1 is less 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. The first threshold angle D1 is the sum of the first angle value and the preset calibration value. Therefore, the first threshold angle D1 must be greater than the angle when the pen cap rotates to the first switch position, and a space for angle jump is reserved so that when the pen cap rotates 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 rotates 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 less than the second threshold angle D2, so as 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: Update the first mode angle range R1 to be less than or equal to the first threshold angle D1, update the second mode angle range R2 to be greater than the first threshold angle D1 and less than the second threshold angle D2, and update the third mode angle range R3 to be greater than or equal to the second threshold angle D2.

[0063] It should be noted that, as 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. Each angle range corresponds to a switch position of the capacitive pen, so that when the capacitive pen cap is rotated to different switch positions, even if the angle jump occurs, it can still be in the corresponding mode angle range and accurately switch to the corresponding working mode.

[0064] In this embodiment, by acquiring 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 range of different modes is determined based on these angle values ​​and preset calibration values, thereby accurately calibrating the capacitive pen mode. This achieves precise switching between multiple working modes of the capacitive pen while maintaining its rotating appearance.

[0065] Based on the first embodiment of the present invention, in the second embodiment of the present invention, the contents that are the same as or similar to those in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 In the second embodiment of the present invention, step S20 may include steps S21 to S22:

[0066] Step S21: Calculate the first angle parameter based on the first magnetic field strength and the second magnetic field strength, and calculate the 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 the ratio of the first magnetic field strength to the second magnetic field strength, and the second angle parameter is the ratio of the third magnetic field strength to the fourth magnetic field strength.

[0068] Step S22: 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.

[0069] It should be noted that the first angle value is obtained by calculating the arctangent of the first angle parameter through the controller of the capacitive pen, and similarly, the second angle value is obtained by calculating the arctangent of the second angle parameter. This allows for the precise calculation of the angle values ​​of the 3D Hall switch at different switching positions of the capacitive pen when the pen cap is rotated. Both the first and second angle parameters are calculated using the magnetic field strengths in mutually orthogonal first and second directions, extending the detectable angle range to 360°.

[0070] This application achieves precise measurement of the angle values ​​of a 3D Hall switch at different switch positions by using a 3D Hall switch and an inverse trigonometric function calculation method. This application can more accurately calculate the switch position angle value of the capacitive pen, thereby improving the stability and accuracy of the capacitive pen when switching between different working modes, ensuring that the capacitive pen can accurately switch to the expected working mode during user operation.

[0071] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 In the third embodiment of the present invention, step S30 may include steps S31 to S33:

[0072] Step S31: Obtain multiple first angle values ​​and multiple second angle values ​​a preset number of times;

[0073] It should be noted that obtaining multiple first angle values ​​and multiple second angle values ​​through a preset number of measurements can reduce the error of a single measurement and improve the accuracy of the data. In the embodiments of the present invention, the preset number of measurements can be set to 5. The more preset number of measurements, the more reliable the data results will be, but the calibration process will take longer. The setting of the preset number of measurements needs to be selected according to the actual calibration requirements, and this embodiment does not impose a specific limitation on it.

[0074] Step S32: Compare multiple first angle values ​​to obtain the maximum first angle value, and compare multiple second angle values ​​to obtain the minimum second angle value;

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

[0076] It should be noted that calculating with the maximum first angle value will result in the final first threshold angle D1 being the maximum value, thus making the first threshold angle D1 greater than all first angle values. This ensures that when the pen cap is rotated to the first switch position, even if an angle jump occurs, the first angle value will always be less than the first threshold angle D1. Similarly, calculating with the minimum first angle value will result in the final second threshold angle D2 being the minimum value, thus making the second threshold angle D2 less than all second angle values. This ensures that when the pen cap is rotated to the second switch position, even if an angle jump occurs, the second angle value will always be greater than the second threshold angle D2.

[0077] In the embodiments of this application, by acquiring multiple first angle values ​​and multiple second angle values ​​a preset number of times and comparing them, the maximum first angle value and the minimum second angle value are selected to calculate the first threshold angle D1 and the second threshold angle D2, which can effectively improve the accuracy and reliability of the data. This ensures that the mode switching of the capacitive pen is not affected by the angle jump during rotation, further guaranteeing the accurate switching of the capacitive pen between different modes.

[0078] Based on the above embodiments of this application, in the fourth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... 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 sequentially. After step S31, steps A10 to A30 may also be included:

[0079] Step A10: Compare multiple first angle values ​​to obtain the maximum first angle value and the minimum first angle value; compare multiple second angle values ​​to obtain the maximum second angle value and the minimum second angle value.

[0080] Step A20: Calculate the difference between the maximum first angle value and the minimum first angle value to obtain the first angle difference; calculate the difference between the maximum second angle value and the minimum second angle value to obtain the second angle difference.

[0081] Step A30: Take the larger of the first angle difference and the second angle difference as the deviation value. If the deviation value is less than a preset deviation threshold, update the first calibration value to the preset calibration value. If the deviation value is greater than or equal to the preset deviation threshold, update the second calibration value 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 between the multiple first angle values ​​and multiple second angle values, the larger of these ranges can be used as the deviation value to characterize the angle jump when the capacitive pen switches working modes. A preset standard value is determined based on the deviation value. When the deviation value is less than a preset deviation threshold, it indicates a small angle jump, and the first calibration value can be used as the preset calibration value to meet the calibration requirements. When the deviation value is greater than the preset deviation threshold, it indicates a large angle jump, and a second calibration value greater than the first calibration value is required to meet the calibration requirements. In the embodiments of this application, the first calibration value can be set to 15°, the second calibration value to 20°, and the preset deviation threshold 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 conditions to meet the calibration requirements; this embodiment does not specifically limit this.

[0083] The embodiments of the present invention obtain the maximum deviation value of the angle value by acquiring multiple angle values ​​a preset number of times. Based on this, a preset calibration value that is more in line with the standard is determined between a first calibration value and a second calibration value for calibration. This effectively adjusts and optimizes the calibration accuracy of the capacitive pen's mode switching, solving the problem that the calibration degree cannot match the deviation degree during calibration. Therefore, the stability of the capacitive pen and the user experience are improved, making the switching of the capacitive pen in multiple working modes more accurate and reliable.

[0084] Based on the above embodiments of this application, in the fifth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Furthermore, in the fifth embodiment of this invention, the working modes of the capacitive pen include air mouse mode, laser mode, and writing mode.

[0085] Specifically, the three working modes can be implemented by incorporating different circuit modules and sensors within the capacitive pen. For example, in air mouse mode, the movement of the pen can be detected by a built-in gyroscope and accelerometer, thereby enabling mouse pointer movement. In laser mode, a laser emitter can be integrated at the pen tip to achieve laser pointing functionality. In writing mode, a capacitive sensor can detect the contact between the pen tip and the screen, thereby enabling writing functionality. Furthermore, in embodiments of the invention, rotating the pen cap switches between different working modes, each corresponding to a different mode angle range, thus achieving precise mode switching.

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

[0087] Please see Figure 5 In one possible implementation, step B10 may be included after step S40:

[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 define the working modes corresponding to the first mode angle range R1, the second mode angle range R2, and the third mode angle range R3 through the settings interface. For example, users can choose to set the range less than or equal to the first threshold angle D1 as air mouse mode, the range greater than the first threshold angle D1 and less than the second threshold angle D2 as laser mode, and the range greater than or equal to the second threshold angle D2 as writing mode. This setting method allows users to flexibly adjust the corresponding angle range of each mode according to their own usage habits and needs.

[0090] By assigning the first mode angle range R1, the second mode angle range R2, and the third mode angle range R3 to one of the air mouse mode, laser mode, and writing mode, respectively, based on user settings, the problem of capacitive pens only being able to correspond to a fixed angle range for multiple modes, thus preventing personalized user adjustments, is solved. By mapping different angle ranges to different working modes according to user-defined settings, it ensures precise switching to the desired working mode when rotating the pen cap, thereby enhancing the versatility of capacitive pen usage and the user experience.

[0091] Therefore, through personalized settings, the capacitive stylus can precisely switch to the desired working mode when the cap is rotated, avoiding issues such as erroneous switching or failure to trigger due to sudden changes in angle. This not only improves the stability and accuracy of the capacitive stylus but also enhances the user experience, allowing it to perform optimally in various application scenarios.

[0092] In summary, this application proposes a mode calibration method for a capacitive pen. 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 values, and adjusts them according to preset calibration values ​​to determine different threshold angles and different mode angle ranges, thereby achieving precise switching between different modes of the capacitive pen. This method effectively solves the problem of malfunctions or inability to switch properly due to abrupt changes in rotation angle, ensuring the stability and accuracy of the capacitive pen when switching between different working modes.

[0093] Please see Figure 7 The present invention also proposes a mode calibration device for a capacitive pen, the mode calibration device comprising:

[0094] The acquisition module 10 is used to acquire 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 to acquire 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;

[0095] The calculation module 20 is used 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 to 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 used to update the first mode angle range R1 with an angle less than or equal to a first threshold angle D1, update the second mode angle range R2 with an angle greater than the first threshold angle D1 and less than a second threshold angle D2, and update the third mode angle range R3 with an angle greater than or equal to the second threshold angle D2.

[0097] The capacitive pen mode calibration device provided in this invention, employing the capacitive pen mode calibration method described in the above embodiments, solves the technical problem of accurately switching between multiple working modes of a capacitive pen while maintaining its rotary appearance. Compared with the prior art, the beneficial effects of the capacitive pen mode calibration device provided in this application are the same as those of the capacitive pen mode calibration method provided in the above embodiments, and other technical features in the capacitive pen mode calibration device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0098] The present invention also proposes a capacitive pen, comprising:

[0099] Pen cap and pen body;

[0100] A 3D Hall switch includes a permanent magnet part and a sensing part. The permanent magnet part is disposed on the pen cap, and the sensing part is disposed on the pen body. It is used to sense the change in magnetic field generated when the pen cap is rotated and output a magnetic field detection signal.

[0101] A controller for performing the steps of the capacitive pen mode calibration method as described in any of the preceding claims.

[0102] The capacitive pen provided in this invention solves the technical problem of accurately switching between multiple working modes of a capacitive pen while maintaining its rotating appearance. Compared with the prior art, the beneficial effects of the capacitive pen provided in this application are the same as those of the mode calibration method for the capacitive pen provided in the above embodiments, and will not be repeated here.

[0103] The present invention also proposes a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the capacitive pen mode calibration method in the above embodiments.

[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, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing 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 suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0105] The aforementioned computer-readable storage medium may be included in the capacitive pen; or it may exist independently and not assembled into the capacitive pen.

[0106] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a capacitive pen, cause the capacitive pen to: acquire a first magnetic field strength in a first direction and a second magnetic field strength in a second direction of a 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; and calculate a 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. The system calculates the 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; it calculates the sum of the first angle value and the preset calibration value and saves it as the first threshold angle; it calculates the difference between the second angle value and the preset calibration value and saves it as the second threshold angle, wherein the first threshold angle is less than the second threshold angle; it updates the first mode angle range with an angle less than or equal to the first threshold angle, updates the second mode angle range with an angle greater than the first threshold angle and less than the second threshold angle, and updates the third mode angle range with an angle greater than or equal to the second threshold angle.

[0107] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via 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 this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0110] The 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 above-described capacitive pen mode calibration method. This solves the technical problem of how to achieve precise switching between multiple working modes of a capacitive pen while maintaining its rotating appearance. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the capacitive pen mode calibration method provided in the above embodiments, and will not be repeated 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 the mode of a capacitive pen, characterized in that, The method includes: The system acquires 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 acquires 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; The first angle value of the 3D Hall switch when the pen cap is rotated to the first switch position is calculated based on the first magnetic field strength and the second magnetic field strength, and the second angle value of the 3D Hall switch when the pen cap is rotated to the second switch position is calculated 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 the preset calibration value, and save it as the first threshold angle. Calculate the difference between the second angle value and the preset calibration value, and save it as the second threshold angle. The first threshold angle is less than the second threshold angle. The angle range is updated to the first mode angle range when it is less than or equal to the first threshold angle, to the second mode angle range when it is greater than the first threshold angle and less than the second threshold angle, and to the third mode angle range when it is greater than or equal to the second threshold angle.

2. The mode calibration method for a capacitive pen as described in claim 1, characterized in that, The steps of calculating the 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 the 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, include: The first angle parameter is calculated based on the first magnetic field strength and the second magnetic field strength, and the second angle parameter is calculated based on the third magnetic field strength and the fourth magnetic field strength. The first angle parameter and the second angle parameter are calculated by performing inverse trigonometric functions respectively to obtain the first angle value and the second angle value.

3. The mode calibration method for a capacitive pen as described in 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: Multiple first angle values ​​and multiple second angle values ​​are obtained a preset number of times; The maximum first angle value is obtained by comparing multiple first angle values, and the minimum second angle value is obtained by comparing multiple second angle values; 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 less than the second threshold angle.

4. The mode calibration method for a capacitive pen as described in claim 3, characterized in that, The preset calibration values ​​include a first calibration value and a second calibration value that increase sequentially. After the step of obtaining multiple first angle values ​​and multiple second angle values ​​a preset number of times, the following steps are included: The maximum first angle value and the minimum first angle value are obtained by comparing multiple first angle values, and the maximum second angle value and the minimum second angle value are obtained by comparing multiple second angle values. Calculate the difference between the maximum first angle value and the minimum first angle value to obtain the first angle difference; calculate the difference between the maximum second angle value and the minimum second angle value to obtain the 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 mode calibration method for a capacitive pen as described in any one of claims 1 to 4, characterized in that, The capacitive pen has three working modes: air mouse mode, laser mode, and writing mode.

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

7. A mode calibration device for a capacitive pen, characterized in that, The mode calibration device for the capacitive pen includes: The acquisition module is used to acquire 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 to acquire 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; The calculation module is used 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 to 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; The calibration module is used to update the angle range to a first mode with an angle less than or equal to a first threshold angle, to a second mode angle range with an angle greater than the first threshold angle and less than a second threshold angle, and to a third mode angle range with an angle greater than or equal to the second threshold angle.

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

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the mode calibration method for the capacitive pen as described in any one of claims 1 to 6.

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