CN117129763A - Handwriting pen offset detection method and electronic equipment - Google Patents

Handwriting pen offset detection method and electronic equipment Download PDF

Info

Publication number
CN117129763A
CN117129763A CN202310471931.9A CN202310471931A CN117129763A CN 117129763 A CN117129763 A CN 117129763A CN 202310471931 A CN202310471931 A CN 202310471931A CN 117129763 A CN117129763 A CN 117129763A
Authority
CN
China
Prior art keywords
transmitting coil
quality factor
processor
stylus
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310471931.9A
Other languages
Chinese (zh)
Inventor
武渊
王朝
马雷
王勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310471931.9A priority Critical patent/CN117129763A/en
Publication of CN117129763A publication Critical patent/CN117129763A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J50/00Circuit arrangements or systems for wireless supply or distribution of electric power
    • H02J50/90Circuit arrangements or systems for wireless supply or distribution of electric power involving detection or optimisation of position, e.g. alignment
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R27/00Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
    • G01R27/02Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
    • G01R27/26Measuring inductance or capacitance; Measuring quality factor, e.g. by using the resonance method; Measuring loss factor; Measuring dielectric constants ; Measuring impedance or related variables
    • G01R27/2688Measuring quality factor or dielectric loss, e.g. loss angle, or power factor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0441Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means using active external devices, e.g. active pens, for receiving changes in electrical potential transmitted by the digitiser, e.g. tablet driving signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0442Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means using active external devices, e.g. active pens, for transmitting changes in electrical potential to be received by the digitiser
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J50/00Circuit arrangements or systems for wireless supply or distribution of electric power
    • H02J50/10Circuit arrangements or systems for wireless supply or distribution of electric power using inductive coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Position Input By Displaying (AREA)

Abstract

The application discloses a handwriting pen offset detection method and electronic equipment, and relates to the technical field of electronics. The handwriting pen offset detection method comprises the following steps: and detecting the quality factor of a transmitting coil in the electronic equipment, and determining whether the handwriting pen deviation condition occurs according to the quality factor of the transmitting coil. The stylus offset condition refers to that an adsorption position of a stylus adsorbed on the electronic device is offset relative to a preset adsorption position. Thus, whether the adsorption position of the handwriting pen on the electronic equipment is deviated or not can be detected.

Description

