1. Technical Field
The present invention generally relates to a method for detecting a threshold value, and more particularly to a method for dynamically detecting a threshold value of displaying stylus stroke on a touch panel.
2. Description of Related Art
Capacitive touch input technology is the mainstream of the input technologies applied to the widely used touch panel. A typical capacitive touch panel includes substrates on which transparent electrode patterns are coated thereon. When a finger or a stylus touch or hover on the touch panel, coupling capacitance is formed between the finger or the stylus and the transparent electrode patterns because the finger or the tip of the stylus is a conductive to establish capacitive coupling with the transparent electrode patterns. Meanwhile, the capacitance of the electrode pattern under the finger or the stylus on the touch panel will change, thus the voltage or the current in the electrodes of the electrode patterns will change. By comparing a voltage difference between the electrode under the finger or the stylus and the adjacent electrodes, the coordinate of the finger or the stylus can be determined.
However, the fingers of user are not suitable for a more delicate writing input operation, such as the writing input operations with stroke thickness changes. Moreover, input operation by using user's fingers also lacks various functions. Thus a stylus instead of user's fingers is used to perform exquisite input operation upon a touch panel with a capacitive touch input function. The stylus can further allow user to depict lines with various stroke thicknesses on a touch panel. The stylus can also detect the force which a user applies upon the stylus against the touch panel.
The stroke thickness of a stylus displayed on the touch panel is a result of signals generated from a force sensing module of the stylus. The stroke thickness of a stylus displayed on a touch panel should be proportional to the force difference (corresponding to the tip-off state) applied on the tip of the stylus in an ideal condition. Moreover, the stroke of the stylus should display on the touch panel once the tip of the stylus contacts the touch panel in an ideal condition. However, due to various issues, such as physical or mechanical defects of force detection components of the stylus or unstable characteristics of a force sensor of the stylus, the stroke of the stylus might display on the touch panel before the tip of the stylus contacts the touch panel or the thickness of the stroke displayed on the touch panel is thinner than expected. Thus the invention provides a method for dynamically detecting a threshold value to compromise the above issues of displaying stylus stroke on a touch panel.
The invention provides a method for dynamically detecting a threshold value of displaying stylus stroke on a touch panel. The method comprises a step of detecting an average value of a plurality of sampling values of legal zero-force sensing signal; a step of determining the average value of the plurality of sampling values of legal zero-force sensing signal as a dynamic value of zero-force sensing signal; and a step of calculating a threshold value of force sensing signal by the dynamic value of zero-force sensing signal and an offset value of force sensing signal.
The invention also provide a stylus with functions of dynamically detecting a threshold value of force sensing signal for displaying stroke on a touch panel comprising a control unit with embedded non-transitory computer readable medium storing executable instructions for performing a method for dynamically detecting a threshold value of force sensing signal for displaying stroke on a touch panel comprising a step of detecting an average value of a plurality of sampling values of legal zero-force sensing signal; a step of determining the average value of the plurality of sampling values of legal zero-force sensing signal as a dynamic value of zero-force sensing signal; and a step of calculating a threshold value of force sensing signal by the dynamic value of zero-force sensing signal and an offset value of force sensing signal.
Embodiment of this invention will be described in detail below. However, in addition to as described below, and this invention can be broadly implemented in the other cases the purpose and scope of this invention is not affected by the application of qualified, claim after its prevail. Furthermore, to provide a description more clear and easier to understand the invention, the pieces within the schema and not in accordance with their relative size of drawing, compared to certain dimensions to other scales have been exaggerated; details not related nor completely drawn in part in order to schematic simplicity.
In this embodiment, the conductive nib 104, the nib holder 105, the elastomer 108, the force sensor 110 and the force sensor circuit board 112 are configured to provide the stylus 100 with tip force detection. Some components can be further included to enhance the performance, such as a spring to restore the conductive nib 104 back to the original position after tip force is removed. In other embodiments, various force sensing modules can be used to provide the stylus 100 with tip force detection.
The stylus further comprises a control unit (not shown) on the control circuit board 114. The control unit comprises a microprocessor unit or MCU with embedded non-volatile memory or non-transitory computer readable medium such as flash memory. The control unit calculates the tip force applied on the stylus 100 via signals from the force sensor 110. The control unit outputs force sensing signals via the conductive nib 104 to the touch panel 10. The touch panel 10 displays strokes of the stylus 100 according to coordinates of the stylus 100 and stroke thicknesses according to force sensing signals. The stroke of the stylus 100 would be displayed on the touch panel 10 when the force sensing signals is over a default threshold value of force sensing signal once the conductive nib 104 contacts the touch panel 10.
The signals from the force sensor 110 may fluctuate due to various reasons. For example, physical and mechanical defects of the conductive nib 104, the nib holder 105, the elastomer 108 or the spring to restore the conductive nib 104, and the fluctuated contact condition between the elastomer 108 and the force sensor 110 amid the use of the stylus 100. The physical or mechanical defects of force sensing module may cause threshold value of force sensing signal fluctuates so that the stroke of the stylus 100 might be displayed on the touch panel 100 before the conductive nib 104 contacts the touch panel 10 or the thickness of the stroke displayed on the touch panel 10 is thinner than expected.
V
th
_
0
=V
zero
_
0
+V
offset
_
0,
wherein Vzero_0 and Voffset_0 are pre-defined
During usage of the stylus, while the stylus is power-up, a step of detecting an average of sampling values Vk of legal zero-force sensing signal is performed. The sampling values Vk are smaller than the default threshold value of force sensing signal Vth_0. The sampling values Vk are within a standard deviation Vdev, that is
Vk<Vth_0
|Vk−Vk−1|<Vdev
If the average of sampling values Vk of legal zero-force sensing signal is generated and detected, the average is set as a new dynamic value of zero-force sensing signal Vzero_1. However, if the average of sampling values Vk of legal zero-force sensing signal is not generated and detected, the default value of zero-force sensing signal Vzero_0 remains as the value of zero-force sensing signal. It is noted that the default value of zero-force sensing signal Vzero_0 may be predetermined due to the specification of a stylus which is not actually being used yet before leaving the production line. Thus in production line of stylus under good control condition, a more realistic and reliable value of zero-force sensing signal Vzero_1 might be generated and detected and be encoded and written to on-chip non-volatile memory such as flash memory of a control unit of every stylus.
If the stylus is power-up again, the value of zero-force sensing signal Vzero_1 is read back from the on-chip non-volatile memory of the control unit of the stylus. Then, the value of zero-force sensing signal Vzero_1 plus an offset Voffset_1 obtains a threshold value of force sensing signal Vth_1 available and adaptive to display stylus stoke on a touch panel instead of the pre-defined default threshold value of force sensing signal Vth_0. The offset Voffset_1 is smaller than the default offset Voffset_0.
In one embodiment of the invention, before leaving production line, each stylus will have an optimal zero-force sensing signal value Vzero _1 stored in on-chip non-volatile memory of each stylus; Hence, with the same offset (Voffset_1), every stylus has its own optimal threshold value (Vth_1) after the stylus is power-up. The value of zero-force sensing signal Vzero _1 and the threshold value of force sensing signal Vth_1 can be obtained by the following equations,
V
zero
_
1=(Σk=0n−1Vk)/n,
wherein n≧N, Vk<Vth_0, and |Vk−Vk−1|<Vdev
V
zero
_
1
=V
zero
_
0,
wherein n<N
V
th
_
1
=V
zero
_
1
+V
offset
_
1,
wherein Voffset_1<Voffset_0
The value of zero-force sensing signal Vzero_1 is the average of the sum of sampling values Vk of legal zero-force sensing signal. The sampling values Vk are within a standard deviation Vdev. If n is smaller N, the default value of zero-force sensing signal Vzero_0 remains as the value of zero-force sensing signal, that is, Vzero_1 equals to Vzero_0. If Voffset_1 is smaller than Voffset_0, the value of zero-force sensing signal Vzero_1 plus an offset Voffset_1 equals a threshold value of force sensing signal Vth
Next, based on a current threshold value, a step of detecting an average of sampling values Vk of legal zero-force sensing signal within a standard deviation Vdev is performed. The sampling values Vk are smaller than the threshold value of force sensing signal Vth_1. The sampling values Vk are within the standard deviation Vdev, that is
Vk<Vth_1
|Vk−Vk−1|<Vdev
If the average of sampling values Vk of legal zero-force sensing signal is generated and detected, the average is set as a new dynamic value of zero-force sensing signal Vzero_2. However, if the average of sampling values Vk of legal zero-force sensing signal is not generated and detected, the value of zero-force sensing signal Vzero_1 remains as the value of zero-force sensing signal. Then the new/old threshold value (Vth_2 or Vth_1) is available for following force sensing signal to display stylus stoke on a touch panel. The value of zero-force sensing signal Vzero_2 and the threshold value of force sensing signal Vth_2 can be obtained by the following equations.
V
zero
_
2=(Σk=0n−1Vk)/n,
wherein n≧N, Vk<Vth_1, and |Vk−Vk−1|<Vdev
Vzero_2=Vzero_1, wherein n<N
V
th
_
2
=V
zero
_
2
+V
offset
_
1,
wherein Voffset_1<Voffset_0
With loopy detecting of sampling values Vk of legal zero-force sensing signal, a dynamic zero-force sensing signal value Vzero_x will be detected repeatedly. Then, the offset Voffset_1 plus the dynamic zero-force sensing signal value Vzero_x equals a dynamic threshold value Vth_x available for force sensing signal to display stylus stoke on a touch panel.
V
zero
_
x=(Σk=0n−1Vk)/n,
wherein n≧N, Vk<Vth_1, and |Vk−Vk−1|<Vdev
Vzero_x=Vzero_x−1,
wherein n<N
V
th
_
x
=V
zero
_
x
+V
offset
_
1,
wherein Voffset_1<Voffset_0
Hence, a method for dynamically detecting a threshold value of displaying stylus stroke on a touch panel is performed. Since the threshold value of displaying stylus stroke on a touch panel can be dynamically detected and adjusted, the malfunction of stylus stroke including the stroke of the stylus displaying on the touch panel before the tip of the stylus contacts the touch panel or the thickness of the stroke displayed on the touch panel thinner than expected is avoided and the thickness of stylus stroke on a touch panel is well performed at the same time. Thus the invention provides a method for dynamically detecting a threshold value to compromise the above issues of displaying stylus stroke on a touch panel.
Although specific embodiments of the present invention have been described, it will be understood by those of skill in the art that there are other embodiments that are equivalent to the described embodiments. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims.