Pressing detection method of piezoelectric ceramic, electronic equipment and storage medium
By collecting the voltage rate sequence of piezoelectric ceramics and determining whether it exceeds the threshold, the problem of piezoelectric ceramics outputting different voltages at different times is solved, and the accuracy of press detection is improved.
Patent Information
- Application Number
- CN202411729677.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-08
AI Technical Summary
Because piezoelectric peristalsis occurs in piezoelectric ceramics, different voltage values are output to the same pressing pressure, which affects the accuracy of pressing detection.
By obtaining the voltage sequences at both ends of the piezoelectric ceramics collected at the set time interval, the voltage rate sequence is determined, and whether the piezoelectric ceramics are pressed is determined based on the voltage rate sequence and the threshold value.
This method avoids the influence of piezoelectric peristalsis on the accuracy of press detection and improves the accuracy of press detection.
Smart Images

Figure CN119788050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic devices, and more specifically, to a piezoelectric ceramic pressure detection method, electronic equipment and storage medium. Background Art
[0002] The principle of piezoelectric ceramics as touch buttons of electronic devices is that piezoelectric ceramics will output different voltages under different pressing forces. By detecting the change in voltage, it is possible to detect the pressing force and identify the finger pressing and finger lifting actions. In related technologies, the voltage value at both ends of the piezoelectric ceramic is often compared with a fixed voltage value to achieve piezoelectric ceramic pressing detection.
[0003] However, due to the piezoelectric creep phenomenon of piezoelectric ceramics (piezoelectric creep refers to the phenomenon that the piezoelectric properties of piezoelectric ceramics gradually change over time under continuous electric field or mechanical stress), different voltage values will be output for the same pressing force, which seriously affects the accuracy of pressure detection based on voltage value. Summary of the invention
[0004] An object of an embodiment of the present invention is to provide a new technical solution for pressure detection of piezoelectric ceramics to solve the technical problem of low accuracy in pressure detection based on the voltage value of piezoelectric ceramics in the related art, thereby improving the accuracy of pressure detection.
[0005] According to a first aspect of the present invention, a method for detecting a pressure of a piezoelectric ceramic is provided, comprising:
[0006] Acquire a first voltage sequence across the piezoelectric ceramic at a set time interval;
[0007] Determining a voltage change rate sequence according to the first voltage sequence and the set time interval;
[0008] Whether the piezoelectric ceramic is pressed is determined according to the voltage change rate sequence and the voltage change rate threshold.
[0009] Optionally, the voltage change rate threshold includes a pressing threshold, and determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold includes:
[0010] When the voltage change rate sequence meets a first preset condition, determining that the piezoelectric ceramic is pressed;
[0011] The first preset condition includes at least one of the following:
[0012] The voltage change rate sequence includes a first voltage change rate; wherein the first voltage change rate is greater than or equal to the pressing threshold;
[0013] The voltage change rate sequence includes m consecutive first voltage change rates; wherein m is greater than or equal to 2.
[0014] Optionally, the voltage change rate threshold further includes a release threshold, and determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold includes:
[0015] When the voltage change rate sequence meets a second preset condition, determining that the piezoelectric ceramic is not pressed;
[0016] The second preset condition includes at least one of the following:
[0017] The voltage change rate sequence includes a second voltage change rate; wherein the second voltage change rate is less than or equal to the release threshold;
[0018] The voltage change rate sequence includes m consecutive second voltage change rates; wherein m is greater than or equal to 2.
[0019] Optionally, the first voltage sequence is obtained by digitally converting an analog voltage signal through an analog-to-digital converter, and the analog voltage signal is a signal at both ends of the piezoelectric ceramic collected at the set time interval.
[0020] Optionally, the voltage change rate threshold includes a press threshold, and the step of determining the press threshold includes:
[0021] Obtaining N groups of historical voltage change rate sequences for the most recent N times when the piezoelectric ceramic is in a pressed state; wherein N is greater than or equal to 1;
[0022] The pressing threshold is determined according to the N groups of historical voltage change rate sequences.
[0023] Optionally, determining the pressing threshold according to the N groups of historical voltage change rate sequences includes:
[0024] According to the N groups of historical voltage change rate sequences, determining the average voltage change rate corresponding to each group of historical voltage change rate sequences, and obtaining N average voltage change rates;
[0025] The pressing threshold is determined according to the N average voltage change rates.
[0026] Optionally, the voltage change rate threshold further includes a release threshold, and the step of determining the release threshold includes:
[0027] Obtaining N groups of historical voltage change rate sequences for the most recent N times when the piezoelectric ceramic is in a non-pressed state; wherein N is greater than or equal to 1;
[0028] The release threshold is determined according to the N groups of historical voltage change rate sequences.
[0029] Optionally, before determining a voltage change rate sequence according to the first voltage sequence and the set time interval, the method further includes:
[0030] The first voltage sequence is normalized to obtain a second voltage sequence as a new first voltage sequence.
[0031] According to a second aspect of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store executable instructions; the processor is used to operate according to the control of the instructions to execute the method as described in the first aspect.
[0032] According to a third aspect of the present disclosure, a storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0033] One of the beneficial effects of the present invention is that by acquiring a first voltage sequence collected at both ends of a piezoelectric ceramic at a set time interval, determining a voltage change rate sequence based on the first voltage sequence and the set time interval, and determining whether the piezoelectric ceramic is pressed based on the voltage change rate sequence and a voltage change rate threshold, it is possible to determine whether the piezoelectric ceramic is pressed based on the voltage change rate sequence. Compared with a press detection method that determines whether the piezoelectric ceramic is pressed based on a voltage value, the influence of piezoelectric creep on the accuracy of press detection can be avoided, thereby improving the accuracy of press detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0035] Figure 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention;
[0036] Figure 2 is a schematic flow chart of a method for detecting a pressure of a piezoelectric ceramic according to an embodiment of the present invention;
[0037] Figure 3 is a schematic diagram of a first voltage sequence according to an embodiment of the present invention;
[0038] Figure 4 is a schematic diagram of a voltage change rate sequence according to an embodiment of the present invention;
[0039] Figure 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0041] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0042] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0043] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0044] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0045] <Hardware Configuration>
[0046] Figure 1 is a block diagram of a hardware configuration of an electronic device 100 according to an embodiment of the present invention.
[0047] like Figure 1 As shown, the electronic device 100 may be a tablet computer, a desktop computer, a small computer, a workstation, a laptop computer, a mobile phone, etc., which is not limited here.
[0048] In this embodiment, refer to Figure 1 As shown, the electronic device 100 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like.
[0049] The processor 1100 may be a mobile version processor. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1300 may include, for example, a USB interface, a headphone interface, etc. The communication device 1400 may, for example, be capable of wired or wireless communication. The communication device 1400 may include a short-range communication device, for example, any device for short-range wireless communication based on short-range wireless communication protocols such as Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1400 may also include a remote communication device, for example, any device for WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The display device 1500 may, for example, be a liquid crystal display, a touch display, etc. The input device 1600 may include, for example, a touch screen, a keyboard, etc. The user may input voice information through a microphone and output voice information through a speaker 1700.
[0050] In this embodiment, the memory 1200 of the electronic device is used to store instructions, and the instructions are used to control the processor 1100 to operate to at least perform the piezoelectric ceramic pressure detection method implemented by the electronic device according to any embodiment of the present invention. The technician can design the instructions according to the scheme disclosed in the present invention. How the instructions control the processor to operate is well known in the art, so it will not be described in detail here.
[0051] Despite Figure 1 , multiple devices of the electronic device 100 are shown; however, the present invention may only involve some of the devices, for example, the electronic device 100 only involves the memory 1200 and the processor 1100 .
[0052] <Method Example>
[0053] Figure 2 1 is a flow chart of a method for detecting a pressure of a piezoelectric ceramic according to an embodiment of the present invention. The method can be implemented by the electronic device 100 .
[0054] according to Figure 2 As shown, the piezoelectric ceramic pressure detection method of this embodiment may include the following steps S2100 to S2300:
[0055] Step S2100, acquiring a first voltage sequence collected at both ends of the piezoelectric ceramic at a set time interval.
[0056] In this embodiment, the piezoelectric ceramic is a material that can convert mechanical pressure into an electrical signal, and the voltage change at both ends of the piezoelectric ceramic reflects the pressure change applied thereon.
[0057] By collecting the voltage across the piezoelectric ceramic at set time intervals, a first voltage sequence can be obtained. The first voltage sequence can be expressed as [V0, V1...V n ]. The set time interval may also be referred to as a sampling interval or a sampling period, which may refer to the set time difference between two consecutive sampling points when collecting the voltage across the piezoelectric ceramic. In other words, the set time interval is the sampling time difference between any two adjacent voltage values in the first voltage sequence.
[0058] Exemplarily, the set time interval may be Delta=100 ms.
[0059] In some embodiments, the first voltage sequence is obtained by digitally converting an analog voltage signal through an analog-to-digital converter, and the analog voltage signal is a signal across the piezoelectric ceramic collected at the set time interval.
[0060] In this embodiment, the process of collecting the voltage across the piezoelectric ceramic may be a process of converting the analog voltage signal detected by the piezoelectric ceramic into a digital signal (i.e., a voltage value) through an analog-to-digital converter (ADC). In addition, the process of collecting the voltage across the piezoelectric ceramic is performed at a set time interval, and each sampling point corresponds to a voltage value, thereby obtaining a first voltage sequence.
[0061] For example, Figure 3 As shown, the first voltage sequence is [17.66, 23.47...113.96, 127.24, 140.68...195.5, 180.29, 162.94...7.6, 4.3].
[0062] Step S2200: determining a voltage change rate sequence according to the first voltage sequence and the set time interval.
[0063] In this embodiment, K1 = (V1-V0) / Delta...Kn = (V n –V n-1 ) / Delta, the voltage change rate sequence can be expressed as [K1,K2………Kn].
[0064] In some embodiments, before determining the voltage change rate sequence according to the first voltage sequence and the set time interval in step S2200, the method further includes: step SA.
[0065] Step SA: normalize the first voltage sequence to obtain a second voltage sequence as a new first voltage sequence.
[0066] In this embodiment, the normalization process can adjust the first voltage sequence to a specific range. The characteristic range can be between 0 and 1, or between -1 and 1. The second voltage sequence can be expressed as [N0, N1...N n ].
[0067] The normalization process may be minimum-maximum normalization, z-score normalization, decimal scaling normalization, maximum absolute value normalization, logarithmic normalization, etc., which are not limited here.
[0068] Those skilled in the art should understand that normalization processing methods such as maximum absolute value normalization and minimum-maximum normalization are well known in the art and will not be elaborated here.
[0069] Exemplarily, the first voltage sequence of [17.66, 23.47...113.96, 127.24, 140.68...195.5, 180.29, 162.94...7.6, 4.3] can be processed by maximum absolute value normalization to obtain a second voltage sequence, wherein the second voltage sequence is [0.043, 0.06...0.3, 0.34, 0.37...0.53, 0.48, 0.43..., 0.01, 0].
[0070] By normalizing the first voltage sequence, the scale difference in the first voltage sequence can be eliminated, so as to facilitate subsequent press detection through a voltage change rate sequence obtained based on the first voltage sequence, thereby further improving the accuracy of press detection.
[0071] After executing step SA to use the second voltage sequence as a new first voltage sequence, executing step S2200 to determine a voltage change rate sequence according to the first voltage sequence and the set time interval.
[0072] Continuing with the above example, the second voltage sequence is [0.043, 0.06...0.3, 0.34, 0.37...0.53, 0.48, 0.43..., 0.01, 0]. The voltage change rate is calculated as K1 = (N1-N0) / Delta...Kn = (N n –N n-1 ) / Delta, the voltage change rate sequence is [0.16, 0.12......, 0.36, 0.36, 0.37......, -0.41, -0.47, -0.46......, -0.09, -0.07]. The change diagram of the voltage change rate sequence is as follows: Figure 4 shown.
[0073] Step S2300: determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold.
[0074] In this embodiment, the voltage change rate threshold may be a critical value of the voltage change rate set when judging whether the piezoelectric ceramic is pressed, and may be determined based on experimental data.
[0075] Exemplarily, when the maximum value of the voltage change rate in the voltage change rate sequence is greater than or equal to the voltage change rate threshold, the piezoelectric ceramic is determined to be pressed. When the maximum value of the voltage change rate in the voltage change sequence is less than the voltage change rate threshold, the piezoelectric ceramic is determined not to be pressed.
[0076] In some embodiments, the voltage change rate threshold includes a pressing threshold, wherein the pressing threshold is a critical value of the voltage change rate set for a state where the piezoelectric ceramic is pressed, and is used to identify a state where the piezoelectric ceramic is pressed.
[0077] The pressing threshold may be a critical value of the voltage change rate set before the electronic device leaves the factory based on a pressing experiment, or may be determined based on the voltage change rate corresponding to the user's historical pressing operations on the electronic device, which is not limited here.
[0078] In these embodiments, determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold in step S2300 includes:
[0079] When the voltage change rate sequence meets a first preset condition, it is determined that the piezoelectric ceramic is pressed.
[0080] In some embodiments, the first preset condition is that the voltage change rate sequence includes a first voltage change rate.
[0081] In this embodiment, the first voltage change rate is greater than or equal to the pressing threshold. That is, when there is a first voltage change rate whose voltage change rate is greater than or equal to the pressing threshold in the voltage change rate sequence, it is determined that the piezoelectric ceramic is pressed.
[0082] According to an embodiment of the present application, when there is a first voltage change rate in a voltage change rate sequence, no matter whether the voltage change rate sequence includes one or more first voltage change rates, and no matter whether the multiple first voltage change rates are continuous in the voltage change rate sequence, it is determined that the piezoelectric ceramic is pressed, and pressure detection of the piezoelectric ceramic based on the voltage change rate sequence can be realized. Compared with the method of performing pressure detection based on voltage value, it can avoid the problem of low accuracy of pressure detection caused by piezoelectric creep, improve the accuracy of pressure detection, and the calculation process is simple and the detection efficiency is high.
[0083] Piezoelectric creep refers to the phenomenon that the piezoelectric properties of piezoelectric ceramics gradually change over time under a continuous electric field or mechanical stress, that is, piezoelectric creep has a high correlation with time. Therefore, by allowing longer voltage value changes to be included in the press detection, the influence of piezoelectric creep on the accuracy of press detection can be further avoided, thereby further improving the accuracy of press detection.
[0084] Based on this, in some other embodiments, the first preset condition is: the voltage change rate sequence includes m consecutive first voltage change rates.
[0085] In this embodiment, the first preset condition is set to be m consecutive first voltage change rates, which can make the voltage value change for a longer time enter the press detection relative to the first preset condition that the voltage change rate sequence includes the first voltage change rate. The first voltage change rate is greater than or equal to the press threshold, and m is greater than or equal to 2.
[0086] In an example, the press threshold is 0.3, the value of m is 3, and the voltage change rate sequence is [0.16, 0.12......, 0.36, 0.36, 0.37......, -0.41, -0.47, -0.46......, -0.09, -0.07]. At this time, 0.36, 0.36, and 0.37 in the voltage change rate sequence are all greater than the press threshold of 0.3, then it is determined that the piezoelectric ceramic is pressed.
[0087] In some embodiments, determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold in step S2300 further includes:
[0088] When the voltage change rate sequence does not meet the first preset condition, it is determined that the piezoelectric ceramic is not pressed.
[0089] In this embodiment, not meeting the first preset condition means that: the voltage change rate sequence does not include the first voltage change rate, or the voltage change rate sequence does not include m consecutive first voltage change rates.
[0090] It should be noted that the first voltage change rate, the first preset condition, etc. in this step can be referred to the above explanation and will not be elaborated here.
[0091] According to an embodiment of the present application, by acquiring a first voltage sequence collected at both ends of a piezoelectric ceramic at a set time interval, determining a voltage change rate sequence based on the first voltage sequence and the set time interval, and determining whether the piezoelectric ceramic is pressed based on the voltage change rate sequence and a voltage change rate threshold, it is possible to determine whether the piezoelectric ceramic is pressed based on the voltage change rate sequence. Compared with a press detection method that determines whether the piezoelectric ceramic is pressed based on a voltage value, the influence of piezoelectric creep on the accuracy of press detection can be avoided, thereby improving the accuracy of press detection.
[0092] In some embodiments, the voltage change rate threshold value further includes a release threshold value, wherein the release threshold value is a critical value of the voltage change rate set for a state where the piezoelectric ceramic is not pressed, and is used to identify a state where the piezoelectric ceramic is not pressed.
[0093] The release threshold may be a critical value of the voltage change rate set before the electronic device leaves the factory based on a press-release experiment, or may be determined based on the voltage change rate corresponding to the user's historical press-release operations of the electronic device, and is not limited here.
[0094] In these embodiments, determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold in step S2300 includes:
[0095] When the voltage change rate sequence meets a second preset condition, it is determined that the piezoelectric ceramic is not pressed.
[0096] In some embodiments, the second preset condition is that the voltage change rate sequence includes a second voltage change rate.
[0097] In this embodiment, the second voltage change rate is less than or equal to the release threshold. That is, when there is a second voltage change rate whose voltage change rate is less than or equal to the release threshold in the voltage change rate sequence, it is determined that the piezoelectric ceramic is not pressed.
[0098] According to an embodiment of the present application, by setting a release threshold for identifying the unpressed state of the piezoelectric ceramic, the misjudgment of the unpressed state (i.e., released state) due to environmental changes or system noise can be reduced, thereby improving the accuracy of press detection.
[0099] By determining that the piezoelectric ceramic is not pressed when there is a second voltage change rate in the voltage change rate sequence, regardless of whether the voltage change rate sequence includes one or more second voltage change rates and whether the multiple second voltage change rates are continuous in the voltage change rate sequence, it is possible to detect that the piezoelectric ceramic is not pressed based on the voltage change rate sequence. Compared with the method of performing press detection based on voltage value, it can avoid the problem of low detection accuracy caused by piezoelectric creep, improve the accuracy of press detection, and the calculation process is simple and the detection efficiency is high.
[0100] In some other embodiments, the voltage change rate sequence includes m consecutive second voltage change rates.
[0101] In this embodiment, the second voltage change rate is less than or equal to the release threshold, and m is greater than or equal to 2.
[0102] In one example, the release threshold is -0.35, the value of m is 3, and the voltage change rate sequence is [0.16, 0.12......, 0.36, 0.36, 0.37......, -0.41, -0.47, -0.46......, -0.09, -0.07]. At this time, -0.41, -0.47, -0.46 in the voltage change rate sequence are all less than the release threshold -0.35, then it is determined that the piezoelectric ceramic is not pressed.
[0103] According to an embodiment of the present application, by setting the second preset condition to m consecutive second voltage change rates, relative to the second preset condition being that the voltage change rate sequence includes the second voltage change rate, a longer voltage value change can be included in the press detection, further avoiding the influence of piezoelectric creepage on the accuracy of press detection, thereby improving the accuracy of press detection.
[0104] In some embodiments, the voltage change rate threshold includes a press threshold, and the step of determining the press threshold includes: step S3100 to step S3200.
[0105] Step S3100, obtaining N groups of historical voltage change rate sequences for the most recent N times when the piezoelectric ceramic is in a pressed state.
[0106] In this embodiment, the electronic device is preset with an initial pressing threshold (i.e., an initial voltage change rate threshold for identifying that the piezoelectric ceramic is pressed) before leaving the factory. When the user uses the electronic device, the determination of the first N pressed states of the piezoelectric ceramic is based on the measured voltage change rate and the first preset condition. At this time, the pressing threshold in the first preset condition is the initial pressing threshold.
[0107] It should be noted that the determination of whether the piezoelectric ceramic is pressed based on the measured voltage change rate and the first preset condition can be referred to the above description and will not be elaborated here.
[0108] After the first N times of the pressed state of the piezoelectric ceramic are determined based on the initial pressing threshold, the initial pressing threshold is updated according to the historical voltage change rate sequence corresponding to the first N times when the piezoelectric ceramic is in the pressed state, so as to be used for the next identification of the pressed state of the piezoelectric ceramic. In other words, the pressing threshold after the first N times is updated according to the N groups of historical voltage change rate sequences of the most recent N times when the piezoelectric ceramic is in the pressed state. Among them, the historical voltage change rate sequence is a sequence composed of the first voltage change rate whose voltage change rate is greater than or equal to the pressing threshold.
[0109] In some embodiments, N is greater than or equal to one.
[0110] In one embodiment, N is 10.
[0111] Exemplarily, N takes a value of 1, the pressing threshold used to determine that the piezoelectric ceramic was pressed the most recently is 0.3, and the historical voltage change rate sequence when the piezoelectric ceramic was pressed the most recently may be: 0.36, 0.36, 0.37, which are all greater than 0.3.
[0112] Step S3200: determining the pressing threshold according to the N groups of historical voltage change rate sequences.
[0113] Continuing the above example, N is 1, the most recent press threshold used to determine that the piezoelectric ceramic is pressed is 0.3, and the most recent historical voltage change rate sequence when the piezoelectric ceramic is in a pressed state can be: 0.36, 0.36, 0.37. The mean value of the historical voltage change rate sequence, 0.36, can be used as the press threshold for the next press detection. The maximum value of the historical voltage change rate sequence, 0.37, can also be used as the press threshold for the next press detection, which is not limited here.
[0114] In some embodiments, determining the pressing threshold in step S3200 according to the N groups of historical voltage change rate sequences includes: step S3200.1 and step S3200.2.
[0115] Step S3200.1, according to the N groups of historical voltage change rate sequences, determine the average voltage change rate corresponding to each group of historical voltage change rate sequences, and obtain N average voltage change rates.
[0116] Exemplarily, N takes a value of 2, and the historical voltage change rate sequences of the two most recent times when the piezoelectric ceramic is in a pressed state may be: 0.36, 0.36, 0.37; 0.40, 0.39, 0.40, respectively. Then, the two average voltage change rates are calculated to be 0.36 and 0.39 respectively.
[0117] Step S3200.2, determining the pressing threshold according to the N average voltage change rates.
[0118] Continuing with the above example, the two average voltage change rates are 0.36 and 0.39, and the press threshold is 0.37.
[0119] In some embodiments, the voltage change rate threshold also includes a release threshold, wherein the release threshold is a critical value of the voltage change rate set for a state where the piezoelectric ceramic is not pressed, and is used to identify a state where the piezoelectric ceramic is not pressed.
[0120] In these embodiments, the step of determining the release threshold includes: step S4100 to step S4200.
[0121] Step S4100, obtaining N groups of historical voltage change rate sequences when the piezoelectric ceramic is in a non-pressed state for the most recent N times.
[0122] In this embodiment, the electronic device is preset with an initial release threshold (i.e., an initial voltage change rate threshold for identifying that the piezoelectric ceramic is not pressed) before leaving the factory. When the user uses the electronic device, the determination of the piezoelectric ceramic's first N non-pressed states is based on the measured voltage change rate and the second preset condition. At this time, the release threshold in the second preset condition is the initial release threshold.
[0123] It should be noted that the determination of whether the piezoelectric ceramic is not pressed based on the measured voltage change rate and the second preset condition can be referred to the above description and will not be elaborated here.
[0124] After the first N times of the piezoelectric ceramic being in the unpressed state are determined based on the initial release threshold, the initial release threshold is updated according to the historical voltage change rate sequence corresponding to the first N times when the piezoelectric ceramic is in the unpressed state, so as to be used for the next identification of the unpressed state of the piezoelectric ceramic. In other words, the release threshold after the first N times is updated according to the N groups of historical voltage change rate sequences of the most recent N times when the piezoelectric ceramic is in the unpressed state. Among them, the historical voltage change rate sequence is a sequence composed of the second voltage change rate whose voltage change rate is less than or equal to the release threshold.
[0125] In some embodiments, N is greater than or equal to one.
[0126] In one embodiment, N is 10.
[0127] Exemplarily, N takes a value of 1, the release threshold used when the piezoelectric ceramic was most recently determined to be not pressed is -0.35, and the most recent historical voltage change rate sequence when the piezoelectric ceramic was not pressed can be: -0.41, -0.47, -0.46, all of which are less than -0.35.
[0128] Step S4200: determining the release threshold according to the N groups of historical voltage change rate sequences.
[0129] Continuing the above example, N takes a value of 1, and the release threshold used when the piezoelectric ceramic was most recently determined to be unpressed is -0.35. The most recent historical voltage change rate sequence when the piezoelectric ceramic was not pressed can be: -0.41, -0.47, -0.46. The mean value of the historical voltage change rate sequence -0.45 can be used as the release threshold for the next press detection. The minimum value of the historical voltage change rate sequence -0.47 can also be used as the release threshold for the next press detection, which is not limited here.
[0130] In some embodiments, determining the release threshold in step S4200 according to the N groups of historical voltage change rate sequences includes: step S4200.1 and step S4200.2.
[0131] Step S4200.1, according to the N groups of historical voltage change rate sequences, determine the average voltage change rate corresponding to each group of historical voltage change rate sequences, and obtain N average voltage change rates.
[0132] Exemplarily, N takes a value of 2, and the historical voltage change rate sequences of the two most recent times when the piezoelectric ceramic is in an unpressed state may be: -0.41, -0.47, -0.46; -0.48, -0.49, -0.49, respectively. Then, the two average voltage change rates are calculated to be -0.45 and -0.49 respectively.
[0133] Step S3300.2: Determine the release threshold according to the N average voltage change rates.
[0134] Continuing with the above example, the two average voltage change rates are -0.45 and -0.49 respectively, and the release threshold is updated to -0.47.
[0135] According to an embodiment of the present application, by setting a dynamically updated press threshold and a release threshold for use in current press detection, it is possible to adjust the press threshold and the release threshold according to environmental changes (such as temperature, humidity) and operating conditions (such as changes in press force), and it is possible to accurately distinguish between real press events and false operations caused by noise or other interference, as well as distinguish between real non-pressed events and false judgments caused by noise or other interference. In addition, the press threshold and the release threshold can be automatically adjusted according to the user's historical press pattern to achieve more accurate press detection.
[0136] According to an embodiment of the present application, by acquiring a first voltage sequence collected at both ends of a piezoelectric ceramic at a set time interval, determining a voltage change rate sequence based on the first voltage sequence and the set time interval, and determining whether the piezoelectric ceramic is pressed based on the voltage change rate sequence and a voltage change rate threshold, it is possible to determine whether the piezoelectric ceramic is pressed based on the voltage change rate sequence. Compared with a press detection method that determines whether the piezoelectric ceramic is pressed based on a voltage value, the influence of piezoelectric creep on the accuracy of press detection can be avoided, thereby improving the accuracy of press detection.
[0137] <Device Example>
[0138] Figure 5 FIG. 5 is a principle block diagram of an electronic device 500 according to an embodiment of the present invention.
[0139] In this embodiment, if Figure 5 As shown, the electronic device 500 includes a memory 510 and a processor 520, wherein the memory 510 is used to store executable instructions; the processor 520 is used to operate according to the control of the instructions to execute the method described in any of the above method embodiments.
[0140] In other embodiments, the electronic device may also be Figure 1 Electronic equipment shown.
[0141] An embodiment of the present application further provides a storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the method described in any of the above method embodiments are implemented.
[0142] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0143] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0144] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0145] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0146] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0147] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0148] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0149] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0150] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for detecting pressure of a piezoelectric ceramic, characterized in that: include: Acquire a first voltage sequence across the piezoelectric ceramic at a set time interval; Determining a voltage change rate sequence according to the first voltage sequence and the set time interval; Whether the piezoelectric ceramic is pressed is determined according to the voltage change rate sequence and the voltage change rate threshold.
2. The method according to claim 1, characterized in that The voltage change rate threshold includes a pressing threshold, and determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold includes: When the voltage change rate sequence meets a first preset condition, determining that the piezoelectric ceramic is pressed; The first preset condition includes at least one of the following: The voltage change rate sequence includes a first voltage change rate; wherein the first voltage change rate is greater than or equal to the pressing threshold; The voltage change rate sequence includes m consecutive first voltage change rates; wherein m is greater than or equal to 2.
3. The method according to claim 2, characterized in that The voltage change rate threshold also includes a release threshold, and determining whether the piezoelectric ceramic is pressed according to the voltage change rate sequence and the voltage change rate threshold includes: When the voltage change rate sequence meets a second preset condition, determining that the piezoelectric ceramic is not pressed; The second preset condition includes at least one of the following: The voltage change rate sequence includes a second voltage change rate; wherein the second voltage change rate is less than or equal to the release threshold; The voltage change rate sequence includes m consecutive second voltage change rates; wherein m is greater than or equal to 2.
4. The method according to claim 1, characterized in that The first voltage sequence is obtained by digitally converting an analog voltage signal through an analog-to-digital converter, and the analog voltage signal is a signal at both ends of the piezoelectric ceramic collected at the set time interval.
5. The method according to claim 1, characterized in that: The voltage change rate threshold includes a press threshold, and the step of determining the press threshold includes: Obtaining N groups of historical voltage change rate sequences for the most recent N times when the piezoelectric ceramic is in a pressed state; wherein N is greater than or equal to 1; The pressing threshold is determined according to the N groups of historical voltage change rate sequences.
6. The method according to claim 5, characterized in that The step of determining the pressing threshold according to the N groups of historical voltage change rate sequences includes: According to the N groups of historical voltage change rate sequences, determining the average voltage change rate corresponding to each group of historical voltage change rate sequences, and obtaining N average voltage change rates; The pressing threshold is determined according to the N average voltage change rates.
7. The method according to claim 5, characterized in that The voltage change rate threshold also includes a release threshold, and the step of determining the release threshold includes: Obtaining N groups of historical voltage change rate sequences for the most recent N times when the piezoelectric ceramic is in a non-pressed state; wherein N is greater than or equal to 1; The release threshold is determined according to the N groups of historical voltage change rate sequences.
8. The method according to claim 1, characterized in that: Before determining the voltage change rate sequence according to the first voltage sequence and the set time interval, the method further includes: The first voltage sequence is normalized to obtain a second voltage sequence as a new first voltage sequence.
9. An electronic device comprising a memory and a processor, wherein the memory is used to store executable instructions; and the processor is used to operate according to the control of the instructions to execute the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Touch control method and electronic equipment
CN110618763A
Touch-sensitive pad capable of detecting depressing pressure
US20080007532A1