Handwriting pen offset detection method and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a handwriting pen offset detection method and an electronic device.
Background
An electronic device such as a tablet computer capable of inputting information by a touch manner may be configured with a stylus. A user can input information such as characters and graphics on an electronic device using a stylus. In the related art, a stylus pen may be attached to an electronic device through a magnet. After the handwriting pen is adsorbed at the correct position on the electronic equipment, electric energy transmission can be carried out between a transmitting coil in the electronic equipment and a receiving coil in the handwriting pen, so that the electronic equipment charges the handwriting pen. However, since the specific positions of the transmitting coil and the receiving coil cannot be known by the user, when the user adsorbs the stylus pen to the electronic device, the adsorption position of the stylus pen on the electronic device may be shifted, which may affect the charging of the stylus pen by the electronic device. Based on this, there is an urgent need for a stylus misalignment detection method to detect whether a stylus is misaligned in an adsorption position on an electronic device.
Disclosure of Invention
The application provides a handwriting pen offset detection method and electronic equipment, which can detect whether the adsorption position of a handwriting pen on the electronic equipment is offset or not. The technical scheme is as follows:
in a first aspect, a stylus deflection detection method is provided. The handwriting pen offset detection method is applied to the electronic equipment. The electronic device includes a processor and a transmit coil, the processor being coupled to the transmit coil such that the processor can output an electrical signal to the transmit coil. The handwriting pen offset detection method comprises the following steps: a processor detects a quality factor of a transmitting coil in the electronic device, and the processor determines whether a stylus deflection condition occurs according to the quality factor of the transmitting coil. The stylus offset condition refers to that an adsorption position of a stylus adsorbed on the electronic equipment is offset relative to a preset adsorption position.
In the present application, the processor may detect the quality factor of the transmit coil. Since the quality factor of the transmitting coil is different between when the stylus pen is offset and when the stylus pen is not offset, the processor can determine whether the stylus pen adsorbed on the electronic equipment is offset according to the quality factor of the transmitting coil after detecting the quality factor of the transmitting coil. Thus, whether the adsorption position of the handwriting pen on the electronic equipment is deviated or not can be detected.
The process of the processor determining whether a stylus deflection condition is present based on the quality factor of the transmit coil is described below in two possible implementations.
In a first possible implementation manner, when the processor performs the step of determining whether the offset condition of the handwriting pen occurs according to the quality factor of the transmitting coil, the processor may specifically be: if the quality factor of the transmitting coil is smaller than or equal to a first threshold value, the processor transmits a communication signal; if the processor receives the feedback signal for the communication signal within the preset time after the communication signal is sent, determining that the handwriting pen deviation condition occurs. If the quality factor of the transmitting coil is greater than or equal to a second threshold, the processor transmits a communication signal; if the processor receives the feedback signal for the communication signal within the preset time after the communication signal is sent, determining that the handwriting pen deviation condition does not occur. In an embodiment of the application, the second threshold is greater than the first threshold.
In some embodiments, the processor may periodically detect the quality factor of the transmit coil. The period here may be 1 second or 0.5 seconds.
In this embodiment, the processor may be further configured to, after executing the step of "the processor determines whether a stylus offset condition occurs based on the quality factor of the transmitting coil", execute the steps of: if the processor determines that the offset condition of the handwriting pen does not occur, stopping detecting the quality factor of the transmitting coil; and controlling the transmitting coil to output electric energy.
In a second possible implementation, before performing the step of "the processor detects the quality factor of the transmitting coil in the electronic device", the processor is further configured to perform the following steps: the processor transmits a communication signal; if the processor receives a feedback signal for the communication signal within a preset time period after the communication signal is transmitted, the processor executes the step of detecting the quality factor of the transmitting coil in the electronic device by the processor.
In this case, when the processor performs the step of "the processor determines whether the offset condition of the stylus pen occurs according to the quality factor of the transmitting coil", it may specifically be: if the quality factor of the transmitting coil is smaller than or equal to a first threshold value, the processor determines that the handwriting pen deviation condition occurs; if the quality factor of the transmitting coil is greater than or equal to the second threshold, the processor determines that a stylus deflection condition is not present.
In some embodiments, the processor may periodically transmit the communication signal. The period here may be 1 second or 0.5 seconds.
In this embodiment, the processor, after executing the "processor determines whether a stylus offset condition occurs based on the quality factor of the transmit coil", may be further configured to execute the steps of: if the processor determines that the offset condition of the handwriting pen does not occur, stopping sending the communication signal; and controlling the transmitting coil to output electric energy.
In some embodiments, after performing the step of "the processor determines whether a stylus offset condition has occurred based on the quality factor of the transmit coil", the processor may be further configured to perform the steps of: and if the processor determines that the offset condition of the handwriting pen occurs, outputting reminding information. The reminding information is used for reminding the occurrence of the offset condition of the handwriting pen.
The process of the processor detecting the quality factor of the transmitting coil in the electronic device is described below.
In some embodiments, the electronic device further comprises a capacitor, a first plate of the capacitor being connected to the first end of the transmit coil. In this case, the processor may specifically be when executing the step of "the processor detects the quality factor of the transmitting coil in the electronic device" that: the processor charges the capacitor and the transmitting coil until the capacitor and the transmitting coil are in a steady state; the processor controls the second polar plate of the capacitor to be connected with the second end of the transmitting coil so as to generate an oscillating electric signal between the first polar plate of the capacitor and the first end of the transmitting coil; the processor determines a quality factor of the transmitting coil according to the n-1 th amplitude and the n-th amplitude of the plurality of amplitudes of the oscillating electric signal. Wherein n is an integer greater than or equal to 2.
Specifically, the electronic device further comprises a first switch, a second switch and a third switch. The first end of the first switch is used for being connected with the positive electrode of the power supply, the second end of the first switch is connected with the second polar plate of the capacitor and the first end of the second switch, the first end of the third switch is connected with the second end of the transmitting coil, and the second end of the second switch and the second end of the third switch are both used for being connected with the negative electrode of the power supply. In this case, the processor may specifically be when executing the step of "the processor charges the capacitor and the transmitting coil: the processor controls the second switch to be turned off, and controls the first switch and the third switch to be turned on to charge the capacitor and the transmitting coil. When the processor performs the step of connecting the second electrode plate of the processor controlled capacitor with the second end of the transmitting coil, the step may specifically be: the processor controls the first switch to be turned off, and controls the second switch and the third switch to be turned on so that the second polar plate of the capacitor is connected with the second end of the transmitting coil.
In some embodiments, the processor may specifically be when executing the step of determining the quality factor of the transmitting coil by the processor according to the n-1 th amplitude and the n-th amplitude of the plurality of amplitudes of the oscillating electric signal: the processor determines the quality factor of the transmitting coil according to the n-1 th amplitude and the n-th amplitude by the following formula:
Where Q is the quality factor of the transmitting coil, F ((n-1) T) is the n-1 th amplitude, F (nT) is the n-th amplitude, pi is the circumference ratio, ln () is the logarithm based on the natural constant.
In a second aspect, a stylus offset detection method is provided, including the steps of: the processor detects a quality factor of a transmitting coil in the electronic device; and if the processor determines that the offset condition of the handwriting pen occurs according to the quality factor of the transmitting coil, outputting reminding information. The reminding information is used for reminding the occurrence of the offset condition of the handwriting pen. The stylus pen offset condition is that an adsorption position of the stylus pen adsorbed on the electronic equipment is offset relative to a preset adsorption position.
In a third aspect, an electronic device is provided that includes a transmit coil, a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program, when executed by a processor, implements a method as in any one of the first and second aspects.
In a fourth aspect, an electronic device is provided that includes a transmit coil, a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program, when executed by the processor, detects a quality factor of the transmitting coil.
The technical effects obtained by the second, third and fourth aspects are similar to the technical effects obtained by the corresponding technical means in the first aspect, and are not described in detail herein.
Drawings
Fig. 1 is a schematic view of an application scenario of an electronic device and a handwriting pen according to an embodiment of the present application;
fig. 2 is a schematic diagram of an adsorption scenario of an electronic device and a handwriting pen according to an embodiment of the present application;
fig. 3 is a schematic diagram of a positional relationship between a first electronic device and a handwriting pen according to an embodiment of the present application;
fig. 4 is a schematic diagram of an adsorption relationship between a first electronic device and a stylus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a positional relationship between a second electronic device and a stylus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an adsorption relationship between a second electronic device and a stylus according to an embodiment of the present application;
fig. 7 is a schematic diagram of a positional relationship between a third electronic device and a stylus according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an adsorption relationship between a third electronic device and a stylus according to an embodiment of the present application;
fig. 9 is a schematic diagram of a positional relationship between a fourth electronic device and a stylus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an adsorption relationship between a fourth electronic device and a stylus according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a positional relationship between a fifth electronic device and a stylus according to an embodiment of the present application;
FIG. 12 is a schematic diagram of an adsorption relationship between a fifth electronic device and a stylus according to an embodiment of the present application;
fig. 13 is a schematic diagram of a positional relationship between a sixth electronic device and a stylus according to an embodiment of the present application;
FIG. 14 is a schematic diagram of an adsorption relationship between a sixth electronic device and a stylus according to an embodiment of the present application;
fig. 15 is a schematic diagram of a positional relationship between a seventh electronic device and a stylus according to an embodiment of the present application;
FIG. 16 is a schematic diagram of an adsorption relationship between a seventh electronic device and a stylus according to an embodiment of the present application;
fig. 17 is a schematic diagram of a positional relationship between an eighth electronic device and a stylus according to an embodiment of the present application;
FIG. 18 is a schematic diagram of an adsorption relationship between an eighth electronic device and a stylus according to an embodiment of the present application;
fig. 19 is a schematic diagram of a positional relationship between a ninth electronic device and a handwriting pen according to an embodiment of the present application;
fig. 20 is a schematic diagram of an adsorption relationship between a ninth electronic device and a handwriting pen according to an embodiment of the present application;
Fig. 21 is a schematic diagram of a positional relationship between a tenth electronic device and a stylus according to an embodiment of the present application;
FIG. 22 is a schematic diagram of an adsorption relationship between a tenth electronic device and a stylus according to an embodiment of the present application;
fig. 23 is a schematic diagram of a positional relationship between an eleventh electronic device and a stylus according to an embodiment of the present application;
FIG. 24 is a schematic diagram of an adsorption relationship between an eleventh electronic device and a stylus according to an embodiment of the present application;
fig. 25 is a schematic diagram of a positional relationship between a twelfth electronic device and a stylus according to an embodiment of the present application;
FIG. 26 is a schematic diagram of an adsorption relationship between a twelfth electronic device and a stylus according to an embodiment of the present application;
FIG. 27 is a schematic diagram of a thirteenth electronic device and a stylus according to an embodiment of the present application;
FIG. 28 is a schematic diagram of an adsorption relationship between a thirteenth electronic device and a stylus according to an embodiment of the present application;
fig. 29 is a schematic diagram of a position relationship between a fourteenth electronic device and a handwriting pen according to an embodiment of the present application;
fig. 30 is a schematic diagram of an adsorption relationship between a fourteenth electronic device and a handwriting pen according to an embodiment of the present application;
fig. 31 is a block diagram of a first electronic device according to an embodiment of the present application;
Fig. 32 is a circuit configuration diagram of a first electronic device according to an embodiment of the present application;
fig. 33 is a circuit configuration diagram of a second electronic device according to an embodiment of the present application;
FIG. 34 is a waveform diagram of an oscillating electrical signal provided by an embodiment of the present application;
fig. 35 is a schematic structural view of a third attraction magnet according to an embodiment of the application;
FIG. 36 is a flowchart of a first stylus misalignment detection method according to an embodiment of the present application;
FIG. 37 is a schematic view of the location of a contact surface according to an embodiment of the present application;
FIG. 38 is a schematic diagram of a first alert message provided by an embodiment of the present application;
FIG. 39 is a schematic diagram of a second first alert message provided by an embodiment of the present application;
FIG. 40 is a flowchart of a second stylus misalignment detection method according to an embodiment of the present application;
FIG. 41 is a flowchart of a third stylus misalignment detection method according to an embodiment of the present application;
FIG. 42 is a flowchart of a fourth stylus misalignment detection method according to an embodiment of the present application;
FIG. 43 is a flowchart of a fifth stylus misalignment detection method according to an embodiment of the present application;
fig. 44 is a block diagram of a second electronic device according to an embodiment of the present application.
Wherein, the meanings represented by the reference numerals are respectively as follows:
10. an electronic device;
102. a camera;
104. a contact surface;
110. a transmitting coil;
122. a first hall sensor;
124. a second hall sensor;
130. a first attracting magnet;
132. a first sub-magnet;
134. a second sub-magnet;
140. a second attracting magnet;
142. a third sub-magnet;
144. a fourth sub-magnet;
150. a processor;
152. a first sub-processor;
154. a second sub-processor;
160. an output unit;
170. a memory;
20. a handwriting pen;
202. a metal frame;
210. a receiving coil;
220. detecting a magnet;
230. a third attracting magnet;
232. a fifth sub-magnet;
234. a sixth sub-magnet;
240. a fourth attracting magnet;
242. a seventh sub-magnet;
244. and an eighth sub-magnet.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that references to "a plurality" in this disclosure refer to two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, A/B may represent A or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and function. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
Before explaining the stylus pen offset detection method provided by the embodiment of the application in detail, an application scene of the stylus pen offset detection method is explained.
Fig. 1 is a schematic view of an application scenario of an electronic device 10 and a stylus 20 according to an embodiment of the present application. As shown in fig. 1, an electronic device 10 capable of inputting information by a touch manner, such as a tablet computer, may be configured with a stylus 20. The user can input information such as characters and graphics on the electronic device 10 using the stylus 20. Fig. 2 is a schematic diagram of an adsorption scenario of the electronic device 10 and the stylus 20 according to an embodiment of the present application. As shown in fig. 2, stylus 20 may be attached to electronic device 10.
Fig. 3 is a schematic diagram of a positional relationship between an electronic device 10 and a stylus 20 according to an embodiment of the present application, and fig. 4 is a schematic diagram of an adsorption relationship between the electronic device 10 and the stylus 20 according to an embodiment of the present application, where the devices shown in fig. 4 are all devices in a region a in fig. 3. As shown in fig. 3 and 4, the electronic device 10 includes a transmitting coil 110, a first hall sensor 122, a second hall sensor 124, a first attracting magnet 130, and a second attracting magnet 140. The first attracting magnet 130 includes a first sub-magnet 132 and a second sub-magnet 134. The second attracting magnet 140 includes a third sub-magnet 142 and a fourth sub-magnet 144. The stylus pen 20 includes a receiving coil 210, a detecting magnet 220, a third attracting magnet 230, and a fourth attracting magnet 240. The third attracting magnet 230 includes a fifth sub-magnet 232 and a sixth sub-magnet 234. The fourth attracting magnet 240 includes a seventh sub-magnet 242 and an eighth sub-magnet 244. The first attracting magnet 130, the second attracting magnet 140, the third attracting magnet 230 and the fourth attracting magnet 240 all employ Halbach Array (Halbach Array) to enhance the attraction force. A transverse magnet is also arranged between the two sub magnets in each attracting magnet. The detection magnet 220 in the stylus 20 is a separate magnet. In the following description, the relative positions of the first hall sensor 122 and the transmitting coil 110 are defined as: the first hall sensor 122 is located at the left side of the transmitting coil 110. In this case, the second hall sensor 124 is located at the right side of the transmitting coil 110. Meanwhile, in the embodiment of the application, for convenience of understanding, the left side in the text description and the left side of the orientation along the paper surface direction in the drawing are the same direction, and the right side in the text description and the right side of the orientation along the paper surface direction in the drawing are the same direction.
After the stylus 20 is adsorbed at the correct position on the electronic device 10, electric energy can be transmitted between the transmitting coil 110 in the electronic device 10 and the receiving coil 210 in the stylus 20, so that the electronic device 10 charges the stylus 20. The correct position herein refers to a preset adsorption position where the stylus 20 is adsorbed on the electronic device 10. At the preset adsorption position, the adsorption positions of the electronic device 10 and the stylus 20 are not shifted. In the embodiment of the present application, the preset adsorption position includes the following two different cases.
(A) In the first case, as shown in fig. 3 and 4, when the tip of the stylus pen 20 is directed to the left, the first sub-magnet 132 and the fifth sub-magnet 232 are attracted, the second sub-magnet 134 and the sixth sub-magnet 234 are attracted, the third sub-magnet 142 and the seventh sub-magnet 242 are attracted, and the fourth sub-magnet 144 and the eighth sub-magnet 244 are attracted. When the adsorption relationship between the electronic device 10 and the stylus pen 20 is as shown in fig. 4, the transmitting coil 110 and the receiving coil 210 are located at corresponding positions, and the first hall sensor 122 and the detecting magnet 220 are located at corresponding positions. In this case, the detecting magnet 220 triggers the first hall sensor 122, and at this time, the transmitting coil 110 in the electronic device 10 outputs electrical energy, and the receiving coil 210 in the stylus pen 20 can receive the electrical energy, so that the electronic device 10 charges the stylus pen 20 wirelessly.
(B) In the second case, fig. 5 is a schematic diagram of a positional relationship between the electronic device 10 and the stylus 20 according to another embodiment of the present application, where an adsorption relationship between the electronic device 10 and the stylus 20 is shown in fig. 6. As shown in fig. 5 and 6, when the tip of the stylus pen 20 is directed to the right, the first sub-magnet 132 and the eighth sub-magnet 244 are attracted to each other, the second sub-magnet 134 and the seventh sub-magnet 242 are attracted to each other, the third sub-magnet 142 and the sixth sub-magnet 234 are attracted to each other, and the fourth sub-magnet 144 and the fifth sub-magnet 232 are attracted to each other. When the adsorption relationship between the electronic device 10 and the stylus pen 20 is as shown in fig. 6, the transmitting coil 110 and the receiving coil 210 are located at corresponding positions, and the second hall sensor 124 and the detecting magnet 220 are located at corresponding positions. In this case, the detection magnet 220 triggers the second hall sensor 124, and at this time, the transmitting coil 110 in the electronic device 10 outputs electrical energy, and the receiving coil 210 in the stylus pen 20 can receive the electrical energy, so that the electronic device 10 charges the stylus pen 20 wirelessly.
Since the specific positions of the transmitting coil 110 and the receiving coil 210 are not known to the user, the user subconsciously places the stylus 20 in the middle of the electronic device 10 from the general usage habit when the user adsorbs the stylus 20 to the electronic device 10. However, as shown in fig. 3 and 5, since the camera 102 is provided at the middle position of the electronic apparatus 10, the transmitting coil 110, the first attraction magnet 130, and the second attraction magnet 140 are generally disposed at a left (not shown) or right position in the electronic apparatus 10. In this case, the suction position of the stylus 20 on the electronic apparatus 10 may be shifted. In addition, even if the user knows that the stylus 20 should be sucked to the left or right of the electronic apparatus 10, the user cannot accurately determine the suction position of the stylus 20 because there is no explicit position indication, which easily causes the stylus 20 to be emitted in the case of the suction position deviation on the electronic apparatus 10.
Next, a case will be described in which twelve adsorption positions may be shifted when the stylus 20 is adsorbed on the electronic apparatus 10.
(1) In the first case, as shown in fig. 7 and 8, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the third sub-magnet 142 and the sixth sub-magnet 234 attracted to each other.
(2) In the second case, as shown in fig. 9 and 10, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the second sub-magnet 134 and the seventh sub-magnet 242 attracted to each other.
(3) In the third case, as shown in fig. 11 and 12, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the fourth sub-magnet 144 and the fifth sub-magnet 232 attracted to each other.
(4) In the fourth case, as shown in fig. 13 and 14, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the first sub-magnet 132 and the eighth sub-magnet 244 attracted to each other.
(5) In the fifth case, as shown in fig. 15 and 16, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the third attraction magnet 230 and the transmitting coil 110 attracted to each other, and the second attraction magnet 140 and the receiving coil 210 attracted to each other.
(6) In the sixth case, as shown in fig. 17 and 18, the tip of the stylus pen 20 faces to the left, and the attraction force mainly comes from the first attraction magnet 130 and the receiving coil 210 attracted to each other, and the fourth attraction magnet 240 and the transmitting coil 110 attracted to each other.
(7) In the seventh case, as shown in fig. 19 and 20, the tip of the stylus pen 20 faces right, and the attraction force mainly originates from the attracted second sub-magnet 134 and sixth sub-magnet 234.
(8) In the eighth case, as shown in fig. 21 and 22, the tip of the stylus pen 20 faces to the right, and the attraction force mainly comes from the third sub-magnet 142 and the seventh sub-magnet 242 attracted to each other.
(9) In the ninth case, as shown in fig. 23 and 24, the tip of the stylus pen 20 faces to the right, and the attraction force mainly comes from the first sub-magnet 132 and the fifth sub-magnet 232 attracted to each other.
(10) In the tenth case, as shown in fig. 25 and 26, the tip of the stylus pen 20 faces rightward, and the attraction force mainly originates from the fourth sub-magnet 144 and the eighth sub-magnet 244 attracted to each other.
(11) In the eleventh case, as shown in fig. 27 and 28, the tip of the stylus pen 20 faces to the right, and the attraction force mainly comes from the first attraction magnet 130 and the receiving coil 210 attracted to each other, and the third attraction magnet 230 and the transmitting coil 110 attracted to each other.
(12) In the twelfth case, as shown in fig. 29 and 30, the tip of the stylus pen 20 faces to the right, and the attraction force mainly comes from the attraction of the fourth attraction magnet 240 and the transmitting coil 110, and the attraction of the second attraction magnet 140 and the receiving coil 210.
Referring to fig. 7 to 30, when the adsorption position of the stylus pen 20 on the electronic device 10 is shifted, the transmitting coil 110 and the receiving coil 210 are not in corresponding positions, which may affect the electronic device 10 to charge the stylus pen 20. Based on this, the present application provides a method for detecting offset of the stylus 20 and the electronic device 10, which can detect whether the adsorption position of the stylus 20 on the electronic device 10 is offset.
It will be appreciated that in the above embodiments, only the case where the attracting magnet is of a three-stage structure (for example, the first attracting magnet 130 includes the first and second sub-magnets 132 and 134 and the transverse magnet) is shown. In other embodiments, the attracting magnets may also have a five-segment structure, i.e., each attracting magnet includes three sub-magnets and two transverse magnets interposed between the three sub-magnets. In addition, the south (S) pole and north (N) pole of the attracting magnet may be all reversed without affecting the function of the attracting magnet.
In the embodiment of the present application, simulation analysis is performed on the magnitude of the adsorption force between the electronic device 10 and the stylus pen 20 in two cases of the preset adsorption positions and in twelve cases of the above-described adsorption position shift, and the simulation results are shown in table 1 below. The unit of the adsorption force is newton (N) in table 1.
TABLE 1
As is clear from table 1, when the adsorption positions of the electronic device 10 and the stylus pen 20 are not shifted, the adsorption force between the electronic device 10 and the stylus pen 20 is maximum and is much larger than twelve cases of the adsorption position shift, which is 1.9178N. For two cases where different pen points are oriented but the substantial adsorption relationship is the same, as in cases (1) and (7), cases (2) and (8) … … cases (6) and (12), the adsorption force between the electronic device 10 and the stylus 20 is also the same. The difference in the amount of attraction force between the different conditions is also affected by the detection magnet 220.
As can be seen from table 1, when the adsorption positions of the electronic device 10 and the stylus 20 are shifted, the electronic device 10 and the stylus 20 have adsorption force therebetween. In the four cases (3), (4), (9) and (10), the adsorption position of the electronic device 10 and the stylus 20 is most severely deviated, and the adsorption force between the electronic device 10 and the stylus 20 is small, so that the user can obviously perceive that the adsorption position of the stylus 20 on the electronic device 10 is deviated. Based on this, the stylus 20 offset detection method provided in the embodiment of the present application mainly performs adsorption position offset detection for eight cases (1), (2), (5), (6), (7), (8), (11), (12).
First, an electrical structure of the electronic device 10 to which the offset detection method of the stylus 20 provided by the embodiment of the present application is applied will be described. In the embodiment of the application, the connection between the two electronic devices is electrical connection, and the electrical connection refers to the transmission of the electrical signals between the two electronic devices through the connection. The electrical connection between the two electronic devices may be directly via wires or indirectly via other electronic devices.
Fig. 31 is a block diagram of an electronic device 10 according to an embodiment of the present application. As shown in fig. 31, the electronics in the electronic device 10 may include a transmit coil 110 and a processor 150.
The transmitting coil 110 may include ferrite and a metal wire wound around the ferrite. Electronic device 10 may output an electrical signal through transmitting coil 110 to charge pen 20 or/and communicate with pen 20. The processor 150 is connected to the transmitting coil 110 such that the processor 150 can output an electrical signal to the transmitting coil 110 and can detect the electrical signal in the transmitting coil 110.
It should be understood that, in the embodiment of the present application, the processor 150 refers to an integrated circuit having a processing function, and it is not limited that the processor 150 is necessarily a chip formed by packaging. For example, fig. 32 is a circuit configuration diagram of an electronic device 10 according to an embodiment of the present application. As shown in fig. 32, in some embodiments, the processor 150 may include a first sub-processor 152 and a second sub-processor 154 connected. The first sub-processor 152 may be packaged together with the first switch Q1, the second switch Q2, the third switch Q3, and the fourth switch Q4 to form a Transmit (TX) chip within the electronic device 10. The second sub-processor 154 may be a System On Chip (SOC) within the electronic device 10. The SOC includes a central processor 150 (central processing unit, CPU), a graphics processor 150 (graphics processing unit, GPU), baseband, etc. The embodiment shown in fig. 32 is not intended to limit the location of the individual electronic devices.
In some embodiments, as shown in fig. 32, a capacitor C is also included in the electronic device 10. A first plate of the capacitor C is connected to a first end of the transmit coil 110 and the first end of the transmit coil 110 is connected to the first sub-processor 152. The first switch Q1, the second switch Q2, the third switch Q3, and the fourth switch Q4 are all three-terminal switching devices, i.e., the first switch Q1, the second switch Q2, the third switch Q3, and the fourth switch Q4 all have a first terminal, a second terminal, and a control terminal. The first end of the first switch Q1 and the first end of the fourth switch Q4 are both used for being connected with the positive electrode of the power supply, and the second end of the first switch Q1 is connected with the second polar plate of the capacitor C and the first end of the second switch Q2. The second end of the fourth switch Q4 and the first end of the third switch Q3 are both connected to the second end of the transmitting coil 110, and the second end of the second switch Q2 and the second end of the third switch Q3 are both connected to the negative electrode of the power supply. In the embodiment shown in fig. 32, the positive power supply is denoted by the symbol "+" and the negative power supply is denoted by the symbol "-". The first sub-processor 152 may be further connected to control terminals (not shown in the connection relationship) of the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4 to control on and off of the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4.
In some embodiments, as shown in fig. 33, an output unit 160 is also included in the electronic device 10. The output unit 160 is a device in the electronic apparatus 10 that can output information to a user. For example, the output unit 160 may be a display screen or a speaker in the electronic device 10. The output unit 160 may be connected to the second sub-processor 154 in the processor 150 so that the second sub-processor 154 may control the operation of the output unit 160. That is, when the output unit 160 is a display screen, the second sub-processor 154 may control the display screen to display text information or image information. When the output unit 160 is a horn, the second sub-processor 154 may control the horn to emit a sound.
The principle of the stylus 20 offset detection method according to the embodiment of the present application will be described below. In the embodiment of the present application, the principle of the offset detection method of the stylus 20 is as follows: whether the suction position of the stylus 20 on the electronic device 10 is shifted is determined according to the quality factor of the transmitting coil 110. The principle may include, in particular, two parts, namely "a process of determining the quality factor of the transmitting coil 110" and "a relationship of the quality factor of the transmitting coil 110 to the adsorption position of the stylus 20 on the electronic device 10".
(1) A process of determining the quality factor of the transmitting coil 110.
The processor 150 is connected to the transmit coil 110 so that the processor 150 can detect the electrical signal in the transmit coil 110. In an embodiment of the present application, the processor 150 may detect the quality factor of the transmitting coil 110 by detecting an electrical signal in the transmitting coil 110. Taking the circuit configuration of the electronic device 10 shown in fig. 32 as an example, there are: the first sub-processor 152 may detect the quality factor of the transmit coil 110 by detecting the electrical signal in the transmit coil 110.
Specifically, when the first sub-processor 152 is operated, the second switch Q2 and the fourth switch Q4 may be controlled to be turned off, and the first switch Q1 and the third switch Q3 may be turned on. At this time, a path from the positive electrode of the power supply through the first switch Q1, the capacitor C, the transmitting coil 110, and the third switch Q3 to the negative electrode of the power supply may be formed, thereby charging the capacitor C and the transmitting coil 110.
When the capacitor C and the transmitting coil 110 are fully charged, a steady state is reached, at which time the capacitor C and the transmitting coil 110 cannot continue to charge. In this case, the first sub-processor 152 may control the first switch Q1 and the fourth switch Q4 to be turned off, and the second switch Q2 and the third switch Q3 to be turned on, so that the second plate of the capacitor C is connected to the second terminal of the transmitting coil 110 through the second switch Q2 and the third switch Q3. At this time, an oscillating electric signal is generated in a loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3. Since the capacitor C has an equivalent series resistance, the conductive wire also has a resistance, and the metal in the electronic device 10 and the stylus pen 20 near the transmitting coil 110 also generates eddy current loss, there is an impedance in the loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3. That is, the loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3 is an inductance-capacitance-impedance (LCR) oscillating circuit. Based on this, the oscillating electrical signal will take on a gradually decaying waveform, as shown in fig. 34. In FIG. 34, the unit of the abscissa is ". Times.10 -4 Second ", the ordinate is in volts (V).
As can be seen from fig. 34, the gradually decaying oscillating electrical signal has a plurality of magnitudes. The first sub-processor 152 may determine the quality factor of the transmitting coil 110 by detecting the oscillating electrical signal and according to the n-1 th amplitude and the n-th amplitude of the plurality of amplitudes of the oscillating electrical signal. Where n is an integer greater than or equal to 2.
Specifically, the first sub-processor 152, after obtaining the n-1 th amplitude and the n-th amplitude among the plurality of amplitudes of the oscillating electric signal, may obtain the ratio of the n-1 th amplitude and the n-th amplitude by the following formula, that is:
wherein F ((n-1) T) is the n-1 th amplitude, F (nT) is the n-1 th amplitude, S is the ratio of the n-1 th amplitude to the n-th amplitude, e is a natural constant, ζ is the conductivity, ω 0 The oscillation angle frequency is T, and the oscillation period is T.
In an LCR tank circuit, there is the following formula:
wherein R is the impedance value of the LCR oscillation circuit, C is the capacitance value of the LCR oscillation circuit, L is the inductance value of the LCR oscillation circuit, pi is the circumference ratio, and ω is the oscillation frequency.
The combination of formula (1) and formula (2) can be obtained:
where ln () is the base log of the natural constant.
In an LCR tank circuit, the quality factor Q of the transmitting coil 110 (i.e., inductance) is:
Combining equation (3) and equation (4) can be obtained:
the method can be obtained by deforming the formula (5):
as such, the first sub-processor 152 may determine the quality factor of the transmitting coil 110 through the formula (1) and the formula (6) after obtaining the n-1 th amplitude and the n-th amplitude of the plurality of amplitudes of the oscillating electric signal.
(2) The quality factor of the transmitting coil 110 is related to the position of the stylus 20 on the electronic device 10.
As can be seen from the above formula (4), in the electronic device 10, the quality factor of the transmitting coil 110 is only related to the inductance value and the impedance value of the LCR oscillating circuit in which the transmitting coil 110 is located. When the stylus pen 20 is attached to the electronic device 10, if the stylus pen 20 is attached to a predetermined attachment position on the electronic device 10, that is, when the case (a) and the case (B) occur, the inductance value of the LCR oscillating circuit increases, so that the quality factor of the transmitting coil 110 increases. Conversely, when the stylus pen 20 and the electronic device 10 are attracted, if the attracted position of the stylus pen 20 is shifted, that is, cases (1), (2), (5), (6), (7), (8), (11), (12) occur, the impedance value of the LCR oscillation circuit increases, and the quality factor of the transmitting coil 110 decreases.
Specifically, when the stylus pen 20 is attracted to a preset attracted position on the electronic apparatus 10, that is, when the case (a) and the case (B) occur, as shown in fig. 4 and 6, the receiving coil 210 and the transmitting coil 110 are in the corresponding positions at this time. Since the receiving coil 210 and the transmitting coil 110 are both metal wires wound on ferrite, when the transmitting coil 110 and the receiving coil 210 are located at corresponding positions, the inductance value of the transmitting coil 110 is increased, that is, the inductance value of the LCR oscillating circuit is increased, so that the quality factor of the transmitting coil 110 is increased.
When the adsorption position of the stylus pen 20 on the electronic device 10 is shifted, that is, cases (1), (2), (5), (6), (7), (8), (11), (12) occur, referring to the drawings, it can be seen that the receiving coil 210 and the transmitting coil 110 are far away, and the adsorption magnet in the stylus pen 20 is close to the transmitting coil 110. Fig. 35 is a schematic structural diagram of a third attracting magnet 230 according to an embodiment of the present application, where the first attracting magnet 130, the second attracting magnet 140, and the fourth attracting magnet 240 have the same structure as the third attracting magnet 230. As shown in fig. 35, the attracting magnet using halbach array requires a metal frame 202 as a receiving support structure for the magnet. Since the attracting magnet itself is also made of metal, when the attracting magnet in the stylus pen 20 approaches the transmitting coil 110, an eddy current effect is generated, and at this time, both the metal frame 202 near the transmitting coil 110 and the metal in the attracting magnet absorb energy, which is manifested in that the impedance value of the LCR oscillating circuit increases, and the quality factor of the transmitting coil 110 decreases.
Based on this, it may be determined whether an offset condition of the stylus pen 20 occurs according to the quality factor of the transmitting coil 110. Specifically, the first sub-processor 152 may have a first threshold value and a second threshold value preset therein. The first threshold is less than the second threshold. In addition, the setting of the first threshold value and the second threshold value also needs to satisfy the following conditions: when the stylus pen 20 is adsorbed at a preset adsorption position on the electronic device 10, that is, when the case (a) and the case (B) occur, the second threshold value is less than or equal to the quality factor of the transmitting coil 110; when the adsorption position of the stylus pen 20 on the electronic device 10 is shifted, that is, cases (1), (2), (5), (6), (7), (8), (11), (12) occur, the first threshold value is greater than or equal to the quality factor of the transmitting coil 110; when the electronic device 10 is not adsorbed to the stylus pen 20 and the electronic device 10 is not adsorbed to other metal impurities and ferrite impurities, the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold.
In this case, if the stylus 20 is adsorbed on the electronic device 10 and the first sub-processor 152 detects that the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, it can be determined that the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10, that is, no offset condition of the stylus 20 occurs. Conversely, if the stylus 20 is adsorbed on the electronic device 10 and the first sub-processor 152 detects that the quality factor of the transmitting coil 110 is less than or equal to the first threshold, it may be determined that the adsorption position of the stylus 20 is shifted.
Based on the above principle, the embodiment of the present application provides a method for detecting the offset of the stylus 20, which is applied to the electronic device 10 shown in fig. 31, 32 or 33. Fig. 36 is a flowchart of a method for detecting offset of the stylus 20 according to an embodiment of the present application. As shown in fig. 36, the stylus 20 offset detection method includes the following steps S100 and S200.
S100, the processor 150 detects the quality factor of the transmitting coil 110 in the electronic device 10.
When step S100 is specifically performed, it can be applied to the electronic device 10 shown in fig. 32 or 33. In this case, step S100 may specifically include the following steps S110 to S130.
S110, the processor 150 charges the capacitor C and the transmitting coil 110 until both the capacitor C and the transmitting coil 110 are in steady state.
Specifically, the processor 150 may control the second and fourth switches Q2 and Q4 to be turned off and the first and third switches Q1 and Q3 to be turned on, thereby charging the capacitor C and the transmitting coil 110. In the embodiment of the present application, the processor 150 may set a first preset duration. The first predetermined period of time should be greater than or equal to the period of time required for the capacitor C and the transmitting coil 110 to be fully charged. As such, when executing step S110, the processor 150 may specifically be: the processor 150 controls the second and fourth switches Q2 and Q4 to be turned off and controls the first and third switches Q1 and Q3 to be turned on for a first preset period of time, thereby charging the capacitor C and the transmitting coil 110 so that both the capacitor C and the transmitting coil 110 are in a steady state.
S120, the processor 150 controls the second plate of the capacitor C to be connected to the second end of the transmitting coil 110, so that an oscillating electrical signal is generated between the first plate of the capacitor C and the first end of the transmitting coil 110.
Specifically, the processor 150 may control the first switch Q1 and the fourth switch Q4 to be turned off, and the second switch Q2 and the third switch Q3 to be turned on, so that the second plate of the capacitor C is connected to the second terminal of the transmitting coil 110. At this time, an oscillating electric signal is generated in the loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3, that is, the oscillating electric signal is generated between the first electrode plate of the capacitor C and the first end of the transmitting coil 110.
S130, the processor 150 determines the quality factor of the transmitting coil 110 according to the n-1 th amplitude and the n-th amplitude of the plurality of amplitudes of the oscillating electrical signal.
When an oscillating electric signal is generated between the first plate of the capacitor C and the first end of the transmitting coil 110, the processor 150 connected to the first end of the transmitting coil 110 may detect the oscillating electric signal and determine the quality factor of the transmitting coil 110 according to the n-1 th and n-th amplitude values of the plurality of amplitude values of the oscillating electric signal through the formula (1) and the formula (6).
S200, the processor 150 determines whether the offset condition of the stylus 20 occurs according to the quality factor of the transmitting coil 110.
The processor 150 may obtain the quality factor of the transmitting coil 110 after performing step S100. In this case, if the device attached to the electronic device 10 is the stylus 20, the processor 150 may determine whether the stylus 20 is offset according to the quality factor of the transmitting coil 110. The method comprises the following steps: if the quality factor of the transmitting coil 110 is less than or equal to the first threshold, indicating that an offset condition of the stylus 20 is present; if the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, it indicates that no offset condition of the stylus 20 has occurred. In this way, it is possible to detect whether or not the suction position of the stylus 20 on the electronic device 10 is shifted.
In some embodiments, the processor 150 also needs to determine whether the device attached to the electronic device 10 is a stylus 20, because other metal conductors or ferrites in addition to the stylus 20 will cause the quality factor of the transmitting coil 110 to change when they are in close proximity to the transmitting coil 110 of the electronic device 10. In a first possible implementation, the processor 150 may determine whether the device attached to the electronic device 10 is the stylus 20 during execution of step S200. In a second possible implementation, the processor 150 may determine whether the device attached to the electronic device 10 is the stylus 20 before performing step S200.
In these two possible implementations, the specific implementation of the execution of step S200 by the processor 150 is different. The process of step S200 "the processor 150 determines whether the offset condition of the stylus 20 occurs according to the quality factor of the transmitting coil 110" will be explained in detail with reference to these two possible implementations.
In a first possible implementation, the processor 150 may determine whether the device attached to the electronic device 10 is the stylus 20 during execution of step S200. In this case, step S200 may specifically include the following steps S210 to S240.
S210, if the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor 150 transmits a communication signal.
S220, if the processor 150 receives the feedback signal for the communication signal within the second preset time period after sending the communication signal, it is determined that the offset condition of the stylus 20 occurs.
If the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, the processor 150 sends a communication signal S230.
S240, if the processor 150 receives the feedback signal for the communication signal within the second preset time period after sending the communication signal, it is determined that the offset condition of the stylus 20 does not occur.
Wherein step S220 is located after step S210, step S240 is located after step S230, and step S230 and step S210 are two steps executed in parallel.
The manner in which the processor 150 transmits the communication signal may be broadcasting the communication signal. That is, the processor 150 transmits a communication signal without a specific target for receiving the communication signal. The processor 150 may send the communication signal in a specified direction. The communication signal is used to identify the stylus 20. Generally, as shown in fig. 37, the electronic device 10 also has a contact surface 104. The contact surface 104 may be a bezel of the electronic device 10. Stylus 20 contacts contact surface 104 when it is attached to electronic device 10. The propagation distance of the communication signal may satisfy the following condition: when stylus 20 is in contact with contact surface 104 of electronic device 10, stylus 20 may receive the communication signal; when the stylus 20 is not in contact with the contact surface 104 of the electronic device 10, the communication signal is not received by the stylus 20.
After receiving the communication signal, stylus 20 may send a feedback signal for the communication signal. The feedback signal sent by the stylus 20 may carry information of the stylus 20, such as Identity (ID) of the stylus 20. In this manner, the processor 150 of the electronic device 10 may be caused to recognize the stylus 20 upon receipt of the feedback signal.
In this possible implementation, the processor 150 first determines whether an offset condition has occurred based on the quality factor of the transmitter coil 110, and then determines whether the device attached to the electronic device 10 is the stylus 20 by sending a communication signal and receiving a feedback signal. Wherein the processor determines that an offset condition has occurred when the quality factor of the transmit coil 110 is less than or equal to a first threshold. When the quality factor of the transmit coil 110 is greater than or equal to the second threshold, the processor determines that an offset condition has not occurred. When the processor 150 receives the feedback signal for the communication signal within a second preset time period after the communication signal is transmitted, the processor 150 determines that the device adsorbed on the electronic device 10 is the stylus 20. When the processor 150 does not receive the feedback signal for the communication signal within the second preset time period after the communication signal is transmitted, the processor 150 determines that the device adsorbed on the electronic device 10 is not the stylus 20. In this manner, processor 150 may determine whether an offset condition of stylus 20 has occurred.
It will be appreciated that the second predetermined period of time should be greater than the period of time required for the stylus 20 to send a feedback signal for the communication signal after receiving the communication signal. For example, the second preset time period may be 0.2 seconds, 0.5 seconds, or 1 second. In some specific embodiments, when the stylus 20 offset detection method is applied to the electronic device 10 shown in fig. 32 or 33, steps S210 to S240 may be performed by the first sub-processor 152 in the processor 150. In operation, the first sub-processor 152 may transmit a communication signal by modulating the waveform of the electrical signal on the transmit coil 110.
In this possible implementation manner, the processor, when executing step S100, may specifically be: the processor 150 periodically detects the quality factor of the transmitting coil 110 in the electronic device 10.
That is, the processor 150 may detect the quality factor of the transmitting coil 110 once every third preset time period. Here, the third preset time period is longer than or equal to the time period required for the processor 150 to perform steps S110 to S130. The third preset time period may be, for example, 0.5 seconds, 1 second, or 2 seconds. In this case, the processor 150 detects the quality factor of the transmitting coil 110 once every third preset time period. If the quality factor of the transmitting coil 110 is detected to be greater than the first threshold and less than the second threshold, the quality factor of the transmitting coil 110 is again detected when a third preset time period after the quality factor of the transmitting coil 110 is detected. If the quality factor of the transmitting coil 110 is detected to be smaller than or equal to the first threshold value or the quality factor of the transmitting coil 110 is detected to be larger than or equal to the second threshold value, a communication signal is transmitted, and at this time, if a feedback signal for the communication signal is received within a second preset time period after the communication signal is transmitted, whether the offset condition of the stylus pen 20 occurs is determined according to the quality factor of the transmitting coil 110.
Based on this, the processor 150 is further configured to perform the following steps S310 to S320 after step S200.
If it is determined that the offset condition of the stylus 20 does not occur, the processor 150 stops detecting the quality factor of the transmitting coil 110 at S310.
S320, the processor 150 controls the transmitting coil 110 to output power.
When the processor 150 determines that the offset condition of the stylus 20 does not occur, that is, the processor 150 determines that the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10, the processor 150 may stop detecting the quality factor of the transmitting coil 110 and control the transmitting coil 110 to output power. Steps S310 and S320, when embodied, may be applied to the electronic device 10 shown in fig. 32 or 33. In this case, step S320 may include steps S321 and S322 as follows.
S321, during the first phase, the processor 150 controls the first switch Q1 and the third switch Q3 to be turned on, and controls the second switch Q2 and the fourth switch Q4 to be turned off.
In a second phase after the first phase, the processor 150 controls the second switch Q2 and the fourth switch Q4 to be turned on, and controls the first switch Q1 and the third switch Q3 to be turned off.
In this embodiment, the first, second, third and fourth switches Q1, Q2, Q3 and Q4 form an inverter bridge, and can convert the direct current output from the positive and negative electrodes of the power source into two-phase alternating current. Steps S321 and S322 are repeatedly performed in a loop, that is, alternating current is output to the capacitor C and the transmitting coil 110, thereby causing the transmitting coil 110 to output power.
It will be appreciated that in steps S310 and S320, the processor 150 needs to stop detecting the quality factor of the transmitting coil 110 first, and then control the transmitting coil 110 to output power because: in the two different processes of detecting the quality factor of the transmitting coil 110 and controlling the transmitting coil 110 to output power, the control logic of the processor 150 to the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4 is different, and thus, the processor 150 cannot simultaneously detect the quality factor of the transmitting coil 110 and control the transmitting coil 110 to output power. When the processor 150 determines that an offset condition of the stylus 20 is present, then the quality factor of the transmitting coil 110 in the electronic device 10 may continue to be periodically detected.
(two) in a second possible implementation, the processor 150 may determine whether the device attached to the electronic device 10 is the stylus 20 before performing step S200. In this case, the processor 150 may perform the following step S001 before step S100.
S001, the processor 150 transmits a communication signal.
If the processor 150 receives the feedback signal for the communication signal within the second preset time period after the communication signal is transmitted, step S100 is performed.
Based on this, when the processor 150 performs step S200, step S200 may specifically include the following steps S250 and S260.
If the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor 150 determines that an offset condition of the stylus pen 20 is present, S250.
If the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, the processor 150 determines that no offset condition of the stylus pen 20 has occurred S260.
Specifically, in this possible implementation, the processor 150 first determines whether the device attached to the electronic device 10 is the stylus 20 by sending a communication signal and receiving a feedback signal (or whether the stylus 20 is attached to the electronic device 10 by sending a communication signal and receiving a feedback signal), and if so, the processor 150 again detects the quality factor of the transmitting coil 110 and determines whether an offset condition has occurred based on the quality factor of the transmitting coil 110. The processor determines whether the device attached to the electronic device 10 is the stylus 20 according to the following criteria: the processor 150 receives a feedback signal for the communication signal within a second preset time period after the communication signal is transmitted. As such, when the quality factor of the transmit coil 110 is greater than or equal to the second threshold, the processor 150 may determine that the device attached to the electronic device 10 is the stylus 20 and that no offset condition of the stylus 20 has occurred. When the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor 150 may determine that the device attached to the electronic device 10 is the stylus 20 and that a stylus 20 offset condition is occurring.
In this possible implementation manner, the processor, when executing step S001, may specifically be: the processor 150 periodically transmits the communication signal.
That is, the processor 150 may transmit a communication signal once every fourth preset time period to determine whether the stylus 20 is attached to the electronic device 10. The fourth predetermined time period is longer than the second predetermined time period. For example, the fourth preset time period may be 1 second or 2 seconds. In this case, the processor 150 transmits the communication signal once every fourth preset time period. If the feedback signal is not received within the second preset time period after the communication signal is sent once, the communication signal is sent once again when the fourth preset time period after the communication signal is sent. If the feedback signal is received within a second preset time period after the communication signal is sent once, the quality factor of the transmitting coil 110 is detected, and whether the offset condition of the stylus pen 20 occurs is determined according to the quality factor of the transmitting coil 110.
Based on this, the processor 150 is further configured to perform the following steps S410 to S420 after step S200.
If it is determined that the offset condition of the stylus 20 does not occur, the processor 150 stops transmitting the communication signal S410.
S420, the processor 150 controls the transmitting coil 110 to output power.
When the processor 150 determines that the offset condition of the stylus 20 does not occur, that is, the processor 150 determines that the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10, the processor 150 may stop sending the communication signal and control the transmitting coil 110 to output the power. Steps S410 and S420, when embodied, may be applied to the electronic device 10 shown in fig. 32 or 33. In this case, step S420 may include steps S421 and S422 as follows.
In the first stage, the processor 150 controls the first switch Q1 and the third switch Q3 to be turned on, and controls the second switch Q2 and the fourth switch Q4 to be turned off S421.
In a second phase after the first phase, the processor 150 controls the second switch Q2 and the fourth switch Q4 to be turned on, and controls the first switch Q1 and the third switch Q3 to be turned off S422.
In this embodiment, the first, second, third and fourth switches Q1, Q2, Q3 and Q4 form an inverter bridge, and can convert the direct current output from the positive and negative electrodes of the power source into two-phase alternating current. Steps S421 and S422 are repeatedly performed in a loop, i.e., ac power is output to the capacitor C and the transmitting coil 110, thereby causing the transmitting coil 110 to output power.
It will be appreciated that when processor 150 determines that an offset condition of stylus 20 is present, then periodic transmission of the communication signal may continue.
In some embodiments, in the method for detecting offset of the stylus 20, the processor 150 is further configured to execute the following step S500 after executing the step S200.
S500, if the processor 150 determines that the offset condition of the stylus 20 occurs, the output unit 160 is controlled to output the first reminding information.
As described above, after executing step S200, the processor 150 may determine whether the offset condition of the stylus 20 occurs. In this embodiment, if the processor 150 determines that the offset condition of the stylus 20 occurs, the output unit 160 is further controlled to output the first alert information. The first reminding information is used for reminding that the offset condition of the handwriting pen 20 occurs. In some embodiments, the output unit 160 is a speaker in the electronic device 10. At this time, the first reminder information may be voice information. For example, when the processor 150 controls the output unit 160 to output the first alert message, the speaker in the electronic device 10 may sound "the stylus is attracted to the position is shifted, please place the stylus at the correct position". In other embodiments, the output unit 160 is a display screen in the electronic device 10. At this time, the first reminding information may be text information or/and image information. In a specific embodiment, when the processor 150 controls the output unit 160 to output the first alert information, as shown in fig. 38, the display screen in the electronic device 10 may display the text information of "handwriting pen adsorption position shift". In another specific embodiment, when the processor 150 controls the output unit 160 to output the first reminding information, as shown in fig. 39, the display screen in the electronic device 10 may display the text information of "the handwriting pen is adsorbed to the correct position", please place the handwriting pen at the correct position ", and simultaneously display the relative positions of the handwriting pen 20 and the electronic device 10 when the handwriting pen 20 adsorbs the correct position (i.e. the preset adsorption position) of the electronic device 10.
In some specific embodiments, the "control output unit 160 outputs the first alert information" in step S500 is performed by the second sub-processor 154 in the processor 150.
The method for detecting the offset of the stylus 20 according to the embodiment of the present application will be explained in detail from four specific embodiments with reference to the accompanying drawings.
A first specific embodiment.
In this embodiment, the processor 150 first determines whether an offset condition has occurred based on the quality factor of the transmitting coil 110, and then determines whether the device attached to the electronic device 10 is the stylus 20 by sending a communication signal and receiving a feedback signal.
Specifically, fig. 40 is a flowchart of another method for detecting the offset of the stylus 20 according to an embodiment of the present application, where the method for detecting the offset of the stylus 20 may be applied to the electronic device 10 shown in fig. 33. As shown in fig. 40, the stylus 20 offset detection method may include the following steps.
S1, quality factor detection.
After the first sub-processor 152 is powered on, the first switch Q1 and the third switch Q3 may be controlled to be turned on for a first preset period of time, so as to charge the capacitor C and the transmitting coil 110 for the first preset period of time, so that the capacitor C and the transmitting coil 110 are in a steady state. Then, the first sub-processor 152 controls the second switch Q2 and the third switch Q3 to be turned on, so that the second electrode plate of the capacitor C is connected to the second end of the transmitting coil 110, and an oscillating electrical signal is generated between the first electrode plate of the capacitor C and the first end of the transmitting coil 110. The first sub-processor 152 may determine the quality factor of the transmitting coil 110 by equation (1) and equation (6) by detecting the oscillating electric signal and according to the n-1 th amplitude and the n-th amplitude among the plurality of amplitudes of the oscillating electric signal.
Here, the first sub-processor 152 may detect the quality factor of the transmitting coil 110 once every third preset time period.
A first threshold and a second threshold are preset in the first sub-processor 152, where the first threshold is smaller than the second threshold. After the first sub-processor 152 detects the quality factor of the transmitting coil 110, it can determine the magnitude relation between the quality factor and the first and second thresholds. The magnitude relation between the quality factor and the first and second thresholds includes three of the following steps S2, S3 and S4.
S2, the quality factor is larger than the first threshold value and smaller than the second threshold value.
When the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold, a smaller change in the quality factor of the transmitting coil 110 is indicated. In this case, the first sub-processor 152 determines that no stylus pen, metal foreign matter, or ferrite foreign matter is adsorbed on the electronic device 10, and at this time, returns to step S1 of detecting the quality factor of the transmitting coil 110 once again every third preset time period.
S3, the quality factor is smaller than or equal to a first threshold value.
When the quality factor of the transmit coil 110 is less than or equal to the first threshold, indicating that metal is near the transmit coil 110, the first sub-processor 152 determines that an offset condition is present. In this case, the first sub-processor 152 continues to perform steps S31 to S33.
S31, transmitting a communication signal.
The first sub-processor 152 transmits a communication signal. The first sub-processor 152 may transmit the communication signal by modulating the waveform of the electrical signal on the transmit coil 110.
S32, judging whether the feedback signal is received within a second preset time period after the communication signal is sent.
If the first sub-processor 152 receives the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 can communicate with the stylus 20, that is, that the device adsorbed on the electronic device 10 is the stylus. At this time, the first sub-processor 152 determines that the offset condition of the stylus 20 occurs, and performs step S33.
If the first sub-processor 152 does not receive the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 cannot communicate with the stylus 20, that is, indicates that the device adsorbed on the electronic device 10 is not the stylus. At this time, the process returns to step S1.
S33, outputting the first reminding information.
After the first sub-processor 152 determines that an offset condition of the stylus 20 has occurred, a first instruction may be issued to the second sub-processor 154. The second sub-processor 154 outputs a first alert message after receiving the first command to alert the user to the offset condition of the stylus 20.
S4, the quality factor is larger than or equal to a second threshold value.
When the quality factor of the transmit coil 110 is greater than or equal to the second threshold, indicating that ferrite is near the transmit coil 110, the first sub-processor 152 determines that no offset condition has occurred. In this case, the first sub-processor 152 continues to perform steps S41 to S43.
S41, transmitting a communication signal.
S42, judging whether the feedback signal is received within a second preset time period after the communication signal is sent.
If the first sub-processor 152 receives the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 can communicate with the stylus 20, that is, that the device adsorbed on the electronic device 10 is the stylus. At this time, the first sub-processor 152 determines that the offset condition of the stylus 20 does not occur, and performs step S43.
If the first sub-processor 152 does not receive the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 cannot communicate with the stylus 20, that is, indicates that the device adsorbed on the electronic device 10 is not the stylus. At this time, the process returns to step S1.
S43, stopping detecting the quality factor, and controlling the transmitting coil 110 to output power.
The first sub-processor 152 may control the first switch Q1 and the third switch Q3 to be turned on and control the second switch Q2 and the fourth switch Q4 to be turned off in the first stage; in the second stage, the second switch Q2 and the fourth switch Q4 are controlled to be turned on, and the first switch Q1 and the third switch Q3 are controlled to be turned off. This cycle is repeated so that alternating current is output to the capacitor C and the transmitting coil 110, thereby causing the transmitting coil 110 to output electric power.
A second embodiment.
Fig. 41 is a flowchart of another method for detecting offset of the stylus 20 according to an embodiment of the present application, which has the following difference point based on the embodiment shown in fig. 40.
1) If the determination result of step S32 and step S42 is no, the routine returns to step S1 and step S5 is also executed.
S5, outputting second reminding information.
When the first sub-processor 152 does not receive the feedback signal for the communication signal within a second preset time period after the communication signal is transmitted, that is, when the first sub-processor 152 is unable to communicate with the stylus 20, a second instruction may be issued to the second sub-processor 154. The second sub-processor 154 outputs the second reminder information after receiving the second instruction. The second reminding information is used for reminding the user of not approaching the metal sundries or ferrite sundries to the transmitting coil 110.
A third embodiment.
Fig. 42 is a flowchart of still another method for detecting offset of the stylus 20 according to an embodiment of the present application, which has the following differences based on the embodiment shown in fig. 40.
1) The first sub-processor 152 is not preset with the first threshold value and the second threshold value, but preset with the third threshold value, the fourth threshold value, and the preset quality factor. The third threshold is less than the fourth threshold. In this embodiment, the third and fourth thresholds should satisfy the following condition: when the stylus pen 20 is adsorbed at a preset adsorption position on the electronic device 10, that is, when the case (a) and the case (B) occur, the fourth threshold value is less than or equal to a difference of the quality factor of the transmitting coil 110 minus the preset quality factor; when the adsorption position of the stylus 20 on the electronic device 10 is shifted, that is, cases (1), (2), (5), (6), (7), (8), (11), (12) occur, the third threshold value is greater than or equal to the difference of the quality factor of the transmitting coil 110 minus the preset quality factor. In this case, if the stylus 20 is adsorbed on the electronic device 10, and the difference between the quality factor of the transmitting coil 110 and the preset quality factor is greater than or equal to the fourth threshold, the first sub-processor 152 can determine that the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10, i.e. no offset condition of the stylus 20 occurs. Otherwise, if the stylus 20 is adsorbed on the electronic device 10, and the difference between the quality factor of the transmitting coil 110 and the preset quality factor is less than or equal to the third threshold, the first sub-processor 152 can determine that the adsorption position of the stylus 20 is shifted.
Here, the predetermined quality factor is the quality factor of the transmitting coil 110 when the electronic device 10 is not attached to the stylus 20, and the electronic device 10 is not attached to other metal impurities and ferrite impurities, that is, the quality factor of the transmitting coil 110 when only the electronic device 10 is used. The preset figure of merit is greater than the first threshold and less than the second threshold. The third threshold may be equal to the first threshold minus a preset figure of merit, the third threshold being negative. The fourth threshold may be equal to the second threshold minus a preset figure of merit.
Based on this, on the basis of the first specific embodiment, the following step S6 may be performed after step S1.
S6, calculating a difference value between the quality factor and a preset quality factor.
The first sub-processor 152 calculates a difference (hereinafter, simply referred to as a "difference") between the detected quality factor and a preset quality factor after detecting the quality factor of the transmitting coil 110. Thus, the magnitude relation between the difference and the third and fourth thresholds can be judged. The magnitude relation between the difference value and the third and fourth thresholds includes three of the following steps S7, S8 and S9.
S7, the difference value is larger than the third threshold value and smaller than the fourth threshold value.
As can be seen from the foregoing description, when the difference value meets the condition of step S7, the quality factor of the transmitting coil 110 meets the condition of step S2. Therefore, at this time, the process returns to step S1.
S8, the difference value is smaller than or equal to a third threshold value.
As can be seen from the foregoing description, when the difference value meets the condition of step S8, the quality factor of the transmitting coil 110 meets the condition of step S3. Therefore, step S31 is continued at this time.
S9, the difference value is larger than or equal to a fourth threshold value.
As can be seen from the foregoing description, when the difference value meets the condition of step S9, the quality factor of the transmitting coil 110 meets the condition of step S4. Therefore, step S41 is continued at this time.
A fourth embodiment.
In this embodiment, the processor 150 first determines whether the device attached to the electronic device 10 is a stylus 20 by sending a communication signal and receiving a feedback signal (or whether the stylus 20 is attached to the electronic device 10 by sending a communication signal and receiving a feedback signal), and if so, the processor 150 again detects the quality factor of the transmitting coil 110 and determines whether an offset condition has occurred based on the quality factor of the transmitting coil 110.
Specifically, fig. 43 is a flowchart of still another method for detecting the offset of the stylus 20 according to an embodiment of the present application, where the method for detecting the offset of the stylus 20 may be applied to the electronic device 10 shown in fig. 33. As shown in fig. 43, the stylus 20 offset detection method may include the following steps.
S01, sending a communication signal.
The first sub-processor 152 transmits the communication signal upon power-up. The first sub-processor 152 may transmit the communication signal by modulating the waveform of the electrical signal on the transmit coil 110. Here, the first sub-processor 152 may transmit the communication signal once every fourth preset time period.
S02, judging whether the feedback signal is received within a second preset time period after the communication signal is sent.
If the first sub-processor 152 receives the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 can communicate with the stylus 20, that is, indicates that the stylus 20 is attracted to the electronic device 10. At this time, step S03 is performed.
If the first sub-processor 152 does not receive the feedback signal for the communication signal within the second preset time period after the communication signal is sent, it indicates that the first sub-processor 152 cannot communicate with the stylus 20, that is, indicates that the stylus 20 is not adsorbed to the electronic device 10. At this time, the process returns to step S01. In some other embodiments, if the determination result in step S02 is no, step S5 may be executed while step S1 is executed.
S03, quality factor detection.
The first sub-processor 152 may first control the first switch Q1 and the third switch Q3 to be turned on for a first preset time period, so as to charge the capacitor C and the transmitting coil 110 for the first preset time period, and make the capacitor C and the transmitting coil 110 in a steady state. Then, the first sub-processor 152 controls the second switch Q2 and the third switch Q3 to be turned on, so that the second electrode plate of the capacitor C is connected to the second end of the transmitting coil 110, and an oscillating electrical signal is generated between the first electrode plate of the capacitor C and the first end of the transmitting coil 110. The first sub-processor 152 may determine the quality factor of the transmitting coil 110 by equation (1) and equation (6) by detecting the oscillating electric signal and according to the n-1 th amplitude and the n-th amplitude among the plurality of amplitudes of the oscillating electric signal.
A first threshold and a second threshold are preset in the first sub-processor 152, where the first threshold is smaller than the second threshold. After the first sub-processor 152 detects the quality factor of the transmitting coil 110, it can determine the magnitude relation between the quality factor and the first and second thresholds. The magnitude relation between the quality factor and the first and second thresholds includes three of the following steps S04, S05, S06.
S04, the figure of merit is greater than the first threshold and less than the second threshold.
When the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold, a smaller change in the quality factor of the transmitting coil 110 is indicated. In this case, there may be a feedback signal reception error. At this time, step S01 is performed back, i.e., the communication signal is transmitted once again every fourth preset time period.
S05, the quality factor is smaller than or equal to a first threshold value.
When the quality factor of the transmitting coil 110 is less than or equal to the first threshold, indicating that metal is near the transmitting coil 110, the first sub-processor 152 determines that an offset condition of the stylus 20 is present. In this case, the first sub-processor 152 continues to perform step S051.
S051, outputting first reminding information.
After the first sub-processor 152 determines that an offset condition of the stylus 20 has occurred, a first instruction may be issued to the second sub-processor 154. The second sub-processor 154 outputs a first alert message after receiving the first command to alert the user to the offset condition of the stylus 20.
S06, the quality factor is larger than or equal to a second threshold value.
When the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, indicating that ferrite is near the transmitting coil 110, the first sub-processor 152 determines that no offset condition of the stylus 20 is present. In this case, the first sub-processor 152 continues to execute step S061.
S061, the transmission of the communication signal is stopped, and the transmitting coil 110 is controlled to output electric energy.
The first sub-processor 152 may control the first switch Q1 and the third switch Q3 to be turned on and control the second switch Q2 and the fourth switch Q4 to be turned off in the first stage; in the second stage, the second switch Q2 and the fourth switch Q4 are controlled to be turned on, and the first switch Q1 and the third switch Q3 are controlled to be turned off. This cycle is repeated so that alternating current is output to the capacitor C and the transmitting coil 110, thereby causing the transmitting coil 110 to output electric power.
The method for detecting the offset of the stylus 20 provided by the embodiment of the application has at least the following beneficial effects: 1. the processor 150 may detect the quality factor of the transmit coil 110. Since the quality factor of the transmitting coil 110 is different between when the stylus 20 is shifted and when the stylus 20 is not shifted, the processor 150 can determine whether the stylus 20 attached to the electronic device 10 is shifted according to the quality factor of the transmitting coil 110 after detecting the quality factor of the transmitting coil 110. In this way, it is possible to detect whether or not the suction position of the stylus 20 on the electronic device 10 is shifted. 2. According to the offset detection method of the stylus pen 20, only the quality factor of the transmitting coil 110 is required to be detected, communication signals are transmitted and received through the transmitting coil 110, and auxiliary devices such as a Hall sensor or a compass are not required to judge whether the stylus pen 20 is close to the electronic equipment 10, so that the cost can be saved.
The embodiment of the application also provides a method for detecting the offset of the stylus 20, which comprises the following steps S601 and S602.
S601, the processor 150 detects the quality factor of the transmitting coil 110 in the electronic device 10.
S602, if the processor 150 determines that the offset condition of the stylus 20 occurs according to the quality factor of the transmitting coil 110, the first reminding information is output.
In some embodiments, the first reminder information is used to remind the stylus 20 of an offset condition. Alternatively, the first reminding information is used for reminding the handwriting pen 20 that the adsorption position on the electronic device 10 deviates from the preset adsorption position.
The embodiment of the present application further provides an electronic device 10, as shown in fig. 44, including a transmitting coil 110, a memory 170, a processor 150, and a computer program stored in the memory 170 and executable on the processor 150, where the computer program when executed by the processor 150 implements the method for detecting offset of the stylus 20 according to any one of the embodiments described above.
The embodiment of the present application also provides an electronic device 10, as shown in fig. 44, comprising a transmitting coil 110, a memory 170, a processor 150, and a computer program stored in the memory 170 and executable on the processor 150, the computer program, when executed by the processor 150, the processor 150 detecting a quality factor of the transmitting coil 110.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (15)

