CN117129763A - Stylus offset detection method and electronic device - Google Patents
Stylus offset detection method and electronic device Download PDFInfo
- 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
- stylus
- processor
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 45
- 238000001179 sorption measurement Methods 0.000 claims abstract description 145
- 238000004891 communication Methods 0.000 claims description 99
- 239000003990 capacitor Substances 0.000 claims description 60
- 238000000034 method Methods 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 11
- 241001422033 Thestylus Species 0.000 abstract description 251
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 47
- 239000002184 metal Substances 0.000 description 15
- 229910052751 metal Inorganic materials 0.000 description 15
- 230000010355 oscillation Effects 0.000 description 14
- 229910000859 α-Fe Inorganic materials 0.000 description 9
- 230000008569 process Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000012535 impurity Substances 0.000 description 3
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 1
- 230000002238 attenuated effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 229910052760 oxygen Inorganic materials 0.000 description 1
- 239000001301 oxygen Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J50/00—Circuit arrangements or systems for wireless supply or distribution of electric power
- H02J50/90—Circuit arrangements or systems for wireless supply or distribution of electric power involving detection or optimisation of position, e.g. alignment
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R27/00—Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
- G01R27/02—Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
- G01R27/26—Measuring 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/2688—Measuring quality factor or dielectric loss, e.g. loss angle, or power factor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing 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/03545—Pens or stylus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/044—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
- G06F3/0441—Digitisers, 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/044—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
- G06F3/0442—Digitisers, 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
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J50/00—Circuit arrangements or systems for wireless supply or distribution of electric power
- H02J50/10—Circuit 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
本申请公开了一种手写笔偏移检测方法及电子设备,涉及电子技术领域。所述的手写笔偏移检测方法包括:检测电子设备中发射线圈的品质因数,根据发射线圈的品质因数确定是否出现手写笔偏移情况。手写笔偏移情况是指吸附在电子设备上的手写笔的吸附位置相对于预设吸附位置偏移。如此,可以检测手写笔在电子设备上的吸附位置是否偏移。
This application discloses a stylus offset detection method and electronic equipment, and relates to the field of electronic technology. The stylus offset detection method includes: detecting the quality factor of the transmitting coil in the electronic device, and determining whether the stylus offset occurs according to the quality factor of the transmitting coil. The offset of the stylus refers to the deviation of the adsorption position of the stylus adsorbed on the electronic device relative to the preset adsorption position. In this way, it can be detected whether the adsorption position of the stylus on the electronic device has shifted.
Description
技术领域Technical field
本申请涉及电子技术领域,特别涉及一种手写笔偏移检测方法及电子设备。The present application relates to the field of electronic technology, and in particular to a stylus offset detection method and electronic equipment.
背景技术Background technique
诸如平板电脑等能够通过触控方式输入信息的电子设备可以配置有手写笔。用户利用手写笔可以在电子设备上进行文字、图形等信息的输入。相关技术中,手写笔可以通过磁铁吸附在电子设备上。手写笔吸附在电子设备上的正确位置后,电子设备中的发射线圈与手写笔中的接收线圈之间可以进行电能的传输,从而使电子设备对手写笔进行充电。然而,由于用户无法得知发射线圈和接收线圈的具体位置,因此用户将手写笔与电子设备进行吸附时,可能会发生手写笔在电子设备上的吸附位置偏移的情况,这会影响到电子设备对手写笔进行充电。基于此,急需一种手写笔偏移检测方法,以检测手写笔在电子设备上的吸附位置是否发生偏移。Electronic devices capable of inputting information through touch, such as tablet computers, may be equipped with a stylus. Users can use a stylus to input text, graphics and other information on electronic devices. In related technology, a stylus can be attached to an electronic device through a magnet. After the stylus is adsorbed at the correct position on the electronic device, electric energy can be transmitted between the transmitting coil in the electronic device and the receiving coil in the stylus, thereby allowing the electronic device to charge the stylus. However, since the user cannot know the specific positions of the transmitting coil and the receiving coil, when the user attaches the stylus to the electronic device, the adsorption position of the stylus on the electronic device may shift, which will affect the electronic device. The device charges the stylus. Based on this, there is an urgent need for a stylus offset detection method to detect whether the adsorption position of the stylus on the electronic device is offset.
发明内容Contents of the invention
本申请提供了一种手写笔偏移检测方法及电子设备,可以检测手写笔在电子设备上的吸附位置是否偏移。所述技术方案如下:This application provides a stylus offset detection method and an electronic device, which can detect whether the adsorption position of the stylus on the electronic device is offset. The technical solutions are as follows:
第一方面,提供了一种手写笔偏移检测方法。手写笔偏移检测方法应用于电子设备。电子设备包括处理器和发射线圈,处理器与发射线圈连接,以使处理器可以向发射线圈输出电信号。手写笔偏移检测方法包括如下步骤:处理器检测电子设备中发射线圈的品质因数,处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况。其中,手写笔偏移情况是指吸附在电子设备上的手写笔的吸附位置相对于预设吸附位置偏移。In the first aspect, a stylus offset detection method is provided. The stylus offset detection method is applied to electronic devices. The electronic device includes a processor and a transmitting coil, and the processor is connected to the transmitting coil so that the processor can output an electrical signal to the transmitting coil. The stylus offset detection method includes the following steps: the processor detects the quality factor of the transmitting coil in the electronic device, and the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil. The offset of the stylus refers to the deviation of the adsorption position of the stylus adsorbed on the electronic device relative to the preset adsorption position.
在本申请中,处理器可以检测发射线圈的品质因数。由于手写笔出现偏移情况和未出现偏移情况时,发射线圈的品质因数不同,因此,处理器在检测到发射线圈的品质因数后,可以根据发射线圈的品质因数来确定吸附在电子设备上的手写笔是否出现偏移情况。如此,可以检测到手写笔在电子设备上的吸附位置是否偏移。In this application, the processor can detect the quality factor of the transmitting coil. Since the quality factor of the transmitting coil is different when the stylus is deflected and when it is not deflected, the processor can determine whether it is adsorbed on the electronic device based on the quality factor of the transmitting coil after detecting the quality factor of the transmitting coil. Whether the stylus pen is deflected. In this way, it can be detected whether the adsorption position of the stylus on the electronic device has shifted.
下面从两种可能的实现方式,对“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”的过程进行说明。The following describes the process of "the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil" from two possible implementation methods.
在第一种可能的实现方式中,处理器在执行“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”这一步骤时,具体可以是:若发射线圈的品质因数小于或等于第一阈值,则处理器发送通信信号;若处理器在发送通信信号后的预设时长内接收到针对通信信号的反馈信号,则确定出现手写笔偏移情况。若发射线圈的品质因数大于或等于第二阈值,则处理器发送通信信号;若处理器在发送通信信号后的预设时长内接收到针对通信信号的反馈信号,则确定未出现手写笔偏移情况。在本申请实施例中,第二阈值大于第一阈值。In the first possible implementation, when the processor performs the step of "the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil", specifically: if the quality factor of the transmitting coil is less than or equal to First threshold, the processor sends the communication signal; if the processor receives a feedback signal for the communication signal within a preset time period after sending the communication signal, it is determined that the stylus offset occurs. If the quality factor of the transmitting coil is greater than or equal to the second threshold, the processor sends the communication signal; if the processor receives a feedback signal for the communication signal within a preset time period after sending the communication signal, it is determined that no stylus offset occurs. Condition. In this embodiment of the present application, the second threshold is greater than the first threshold.
在一些实施例中,处理器可以周期性检测发射线圈的品质因数。这里的周期可以是1秒或0.5秒。In some embodiments, the processor may periodically detect the quality factor of the transmit coil. The period here can be 1 second or 0.5 seconds.
在这一实施例中,处理器在执行“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”这一步骤之后,还可以用于执行如下步骤:若处理器确定未出现手写笔偏移情况,则停止检测发射线圈的品质因数;控制发射线圈输出电能。In this embodiment, after the processor performs the step of "the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil", it can also be used to perform the following steps: If the processor determines that the stylus does not appear If there is an offset, stop detecting the quality factor of the transmitting coil; control the output power of the transmitting coil.
在第二种可能的实现方式中,处理器在执行“处理器检测电子设备中发射线圈的品质因数”这一步骤之前,还用于执行如下步骤:处理器发送通信信号;若处理器在发送通信信号后的预设时长内接收到针对通信信号的反馈信号,则处理器执行“处理器检测电子设备中发射线圈的品质因数”这一步骤。In the second possible implementation, before the processor performs the step of "the processor detects the quality factor of the transmitting coil in the electronic device", it is also used to perform the following steps: the processor sends the communication signal; if the processor is sending When the feedback signal for the communication signal is received within a preset time period after the communication signal, the processor executes the step of "the processor detects the quality factor of the transmitting coil in the electronic device".
这种情况下,处理器在执行“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”这一步骤时,具体可以是:若发射线圈的品质因数小于或等于第一阈值,则处理器确定出现手写笔偏移情况;若发射线圈的品质因数大于或等于第二阈值,则处理器确定未出现手写笔偏移情况。In this case, when the processor performs the step of "the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil", the specific procedure may be: if the quality factor of the transmitting coil is less than or equal to the first threshold, then The processor determines that the stylus offset occurs; if the quality factor of the transmitting coil is greater than or equal to the second threshold, the processor determines that the stylus offset does not occur.
在一些实施例中,处理器可以周期性发送通信信号。这里的周期可以是1秒或0.5秒。In some embodiments, the processor may send communication signals periodically. The period here can be 1 second or 0.5 seconds.
在这一实施例中,处理器在执行“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”之后,还可以用于执行如下步骤:若处理器确定未出现手写笔偏移情况,则停止发送通信信号;控制发射线圈输出电能。In this embodiment, after the processor performs "the processor determines whether the stylus offset occurs based on the quality factor of the transmitting coil", it can also be used to perform the following steps: if the processor determines that the stylus offset does not occur , then stop sending communication signals; control the transmitting coil to output electric energy.
在一些实施例中,处理器在执行“处理器根据发射线圈的品质因数确定是否出现手写笔偏移情况”这一步骤之后,还可以用于执行如下步骤:若处理器确定出现手写笔偏移情况,则输出提醒信息。提醒信息用于提醒出现手写笔偏移情况。In some embodiments, after the processor performs the step of "the processor determines whether a stylus offset occurs based on the quality factor of the transmitting coil", it can also be used to perform the following steps: if the processor determines that a stylus offset occurs If so, a reminder message will be output. The reminder message is used to remind you of the occurrence of stylus offset.
下面对“处理器检测电子设备中发射线圈的品质因数”的过程进行说明。The process of "the processor detects the quality factor of the transmitting coil in the electronic device" is explained below.
在一些实施例中,电子设备还包括电容,电容的第一极板与发射线圈的第一端连接。这种情况下,处理器在执行“处理器检测电子设备中发射线圈的品质因数”这一步骤时,具体可以是:处理器向电容和发射线圈充电,直至电容和发射线圈均处于稳态;处理器控制电容的第二极板与发射线圈的第二端连接,以使电容的第一极板和发射线圈的第一端之间产生震荡电信号;处理器根据震荡电信号的多个幅值中的第n-1个幅值和第n个幅值,确定发射线圈的品质因数。其中,n为大于或等于2的整数。In some embodiments, the electronic device further includes a capacitor, the first plate of the capacitor is connected to the first end of the transmitting coil. In this case, when the processor performs the step of "the processor detects the quality factor of the transmitting coil in the electronic device", the specific steps may be: the processor charges the capacitor and the transmitting coil until both the capacitor and the transmitting coil are in a steady state; The processor controls the connection between the second plate of the capacitor and the second end of the transmitting coil so that an oscillating electrical signal is generated between the first plate of the capacitor and the first end of the transmitting coil; the processor controls the connection between the first plate of the capacitor and the first end of the transmitting coil; The n-1th amplitude and the nth amplitude in the value determine the quality factor of the transmitting coil. Among them, n is an integer greater than or equal to 2.
具体来说,电子设备中还包括第一开关、第二开关、第三开关。第一开关的第一端用于与电源正极连接,第一开关的第二端与电容的第二极板及第二开关的第一端连接,第三开关的第一端与发射线圈的第二端连接,第二开关的第二端、第三开关的第二端均用于与电源负极连接。这种情况下,处理器在执行“处理器向电容和发射线圈充电”这一步骤时,具体可以是:处理器控制第二开关关断,以及控制第一开关和第三开关导通,以向电容和发射线圈充电。处理器在执行“处理器控制电容的第二极板与发射线圈的第二端连接”这一步骤时,具体可以是:处理器控制第一开关关断,以及控制第二开关和第三开关导通,以使电容的第二极板与发射线圈的第二端连接。Specifically, the electronic device also includes a first switch, a second switch, and a third switch. The first terminal of the first switch is connected to the positive electrode of the power supply, the second terminal of the first switch is connected to the second plate of the capacitor and the first terminal of the second switch, and the first terminal of the third switch is connected to the third terminal of the transmitting coil. Two-terminal connection, the second terminal of the second switch and the second terminal of the third switch are both used to connect to the negative pole of the power supply. In this case, when the processor performs the step of "the processor charges the capacitor and the transmitting coil", the specific steps may be: the processor controls the second switch to turn off, and controls the first switch and the third switch to turn on, so as to Charge the capacitor and transmitter coil. When the processor performs the step of "the processor controls the connection between the second plate of the capacitor and the second end of the transmitting coil", the specific steps may be: the processor controls the first switch to turn off, and controls the second switch and the third switch. Turn on so that the second plate of the capacitor is connected to the second end of the transmitting coil.
在一些实施例中,处理器在执行“处理器根据震荡电信号的多个幅值中的第n-1个幅值和第n个幅值,确定发射线圈的品质因数”这一步骤时,具体可以是:处理器根据第n-1个幅值和第n个幅值,通过如下公式确定发射线圈的品质因数:In some embodiments, when the processor performs the step of "the processor determines the quality factor of the transmitting coil based on the n-1th amplitude and the nth amplitude among the multiple amplitudes of the oscillating electrical signal", Specifically, the processor determines the quality factor of the transmitting coil through the following formula based on the n-1th amplitude and the nth amplitude:
其中,Q为发射线圈的品质因数,F((n-1)T为第n-1个幅值,F(nT)为第n个幅值,π为圆周率,ln( )为以自然常数为底的对数。Among them, Q is the quality factor of the transmitting coil, F((n-1)T is the n-1th amplitude, F(nT) is the nth amplitude, π is the pi ratio, and ln( ) is the natural constant. The logarithm of the base.
第二方面,提供了一种手写笔偏移检测方法,包括如下步骤:处理器检测电子设备中发射线圈的品质因数;若处理器根据发射线圈的品质因数确定出现手写笔偏移情况,则输出提醒信息。提醒信息用于提醒出现手写笔偏移情况。手写笔偏移情况为吸附在电子设备上的手写笔的吸附位置相对于预设吸附位置偏移。In a second aspect, a stylus offset detection method is provided, including the following steps: a processor detects the quality factor of a transmitting coil in an electronic device; if the processor determines that a stylus offset occurs based on the quality factor of the transmitting coil, output Reminder message. The reminder message is used to remind you of the occurrence of stylus offset. The offset of the stylus is when the adsorption position of the stylus adsorbed on the electronic device deviates from the preset adsorption position.
第三方面,提供了一种电子设备,包括发射线圈、存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序。计算机程序被处理器执行时实现如第一方面和第二方面中任意一项的方法。In a third aspect, an electronic device is provided, including a transmitting coil, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the method of any one of the first aspect and the second aspect is implemented.
第四方面,提供了一种电子设备,包括发射线圈、存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序。计算机程序被处理器执行时处理器检测发射线圈的品质因数。In a fourth aspect, an electronic device is provided, including a transmitting coil, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the processor detects the quality factor of the transmitting coil.
上述第二方面、第三方面、第四方面所获得的技术效果与上述第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects obtained by the above-mentioned second aspect, third aspect, and fourth aspect are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be described again here.
附图说明Description of the drawings
图1是本申请实施例提供的一种电子设备和手写笔的应用场景示意图;Figure 1 is a schematic diagram of an application scenario of an electronic device and a stylus provided by an embodiment of the present application;
图2是本申请实施例提供的一种电子设备和手写笔的吸附场景示意图;Figure 2 is a schematic diagram of an adsorption scene of an electronic device and a stylus provided by an embodiment of the present application;
图3是本申请实施例提供的第一种电子设备和手写笔的位置关系示意图;Figure 3 is a schematic diagram of the positional relationship between the first electronic device and the stylus provided by the embodiment of the present application;
图4是本申请实施例提供的第一种电子设备和手写笔的吸附关系示意图;Figure 4 is a schematic diagram of the adsorption relationship between the first electronic device and the stylus provided by the embodiment of the present application;
图5是本申请实施例提供的第二种电子设备和手写笔的位置关系示意图;Figure 5 is a schematic diagram of the positional relationship between the second electronic device and the stylus provided by the embodiment of the present application;
图6是本申请实施例提供的第二种电子设备和手写笔的吸附关系示意图;Figure 6 is a schematic diagram of the adsorption relationship between the second electronic device and the stylus provided by the embodiment of the present application;
图7是本申请实施例提供的第三种电子设备和手写笔的位置关系示意图;Figure 7 is a schematic diagram of the positional relationship between the third electronic device and the stylus provided by the embodiment of the present application;
图8是本申请实施例提供的第三种电子设备和手写笔的吸附关系示意图;Figure 8 is a schematic diagram of the adsorption relationship between the third electronic device and the stylus provided by the embodiment of the present application;
图9是本申请实施例提供的第四种电子设备和手写笔的位置关系示意图;Figure 9 is a schematic diagram of the positional relationship between the fourth electronic device and the stylus provided by the embodiment of the present application;
图10是本申请实施例提供的第四种电子设备和手写笔的吸附关系示意图;Figure 10 is a schematic diagram of the adsorption relationship between the fourth electronic device and the stylus provided by the embodiment of the present application;
图11是本申请实施例提供的第五种电子设备和手写笔的位置关系示意图;Figure 11 is a schematic diagram of the positional relationship between the fifth electronic device and the stylus provided by the embodiment of the present application;
图12是本申请实施例提供的第五种电子设备和手写笔的吸附关系示意图;Figure 12 is a schematic diagram of the adsorption relationship between the fifth electronic device and the stylus provided by the embodiment of the present application;
图13是本申请实施例提供的第六种电子设备和手写笔的位置关系示意图;Figure 13 is a schematic diagram of the positional relationship between the sixth electronic device and the stylus provided by the embodiment of the present application;
图14是本申请实施例提供的第六种电子设备和手写笔的吸附关系示意图;Figure 14 is a schematic diagram of the adsorption relationship between the sixth electronic device and the stylus provided by the embodiment of the present application;
图15是本申请实施例提供的第七种电子设备和手写笔的位置关系示意图;Figure 15 is a schematic diagram of the positional relationship between the seventh electronic device and the stylus provided by the embodiment of the present application;
图16是本申请实施例提供的第七种电子设备和手写笔的吸附关系示意图;Figure 16 is a schematic diagram of the adsorption relationship between the seventh electronic device and the stylus provided by the embodiment of the present application;
图17是本申请实施例提供的第八种电子设备和手写笔的位置关系示意图;Figure 17 is a schematic diagram of the positional relationship between the eighth electronic device and the stylus provided by the embodiment of the present application;
图18是本申请实施例提供的第八种电子设备和手写笔的吸附关系示意图;Figure 18 is a schematic diagram of the adsorption relationship between the eighth electronic device and the stylus provided by the embodiment of the present application;
图19是本申请实施例提供的第九种电子设备和手写笔的位置关系示意图;Figure 19 is a schematic diagram of the positional relationship between the ninth electronic device and the stylus provided by the embodiment of the present application;
图20是本申请实施例提供的第九种电子设备和手写笔的吸附关系示意图;Figure 20 is a schematic diagram of the adsorption relationship between the ninth electronic device and the stylus provided by the embodiment of the present application;
图21是本申请实施例提供的第十种电子设备和手写笔的位置关系示意图;Figure 21 is a schematic diagram of the positional relationship between the tenth electronic device and the stylus provided by the embodiment of the present application;
图22是本申请实施例提供的第十种电子设备和手写笔的吸附关系示意图;Figure 22 is a schematic diagram of the adsorption relationship between the tenth electronic device and the stylus provided by the embodiment of the present application;
图23是本申请实施例提供的第十一种电子设备和手写笔的位置关系示意图;Figure 23 is a schematic diagram of the positional relationship between the eleventh electronic device and the stylus provided by the embodiment of the present application;
图24是本申请实施例提供的第十一种电子设备和手写笔的吸附关系示意图;Figure 24 is a schematic diagram of the adsorption relationship between the eleventh electronic device and the stylus provided by the embodiment of the present application;
图25是本申请实施例提供的第十二种电子设备和手写笔的位置关系示意图;Figure 25 is a schematic diagram of the positional relationship between the twelfth electronic device and the stylus provided by the embodiment of the present application;
图26是本申请实施例提供的第十二种电子设备和手写笔的吸附关系示意图;Figure 26 is a schematic diagram of the adsorption relationship between the twelfth electronic device and the stylus provided by the embodiment of the present application;
图27是本申请实施例提供的第十三种电子设备和手写笔的位置关系示意图;Figure 27 is a schematic diagram of the positional relationship between the thirteenth electronic device and the stylus provided by the embodiment of the present application;
图28是本申请实施例提供的第十三种电子设备和手写笔的吸附关系示意图;Figure 28 is a schematic diagram of the adsorption relationship between the thirteenth electronic device and the stylus provided by the embodiment of the present application;
图29是本申请实施例提供的第十四种电子设备和手写笔的位置关系示意图;Figure 29 is a schematic diagram of the positional relationship between the fourteenth electronic device and the stylus provided by the embodiment of the present application;
图30是本申请实施例提供的第十四种电子设备和手写笔的吸附关系示意图;Figure 30 is a schematic diagram of the adsorption relationship between the fourteenth electronic device and the stylus provided by the embodiment of the present application;
图31是本申请实施例提供的第一种电子设备的模块结构图;Figure 31 is a module structure diagram of the first electronic device provided by the embodiment of the present application;
图32是本申请实施例提供的第一种电子设备的电路结构图;Figure 32 is a circuit structure diagram of the first electronic device provided by the embodiment of the present application;
图33是本申请实施例提供的第二种电子设备的电路结构图;Figure 33 is a circuit structure diagram of the second electronic device provided by the embodiment of the present application;
图34是本申请实施例提供的一种振荡电信号的波形图;Figure 34 is a waveform diagram of an oscillating electrical signal provided by an embodiment of the present application;
图35是本申请实施例提供的一种第三吸附磁铁的结构示意图;Figure 35 is a schematic structural diagram of a third adsorption magnet provided by an embodiment of the present application;
图36是本申请实施例提供的第一种手写笔偏移检测方法的流程图;Figure 36 is a flow chart of the first stylus offset detection method provided by the embodiment of the present application;
图37是本申请实施例提供的一种接触面的位置示意图;Figure 37 is a schematic diagram of the position of a contact surface provided by an embodiment of the present application;
图38是本申请实施例提供的第一种第一提醒信息的示意图;Figure 38 is a schematic diagram of the first reminder information provided by the embodiment of the present application;
图39是本申请实施例提供的第二种第一提醒信息的示意图;Figure 39 is a schematic diagram of the second type of first reminder information provided by the embodiment of the present application;
图40是本申请实施例提供的第二种手写笔偏移检测方法的流程图;Figure 40 is a flow chart of the second stylus offset detection method provided by the embodiment of the present application;
图41是本申请实施例提供的第三种手写笔偏移检测方法的流程图;Figure 41 is a flow chart of the third stylus offset detection method provided by an embodiment of the present application;
图42是本申请实施例提供的第四种手写笔偏移检测方法的流程图;Figure 42 is a flow chart of the fourth stylus offset detection method provided by an embodiment of the present application;
图43是本申请实施例提供的第五种手写笔偏移检测方法的流程图;Figure 43 is a flow chart of the fifth stylus offset detection method provided by the embodiment of the present application;
图44是本申请实施例提供的第二种电子设备的模块结构图。Figure 44 is a module structure diagram of the second electronic device provided by the embodiment of the present application.
其中,各附图标号所代表的含义分别为:Among them, the meanings represented by each drawing symbol are:
10、电子设备;10. Electronic equipment;
102、摄像头;102. Camera;
104、接触面;104. Contact surface;
110、发射线圈;110. Transmitting coil;
122、第一霍尔传感器;122. The first Hall sensor;
124、第二霍尔传感器;124. Second Hall sensor;
130、第一吸附磁铁;130. The first adsorption magnet;
132、第一子磁铁;132. The first sub-magnet;
134、第二子磁铁;134. Second sub-magnet;
140、第二吸附磁铁;140. The second adsorption magnet;
142、第三子磁铁;142. The third sub-magnet;
144、第四子磁铁;144. The fourth sub-magnet;
150、处理器;150. Processor;
152、第一子处理器;152. First sub-processor;
154、第二子处理器;154. Second sub-processor;
160、输出单元;160. Output unit;
170、存储器;170. Memory;
20、手写笔;20. Stylus pen;
202、金属框;202. Metal frame;
210、接收线圈;210. Receiving coil;
220、检测磁铁;220. Detect magnet;
230、第三吸附磁铁;230. The third adsorption magnet;
232、第五子磁铁;232. The fifth sub-magnet;
234、第六子磁铁;234. The sixth sub-magnet;
240、第四吸附磁铁;240. The fourth adsorption magnet;
242、第七子磁铁;242. The seventh sub-magnet;
244、第八子磁铁。244. The eighth magnet.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
应当理解的是,本申请提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,比如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,比如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that "plurality" mentioned in this application means two or more. In the description of this application, unless otherwise stated, "/" means or, for example, A/B can mean A or B; "and/or" in this article is just an association relationship describing related objects, It means that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to facilitate a clear description of the technical solution of the present application, words such as “first” and “second” are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not limit the number and execution order.
在对本申请实施例提供的手写笔偏移检测方法进行详细的解释说明之前,先对手写笔偏移检测方法的应用场景予以说明。Before giving a detailed explanation of the stylus offset detection method provided by the embodiment of the present application, the application scenarios of the stylus offset detection method are first explained.
图1是本申请实施例提供的一种电子设备10和手写笔20的应用场景示意图。如图1所示,诸如平板电脑等能够通过触控方式输入信息的电子设备10可以配置有手写笔20。用户利用手写笔20可以在电子设备10上进行文字、图形等信息的输入。图2是本申请实施例提供的一种电子设备10和手写笔20的吸附场景示意图。如图2所示,手写笔20可以吸附在电子设备10上。Figure 1 is a schematic diagram of an application scenario of an electronic device 10 and a stylus 20 provided by an embodiment of the present application. As shown in FIG. 1 , an electronic device 10 capable of inputting information through touch, such as a tablet computer, may be equipped with a stylus 20 . The user can use the stylus 20 to input text, graphics and other information on the electronic device 10 . FIG. 2 is a schematic diagram of an adsorption scene of an electronic device 10 and a stylus 20 provided by an embodiment of the present application. As shown in FIG. 2 , the stylus pen 20 can be adsorbed on the electronic device 10 .
图3是本申请实施例提供的一种电子设备10和手写笔20的位置关系示意图,图4是本申请实施例提供的一种电子设备10和手写笔20的吸附关系示意图,图4中所示的器件均为图3中区域A内的器件。如图3和图4所示,电子设备10中包括发射线圈110、第一霍尔传感器122、第二霍尔传感器124、第一吸附磁铁130和第二吸附磁铁140。第一吸附磁铁130包括第一子磁铁132和第二子磁铁134。第二吸附磁铁140包括第三子磁铁142和第四子磁铁144。手写笔20中包括接收线圈210、检测磁铁220、第三吸附磁铁230和第四吸附磁铁240。第三吸附磁铁230包括第五子磁铁232和第六子磁铁234。第四吸附磁铁240包括第七子磁铁242和第八子磁铁244。第一吸附磁铁130、第二吸附磁铁140、第三吸附磁铁230和第四吸附磁铁240均采用了海尔贝克阵列(Halbach Array)以增强吸附力。每个吸附磁铁中的两个子磁铁之间还设置有横向磁铁。手写笔20中的检测磁铁220为单独的磁铁。在下述描述中,将第一霍尔传感器122与发射线圈110的相对位置定义为:第一霍尔传感器122位于发射线圈110的左侧。这种情况下,第二霍尔传感器124位于发射线圈110的右侧。同时,在本申请实施例中,为便于理解,文字描述中的“左”与附图中沿纸面方向的方位左是同一方向,文字描述中的“右”与附图中沿纸面方向的方位右是同一方向。Figure 3 is a schematic diagram of the positional relationship between an electronic device 10 and a stylus 20 provided by an embodiment of the present application. Figure 4 is a schematic diagram of an adsorption relationship between an electronic device 10 and a stylus 20 provided by an embodiment of the present application. What is shown in Figure 4 The devices shown are all devices in area A in Figure 3. As shown in FIGS. 3 and 4 , the electronic device 10 includes a transmitting coil 110 , a first Hall sensor 122 , a second Hall sensor 124 , a first adsorption magnet 130 and a second adsorption magnet 140 . The first adsorption magnet 130 includes a first sub-magnet 132 and a second sub-magnet 134 . The second adsorption magnet 140 includes a third sub-magnet 142 and a fourth sub-magnet 144 . The stylus 20 includes a receiving coil 210, a detection magnet 220, a third adsorption magnet 230 and a fourth adsorption magnet 240. The third adsorption magnet 230 includes a fifth sub-magnet 232 and a sixth sub-magnet 234 . The fourth adsorption magnet 240 includes a seventh sub-magnet 242 and an eighth sub-magnet 244 . The first adsorption magnet 130, the second adsorption magnet 140, the third adsorption magnet 230 and the fourth adsorption magnet 240 all adopt Halbach Array to enhance the adsorption force. A transverse magnet is also provided between the two sub-magnets in each adsorption magnet. The detection magnet 220 in the stylus 20 is a separate magnet. In the following description, the relative position of the first Hall sensor 122 and the transmitting coil 110 is defined as: the first Hall sensor 122 is located on the left side of the transmitting coil 110 . In this case, the second Hall sensor 124 is located on the right side of the transmit coil 110 . At the same time, in the embodiments of the present application, to facilitate understanding, the “left” in the text description is the same direction as the direction left along the paper in the drawings, and the “right” in the text description is the direction along the paper in the drawings. The bearing to the right is the same direction.
手写笔20吸附在电子设备10上的正确位置后,电子设备10中的发射线圈110与手写笔20中的接收线圈210之间可以进行电能的传输,从而使电子设备10对手写笔20进行充电。这里的正确位置是指手写笔20吸附在电子设备10上的预设吸附位置。在预设吸附位置,电子设备10和手写笔20的吸附位置未发生偏移。在本申请实施例中,预设吸附位置包括如下两种不同的情况。After the stylus 20 is adsorbed to 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 , thereby allowing the electronic device 10 to charge the stylus 20 . The correct position here refers to the preset adsorption position where the stylus pen 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 do not shift. In the embodiment of the present application, the preset adsorption positions include the following two different situations.
(A)在第一种情况下,如图3和图4所示,当手写笔20的笔尖朝左时,第一子磁铁132和第五子磁铁232相吸附,第二子磁铁134和第六子磁铁234相吸附,第三子磁铁142和第七子磁铁242相吸附,第四子磁铁144和第八子磁铁244相吸附。当电子设备10和手写笔20的吸附关系如图4所示时,发射线圈110和接收线圈210位于相对应的位置,第一霍尔传感器122与检测磁铁220位于相对应的位置。这种情况下,检测磁铁220触发第一霍尔传感器122,此时电子设备10中的发射线圈110输出电能,手写笔20中的接收线圈210可以接收电能,从而使电子设备10对手写笔20进行无线充电。(A) In the first case, as shown in Figures 3 and 4, when the tip of the stylus pen 20 faces left, the first sub-magnet 132 and the fifth sub-magnet 232 are attracted to each other, and the second sub-magnet 134 and the fifth sub-magnet 232 are attracted to each other. The sixth sub-magnet 234 is attracted to each other, the third sub-magnet 142 and the seventh sub-magnet 242 are attracted to each other, and the fourth sub-magnet 144 and the eighth sub-magnet 244 are attracted to each other. When the adsorption relationship between the electronic device 10 and the stylus 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 detection magnet 220 are located at corresponding positions. In this case, the detection magnet 220 triggers the first Hall sensor 122. At this time, the transmitting coil 110 in the electronic device 10 outputs electric energy, and the receiving coil 210 in the stylus 20 can receive the electric energy, so that the electronic device 10 can respond to the stylus 20. for wireless charging.
(B)在第二种情况下,图5是本申请实施例提供的另一种电子设备10和手写笔20的位置关系示意图,其中电子设备10和手写笔20的吸附关系如图6所示。如图5和图6所示,当手写笔20的笔尖朝右时,第一子磁铁132和第八子磁铁244相吸附,第二子磁铁134和第七子磁铁242相吸附,第三子磁铁142和第六子磁铁234相吸附,第四子磁铁144和第五子磁铁232相吸附。当电子设备10和手写笔20的吸附关系如图6所示时,发射线圈110和接收线圈210位于相对应的位置,第二霍尔传感器124与检测磁铁220位于相对应的位置。这种情况下,检测磁铁220触发第二霍尔传感器124,此时电子设备10中的发射线圈110输出电能,手写笔20中的接收线圈210可以接收电能,从而使电子设备10对手写笔20进行无线充电。(B) In the second case, Figure 5 is a schematic diagram of the positional relationship between another electronic device 10 and the stylus 20 provided by the embodiment of the present application. The adsorption relationship between the electronic device 10 and the stylus 20 is as shown in Figure 6 . As shown in FIGS. 5 and 6 , when the tip of the stylus pen 20 faces 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, and the third sub-magnet 132 is attracted to the seventh sub-magnet 242 . The 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 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 detection magnet 220 are located at corresponding positions. In this case, the detection magnet 220 triggers the second Hall sensor 124. At this time, the transmitting coil 110 in the electronic device 10 outputs electric energy, and the receiving coil 210 in the stylus 20 can receive electric energy, so that the electronic device 10 can respond to the stylus 20. for wireless charging.
由于用户无法得知发射线圈110和接收线圈210的具体位置,因此用户在将手写笔20吸附在电子设备10上时,从一般的使用习惯出发会下意识将手写笔20放置在电子设备10中间。然而,如图3和图5所示,由于电子设备10的中间位置设置有摄像头102,因此在电子设备10中发射线圈110、第一吸附磁铁130和第二吸附磁铁140通常设置在靠左(未示出)或靠右的位置。这种情况下,就会发生手写笔20在电子设备10上的吸附位置偏移的情况。另外,即使用户知道应该将手写笔20吸附在电子设备10靠左或靠右的位置,但由于没有明确的位置提示,用户无法准确判断手写笔20的吸附位置,这也容易导致手写笔20在电子设备10上的吸附位置偏移情况的发射。Since the user cannot know the specific positions of the transmitting coil 110 and the receiving coil 210 , when the user attaches the stylus 20 to the electronic device 10 , based on general usage habits, the user will subconsciously place the stylus 20 in the middle of the electronic device 10 . However, as shown in FIGS. 3 and 5 , since the camera 102 is disposed in the middle of the electronic device 10 , the transmitting coil 110 , the first adsorption magnet 130 and the second adsorption magnet 140 are usually disposed on the left ( (not shown) or to the right. In this case, the adsorption position of the stylus pen 20 on the electronic device 10 may shift. In addition, even if the user knows that the stylus pen 20 should be adsorbed to the left or right position of the electronic device 10, since there is no clear position prompt, the user cannot accurately determine the adsorption position of the stylus pen 20, which may easily cause the stylus pen 20 to be placed on the left or right side of the electronic device 10. Emission of the adsorption position deviation on the electronic device 10 .
下面对手写笔20吸附在电子设备10上时可能出现的十二种吸附位置偏移的情况进行说明。Twelve adsorption position deviations that may occur when the stylus 20 is adsorbed on the electronic device 10 will be described below.
(1)在第一种情况下,如图7和图8所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第三子磁铁142和第六子磁铁234。(1) In the first case, as shown in FIGS. 7 and 8 , the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the third sub-magnet 142 and the sixth sub-magnet 234 that attract each other.
(2)在第二种情况下,如图9和图10所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第二子磁铁134和第七子磁铁242。(2) In the second case, as shown in FIGS. 9 and 10 , the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the second sub-magnet 134 and the seventh sub-magnet 242 that attract each other.
(3)在第三种情况下,如图11和图12所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第四子磁铁144和第五子磁铁232。(3) In the third case, as shown in FIGS. 11 and 12 , the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the fourth sub-magnet 144 and the fifth sub-magnet 232 that attract each other.
(4)在第四种情况下,如图13和图14所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第一子磁铁132和第八子磁铁244。(4) In the fourth situation, as shown in Figures 13 and 14, the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the first sub-magnet 132 and the eighth sub-magnet 244 that attract each other.
(5)在第五种情况下,如图15和图16所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第三吸附磁铁230与发射线圈110,以及相吸的第二吸附磁铁140与接收线圈210。(5) In the fifth case, as shown in Figures 15 and 16, the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the mutual attraction of the third adsorption magnet 230 and the transmitting coil 110, as well as the mutual attraction of the third adsorption magnet 230 and the transmitting coil 110. Two adsorption magnets 140 and receiving coils 210.
(6)在第六种情况下,如图17和图18所示,手写笔20的笔尖朝左,吸附力主要来源于相吸的第一吸附磁铁130与接收线圈210,以及相吸的第四吸附磁铁240与发射线圈110。(6) In the sixth case, as shown in Figures 17 and 18, the tip of the stylus pen 20 faces left, and the adsorption force mainly comes from the mutual attraction of the first attraction magnet 130 and the receiving coil 210, and the mutual attraction of the third Four adsorption magnets 240 and transmitting coils 110.
(7)在第七种情况下,如图19和图20所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第二子磁铁134和第六子磁铁234。(7) In the seventh case, as shown in FIGS. 19 and 20 , the tip of the stylus pen 20 faces right, and the adsorption force mainly comes from the second sub-magnet 134 and the sixth sub-magnet 234 that attract each other.
(8)在第八种情况下,如图21和图22所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第三子磁铁142和第七子磁铁242。(8) In the eighth case, as shown in Figures 21 and 22, the tip of the stylus pen 20 faces right, and the adsorption force mainly comes from the third sub-magnet 142 and the seventh sub-magnet 242 that attract each other.
(9)在第九种情况下,如图23和图24所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第一子磁铁132和第五子磁铁232。(9) In the ninth case, as shown in Figures 23 and 24, the tip of the stylus pen 20 faces right, and the adsorption force mainly comes from the first sub-magnet 132 and the fifth sub-magnet 232 that attract each other.
(10)在第十种情况下,如图25和图26所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第四子磁铁144和第八子磁铁244。(10) In the tenth case, as shown in Figures 25 and 26, the tip of the stylus pen 20 faces right, and the adsorption force mainly comes from the fourth sub-magnet 144 and the eighth sub-magnet 244 that attract each other.
(11)在第十一种情况下,如图27和图28所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第一吸附磁铁130与接收线圈210,以及相吸的第三吸附磁铁230与发射线圈110。(11) In the eleventh case, as shown in Figures 27 and 28, the tip of the stylus pen 20 is facing right, and the adsorption force mainly comes from the mutual attraction of the first adsorption magnet 130 and the receiving coil 210, and the mutual attraction of the first adsorption magnet 130 and the receiving coil 210. The third adsorption magnet 230 and the transmitting coil 110.
(12)在第十二种情况下,如图29和图30所示,手写笔20的笔尖朝右,吸附力主要来源于相吸的第四吸附磁铁240与发射线圈110,以及相吸的第二吸附磁铁140与接收线圈210。(12) In the twelfth case, as shown in Figures 29 and 30, the tip of the stylus pen 20 is facing to the right, and the adsorption force mainly comes from the attracting fourth adsorbing magnet 240 and the transmitting coil 110, as well as the attracting The second adsorption magnet 140 and the receiving coil 210.
参见图7至图30可知,当手写笔20在电子设备10上的吸附位置偏移时,发射线圈110和接收线圈210不处于相对应的位置,这会影响到电子设备10对手写笔20进行充电。基于此,本申请提供了一种手写笔20偏移检测方法和电子设备10,可以检测手写笔20在电子设备10上的吸附位置是否发生偏移。Referring to FIGS. 7 to 30 , it can be seen that when the adsorption position of the stylus 20 on the electronic device 10 is shifted, the transmitting coil 110 and the receiving coil 210 are not in corresponding positions, which will affect the electronic device 10's operation of the stylus 20 . Charge. Based on this, the present application provides a method for detecting the 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.
可以理解的是,在上述实施例中,仅示出了吸附磁铁为三段式结构(例如第一吸附磁铁130包括第一子磁铁132和第二子磁铁134及横向磁铁)的情况。在其他一些实施例中,吸附磁铁也可以采用五段式结构,即每个吸附磁铁均包括三个子磁铁和穿插于三个子磁铁之间的两个横向磁铁。另外,吸附磁铁中的南(south,S)极和北(north,N)极也可以全部颠倒设置,而不影响吸附磁铁的功能。It can be understood that in the above embodiments, only the case where the adsorption magnet has a three-section structure (for example, the first adsorption magnet 130 includes the first sub-magnet 132 and the second sub-magnet 134 and a transverse magnet) is shown. In some other embodiments, the adsorption magnet may also adopt a five-segment structure, that is, each adsorption magnet includes three sub-magnets and two transverse magnets interspersed between the three sub-magnets. In addition, the south (S) pole and the north (north, N) pole of the adsorption magnet can also be arranged upside down without affecting the function of the adsorption magnet.
在本申请实施例中,对预设吸附位置中的两种情况和上述吸附位置偏移中的十二种情况下,电子设备10与手写笔20之间的吸附力大小进行仿真分析,仿真结果如下表1所示。表1中吸附力大小的单位为牛顿(N)。In the embodiment of the present application, a simulation analysis is performed on the adsorption force between the electronic device 10 and the stylus 20 in two cases of the preset adsorption positions and twelve cases of the above-mentioned adsorption position deviations. The simulation results As shown in Table 1 below. The unit of adsorption force in Table 1 is Newton (N).
表1Table 1
根据表1可知,当电子设备10和手写笔20的吸附位置未发生偏移时,电子设备10与手写笔20之间的吸附力最大,且远大于吸附位置偏移的十二种情况,为1.9178N。对于不同笔尖朝向但实质吸附关系相同的两种情况,如情况(1)和(7)、情况(2)和(8)……情况(6)和(12),电子设备10与手写笔20之间的吸附力也相同。不同情况之间吸附力大小的差别还受检测磁铁220的影响。According to Table 1, it can be seen that when the adsorption positions of the electronic device 10 and the stylus pen 20 do not shift, the adsorption force between the electronic device 10 and the stylus pen 20 is the largest, and is much greater than the twelve cases where the adsorption positions shift, as 1.9178N. For two cases with different pen tip orientations but the same substantial adsorption relationship, such as cases (1) and (7), cases (2) and (8)... cases (6) and (12), the electronic device 10 and the stylus 20 The adsorption force between them is also the same. The difference in adsorption force between different situations is also affected by the detection magnet 220.
根据表1可知,当电子设备10和手写笔20的吸附位置偏移时,电子设备10与手写笔20之间也具有吸附力。其中,在情况(3)、(4)、(9)、(10)这四种情况下,由于电子设备10和手写笔20的吸附位置偏移最为严重,电子设备10与手写笔20之间的吸附力也较小,因此用户可以明显感知到手写笔20在电子设备10上的吸附位置发生偏移。基于此,本申请实施例提供的手写笔20偏移检测方法主要针对情况(1)、(2)、(5)、(6)、(7)、(8)、(11)、(12)这八种情况进行吸附位置偏移检测。According to Table 1, it can be seen that when the adsorption positions of the electronic device 10 and the stylus pen 20 are offset, there is also an adsorption force between the electronic device 10 and the stylus pen 20. Among them, in the four cases (3), (4), (9), and (10), since the adsorption position deviation of the electronic device 10 and the stylus 20 is the most serious, the gap between the electronic device 10 and the stylus 20 The adsorption force is also small, so the user can clearly feel that the adsorption position of the stylus 20 on the electronic device 10 has shifted. Based on this, the stylus 20 offset detection method provided by the embodiment of the present application is mainly aimed at situations (1), (2), (5), (6), (7), (8), (11), (12) These eight situations carry out adsorption position shift detection.
首先对本申请实施例提供的手写笔20偏移检测方法所应用的电子设备10的电学结构进行说明。在本申请实施例中,两个电子器件之间的连接均为电连接,这里的电连接是指这两个电子器件之间通过连接以进行电信号的传输。两个电子器件之间的电连接可以是通过导线直接连接,也可以是通过其他电子器件间接连接。First, the electrical structure of the electronic device 10 to which the stylus 20 offset detection method provided by the embodiment of the present application is applied will be described. In the embodiment of the present application, the connection between the two electronic devices is an electrical connection. The electrical connection here refers to the connection between the two electronic devices for the transmission of electrical signals. The electrical connection between two electronic devices may be directly connected through wires or indirectly connected through other electronic devices.
图31是本申请实施例提供的一种电子设备10的模块结构图。如图31所示,电子设备10中的电子器件可以包括发射线圈110和处理器150。Figure 31 is a module structure diagram of an electronic device 10 provided by an embodiment of the present application. As shown in FIG. 31 , the electronic device in the electronic device 10 may include a transmitting coil 110 and a processor 150 .
发射线圈110可以包括铁氧体和缠绕在铁氧体上的金属导线。电子设备10可以通过发射线圈110输出电信号,从而对手写笔20进行充电或/和与手写笔20进行通信。处理器150与发射线圈110连接,以使处理器150可以向发射线圈110输出电信号,且可以检测发射线圈110中的电信号。The transmitting coil 110 may include a ferrite and a metal wire wound around the ferrite. The electronic device 10 may output electrical signals through the transmitting coil 110 to charge the stylus 20 and/or communicate with the stylus 20 . The processor 150 is connected to the transmitting coil 110 so 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 .
可以理解的是,在本申请实施例中,处理器150是指具有处理功能的集成电路,并不限定处理器150必须是封装形成的一个芯片。例如,图32是本申请实施例提供的一种电子设备10的电路结构图。如图32所示,在一些实施例中,处理器150可以包括相连接的第一子处理器152和第二子处理器154。其中,第一子处理器152可以与第一开关Q1、第二开关Q2、第三开关Q3、第四开关Q4封装在一起,形成电子设备10内的发射(transport,TX)芯片。第二子处理器154可以是电子设备10内的系统级芯片(system on chip,SOC)。SOC包括中央处理器150(central processing unit,CPU)、图形处理器150(graphics processing unit,GPU)、基带等。图32所示的实施例不用于限定各电子器件的位置。It can be understood that in the embodiment of the present application, the processor 150 refers to an integrated circuit with a processing function, and it is not limited to the fact that the processor 150 must be a packaged chip. For example, FIG. 32 is a circuit structure diagram of an electronic device 10 provided by an embodiment of the present application. As shown in Figure 32, in some embodiments, the processor 150 may include a first sub-processor 152 and a second sub-processor 154 that are 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 (transport, TX) chip in 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 processing unit (CPU), a graphics processing unit (GPU), a baseband, and the like. The embodiment shown in FIG. 32 is not used to limit the position of each electronic device.
在一些实施例中,如图32所示,电子设备10中还包括电容C。电容C的第一极板与发射线圈110的第一端连接,且发射线圈110的第一端与第一子处理器152连接。第一开关Q1、第二开关Q2、第三开关Q3、第四开关Q4均为三端开关器件,即第一开关Q1、第二开关Q2、第三开关Q3、第四开关Q4均具有第一端、第二端和控制端。第一开关Q1的第一端、第四开关Q4的第一端均用于与电源正极连接,第一开关Q1的第二端与电容C的第二极板及第二开关Q2的第一端连接。第四开关Q4的第二端、第三开关Q3的第一端均与发射线圈110的第二端连接,第二开关Q2的第二端、第三开关Q3的第二端均用于与电源负极连接。在图32所示的实施例中,电源正极用符号“+”表示,电源负极用符号“-”表示。第一子处理器152还可以与第一开关Q1、第二开关Q2、第三开关Q3和第四开关Q4的控制端连接(图中未示出连接关系),以控制第一开关Q1、第二开关Q2、第三开关Q3、第四开关Q4的导通与关断。In some embodiments, as shown in FIG. 32 , the electronic device 10 further includes a capacitor C. The first plate of the capacitor C is connected to the first end of the transmitting coil 110 , and the first end of the transmitting 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, that is, the first switch Q1, the second switch Q2, the third switch Q3, and the fourth switch Q4 all have a first end, second end and control end. The first terminal of the first switch Q1 and the first terminal of the fourth switch Q4 are both used to connect to the positive electrode of the power supply. The second terminal of the first switch Q1 is connected to the second plate of the capacitor C and the first terminal of the second switch Q2. connect. 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. The second end of the second switch Q2 and the second end of the third switch Q3 are both used to connect to the power supply. Negative connection. In the embodiment shown in Figure 32, the positive pole of the power supply is represented by the symbol "+", and the negative pole of the power supply is represented by the symbol "-". The first sub-processor 152 may also be connected to the control terminals of the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4 (the connection relationship is not shown in the figure) to control the first switch Q1, the third switch Q1, the third switch Q3 and the fourth switch Q4. The second switch Q2, the third switch Q3, and the fourth switch Q4 are turned on and off.
在一些实施例中,如图33所示,电子设备10中还包括输出单元160。输出单元160是电子设备10中可以向用户输出信息的器件。例如,输出单元160可以是电子设备10中的显示屏或喇叭。输出单元160可以与处理器150中的第二子处理器154连接,以使第二子处理器154可以控制输出单元160工作。也就是说,当输出单元160是显示屏时,第二子处理器154可以控制显示屏显示文字信息或图像信息。当输出单元160是喇叭时,第二子处理器154可以控制喇叭发出声音。In some embodiments, as shown in FIG. 33 , the electronic device 10 further includes an output unit 160 . The output unit 160 is a device in the electronic device 10 that can output information to the user. For example, the output unit 160 may be a display screen or a speaker in the electronic device 10 . The output unit 160 can be connected with the second sub-processor 154 in the processor 150, so that the second sub-processor 154 can control the operation of the output unit 160. That is to say, when the output unit 160 is a display screen, the second sub-processor 154 can control the display screen to display text information or image information. When the output unit 160 is a speaker, the second sub-processor 154 can control the speaker to emit sound.
下面对本申请实施例提供的手写笔20偏移检测方法的原理进行说明。在本申请实施例中,手写笔20偏移检测方法的原理为:根据发射线圈110的品质因数确定手写笔20在电子设备10上的吸附位置是否偏移。该原理具体可以包括“确定发射线圈110的品质因数的过程”和“发射线圈110的品质因数与手写笔20在电子设备10上的吸附位置的关系”这两个部分。The principle of the stylus pen 20 offset detection method provided by the embodiment of the present application will be described below. In the embodiment of the present application, the principle of the stylus pen 20 offset detection method is to determine whether the adsorption position of the stylus pen 20 on the electronic device 10 is offset based on the quality factor of the transmitting coil 110 . This principle may specifically include two parts: "the process of determining the quality factor of the transmitting coil 110" and "the relationship between the quality factor of the transmitting coil 110 and the adsorption position of the stylus 20 on the electronic device 10".
(1)确定发射线圈110的品质因数的过程。(1) The process of determining the quality factor of the transmitting coil 110.
处理器150与发射线圈110连接,以使处理器150可以检测发射线圈110中的电信号。在本申请实施例中,处理器150可以通过检测发射线圈110中的电信号来检测发射线圈110的品质因数。以图32所示的电子设备10的电路结构为例,则有:第一子处理器152可以通过检测发射线圈110中的电信号来检测发射线圈110的品质因数。The processor 150 is connected to the transmitting coil 110 so that the processor 150 can detect the electrical signal in the transmitting coil 110 . In this embodiment of the present application, the processor 150 can detect the quality factor of the transmitting coil 110 by detecting the electrical signal in the transmitting coil 110 . Taking the circuit structure of the electronic device 10 shown in FIG. 32 as an example, the first sub-processor 152 can detect the quality factor of the transmitting coil 110 by detecting the electrical signal in the transmitting coil 110 .
具体来说,第一子处理器152工作时,可以控制第二开关Q2和第四开关Q4关断,第一开关Q1和第三开关Q3导通。此时,可以形成从电源正极出发,经第一开关Q1、电容C、发射线圈110和第三开关Q3回到电源负极的通路,从而对电容C和发射线圈110进行充电。Specifically, when the first sub-processor 152 is working, it can control the second switch Q2 and the fourth switch Q4 to be turned off, and the first switch Q1 and the third switch Q3 to be turned on. At this time, a path can be formed starting from the positive electrode of the power supply and returning to the negative electrode of the power supply through the first switch Q1, capacitor C, transmitting coil 110 and third switch Q3, thereby charging the capacitor C and the transmitting coil 110.
当电容C和发射线圈110充满电时,达到稳态,此时电容C和发射线圈110无法继续充电。这种情况下,第一子处理器152可以控制第一开关Q1和第四开关Q4关断,第二开关Q2和第三开关Q3导通,从而使电容C的第二极板通过第二开关Q2、第三开关Q3与发射线圈110的第二端连接。此时,电容C、发射线圈110、第二开关Q2和第三开关Q3形成的回路中会有振荡电信号的产生。由于电容C具有等效串联电阻,导线也具有电阻,且电子设备10、手写笔20中靠近发射线圈110的金属也会产生涡流损耗,因此在电容C、发射线圈110、第二开关Q2和第三开关Q3形成的回路中也具有阻抗的存在。也就是说,电容C、发射线圈110、第二开关Q2和第三开关Q3形成的回路为电感电容阻抗(LCR)振荡电路。基于此,振荡电信号会呈现逐渐衰减的波形,如图34所示。在图34中,横坐标的单位是“×10-4秒”,纵坐标的单位是伏特(V)。When the capacitor C and the transmitting coil 110 are fully charged, a steady state is reached. At this time, the capacitor C and the transmitting coil 110 cannot continue to charge. In this case, the first sub-processor 152 can control the first switch Q1 and the fourth switch Q4 to turn off, and the second switch Q2 and the third switch Q3 to turn on, so that the second plate of the capacitor C passes through the second switch. Q2 and the third switch Q3 are connected to the second end of the transmitting coil 110 . At this time, an oscillating electrical signal will be generated in the 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 wire also has resistance, and the metal in the electronic device 10 and the stylus 20 close to the transmitting coil 110 will also produce eddy current losses, therefore, between the capacitor C, the transmitting coil 110, the second switch Q2 and the third There is also impedance in the loop formed by the three switches Q3. That is to say, the loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3 is an inductor capacitor impedance (LCR) oscillation circuit. Based on this, the oscillating electrical signal will show a gradually attenuating waveform, as shown in Figure 34. In Figure 34, the unit of the abscissa is "×10 -4 seconds" and the unit of the ordinate is volt (V).
根据图34可知,逐渐衰减的振荡电信号具有多个幅值。第一子处理器152可以通过检测振荡电信号,并根据振荡电信号的多个幅值中的第n-1个幅值和第n个幅值来确定发射线圈110的品质因数。这里的n为大于或等于2的整数。According to Figure 34, it can be seen that the gradually attenuated oscillating electrical signal has multiple amplitudes. The first sub-processor 152 may detect the oscillating electrical signal and determine the quality factor of the transmitting coil 110 according to the n-1th amplitude and the nth amplitude among the plurality of amplitudes of the oscillating electrical signal. n here is an integer greater than or equal to 2.
具体来说,第一子处理器152在得到振荡电信号的多个幅值中的第n-1个幅值和第n个幅值后,可以通过如下公式得到第n-1个幅值和第n个幅值之比,即:Specifically, after obtaining the n-1th amplitude and the n-th amplitude among the multiple amplitudes of the oscillating electrical signal, the first sub-processor 152 can obtain the n-1th amplitude and the n-th amplitude through the following formula: The ratio of the nth amplitude, that is:
其中,F((n-1)T)为第n-1个幅值,F(nT)为第n个幅值,S为第n-1个幅值和第n个幅值之比,e为自然常数,ξ为电导率,ω0为振荡角频率,T为振荡周期。Among them, F((n-1)T) is the n-1th amplitude, F(nT) is the nth amplitude, S is the ratio of the n-1th amplitude to the nth amplitude, e is the natural constant, ξ is the conductivity, ω 0 is the oscillation angular frequency, and T is the oscillation period.
在LCR振荡电路中,有如下公式:In the LCR oscillation circuit, there is the following formula:
其中,R为LCR振荡电路的阻抗值,C为LCR振荡电路的电容C值,L为LCR振荡电路的电感值,π为圆周率,ω为振荡频率。Among them, R is the impedance value of the LCR oscillation circuit, C is the capacitance C value of the LCR oscillation circuit, L is the inductance value of the LCR oscillation circuit, π is the pi ratio, and ω is the oscillation frequency.
结合公式①和公式②可得:Combining formula ① and formula ② can be obtained:
其中,ln( )为以自然常数为底的对数。Among them, ln( ) is the logarithm with the natural constant as the base.
在LCR振荡电路中,发射线圈110(即电感)的品质因数Q为:In the LCR oscillation circuit, the quality factor Q of the transmitting coil 110 (ie, the inductor) is:
结合公式③和公式④可得:Combining formula ③ and formula ④ can be obtained:
对公式⑤进行变形即可得到:By deforming formula ⑤, you can get:
如此,第一子处理器152在得到振荡电信号的多个幅值中的第n-1个幅值和第n个幅值后,可以通过公式①和公式⑥确定发射线圈110的品质因数。In this way, after obtaining the n-1th amplitude and the nth amplitude among the multiple amplitudes of the oscillating electrical signal, the first sub-processor 152 can determine the quality factor of the transmitting coil 110 through formula ① and formula ⑥.
(2)发射线圈110的品质因数与手写笔20在电子设备10上的吸附位置的关系。(2) The relationship between the quality factor of the transmitting coil 110 and the adsorption position of the stylus 20 on the electronic device 10 .
根据上述公式④可知,在电子设备10中,发射线圈110的品质因数仅与发射线圈110所在的LCR振荡电路的电感值和阻抗值有关。而在手写笔20与电子设备10吸附时,若手写笔20吸附在电子设备10上的预设吸附位置,即情况(A)和情况(B)发生时,LCR振荡电路的电感值会增大,从而使发射线圈110的品质因数增大。反之,在手写笔20与电子设备10吸附时,若手写笔20的吸附位置偏移,即情况(1)、(2)、(5)、(6)、(7)、(8)、(11)、(12)发生时,LCR振荡电路的阻抗值会增大,从而使发射线圈110的品质因数减小。According to the above formula ④, it can be seen that in the electronic device 10, the quality factor of the transmitting coil 110 is only related to the inductance value and impedance value of the LCR oscillation circuit where the transmitting coil 110 is located. When the stylus pen 20 is adsorbed to the electronic device 10, if the stylus pen 20 is adsorbed at the preset adsorption position on the electronic device 10, that is, when situations (A) and (B) occur, the inductance value of the LCR oscillation circuit will increase. , thereby increasing the quality factor of the transmitting coil 110. On the contrary, when the stylus pen 20 is adsorbed to the electronic device 10, if the adsorption position of the stylus pen 20 is offset, that is, situations (1), (2), (5), (6), (7), (8), ( When 11) and (12) occur, the impedance value of the LCR oscillation circuit will increase, thereby reducing the quality factor of the transmitting coil 110.
具体来说,当手写笔20吸附在电子设备10上的预设吸附位置时,即情况(A)和情况(B)发生时,如图4和图6所示,此时接收线圈210和发射线圈110处于相对应的位置。由于接收线圈210和发射线圈110均为缠绕在铁氧体上的金属导线,因此在发射线圈110和接收线圈210处于相对应的位置时,会使发射线圈110的电感值增大,即LCR振荡电路的电感值会增大,从而使发射线圈110的品质因数增大。Specifically, when the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10, that is, when situations (A) and (B) occur, as shown in Figures 4 and 6, at this time the receiving coil 210 and the transmitting The coil 110 is in a corresponding position. Since the receiving coil 210 and the transmitting coil 110 are both metal wires wound around ferrite, when the transmitting coil 110 and the receiving coil 210 are in corresponding positions, the inductance value of the transmitting coil 110 will increase, that is, LCR oscillation The inductance value of the circuit will increase, thereby increasing the quality factor of the transmitting coil 110.
当手写笔20在电子设备10上的吸附位置偏移时,即情况(1)、(2)、(5)、(6)、(7)、(8)、(11)、(12)发生时,参见附图可知,此时接收线圈210和发射线圈110远离,手写笔20中的吸附磁铁则靠近发射线圈110。图35是本申请实施例提供的一种第三吸附磁铁230的结构示意图,第一吸附磁铁130、第二吸附磁铁140、第四吸附磁铁240的结构与第三吸附磁铁230的结构相同。如图35所示,采用海尔贝克阵列的吸附磁铁需要金属框202作为磁铁的容纳支撑结构。另外,吸附磁铁本身也具有金属,因此,手写笔20中的吸附磁铁则靠近发射线圈110时,会有涡流效应的产生,此时靠近发射线圈110的金属框202和吸附磁铁中的金属都会吸收能量,这表现为LCR振荡电路的阻抗值增大,从而使发射线圈110的品质因数减小。When the adsorption position of the stylus 20 on the electronic device 10 is shifted, situations (1), (2), (5), (6), (7), (8), (11), and (12) occur. , as can be seen from the drawings, the receiving coil 210 and the transmitting coil 110 are far away from each other at this time, and the adsorption magnet in the stylus 20 is close to the transmitting coil 110 . FIG. 35 is a schematic structural diagram of a third adsorption magnet 230 provided by an embodiment of the present application. The structures of the first adsorption magnet 130 , the second adsorption magnet 140 , and the fourth adsorption magnet 240 are the same as the structure of the third adsorption magnet 230 . As shown in Figure 35, the adsorption magnet using the Halbach array requires a metal frame 202 as a supporting structure for containing the magnet. In addition, the adsorption magnet itself also contains metal. Therefore, when the adsorption magnet in the stylus 20 is close to the transmitting coil 110, an eddy current effect will occur. At this time, the metal frame 202 close to the transmitting coil 110 and the metal in the adsorption magnet will absorb Energy, which is manifested as an increase in the impedance value of the LCR oscillation circuit, thereby reducing the quality factor of the transmitting coil 110.
基于此,可以根据发射线圈110的品质因数确定是否出现手写笔20偏移情况。具体来说,第一子处理器152中可以预设有第一阈值和第二阈值。第一阈值小于第二阈值。另外,第一阈值和第二阈值的设置还需要满足如下条件:当手写笔20吸附在电子设备10上的预设吸附位置时,即情况(A)和情况(B)发生时,第二阈值小于或等于发射线圈110的品质因数;当手写笔20在电子设备10上的吸附位置偏移时,即情况(1)、(2)、(5)、(6)、(7)、(8)、(11)、(12)发生时,第一阈值大于或等于发射线圈110的品质因数;当电子设备10未与手写笔20相吸附,且电子设备10也未与其他金属杂物、铁氧体杂物吸附时,发射线圈110的品质因数大于第一阈值且小于第二阈值。Based on this, it can be determined according to the quality factor of the transmitting coil 110 whether the stylus 20 is deflected. Specifically, the first threshold and the second threshold may be preset in the first sub-processor 152 . The first threshold is less than the second threshold. In addition, the settings of the first threshold and the second threshold also need to meet the following conditions: when the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10 , that is, when situations (A) and (B) occur, the second threshold Less than or equal to the quality factor of the transmitting coil 110; when the adsorption position of the stylus 20 on the electronic device 10 is offset, that is, situations (1), (2), (5), (6), (7), (8) ), (11), and (12) occur, the first threshold is greater than or equal to the quality factor of the transmitting coil 110; when the electronic device 10 is not attracted to the stylus 20, and the electronic device 10 is not attracted to other metal debris, iron When oxygen impurities are adsorbed, the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold.
这种情况下,若手写笔20吸附在电子设备10上,且第一子处理器152检测到发射线圈110的品质因数大于或等于第二阈值,即可确定手写笔20吸附在电子设备10上的预设吸附位置,即未出现手写笔20偏移情况。反之,若手写笔20吸附在电子设备10上,且第一子处理器152检测到发射线圈110的品质因数小于或等于第一阈值,即可确定手写笔20的吸附位置发生偏移。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 on the electronic device 10 The preset adsorption position, that is, there is no offset of the stylus 20. On the contrary, 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 can be determined that the adsorption position of the stylus 20 has shifted.
基于上述原理,本申请实施例提供一种手写笔20偏移检测方法,应用于图31、图32或图33所示的电子设备10。图36是本申请实施例提供的一种手写笔20偏移检测方法的流程图。如图36所示,手写笔20偏移检测方法包括如下步骤S100和S200。Based on the above principles, embodiments of the present application provide a stylus 20 offset detection method, which is applied to the electronic device 10 shown in Figure 31, Figure 32 or Figure 33. Figure 36 is a flow chart of a method for detecting the offset of the stylus 20 provided by an embodiment of the present application. As shown in Figure 36, the stylus 20 offset detection method includes the following steps S100 and S200.
S100,处理器150检测电子设备10中发射线圈110的品质因数。S100, the processor 150 detects the quality factor of the transmitting coil 110 in the electronic device 10.
步骤S100具体实施时,可以应用于如图32或图33所示的电子设备10。这种情况下,步骤S100具体可以包括如下步骤S110至S130。When step S100 is specifically implemented, it can be applied to the electronic device 10 as shown in Figure 32 or Figure 33. In this case, step S100 may specifically include the following steps S110 to S130.
S110,处理器150向电容C和发射线圈110充电,直至电容C和发射线圈110均处于稳态。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 a steady state.
具体来说,处理器150可以控制第二开关Q2和第四开关Q4关断,以及控制第一开关Q1和第三开关Q3导通,从而向电容C和发射线圈110充电。在本申请实施例中,处理器150中可以设定有第一预设时长。第一预设时长应大于或等于电容C及发射线圈110充满电所需要的时长。如此,处理器150在执行步骤S110时,具体可以是:处理器150在第一预设时长内控制第二开关Q2和第四开关Q4关断,以及控制第一开关Q1和第三开关Q3导通,从而向电容C和发射线圈110充电,以使电容C和发射线圈110均处于稳态。Specifically, the processor 150 can control the second switch Q2 and the fourth switch Q4 to turn off, and control the first switch Q1 and the third switch Q3 to turn on, thereby charging the capacitor C and the transmitting coil 110 . In this embodiment of the present application, a first preset duration may be set in the processor 150 . The first preset time period should be greater than or equal to the time required for the capacitor C and the transmitting coil 110 to be fully charged. In this way, when the processor 150 performs step S110, specifically, the processor 150 controls the second switch Q2 and the fourth switch Q4 to turn off, and controls the first switch Q1 and the third switch Q3 to turn off within the first preset time period. pass, 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,处理器150控制电容C的第二极板与发射线圈110的第二端连接,以使电容C的第一极板和发射线圈110的第一端之间产生振荡电信号。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 .
具体来说,处理器150可以控制第一开关Q1和第四开关Q4关断,第二开关Q2和第三开关Q3导通,从而使电容C的第二极板与发射线圈110的第二端连接。此时,电容C、发射线圈110、第二开关Q2和第三开关Q3形成的回路中会有振荡电信号的产生,也即电容C的第一极板和发射线圈110的第一端之间产生振荡电信号。Specifically, the processor 150 can control the first switch Q1 and the fourth switch Q4 to turn off, and the second switch Q2 and the third switch Q3 to turn on, so that the second plate of the capacitor C is connected to the second end of the transmitting coil 110 connect. At this time, an oscillating electrical signal will be generated in the loop formed by the capacitor C, the transmitting coil 110, the second switch Q2 and the third switch Q3, that is, between the first plate of the capacitor C and the first end of the transmitting coil 110 Produce oscillating electrical signals.
S130,处理器150根据振荡电信号的多个幅值中的第n-1个幅值和第n个幅值,确定发射线圈110的品质因数。S130, the processor 150 determines the quality factor of the transmitting coil 110 based on the n-1th amplitude and the nth amplitude among the multiple amplitudes of the oscillating electrical signal.
电容C的第一极板和发射线圈110的第一端之间产生振荡电信号时,与发射线圈110的第一端连接的处理器150即可检测该振荡电信号,并根据振荡电信号的多个幅值中的第n-1个幅值和第n个幅值,通过公式①和公式⑥确定发射线圈110的品质因数。When an oscillating electrical 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 can detect the oscillating electrical signal, and detect the oscillating electrical signal according to the The n-1th amplitude and the n-th amplitude among the plurality of amplitudes are used to determine the quality factor of the transmitting coil 110 through formula ① and formula ⑥.
S200,处理器150根据发射线圈110的品质因数确定是否出现手写笔20偏移情况。S200, the processor 150 determines whether the stylus 20 is deflected according to the quality factor of the transmitting coil 110.
处理器150在执行步骤S100后可以得到发射线圈110的品质因数。这种情况下,若吸附在电子设备10上的设备为手写笔20,则处理器150可以根据发射线圈110的品质因数确定是否出现手写笔20偏移情况。具体为:若发射线圈110的品质因数小于或等于第一阈值,则表明出现手写笔20偏移情况;若发射线圈110的品质因数大于或等于第二阈值,则表明未出现手写笔20偏移情况。如此,可以检测到手写笔20在电子设备10上的吸附位置是否偏移。The processor 150 can obtain the quality factor of the transmitting coil 110 after executing step S100. In this case, if the device adsorbed on the electronic device 10 is the stylus 20 , the processor 150 can determine whether the stylus 20 is deflected based on the quality factor of the transmitting coil 110 . Specifically: if the quality factor of the transmitting coil 110 is less than or equal to the first threshold, it indicates that the stylus 20 has drifted; if the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, it indicates that the stylus 20 has not drifted. Condition. In this way, it can be detected whether the adsorption position of the stylus 20 on the electronic device 10 is shifted.
在一些实施例中,由于除手写笔20之外的其他金属导体或铁氧体靠近电子设备10的发射线圈110时,也会引起发射线圈110的品质因数发生变化,因此,处理器150还需要确定吸附在电子设备10上的设备是否为手写笔20。在第一种可能的实现方式中,处理器150可以在执行步骤S200的过程中确定吸附在电子设备10上的设备是否为手写笔20。在第二种可能的实现方式中,处理器150可以在执行步骤S200之前确定吸附在电子设备10上的设备是否为手写笔20。In some embodiments, since other metal conductors or ferrites other than the stylus 20 are close to the transmitting coil 110 of the electronic device 10, it will also cause the quality factor of the transmitting coil 110 to change. Therefore, the processor 150 also needs to It is determined whether the device adsorbed on the electronic device 10 is the stylus 20 . In a first possible implementation, the processor 150 may determine whether the device adsorbed on the electronic device 10 is the stylus 20 during step S200 . In a second possible implementation, the processor 150 may determine whether the device adsorbed on the electronic device 10 is the stylus 20 before performing step S200.
在这两种可能的实现方式中,处理器150执行步骤S200的具体实现方式不同。下面结合这两种可能的实现方式,对步骤S200“处理器150根据发射线圈110的品质因数确定是否出现手写笔20偏移情况”的过程进行详细的解释说明。In these two possible implementations, the specific implementation ways in which the processor 150 performs step S200 are different. The process of step S200 "the processor 150 determines whether the stylus 20 is offset according to the quality factor of the transmitting coil 110" is explained in detail below based on these two possible implementations.
(一)在第一种可能的实现方式中,处理器150可以在执行步骤S200的过程中确定吸附在电子设备10上的设备是否为手写笔20。这种情况下,步骤S200具体可以包括如下步骤S210至S240。(1) In a first possible implementation, the processor 150 may determine whether the device adsorbed on the electronic device 10 is the stylus 20 during step S200. In this case, step S200 may specifically include the following steps S210 to S240.
S210,若发射线圈110的品质因数小于或等于第一阈值,则处理器150发送通信信号。S210, if the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor 150 sends a communication signal.
S220,若处理器150在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则确定出现手写笔20偏移情况。S220, if the processor 150 receives a feedback signal for the communication signal within the second preset time period after sending the communication signal, it is determined that the stylus 20 is deflected.
S230,若发射线圈110的品质因数大于或等于第二阈值,则处理器150发送通信信号。S230, 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.
S240,若处理器150在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则确定未出现手写笔20偏移情况。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 stylus pen 20 does not shift.
其中,步骤S220位于步骤S210之后,步骤S240位于步骤S230之后,步骤S230和步骤S210是两个并列执行的步骤。Among them, 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.
处理器150发送通信信号的方式可以是广播该通信信号。也就是说,处理器150发送通信信号时没有特定的接收该通信信号的目标。处理器150可以向指定方向发送通信信号。通信信号用于识别手写笔20。一般的,如图37所示,电子设备10还具有接触面104。接触面104可以是电子设备10的边框。手写笔20吸附在电子设备10上时与接触面104相接触。通信信号的传播距离可以满足如下条件:当手写笔20与电子设备10的接触面104接触时,手写笔20可以接收该通信信号;当手写笔20未与电子设备10的接触面104接触时,手写笔20接收不到该通信信号。The processor 150 may send the communication signal by broadcasting the communication signal. In other words, when the processor 150 sends a communication signal, there is no specific target to receive the communication signal. The processor 150 may send communication signals in specified directions. 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 frame of the electronic device 10 . When the stylus pen 20 is adsorbed on the electronic device 10, it contacts the contact surface 104. The propagation distance of the communication signal can meet the following conditions: when the stylus 20 is in contact with the contact surface 104 of the electronic device 10, the stylus 20 can receive the communication signal; when the stylus 20 is not in contact with the contact surface 104 of the electronic device 10, The stylus 20 cannot receive the communication signal.
手写笔20在接收通信信号后,可以针对通信信号发出反馈信号。手写笔20发出的反馈信号中可以携带有手写笔20的信息,如手写笔20的身份标识号码(identity,ID)等。如此,可以使电子设备10的处理器150在接收到反馈信号后识别手写笔20。After receiving the communication signal, the stylus pen 20 can send a feedback signal in response to the communication signal. The feedback signal sent by the stylus 20 may carry information about the stylus 20 , such as the identity number (ID) of the stylus 20 . In this way, the processor 150 of the electronic device 10 can recognize the stylus 20 after receiving the feedback signal.
在这一可能的实现方式中,处理器150先根据发射线圈110的品质因数确定是否出现偏移情况,再通过发送通信信号和接收反馈信号确定吸附在电子设备10上的设备是否为手写笔20。其中,当发射线圈110的品质因数小于或等于第一阈值,则处理器确定出现偏移情况。当发射线圈110的品质因数大于或等于第二阈值,则处理器确定未出现偏移情况。当处理器150在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则处理器150确定吸附在电子设备10上的设备为手写笔20。当处理器150在发送通信信号后的第二预设时长内未接收到针对通信信号的反馈信号,则处理器150确定吸附在电子设备10上的设备不为手写笔20。如此,处理器150即可确定是否出现手写笔20偏移情况。In this possible implementation, the processor 150 first determines whether an offset occurs based on the quality factor of the transmitting coil 110 , and then determines whether the device adsorbed on the electronic device 10 is the stylus 20 by sending communication signals and receiving feedback signals. . Wherein, when the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor determines that an offset condition occurs. When the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, the processor determines that no offset condition occurs. When the processor 150 receives the feedback signal for the communication signal within the second preset time period after sending the communication signal, the processor 150 determines that the device adsorbed on the electronic device 10 is the stylus 20 . When the processor 150 does not receive a feedback signal for the communication signal within the second preset time period after sending the communication signal, the processor 150 determines that the device adsorbed on the electronic device 10 is not the stylus 20 . In this way, the processor 150 can determine whether the stylus 20 is deflected.
可以理解的,第二预设时长应大于手写笔20接收通信信号后针对通信信号发出反馈信号所需的时长。例如,第二预设时长可以是0.2秒、0.5秒或1秒。在一些具体的实施例中,当手写笔20偏移检测方法应用于图32或图33所示的电子设备10时,步骤S210至S240可以由处理器150中的第一子处理器152执行。第一子处理器152工作时,可以通过调制发射线圈110上的电信号的波形来发送通信信号。It can be understood that the second preset duration should be longer than the duration required for the stylus 20 to send a feedback signal in response to 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 FIG. 33 , steps S210 to S240 may be executed by the first sub-processor 152 in the processor 150 . When the first sub-processor 152 is working, the communication signal can be sent by modulating the waveform of the electrical signal on the transmitting coil 110 .
在这一可能的实现方式中,处理器在执行步骤S100时,具体可以是:处理器150周期性检测电子设备10中发射线圈110的品质因数。In this possible implementation, when the processor performs step S100 , the processor 150 may periodically detect the quality factor of the transmitting coil 110 in the electronic device 10 .
也就是说,处理器150可以每间隔第三预设时长检测一次发射线圈110的品质因数。在此,第三预设时长大于或等于处理器150执行步骤S110至S130所需的时长。第三预设时长例如可以是0.5秒、1秒或2秒。这种情况下,处理器150每间隔第三预设时长检测一次发射线圈110的品质因数。若检测到发射线圈110的品质因数大于第一阈值且小于第二阈值,则在该次检测发射线圈110的品质因数后的第三预设时长时再次检测发射线圈110的品质因数。若检测到发射线圈110的品质因数小于或等于第一阈值或检测到发射线圈110的品质因数大于或等于第二阈值,则发送通信信号,此时,若在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则根据发射线圈110的品质因数确定出是否出现手写笔20偏移情况。That is to say, the processor 150 may detect the quality factor of the transmitting coil 110 every third preset time interval. Here, the third preset time period is greater than or equal to the time period required by 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 every third preset time interval. If it is detected that the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold, the quality factor of the transmitting coil 110 is detected again at the third preset time period after the quality factor of the transmitting coil 110 is detected. If it is detected that the quality factor of the transmitting coil 110 is less than or equal to the first threshold or it is detected that the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, a communication signal is sent. At this time, if the second preset value is reached after sending the communication signal. When the feedback signal for the communication signal is received within the time period, it is determined according to the quality factor of the transmitting coil 110 whether the stylus 20 is deflected.
基于此,处理器150在步骤S200之后,还用于执行如下步骤S310至S320。Based on this, after step S200, the processor 150 is also configured to perform the following steps S310 to S320.
S310,若确定未出现手写笔20偏移情况,则处理器150停止检测发射线圈110的品质因数。S310, if it is determined that the stylus pen 20 does not shift, the processor 150 stops detecting the quality factor of the transmitting coil 110.
S320,处理器150控制发射线圈110输出电能。S320, the processor 150 controls the transmitting coil 110 to output electric energy.
当处理器150确定未出现手写笔20偏移情况时,即处理器150确定手写笔20吸附在电子设备10上的预设吸附位置时,处理器150即可停止检测发射线圈110的品质因数,并控制发射线圈110输出电能。步骤S310和S320具体实施时,可以应用于图32或图33所示的电子设备10。这种情况下,步骤S320具体可以包括如下步骤S321和S322。When the processor 150 determines that the stylus pen 20 is not deflected, that is, when the processor 150 determines that the stylus pen 20 is adsorbed at the preset adsorption position on the electronic device 10, the processor 150 can stop detecting the quality factor of the transmitting coil 110, And control the transmitting coil 110 to output electric energy. When steps S310 and S320 are implemented in detail, they may be applied to the electronic device 10 shown in FIG. 32 or FIG. 33 . In this case, step S320 may specifically include the following steps S321 and S322.
S321,在第一阶段内,处理器150控制第一开关Q1和第三开关Q3导通,以及控制第二开关Q2和第四开关Q4关断。S321, in the first stage, the processor 150 controls the first switch Q1 and the third switch Q3 to turn on, and controls the second switch Q2 and the fourth switch Q4 to turn off.
S322,在第一阶段后的第二阶段内,处理器150控制第二开关Q2和第四开关Q4导通,以及控制第一开关Q1和第三开关Q3关断。S322, in the second stage after the first stage, the processor 150 controls the second switch Q2 and the fourth switch Q4 to turn on, and controls the first switch Q1 and the third switch Q3 to turn off.
在这一实施例中,第一开关Q1、第二开关Q2、第三开关Q3和第四开关Q4形成逆变桥,可以将电源正极和电源负极输出的直流电转换为两相交流电。步骤S321和S322循环重复执行,即可向电容C和发射线圈110输出交流电,从而使发射线圈110输出电能。In this embodiment, the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4 form an inverter bridge, which can convert the DC power output by the positive pole and the negative pole of the power supply into two-phase alternating current. Steps S321 and S322 are repeatedly executed to output alternating current to the capacitor C and the transmitting coil 110, thereby causing the transmitting coil 110 to output electric energy.
可以理解的,在步骤S310和S320中,处理器150需要先停止检测发射线圈110的品质因数,再控制发射线圈110输出电能的原因是:在检测发射线圈110的品质因数和控制发射线圈110输出电能这两个不同的过程中,处理器150对第一开关Q1、第二开关Q2、第三开关Q3和第四开关Q4的控制逻辑不同,因此,处理器150不能同时检测发射线圈110的品质因数和控制发射线圈110输出电能。当处理器150确定出现手写笔20偏移情况时,则可以继续周期性检测电子设备10中发射线圈110的品质因数。It can be understood that in steps S310 and S320, the reason why the processor 150 needs to first stop detecting the quality factor of the transmitting coil 110 and then control the output of electric energy of the transmitting coil 110 is: before detecting the quality factor of the transmitting coil 110 and controlling the output of the transmitting coil 110 In the two different processes of electric energy, the processor 150 has different control logic for the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4. Therefore, the processor 150 cannot detect the quality of the transmitting coil 110 at the same time. factors and controls the transmitting coil 110 to output electrical energy. When the processor 150 determines that the stylus 20 is deflected, it may continue to periodically detect the quality factor of the transmitting coil 110 in the electronic device 10 .
(二)在第二种可能的实现方式中,处理器150可以在执行步骤S200之前确定吸附在电子设备10上的设备是否为手写笔20。这种情况下,处理器150可以在步骤S100之前执行如下步骤S001。(2) In the second possible implementation manner, the processor 150 may determine whether the device adsorbed on 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,处理器150发送通信信号。S001, the processor 150 sends a communication signal.
若处理器150在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则执行步骤S100。If the processor 150 receives the feedback signal for the communication signal within the second preset time period after sending the communication signal, step S100 is executed.
基于此,处理器150在执行步骤S200时,步骤S200具体可以包括如下步骤S250和S260。Based on this, when the processor 150 executes step S200, step S200 may specifically include the following steps S250 and S260.
S250,若发射线圈110的品质因数小于或等于第一阈值,则处理器150确定出现手写笔20偏移情况。S250, if the quality factor of the transmitting coil 110 is less than or equal to the first threshold, the processor 150 determines that the stylus 20 is deflected.
S260,若发射线圈110的品质因数大于或等于第二阈值,则处理器150确定未出现手写笔20偏移情况。S260, if the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, the processor 150 determines that the stylus pen 20 does not shift.
具体来说,在这一可能的实现方式中,处理器150先通过发送通信信号和接收反馈信号确定吸附在电子设备10上的设备是否为手写笔20(或者说通过发送通信信号和接收反馈信号确定手写笔20是否与电子设备10吸附),若是,则处理器150再检测发射线圈110的品质因数,并根据发射线圈110的品质因数确定是否出现偏移情况。其中,处理器确定吸附在电子设备10上的设备是否为手写笔20的判断依据是:处理器150在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号。如此,当发射线圈110的品质因数大于或等于第二阈值时,处理器150可以确定吸附在电子设备10上的设备为手写笔20且未出现手写笔20偏移情况。当发射线圈110的品质因数小于或等于第一阈值时,处理器150可以确定吸附在电子设备10上的设备为手写笔20且出现手写笔20偏移情况。Specifically, in this possible implementation, the processor 150 first determines whether the device adsorbed on the electronic device 10 is the stylus 20 by sending a communication signal and receiving a feedback signal (or in other words, by sending a communication signal and receiving a feedback signal). Determine whether the stylus 20 is adsorbed to the electronic device 10), if so, the processor 150 then detects the quality factor of the transmitting coil 110, and determines whether an offset occurs according to the quality factor of the transmitting coil 110. The basis for the processor to determine whether the device adsorbed on the electronic device 10 is the stylus 20 is that the processor 150 receives a feedback signal for the communication signal within the second preset time period after sending the communication signal. In this way, when the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, the processor 150 can determine that the device adsorbed on the electronic device 10 is the stylus 20 and no deviation of the stylus 20 occurs. 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 adsorbed on the electronic device 10 is the stylus 20 and the stylus 20 is deflected.
在这一可能的实现方式中,处理器在执行步骤S001时,具体可以是:处理器150周期性发送通信信号。In this possible implementation, when the processor executes step S001, specifically: the processor 150 periodically sends a communication signal.
也就是说,处理器150可以每间隔第四预设时长发送一次通信信号,以确定手写笔20是否与电子设备10吸附。在此,第四预设时长大于第二预设时长。例如,第四预设时长可以是1秒或2秒。这种情况下,处理器150每间隔第四预设时长发送一次通信信号。若在发送一次通信信号后的第二预设时长内未接收到反馈信号,则在发送该通信信号后的第四预设时长时再发送一次通信信号。若在发送一次通信信号后的第二预设时长内接收到反馈信号,则检测发射线圈110的品质因数,再根据发射线圈110的品质因数确定出是否出现手写笔20偏移情况。That is to say, the processor 150 may send a communication signal every fourth preset time interval to determine whether the stylus 20 is adsorbed to the electronic device 10 . Here, the fourth preset time period is longer than the second preset time period. For example, the fourth preset time period may be 1 second or 2 seconds. In this case, the processor 150 sends a communication signal every fourth preset time interval. If no feedback signal is received within the second preset time period after sending the communication signal once, then the communication signal is sent again during the fourth preset time period after the communication signal is sent. If a feedback signal is received within a second preset time period after sending a communication signal, the quality factor of the transmitting coil 110 is detected, and then whether the stylus 20 is deflected is determined based on the quality factor of the transmitting coil 110 .
基于此,处理器150在步骤S200之后,还用于执行如下步骤S410至S420。Based on this, after step S200, the processor 150 is also configured to perform the following steps S410 to S420.
S410,若确定未出现手写笔20偏移情况,则处理器150停止发送通信信号。S410, if it is determined that the stylus pen 20 does not shift, the processor 150 stops sending communication signals.
S420,处理器150控制发射线圈110输出电能。S420, the processor 150 controls the transmitting coil 110 to output electric energy.
当处理器150确定未出现手写笔20偏移情况时,即处理器150确定手写笔20吸附在电子设备10上的预设吸附位置时,处理器150即可停止发送通信信号,并控制发射线圈110输出电能。步骤S410和S420具体实施时,可以应用于图32或图33所示的电子设备10。这种情况下,步骤S420具体可以包括如下步骤S421和S422。When the processor 150 determines that the stylus 20 is not deflected, that is, when the processor 150 determines that the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10 , the processor 150 can stop sending communication signals and control the transmitting coil. 110 outputs electrical energy. When steps S410 and S420 are implemented in detail, they may be applied to the electronic device 10 shown in FIG. 32 or FIG. 33 . In this case, step S420 may specifically include the following steps S421 and S422.
S421,在第一阶段内,处理器150控制第一开关Q1和第三开关Q3导通,以及控制第二开关Q2和第四开关Q4关断。S421, in the first stage, the processor 150 controls the first switch Q1 and the third switch Q3 to turn on, and controls the second switch Q2 and the fourth switch Q4 to turn off.
S422,在第一阶段后的第二阶段内,处理器150控制第二开关Q2和第四开关Q4导通,以及控制第一开关Q1和第三开关Q3关断。S422, in the second stage after the first stage, the processor 150 controls the second switch Q2 and the fourth switch Q4 to turn on, and controls the first switch Q1 and the third switch Q3 to turn off.
在这一实施例中,第一开关Q1、第二开关Q2、第三开关Q3和第四开关Q4形成逆变桥,可以将电源正极和电源负极输出的直流电转换为两相交流电。步骤S421和S422循环重复执行,即可向电容C和发射线圈110输出交流电,从而使发射线圈110输出电能。In this embodiment, the first switch Q1, the second switch Q2, the third switch Q3 and the fourth switch Q4 form an inverter bridge, which can convert the DC power output by the positive pole and the negative pole of the power supply into two-phase alternating current. Steps S421 and S422 are repeatedly executed in a loop to output alternating current to the capacitor C and the transmitting coil 110, so that the transmitting coil 110 outputs electric energy.
可以理解的,当处理器150确定出现手写笔20偏移情况时,则可以继续周期性发送通信信号。It can be understood that when the processor 150 determines that the stylus 20 is deflected, it may continue to send communication signals periodically.
在一些实施例中,该手写笔20偏移检测方法中,处理器150在执行步骤S200之后,还用于执行如下步骤S500。In some embodiments, in the stylus 20 offset detection method, after executing step S200, the processor 150 is further configured to execute the following step S500.
S500,若处理器150确定出现手写笔20偏移情况,则控制输出单元160输出第一提醒信息。S500, if the processor 150 determines that the stylus pen 20 is deflected, the output unit 160 is controlled to output the first reminder information.
如前所述,处理器150在执行步骤S200后,即可确定是否出现手写笔20偏移情况。在这一实施例中,若处理器150确定出现手写笔20偏移情况,还控制输出单元160输出第一提醒信息。这里的第一提醒信息用于提醒出现手写笔20偏移情况。在一些实施例中,输出单元160是电子设备10中的喇叭。此时,第一提醒信息可以是语音信息。例如,处理器150控制输出单元160输出第一提醒信息时,可以是电子设备10中的喇叭发出声音“手写笔吸附位置偏移,请将手写笔放置在正确位置”。在另一些实施例中,输出单元160是电子设备10中的显示屏。此时,第一提醒信息可以是文字信息或/和图像信息。在一个具体的实施例中,处理器150控制输出单元160输出第一提醒信息时,可以如图38所示,电子设备10中的显示屏显示“手写笔吸附位置偏移”的文字信息。在另一个具体的实施例中,处理器150控制输出单元160输出第一提醒信息时,可以如图39所示,电子设备10中的显示屏显示“手写笔吸附位置偏移,请将手写笔放置在正确位置”的文字信息,并同时显示手写笔20吸附电子设备10的正确位置(即预设吸附位置)时手写笔20与电子设备10的相对位置。As mentioned above, after executing step S200, the processor 150 can determine whether the stylus pen 20 is deflected. In this embodiment, if the processor 150 determines that the stylus pen 20 is deflected, it also controls the output unit 160 to output the first reminder information. The first reminder information here is used to remind that the stylus pen 20 is offset. In some embodiments, output unit 160 is a speaker in electronic device 10 . At this time, the first reminder message may be a voice message. For example, when the processor 150 controls the output unit 160 to output the first reminder information, the speaker in the electronic device 10 may sound "The adsorption position of the stylus is offset, please place the stylus in the correct position." In other embodiments, the output unit 160 is a display screen in the electronic device 10 . At this time, the first reminder 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 reminder information, as shown in FIG. 38 , the display screen in the electronic device 10 displays the text information of "stylus pen adsorption position offset". In another specific embodiment, when the processor 150 controls the output unit 160 to output the first reminder information, as shown in FIG. 39 , the display screen in the electronic device 10 displays "The adsorption position of the stylus is offset. Please move the stylus." "Place it in the correct position" text information, and at the same time display the relative position of the stylus pen 20 and the electronic device 10 when the stylus pen 20 adsorbs the electronic device 10 at the correct position (ie, the preset adsorption position).
在一些具体的实施例中,步骤S500中的“控制输出单元160输出第一提醒信息”由处理器150中的第二子处理器154执行。In some specific embodiments, "controlling the output unit 160 to output the first reminder information" in step S500 is executed by the second sub-processor 154 of the processor 150 .
下面结合附图,从四种具体的实施方式,对本申请实施例提供的手写笔20偏移检测方法进行详细的解释说明。The following is a detailed explanation of the stylus 20 offset detection method provided by the embodiment of the present application from four specific implementation modes with reference to the accompanying drawings.
第一种具体的实施方式。First specific implementation.
在这一实施方式中,处理器150先根据发射线圈110的品质因数确定是否出现偏移情况,再通过发送通信信号和接收反馈信号确定吸附在电子设备10上的设备是否为手写笔20。In this implementation, the processor 150 first determines whether an offset occurs based on the quality factor of the transmitting coil 110 , and then determines whether the device adsorbed on the electronic device 10 is the stylus 20 by sending communication signals and receiving feedback signals.
具体来说,图40是本申请实施例提供的另一种手写笔20偏移检测方法的流程图,该手写笔20偏移检测方法可以应用于如图33所示的电子设备10。如图40所示,手写笔20偏移检测方法可以包括如下步骤。Specifically, FIG. 40 is a flow chart of another stylus 20 offset detection method provided by an embodiment of the present application. This stylus 20 offset detection method can be applied to the electronic device 10 shown in FIG. 33 . As shown in Figure 40, the stylus 20 offset detection method may include the following steps.
S1,品质因数检测。S1, quality factor detection.
第一子处理器152上电后,可以先控制第一开关Q1和第三开关Q3在第一预设时长内导通,从而在第一预设时长内向电容C和发射线圈110充电,使电容C和发射线圈110处于稳态。之后,第一子处理器152再控制第二开关Q2和第三开关Q3导通,使电容C的第二极板与发射线圈110的第二端连接,此时电容C的第一极板和发射线圈110的第一端之间产生振荡电信号。第一子处理器152可以通过检测该振荡电信号,并根据振荡电信号的多个幅值中的第n-1个幅值和第n个幅值,通过式①和公式⑥确定发射线圈110的品质因数。After the first sub-processor 152 is powered on, it can first control the first switch Q1 and the third switch Q3 to be turned on within the first preset time period, thereby charging the capacitor C and the transmitting coil 110 within the first preset time period, so that the capacitor C and transmitter coil 110 are in steady state. After that, the first sub-processor 152 then controls the second switch Q2 and the third switch Q3 to turn on, so that the second plate of the capacitor C is connected to the second end of the transmitting coil 110. At this time, the first plate of the capacitor C and An oscillating electrical signal is generated between the first ends of the transmitting coil 110 . The first sub-processor 152 can detect the oscillating electrical signal, and determine the transmitting coil 110 through equation ① and equation ⑥ according to the n-1th amplitude and the n-th amplitude among the multiple amplitudes of the oscillating electrical signal. quality factor.
在此,第一子处理器152可以每间隔第三预设时长检测一次发射线圈110的品质因数。Here, the first sub-processor 152 may detect the quality factor of the transmitting coil 110 every third preset time interval.
第一子处理器152内预设有第一阈值和第二阈值,第一阈值小于第二阈值。第一子处理器152检测到发射线圈110的品质因数后,即可判断品质因数与第一阈值、第二阈值的大小关系。品质因数与第一阈值、第二阈值的大小关系包括如下步骤S2、S3和S4中的三种。A first threshold and a second threshold are preset in the first sub-processor 152, and 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 relationship between the quality factor and the first threshold and the second threshold. The relationship between the quality factor and the first threshold and the second threshold includes three of the following steps S2, S3 and S4.
S2,品质因数大于第一阈值且小于第二阈值。S2, the quality factor is greater than the first threshold and less than the second threshold.
发射线圈110的品质因数大于第一阈值且小于第二阈值时,表明发射线圈110的品质因数变化较小。这种情况下,第一子处理器152判定没有手写笔、金属杂物或铁氧体杂物吸附在电子设备10上,此时,返回执行步骤S1,即重新每间隔第三预设时长检测一次发射线圈110的品质因数。When the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold, it indicates that the change in the quality factor of the transmitting coil 110 is small. In this case, the first sub-processor 152 determines that there is no stylus, metal debris or ferrite debris adsorbed on the electronic device 10. At this time, it returns to step S1, that is, it detects again every third preset time interval. Quality factor of primary transmit coil 110.
S3,品质因数小于或等于第一阈值。S3, the quality factor is less than or equal to the first threshold.
发射线圈110的品质因数小于或等于第一阈值时,表明有金属靠近发射线圈110,此时第一子处理器152确定出现偏移情况。这种情况下,第一子处理器152继续执行步骤S31至S33。When the quality factor of the transmitting coil 110 is less than or equal to the first threshold, it indicates that metal is close to the transmitting coil 110. At this time, the first sub-processor 152 determines that an offset occurs. In this case, the first sub-processor 152 continues to execute steps S31 to S33.
S31,发送通信信号。S31. Send communication signals.
第一子处理器152发送通信信号。第一子处理器152可以通过调制发射线圈110上的电信号的波形来发送通信信号。The first sub-processor 152 sends communication signals. The first sub-processor 152 may transmit the communication signal by modulating the waveform of the electrical signal on the transmit coil 110 .
S32,判断是否在发送通信信号后的第二预设时长内接收到反馈信号。S32: Determine whether the feedback signal is received within the second preset time period after sending the communication signal.
若第一子处理器152在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则表明第一子处理器152能够与手写笔20进行通信,也即表明吸附在电子设备10上的设备是手写笔。此时,第一子处理器152确定出现手写笔20偏移情况,执行步骤S33。If the first sub-processor 152 receives a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is able to communicate with the stylus 20, that is, it indicates that the electronic The device on device 10 is a stylus. At this time, the first sub-processor 152 determines that the stylus pen 20 is deflected, and executes step S33.
若第一子处理器152在发送通信信号后的第二预设时长内未接收到针对通信信号的反馈信号,则表明第一子处理器152不能够与手写笔20进行通信,也即表明吸附在电子设备10上的设备不是手写笔。此时,返回执行步骤S1。If the first sub-processor 152 does not receive a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is unable to communicate with the stylus 20, that is, it indicates that the adsorption The device on electronic device 10 is not a stylus. At this time, return to step S1.
S33,输出第一提醒信息。S33, output the first reminder information.
第一子处理器152确定出现手写笔20偏移情况后,即可向第二子处理器154发出第一指令。第二子处理器154在接到第一指令后输出第一提醒信息,以提示用户出现手写笔20偏移情况。After the first sub-processor 152 determines that the stylus pen 20 is deflected, it can issue a first instruction to the second sub-processor 154 . After receiving the first instruction, the second sub-processor 154 outputs the first reminder message to remind the user that the stylus pen 20 is deflected.
S4,品质因数大于或等于第二阈值。S4, the quality factor is greater than or equal to the second threshold.
发射线圈110的品质因数大于或等于第二阈值时,表明有铁氧体靠近发射线圈110,此时第一子处理器152确定未出现偏移情况。这种情况下,第一子处理器152继续执行步骤S41至S43。When the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, it indicates that ferrite is close to the transmitting coil 110. At this time, the first sub-processor 152 determines that no offset occurs. In this case, the first sub-processor 152 continues to execute steps S41 to S43.
S41,发送通信信号。S41. Send communication signals.
S42,判断是否在发送通信信号后的第二预设时长内接收到反馈信号。S42: Determine whether the feedback signal is received within the second preset time period after sending the communication signal.
若第一子处理器152在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则表明第一子处理器152能够与手写笔20进行通信,也即表明吸附在电子设备10上的设备是手写笔。此时,第一子处理器152确定未出现手写笔20偏移情况,执行步骤S43。If the first sub-processor 152 receives a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is able to communicate with the stylus 20, that is, it indicates that the electronic The device on device 10 is a stylus. At this time, the first sub-processor 152 determines that the stylus pen 20 does not shift, and executes step S43.
若第一子处理器152在发送通信信号后的第二预设时长内未接收到针对通信信号的反馈信号,则表明第一子处理器152不能够与手写笔20进行通信,也即表明吸附在电子设备10上的设备不是手写笔。此时,返回执行步骤S1。If the first sub-processor 152 does not receive a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is unable to communicate with the stylus 20, that is, it indicates that the adsorption The device on electronic device 10 is not a stylus. At this time, return to step S1.
S43,停止检测品质因数,并控制发射线圈110输出电能。S43, stop detecting the quality factor, and control the transmitting coil 110 to output electric energy.
第一子处理器152可以在第一阶段内控制第一开关Q1和第三开关Q3导通,且控制第二开关Q2和第四开关Q4关断;在第二阶段内控制第二开关Q2和第四开关Q4导通,且控制第一开关Q1和第三开关Q3关断。如此循环重复,即可向电容C和发射线圈110输出交流电,从而使发射线圈110输出电能。The first sub-processor 152 can control the first switch Q1 and the third switch Q3 to turn on, and control the second switch Q2 and the fourth switch Q4 to turn off in the first stage; and control the second switch Q2 and the fourth switch Q4 to turn off in the second stage. The fourth switch Q4 is turned on, and the first switch Q1 and the third switch Q3 are controlled to be turned off. By repeating this cycle, alternating current can be output to the capacitor C and the transmitting coil 110, so that the transmitting coil 110 can output electric energy.
第二种具体的实施方式。The second specific implementation.
图41是本申请实施例提供的又一种手写笔20偏移检测方法的流程图,其基于图40所示的实施例具有如下一个区别点。FIG. 41 is a flow chart of yet another method for detecting the offset of the stylus 20 provided by an embodiment of the present application, which has the following difference based on the embodiment shown in FIG. 40 .
1)若步骤S32、步骤S42的判断结果为否,则返回执行步骤S1的同时还执行步骤S5。1) If the judgment result in step S32 and step S42 is no, return to step S1 and also execute step S5.
S5,输出第二提醒信息。S5, output the second reminder information.
当第一子处理器152在发送通信信号后的第二预设时长内未接收到针对通信信号的反馈信号时,即第一子处理器152不能够与手写笔20进行通信时,可以向第二子处理器154发出第二指令。第二子处理器154在接到第二指令后输出第二提醒信息。第二提醒信息用于提示用户请勿将金属杂物或铁氧体杂物靠近发射线圈110。When the first sub-processor 152 does not receive a feedback signal for the communication signal within the second preset time period after sending the communication signal, that is, when the first sub-processor 152 is unable to communicate with the stylus 20, it may send a request to the third sub-processor 152. The second sub-processor 154 issues a second instruction. The second sub-processor 154 outputs the second reminder information after receiving the second instruction. The second reminder message is used to remind the user not to bring metal debris or ferrite debris close to the transmitting coil 110 .
第三种具体的实施方式。The third specific implementation mode.
图42是本申请实施例提供的又一种手写笔20偏移检测方法的流程图,其基于图40所示的实施例具有如下区别点。FIG. 42 is a flow chart of yet another method for detecting offset of the stylus 20 provided by an embodiment of the present application. It has the following differences based on the embodiment shown in FIG. 40 .
1)第一子处理器152内不预设有第一阈值和第二阈值,而是预设有第三阈值、第四阈值和预设品质因数。第三阈值小于第四阈值。在这一实施例中,第三阈值和第四阈值应满足如下条件:当手写笔20吸附在电子设备10上的预设吸附位置时,即情况(A)和情况(B)发生时,第四阈值小于或等于发射线圈110的品质因数减去预设品质因数的差值;当手写笔20在电子设备10上的吸附位置偏移时,即情况(1)、(2)、(5)、(6)、(7)、(8)、(11)、(12)发生时,第三阈值大于或等于发射线圈110的品质因数减去预设品质因数的差值。这种情况下,若手写笔20吸附在电子设备10上,且第一子处理器152检测到发射线圈110的品质因数减去预设品质因数的差值大于或等于第四阈值,即可确定手写笔20吸附在电子设备10上的预设吸附位置,即未出现手写笔20偏移情况。反之,若手写笔20吸附在电子设备10上,且第一子处理器152检测到发射线圈110的品质因数减去预设品质因数的差值小于或等于第三阈值,即可确定手写笔20的吸附位置发生偏移。1) The first sub-processor 152 is not preset with the first threshold and the second threshold, but is preset with the third threshold, the fourth threshold and the preset quality factor. The third threshold is less than the fourth threshold. In this embodiment, the third threshold and the fourth threshold should satisfy the following conditions: when the stylus 20 is adsorbed at the preset adsorption position on the electronic device 10 , that is, when situations (A) and (B) occur, the first The fourth threshold is less than or equal to the difference between 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, situations (1), (2), and (5) , (6), (7), (8), (11), and (12) occur, the third threshold is greater than or equal to the difference between 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 first sub-processor 152 detects that the difference between the quality factor of the transmitting coil 110 minus the preset quality factor is greater than or equal to the fourth threshold, it can be determined The stylus pen 20 is adsorbed at the preset adsorption position on the electronic device 10 , that is, there is no deviation of the stylus pen 20 . On the contrary, if the stylus 20 is adsorbed on the electronic device 10 and the first sub-processor 152 detects that the difference between the quality factor of the transmitting coil 110 minus the preset quality factor is less than or equal to the third threshold, it can be determined that the stylus 20 The adsorption position is shifted.
在此,预设品质因数是电子设备10未与手写笔20相吸附,且电子设备10也未与其他金属杂物、铁氧体杂物吸附时发射线圈110的品质因数,也即只有电子设备10时发射线圈110的品质因数。预设品质因数大于第一阈值,且小于第二阈值。第三阈值可以等于第一阈值减去预设品质因数的差值,第三阈值为负值。第四阈值可以等于第二阈值减去预设品质因数的差值。Here, the preset quality factor is the quality factor of the transmitting coil 110 when the electronic device 10 is not attracted to the stylus 20 , and the electronic device 10 is not attracted to other metal impurities and ferrite impurities, that is, only the electronic device 110 is The quality factor of the transmitter coil 110 at 10 o'clock. The preset quality factor is greater than the first threshold and less than the second threshold. The third threshold may be equal to the difference between the first threshold minus the preset quality factor, and the third threshold may be a negative value. The fourth threshold may be equal to the second threshold minus the preset quality factor.
基于此,在第一种具体的实施方式的基础上,步骤S1之后可以执行如下步骤S6。Based on this, based on the first specific implementation, the following step S6 may be performed after step S1.
S6,计算品质因数与预设品质因数的差值。S6: Calculate the difference between the quality factor and the preset quality factor.
第一子处理器152在检测到发射线圈110的品质因数后,计算检测到的品质因数与预设品质因数的差值(下面简称为“差值”)。如此,即可判断差值与第三阈值、第四阈值的大小关系。差值与第三阈值、第四阈值的大小关系包括如下步骤S7、S8和S9中的三种。After detecting the quality factor of the transmitting coil 110, the first sub-processor 152 calculates the difference between the detected quality factor and the preset quality factor (hereinafter referred to as "difference"). In this way, the relationship between the difference and the third threshold and the fourth threshold can be determined. The relationship between the difference value and the third threshold value and the fourth threshold value includes the following three types of steps S7, S8 and S9.
S7,差值大于第三阈值且小于第四阈值。S7, the difference is greater than the third threshold and less than the fourth threshold.
根据前述描述可知,当差值符合步骤S7的条件时,发射线圈110的品质因数符合前述步骤S2的条件。因此,此时返回执行步骤S1。According to the foregoing description, when the difference meets the condition of step S7, the quality factor of the transmitting coil 110 meets the condition of step S2. Therefore, the execution returns to step S1 at this time.
S8,差值小于或等于第三阈值。S8, the difference is less than or equal to the third threshold.
根据前述描述可知,当差值符合步骤S8的条件时,发射线圈110的品质因数符合前述步骤S3的条件。因此,此时继续执行步骤S31。According to the foregoing description, it can be known that when the difference 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,差值大于或等于第四阈值。S9, the difference is greater than or equal to the fourth threshold.
根据前述描述可知,当差值符合步骤S9的条件时,发射线圈110的品质因数符合前述步骤S4的条件。因此,此时继续执行步骤S41。According to the foregoing description, when the difference 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.
第四种具体的实施方式。The fourth specific implementation mode.
在这一实施方式中,处理器150先通过发送通信信号和接收反馈信号确定吸附在电子设备10上的设备是否为手写笔20(或者说通过发送通信信号和接收反馈信号确定手写笔20是否与电子设备10吸附),若是,则处理器150再检测发射线圈110的品质因数,并根据发射线圈110的品质因数确定是否出现偏移情况。In this embodiment, the processor 150 first determines whether the device adsorbed on the electronic device 10 is the stylus 20 by sending communication signals and receiving feedback signals (or in other words, determining whether the stylus 20 is connected to the electronic device 10 by sending communication signals and receiving feedback signals). The electronic device 10 is absorbed), if so, the processor 150 then detects the quality factor of the transmitting coil 110, and determines whether an offset occurs according to the quality factor of the transmitting coil 110.
具体来说,图43是本申请实施例提供的又一种手写笔20偏移检测方法的流程图,该手写笔20偏移检测方法可以应用于如图33所示的电子设备10。如图43所示,手写笔20偏移检测方法可以包括如下步骤。Specifically, FIG. 43 is a flow chart of yet another method for detecting the offset of the stylus 20 provided by an embodiment of the present application. The method for detecting the offset of the stylus 20 can be applied to the electronic device 10 shown in FIG. 33 . As shown in Figure 43, the stylus 20 offset detection method may include the following steps.
S01,发送通信信号。S01, send communication signal.
第一子处理器152上电后发送通信信号。第一子处理器152可以通过调制发射线圈110上的电信号的波形来发送通信信号。在此,第一子处理器152可以每间隔第四预设时长发送一次通信信号。The first sub-processor 152 sends communication signals after being powered on. 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 send the communication signal once every fourth preset time interval.
S02,判断是否在发送通信信号后的第二预设时长内接收到反馈信号。S02, determine whether a feedback signal is received within a second preset time period after sending the communication signal.
若第一子处理器152在发送通信信号后的第二预设时长内接收到针对通信信号的反馈信号,则表明第一子处理器152能够与手写笔20进行通信,也即表明手写笔20与电子设备10相吸附。此时,执行步骤S03。If the first sub-processor 152 receives a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is able to communicate with the stylus 20 , that is, it indicates that the stylus 20 Adsorbed to the electronic device 10 . At this time, step S03 is executed.
若第一子处理器152在发送通信信号后的第二预设时长内未接收到针对通信信号的反馈信号,则表明第一子处理器152不能够与手写笔20进行通信,也即表明手写笔20未与电子设备10相吸附。此时,返回执行步骤S01。在一些其他的实施例中,若步骤S02的判断结果为否,也可以在返回执行步骤S1的同时还执行步骤S5。If the first sub-processor 152 does not receive a feedback signal for the communication signal within the second preset time period after sending the communication signal, it indicates that the first sub-processor 152 is unable to communicate with the stylus 20, that is, it indicates that the handwriting The pen 20 is not adsorbed to the electronic device 10 . At this time, return to step S01. In some other embodiments, if the determination result in step S02 is no, step S5 may also be executed while returning to step S1.
S03,品质因数检测。S03, quality factor detection.
第一子处理器152可以先控制第一开关Q1和第三开关Q3在第一预设时长内导通,从而在第一预设时长内向电容C和发射线圈110充电,使电容C和发射线圈110处于稳态。之后,第一子处理器152再控制第二开关Q2和第三开关Q3导通,使电容C的第二极板与发射线圈110的第二端连接,此时电容C的第一极板和发射线圈110的第一端之间产生振荡电信号。第一子处理器152可以通过检测该振荡电信号,并根据振荡电信号的多个幅值中的第n-1个幅值和第n个幅值,通过式①和公式⑥确定发射线圈110的品质因数。The first sub-processor 152 may first control the first switch Q1 and the third switch Q3 to be turned on within the first preset time period, thereby charging the capacitor C and the transmitting coil 110 within the first preset time period, so that the capacitor C and the transmitting coil 110 is at steady state. After that, the first sub-processor 152 then controls the second switch Q2 and the third switch Q3 to turn on, so that the second plate of the capacitor C is connected to the second end of the transmitting coil 110. At this time, the first plate of the capacitor C and An oscillating electrical signal is generated between the first ends of the transmitting coil 110 . The first sub-processor 152 can detect the oscillating electrical signal, and determine the transmitting coil 110 through equation ① and equation ⑥ according to the n-1th amplitude and the n-th amplitude among the multiple amplitudes of the oscillating electrical signal. quality factor.
第一子处理器152内预设有第一阈值和第二阈值,第一阈值小于第二阈值。第一子处理器152检测到发射线圈110的品质因数后,即可判断品质因数与第一阈值、第二阈值的大小关系。品质因数与第一阈值、第二阈值的大小关系包括如下步骤S04、S05、S06中的三种。A first threshold and a second threshold are preset in the first sub-processor 152, and 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 relationship between the quality factor and the first threshold and the second threshold. The relationship between the quality factor and the first threshold and the second threshold includes the following three types of steps S04, S05, and S06.
S04,品质因数大于第一阈值且小于第二阈值。S04, the quality factor is greater than the first threshold and less than the second threshold.
发射线圈110的品质因数大于第一阈值且小于第二阈值时,表明发射线圈110的品质因数变化较小。这种情况下,可能是反馈信号接收错误。此时,返回执行步骤S01,即重新每间隔第四预设时长发送一次通信信号。When the quality factor of the transmitting coil 110 is greater than the first threshold and less than the second threshold, it indicates that the change in the quality factor of the transmitting coil 110 is small. In this case, the feedback signal may be received incorrectly. At this time, step S01 is returned to execution, that is, the communication signal is sent again every fourth preset time interval.
S05,品质因数小于或等于第一阈值。S05, the quality factor is less than or equal to the first threshold.
发射线圈110的品质因数小于或等于第一阈值时,表明有金属靠近发射线圈110,此时第一子处理器152确定出现手写笔20偏移情况。这种情况下,第一子处理器152继续执行步骤S051。When the quality factor of the transmitting coil 110 is less than or equal to the first threshold, it indicates that metal is close to the transmitting coil 110. At this time, the first sub-processor 152 determines that the stylus 20 is deflected. In this case, the first sub-processor 152 continues to execute step S051.
S051,输出第一提醒信息。S051, output the first reminder information.
第一子处理器152确定出现手写笔20偏移情况后,即可向第二子处理器154发出第一指令。第二子处理器154在接到第一指令后输出第一提醒信息,以提示用户出现手写笔20偏移情况。After the first sub-processor 152 determines that the stylus pen 20 is deflected, it can issue a first instruction to the second sub-processor 154 . After receiving the first instruction, the second sub-processor 154 outputs the first reminder message to remind the user that the stylus pen 20 is deflected.
S06,品质因数大于或等于第二阈值。S06, the quality factor is greater than or equal to the second threshold.
发射线圈110的品质因数大于或等于第二阈值时,表明有铁氧体靠近发射线圈110,此时第一子处理器152确定未出现手写笔20现偏移情况。这种情况下,第一子处理器152继续执行步骤S061。When the quality factor of the transmitting coil 110 is greater than or equal to the second threshold, it indicates that ferrite is close to the transmitting coil 110. At this time, the first sub-processor 152 determines that the stylus pen 20 does not shift. In this case, the first sub-processor 152 continues to execute step S061.
S061,停止发送通信信号,并控制发射线圈110输出电能。S061, stop sending communication signals, and control the transmitting coil 110 to output electric energy.
第一子处理器152可以在第一阶段内控制第一开关Q1和第三开关Q3导通,且控制第二开关Q2和第四开关Q4关断;在第二阶段内控制第二开关Q2和第四开关Q4导通,且控制第一开关Q1和第三开关Q3关断。如此循环重复,即可向电容C和发射线圈110输出交流电,从而使发射线圈110输出电能。The first sub-processor 152 can control the first switch Q1 and the third switch Q3 to turn on, and control the second switch Q2 and the fourth switch Q4 to turn off in the first stage; and control the second switch Q2 and the fourth switch Q4 to turn off in the second stage. The fourth switch Q4 is turned on, and the first switch Q1 and the third switch Q3 are controlled to be turned off. By repeating this cycle, alternating current can be output to the capacitor C and the transmitting coil 110, so that the transmitting coil 110 can output electric energy.
本申请实施例提供的手写笔20偏移检测方法,至少具备如下有益效果:1、处理器150可以检测发射线圈110的品质因数。由于手写笔20出现偏移情况和未出现偏移情况时,发射线圈110的品质因数不同,因此,处理器150在检测到发射线圈110的品质因数后,可以根据发射线圈110的品质因数来确定吸附在电子设备10上的手写笔20是否出现偏移情况。如此,可以检测到手写笔20在电子设备10上的吸附位置是否偏移。2、该手写笔20偏移检测方法,仅需要检测发射线圈110的品质因数和通过发射线圈110发送、接收通信信号即可,不需要霍尔传感器或指南针等辅助器件来判断手写笔20是否靠近电子设备10,可以节省成本。The stylus 20 offset detection method provided by the embodiment of the present application has at least the following beneficial effects: 1. The processor 150 can detect the quality factor of the transmitting coil 110 . Since the quality factor of the transmitting coil 110 is different when the stylus 20 is offset and when the stylus 20 is not offset, the processor 150 can determine the quality factor according to the quality factor of the transmitting coil 110 after detecting the quality factor of the transmitting coil 110 Whether the stylus 20 adsorbed on the electronic device 10 is deflected. In this way, it can be detected whether the adsorption position of the stylus 20 on the electronic device 10 is shifted. 2. This stylus 20 offset detection method only needs to detect the quality factor of the transmitting coil 110 and send and receive communication signals through the transmitting coil 110. It does not require auxiliary devices such as Hall sensors or compasses to determine whether the stylus 20 is close. The electronic device 10 can save costs.
本申请实施例还提供一种手写笔20偏移检测方法,包括如下步骤S601和S602。The embodiment of the present application also provides a method for detecting the offset of the stylus 20, including the following steps S601 and S602.
S601,处理器150检测电子设备10中发射线圈110的品质因数。S601, the processor 150 detects the quality factor of the transmitting coil 110 in the electronic device 10.
S602,若处理器150根据发射线圈110的品质因数确定出现手写笔20偏移情况,则输出第一提醒信息。S602: If the processor 150 determines that the stylus 20 is deflected according to the quality factor of the transmitting coil 110, it outputs the first reminder information.
在一些实施例中,第一提醒信息用于提醒出现手写笔20偏移情况。或者说,第一提醒信息用于提醒手写笔20在电子设备10上的吸附位置相对预设吸附位置发生偏移。In some embodiments, the first reminder information is used to remind that the stylus pen 20 is deflected. In other words, the first reminder information is used to remind the adsorption position of the stylus pen 20 on the electronic device 10 to deviate from the preset adsorption position.
本申请实施例还提供一种电子设备10,如图44所示,包括发射线圈110、存储器170、处理器150以及存储在存储器170中并可在处理器150上运行的计算机程序,计算机程序被处理器150执行时实现如上述任意一个实施例中的手写笔20偏移检测方法。The embodiment of the present application also provides an electronic device 10, as shown in Figure 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. The computer program is When executed, the processor 150 implements the stylus 20 offset detection method as in any of the above embodiments.
本申请实施例还提供一种电子设备10,如图44所示,包括发射线圈110、存储器170、处理器150以及存储在存储器170中并可在处理器150上运行的计算机程序,计算机程序被处理器150执行时处理器150检测发射线圈110的品质因数。The embodiment of the present application also provides an electronic device 10, as shown in Figure 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. The computer program is When the processor 150 is executed, the processor 150 detects the quality factor of the transmitting coil 110 .
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the above-mentioned implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of this application, and should be included in within the protection scope of this application.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310471931.9A CN117129763A (en) | 2023-04-24 | 2023-04-24 | Stylus offset detection method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310471931.9A CN117129763A (en) | 2023-04-24 | 2023-04-24 | Stylus offset detection method and electronic device |
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 | Stylus offset detection method and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117129763A (en) |
Citations (21)
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 |
CN103548237A (en) * | 2011-05-18 | 2014-01-29 | 索尼公司 | Electromagnetically-coupled state detection circuit, power transmission apparatus, contactless power transmission system, and electromagnetically-coupled state detection 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 of 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 |
CN112583141A (en) * | 2020-11-25 | 2021-03-30 | 华为技术有限公司 | Wireless charging equipment, charging base and foreign matter detection method |
CN112868163A (en) * | 2019-08-07 | 2021-05-28 | 华为技术有限公司 | Wireless charging device, position detection method and system |
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 prompt method, device, device and storage medium |
CN114756142A (en) * | 2022-04-12 | 2022-07-15 | 荣耀终端有限公司 | A stylus pen, wireless charging method and terminal device |
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 | 荣耀终端有限公司 | An adsorption detection system for a stylus |
CN115566747A (en) * | 2022-04-06 | 2023-01-03 | 荣耀终端有限公司 | wireless charging system |
CN116247837A (en) * | 2023-05-08 | 2023-06-09 | 荣耀终端有限公司 | Wireless charging system, method and related equipment |
-
2023
- 2023-04-24 CN CN202310471931.9A patent/CN117129763A/en active Pending
Patent Citations (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103548237A (en) * | 2011-05-18 | 2014-01-29 | 索尼公司 | Electromagnetically-coupled state detection circuit, power transmission apparatus, contactless power transmission system, and electromagnetically-coupled state detection method |
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 of 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 |
CN113243072A (en) * | 2019-08-07 | 2021-08-10 | 华为技术有限公司 | Wireless charging device, position detection method and system |
CN113039700A (en) * | 2019-08-07 | 2021-06-25 | 华为技术有限公司 | Wireless charging device, position detection method and system |
CN112868163A (en) * | 2019-08-07 | 2021-05-28 | 华为技术有限公司 | Wireless charging device, position detection method and system |
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 prompt method, device, device and storage medium |
CN112583141A (en) * | 2020-11-25 | 2021-03-30 | 华为技术有限公司 | Wireless charging equipment, charging base and foreign matter detection method |
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 | 荣耀终端有限公司 | An adsorption detection system for a stylus |
CN115566747A (en) * | 2022-04-06 | 2023-01-03 | 荣耀终端有限公司 | wireless charging system |
CN114756142A (en) * | 2022-04-12 | 2022-07-15 | 荣耀终端有限公司 | A stylus pen, wireless charging method and terminal device |
CN114827972A (en) * | 2022-06-28 | 2022-07-29 | 荣耀终端有限公司 | Method for establishing connection with stylus pen and electronic equipment |
CN116247837A (en) * | 2023-05-08 | 2023-06-09 | 荣耀终端有限公司 | Wireless charging system, method and related equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11995251B2 (en) | Wireless charging system, chip, and wireless charging circuit | |
JP6505372B2 (en) | Electronic device and control method of electronic device | |
JP2016024813A (en) | Method for increasing signal-to-noise ratio, capacitive sensor using the same, and touch panel | |
CN115543106B (en) | Adsorption detection system of handwriting pen | |
JP6219210B2 (en) | Electronic device and display method in electronic device | |
CN114911364B (en) | Control method, touch pen and touch system | |
JP6163133B2 (en) | Electronic device and charging notification method in electronic device | |
KR20220017323A (en) | Electronic device | |
US20240313588A1 (en) | Accessory detection system | |
KR20220145383A (en) | Circuit control device and method | |
CN108123556A (en) | Power reception device, wireless charging prompt system, method and apparatus and medium | |
CN114877793B (en) | Electronic equipment, electronic equipment state determining method and related equipment | |
CN117129763A (en) | Stylus offset detection method and electronic device | |
US11216090B2 (en) | Position indicator and coordinate input device | |
CN108767950A (en) | Multiplexing circuit, wearable device and method for switching working modes of wearable device | |
CN117707348B (en) | Method for determining position of stylus pen and electronic device | |
WO2016170949A1 (en) | Electronic device and charging method | |
CN208112754U (en) | Filter holders for camera modules, camera modules and electronics | |
CN115566747B (en) | Wireless charging system | |
CN117130496B (en) | Stylus pen deviation detection method and electronic device | |
CN108668204A (en) | Multiplexing circuit, wearable device and working mode switching method of wearable device | |
CN116929188A (en) | Accessories in-place detection system | |
CN219959530U (en) | Charging devices and equipment combinations | |
CN222939480U (en) | Display device, stylus and display device assembly | |
CN116736989B (en) | Touch pen and control method thereof |
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 | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after: Honor Terminal Co.,Ltd. Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Applicant before: Honor Device Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information |