1. A stylus deflection detection method, applied to an electronic device, characterized in that the method comprises:
detecting a quality factor of a transmitting coil in the electronic device;
and determining whether a handwriting pen deviation condition occurs according to the quality factor of the transmitting coil, wherein the handwriting pen deviation condition is that the adsorption position of the handwriting pen adsorbed on the electronic equipment deviates from a preset adsorption position.
2. The method of claim 1, wherein said determining whether a stylus deflection condition is present based on a quality factor of the transmit coil comprises:
if the quality factor of the transmitting coil is smaller than or equal to a first threshold value, transmitting a communication signal;
And if the feedback signal aiming at the communication signal is received within the preset time after the communication signal is sent, determining that the offset condition of the handwriting pen occurs.
3. The method of claim 1, wherein said determining whether a stylus deflection condition is present based on a quality factor of the transmit coil comprises:
if the quality factor of the transmitting coil is greater than or equal to a second threshold value, transmitting a communication signal;
and if the feedback signal for the communication signal is received within the preset time after the communication signal is sent, determining that the offset condition of the handwriting pen does not occur.
4. A method according to claim 2 or 3, wherein said detecting the quality factor of a transmitting coil in said electronic device comprises:
periodically detecting a quality factor of the transmitting coil;
after determining whether the offset condition of the handwriting pen occurs according to the quality factor of the transmitting coil, the method further comprises the following steps:
if the fact that the offset condition of the handwriting pen does not occur is determined, stopping detecting the quality factor of the transmitting coil;
and controlling the transmitting coil to output electric energy.
5. The method of claim 1, wherein prior to detecting the quality factor of the transmit coil in the electronic device, further comprising:
Transmitting a communication signal;
and if the feedback signal for the communication signal is received within the preset time after the communication signal is sent, executing the step of detecting the quality factor of the transmitting coil in the electronic equipment.
6. The method of claim 5, wherein said determining whether a stylus deflection condition is present based on a quality factor of the transmit coil comprises:
and if the quality factor of the transmitting coil is smaller than or equal to a first threshold value, determining that the handwriting pen deviation condition occurs.
7. The method of claim 5 or 6, wherein said determining whether a stylus deflection condition is occurring based on a quality factor of the transmit coil further comprises:
and if the quality factor of the transmitting coil is greater than or equal to a second threshold value, determining that the offset condition of the handwriting pen does not occur.
8. The method according to any one of claims 5 to 7, wherein the transmitting the communication signal comprises:
periodically transmitting the communication signal;
after determining whether the offset condition of the handwriting pen occurs according to the quality factor of the transmitting coil, the method further comprises the following steps:
if the handwriting pen deviation condition is not determined to occur, stopping sending the communication signal;
And controlling the transmitting coil to output electric energy.
9. The method of any one of claims 1 to 8, wherein after determining whether a stylus deflection condition has occurred based on the quality factor of the transmit coil, further comprising:
if the offset condition of the handwriting pen is determined to occur, outputting reminding information, wherein the reminding information is used for reminding the occurrence of the offset condition of the handwriting pen.
10. The method of any of claims 1 to 9, wherein the electronic device further comprises a capacitor, a first plate of the capacitor being connected to the first end of the transmit coil;
the detecting the quality factor of the transmitting coil includes:
charging the capacitor and the transmitting coil until both the capacitor and the transmitting coil are in steady state;
controlling the second polar plate of the capacitor to be connected with the second end of the transmitting coil so as to generate an oscillating electric signal between the first polar plate of the capacitor and the first end of the transmitting coil;
and determining the quality factor of the transmitting coil according to the (n-1) th amplitude value and the (n) th amplitude value in the plurality of amplitude values of the oscillating electric signal, wherein n is an integer greater than or equal to 2.
11. The method of claim 10, wherein the electronic device further comprises a first switch, a second switch, and a third switch, a first end of the first switch being configured to be connected to a positive power supply, a second end of the first switch being configured to be connected to a second plate of the capacitor and a first end of the second switch, a first end of the third switch being configured to be connected to a second end of the transmitting coil, a second end of the second switch, and a second end of the third switch being configured to be connected to a negative power supply;
said charging said capacitor and said transmitting coil, comprising:
controlling the second switch to be turned off, and controlling the first switch and the third switch to be turned on to charge the capacitor and the transmitting coil;
the second polar plate for controlling the capacitor is connected with the second end of the transmitting coil, and the second polar plate comprises:
and controlling the first switch to be turned off, and controlling the second switch and the third switch to be turned on so as to enable the second polar plate of the capacitor to be connected with the second end of the transmitting coil.
12. The method of claim 10 or 11, wherein said determining the quality factor of the transmitting coil from the n-1 th and n-th amplitude values of the plurality of amplitude values of the oscillating electrical signal comprises:
Determining the quality factor of the transmitting coil according to the n-1 th amplitude and the n-th amplitude by the following formula:
wherein, Q is the quality factor of the transmitting coil, F ((n-1) T) is the n-1 th amplitude, F (nT) is the n-th amplitude, pi is the circumference ratio, and ln () is the logarithm based on natural constant.
13. A stylus deflection detection method, applied to an electronic device, characterized in that the method comprises:
detecting a quality factor of a transmitting coil in the electronic device;
if the condition of the offset of the handwriting pen is determined to occur according to the quality factor of the transmitting coil, outputting reminding information, wherein the reminding information is used for reminding the occurrence of the condition of the offset of the handwriting pen, and the condition of the offset of the handwriting pen is that the adsorption position of the handwriting pen adsorbed on the electronic equipment is offset relative to a preset adsorption position.
14. An electronic device comprising a transmit coil, a memory, a processor, and a computer program stored in the memory and executable on the processor, which when executed by the processor, implements the method of any one of claims 1 to 13.
15. An electronic device comprising a transmit coil, a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program when executed by the processor detecting a quality factor of the transmit coil.
CN202310471931.9A 2023-04-24 2023-04-24 Handwriting pen offset detection method and electronic equipment Pending CN117129763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310471931.9A CN117129763A (en) 2023-04-24 2023-04-24 Handwriting pen offset detection method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310471931.9A CN117129763A (en) 2023-04-24 2023-04-24 Handwriting pen offset detection method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117129763A true CN117129763A (en) 2023-11-28

Family

ID=88851537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310471931.9A Pending CN117129763A (en) 2023-04-24 2023-04-24 Handwriting pen offset detection method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117129763A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120138565A (en) * 2011-06-15 2012-12-26 주식회사 에코메트론 Wireless tablet device and method for locating electronic pen of the same
CN103176217A (en) * 2011-12-26 2013-06-26 索尼公司 Detecting device, detecting system, power transmitting device, noncontact power transmission system, and detecting method
WO2016143000A1 (en) * 2015-03-06 2016-09-15 昭 池谷 Electronic apparatus
CN109004771A (en) * 2018-07-27 2018-12-14 浙江泰米电子科技有限公司 A kind of wireless charger and foreign matter detecting method
CN111313569A (en) * 2018-12-11 2020-06-19 恩智浦美国有限公司 Q factor determination for foreign object detection circuit in wireless charging system
CN111600398A (en) * 2019-02-19 2020-08-28 Lg电子株式会社 Wireless power transmission apparatus and control method thereof
CN111668893A (en) * 2020-05-20 2020-09-15 苏州蓝沛无线通信科技有限公司 Wireless charging control method and wireless charging device
US20210175728A1 (en) * 2019-12-06 2021-06-10 Nxp Usa, Inc Method for determining a quality factor and wireless charger
WO2021159764A1 (en) * 2020-02-12 2021-08-19 华为技术有限公司 Wireless charging circuit, wireless charging method, device, and system
WO2021238598A1 (en) * 2020-05-27 2021-12-02 华为数字能源技术有限公司 Quality factor detection circuit and detection method based on oscillating circuit, and electronic device
CN113972703A (en) * 2020-07-21 2022-01-25 北京小米移动软件有限公司 Wireless charging method, device, terminal and storage medium
CN114006482A (en) * 2020-07-28 2022-02-01 Oppo广东移动通信有限公司 Charging prompting method, device, equipment and storage medium
CN114756142A (en) * 2022-04-12 2022-07-15 荣耀终端有限公司 Handwriting pen, wireless charging method and terminal equipment
CN114827972A (en) * 2022-06-28 2022-07-29 荣耀终端有限公司 Method for establishing connection with stylus pen and electronic equipment
CN115543700A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Handwriting pen detection method and device and terminal equipment
CN115543106A (en) * 2022-04-06 2022-12-30 荣耀终端有限公司 Adsorption detection system of stylus pen

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120138565A (en) * 2011-06-15 2012-12-26 주식회사 에코메트론 Wireless tablet device and method for locating electronic pen of the same
CN103176217A (en) * 2011-12-26 2013-06-26 索尼公司 Detecting device, detecting system, power transmitting device, noncontact power transmission system, and detecting method
WO2016143000A1 (en) * 2015-03-06 2016-09-15 昭 池谷 Electronic apparatus
CN109004771A (en) * 2018-07-27 2018-12-14 浙江泰米电子科技有限公司 A kind of wireless charger and foreign matter detecting method
CN111313569A (en) * 2018-12-11 2020-06-19 恩智浦美国有限公司 Q factor determination for foreign object detection circuit in wireless charging system
CN111600398A (en) * 2019-02-19 2020-08-28 Lg电子株式会社 Wireless power transmission apparatus and control method thereof
US20210175728A1 (en) * 2019-12-06 2021-06-10 Nxp Usa, Inc Method for determining a quality factor and wireless charger
WO2021159764A1 (en) * 2020-02-12 2021-08-19 华为技术有限公司 Wireless charging circuit, wireless charging method, device, and system
CN111668893A (en) * 2020-05-20 2020-09-15 苏州蓝沛无线通信科技有限公司 Wireless charging control method and wireless charging device
WO2021238598A1 (en) * 2020-05-27 2021-12-02 华为数字能源技术有限公司 Quality factor detection circuit and detection method based on oscillating circuit, and electronic device
CN113972703A (en) * 2020-07-21 2022-01-25 北京小米移动软件有限公司 Wireless charging method, device, terminal and storage medium
CN114006482A (en) * 2020-07-28 2022-02-01 Oppo广东移动通信有限公司 Charging prompting method, device, equipment and storage medium
CN115543700A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Handwriting pen detection method and device and terminal equipment
CN115543106A (en) * 2022-04-06 2022-12-30 荣耀终端有限公司 Adsorption detection system of stylus pen
CN114756142A (en) * 2022-04-12 2022-07-15 荣耀终端有限公司 Handwriting pen, wireless charging method and terminal equipment
CN114827972A (en) * 2022-06-28 2022-07-29 荣耀终端有限公司 Method for establishing connection with stylus pen and electronic equipment

Similar Documents

Publication Publication Date Title
CN113238609B (en) Method and system applied to signal synchronization system, touch pen and electronic equipment
AU2021283000B2 (en) An accessory with a magnetic relay structure for wireless power transfer
CN103576895B (en) Position detecting device and its position indicator
US20130162589A1 (en) Handwriting device with magnetic recharging site
CN107949822B (en) Electronic pen and main body part for electronic pen
WO2016006441A1 (en) Power receiver, power feeder, and electronic device
JP2021096884A (en) Position indicator
US9626009B2 (en) Coordinate indicating device and coordinate measuring device for measuring input coordinates of coordinate indicating device
CN101957706B (en) Electromagnetic handwritten device
CN110377170B (en) Touch stylus and control method thereof
CN115543106B (en) Adsorption detection system of handwriting pen
JP2015188275A (en) Electronic apparatus and control method of the same
CN108123556A (en) Power reception device, wireless charging prompt system, method and apparatus and medium
JP6182131B2 (en) Electronic device and charging method
JP6163133B2 (en) Electronic device and charging notification method in electronic device
CN111373629A (en) Wireless charging alignment detection method and electronic equipment
US20180212447A1 (en) Electronic apparatus, electronic apparatus system, and method of operating electronic apparatus
CN106684962A (en) Wireless charging position calibration method and device
US20220200337A1 (en) Active stylus, electronic device, and wireless power supply system
US11216090B2 (en) Position indicator and coordinate input device
CN117129763A (en) Handwriting pen offset detection method and electronic equipment
US20190319524A1 (en) Power generation element and smart key
CN112953040B (en) Electronic equipment, control method thereof and electronic equipment system
KR20130025668A (en) Charging equipment using pad type electrode contect point
JP6357278B2 (en) Electronic device and charging method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination