CN116719429A - System and method capable of dynamically adjusting pressure sensing trigger threshold - Google Patents

System and method capable of dynamically adjusting pressure sensing trigger threshold Download PDF

Info

Publication number
CN116719429A
CN116719429A CN202310717969.XA CN202310717969A CN116719429A CN 116719429 A CN116719429 A CN 116719429A CN 202310717969 A CN202310717969 A CN 202310717969A CN 116719429 A CN116719429 A CN 116719429A
Authority
CN
China
Prior art keywords
pressure
voltage
thr
value
adc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310717969.XA
Other languages
Chinese (zh)
Inventor
祝志文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Liangan Electronic Technology Co ltd
Original Assignee
Jiangxi Liangan Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Liangan Electronic Technology Co ltd filed Critical Jiangxi Liangan Electronic Technology Co ltd
Priority to CN202310717969.XA priority Critical patent/CN116719429A/en
Publication of CN116719429A publication Critical patent/CN116719429A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Force Measurement Appropriate To Specific Purposes (AREA)

Abstract

The application relates to the technical field of touch control of dot matrix digital pens, and particularly discloses a system and a method capable of dynamically adjusting a touch trigger threshold value of a touch trigger, wherein the system comprises a reference voltage serving as an input power supply, a touch film and a fixed value resistor which are electrically connected with the reference voltage in sequence, an operational amplifier, an analog-to-digital converter and a micro-control unit which are electrically connected with a voltage node between the touch film and the fixed value resistor in sequence, the micro-control unit is used for transmitting signals with a main processor, and the system further comprises an ADC sampling detection circuit, an ADC sampling detection program and an annular queue memory which are arranged in the micro-control unit and are used for transmitting signals with the micro-control unit.

Description

System and method capable of dynamically adjusting pressure sensing trigger threshold
Technical Field
The application relates to the technical field of touch control of dot matrix digital pens, and particularly discloses a system and a method capable of dynamically adjusting a touch trigger threshold.
Background
The dot matrix digital pen is a new writing tool, which is basically composed of a pressure sensor, a high-speed camera, a main processor for data calculation, a battery, a data memory and a Bluetooth or USB communication module. When writing, the dot matrix digital pen stores the written characters or pictures on the paper in a bitmap form in a computer to form a document, and the document can be synchronously displayed through projection if required.
The dot matrix digital pen is usually used as a teaching tool or a meeting recording pen, when the dot matrix digital pen is used as the teaching tool, students can write by using the dot matrix digital pen, the students can write, do homework, answer questions and other traditional processes by using the pen, and the homework, handwriting practice, answer questions and other processes of each student using the dot matrix digital pen which need to write in paper can be converted into vertical, so that the manual time for correcting homework, examination paper, handwriting practice and the like is reduced, and the paper reading and correcting homework pressure of teachers is reduced.
However, in the prior art, the characteristics of the pressure sensing of the dot matrix digital pen are fatigued with the increase of the use times, so that the resistance value of the pressure sensing is shifted under the same pressure degree, and the preset pressure threshold value is also changed, so that the pen error occurs. The triggering of the camera in the pen is due to the pressure sensing the pen core pressure, and the pressure threshold is a fixed value. However, the pressure-sensitive film itself is a polymer material, and there is material fatigue. It is verified that the pressure sensing threshold value is reduced by about 1% -2% when the pressure sensor is pressed for about 10 ten thousand times under the pressure of 15g, and the pressure sensing threshold value is reduced more rapidly as the using strength is increased. In the prior art, a dot matrix digital pen capable of adjusting the pressure sensing threshold value according to the using times is not available.
When the pressure sensing threshold is changed, the pen is easy to touch by mistake, for example, when a student closes a pen cap, but holds the pen by hand to turn around, or when the student plays the pen with fingers, the pressure sensing is caused by acceleration, rotation force, even the action force such as pen falling and the like, so that the camera is triggered to start writing track tracking, and the last stroke which is actually written is caused to be connected with the pen by mistake due to new writing track tracking, so that a character connecting structure or a more than radical structure is formed, and the character is unclear or can not be recognized. A trigger for a pen-up, as shown in figure 8 of the drawings, occurs after a threshold pressure drop, and the recording of lost notes due to insufficient writing pressure to reach the threshold. It can be seen that when the threshold is changed, the experience for the user is greatly reduced.
Accordingly, the present inventors have devised a system and a method for dynamically adjusting a touch trigger threshold to solve the above-mentioned problems.
Disclosure of Invention
The application aims to solve the problems that in the long-term use process of the traditional dot matrix digital pen, the sensitivity of an internal pressure sensitive film is reduced due to material fatigue, the pressure sensitive threshold is reduced, the working state of a camera is easy to change due to pressure change when a user writes, and the recorded characters are connected with the pen or the pen is lost.
In order to achieve the above objective, the basic scheme of the present application provides a dynamically adjustable voltage-sensing triggering threshold system, which comprises a voltage-sensing film and a constant value resistor, wherein the voltage-sensing film and the constant value resistor are electrically connected with the reference voltage in sequence, and a voltage node between the voltage-sensing film and the constant value resistor is also electrically connected with an operational amplifier, an analog-to-digital converter and a micro-control unit in sequence, wherein the micro-control unit is used for transmitting signals with a main processor;
the pressure-sensitive film is used as a variable resistor, when the pressure-sensitive film is not pressed, the resistance value of the variable resistor is infinite, when the pressure of the pressure-sensitive film is below a pressure-sensitive threshold value and gradually increases, the resistance value of the variable resistor is positioned in a resistance value interval in a gradually decreasing trend, and when the pressure of the pressure-sensitive film is above the pressure-sensitive threshold value and gradually increases, the resistance value of the variable resistor gradually decreases along with the increase of the pressure;
the device also comprises an ADC sampling detection circuit, an ADC sampling detection program and an annular queue memory, wherein the ADC sampling detection circuit is arranged in the micro-control unit, the ADC sampling detection program is matched with the ADC sampling detection circuit, and the annular queue memory is used for signal transmission with the micro-control unit.
Further, the output voltage of the variable resistor is calculated as follows:
wherein V is out Representing the voltage value of the output voltage, R s Is the resistance of the variable resistor after the pressure-sensitive film is pressedValue of R a Is the resistance value of a constant value resistor, V ref Is the voltage value of the reference voltage.
Further, the micro control unit is a microcontroller.
The basic scheme of the application also provides a pressure threshold detection method, which comprises the following steps:
step S01: the pressure sensing film is pressed, and when the pressure exceeds a pressure threshold, the resistance value of the pressure sensing film is gradually reduced, and an output voltage is generated through the operational amplifier;
step S02: sampling the output voltage by the microcontroller based on the ADC sampling detection circuit and the ADC sampling detection program to obtain a sampling voltage;
step S03: transmitting the voltage value of the sampling voltage to a decision algorithm for calculation, and transmitting the calculated result to a pressure threshold algorithm for solving;
step S04: the values solved by the pressure threshold algorithm are passed to the ring queue store.
Further, in step S01, the method steps of receiving, by the microcontroller, the voltage value of the sampled voltage based on the ADC sampling detection circuit and the ADC sampling detection program are as follows:
the micro controller directly reads the register in the ADC sampling circuit, obtains the voltage of the ADC pin and then directly writes the voltage into the RAM in the micro controller through the bus.
Further, in step S01, the method steps of receiving, by the microcontroller, the voltage value of the sampled voltage based on the ADC sampling detection circuit and the ADC sampling detection program are as follows:
registers in the ADC sampling integrated circuit are stored directly into the internal RAM by a direct memory in the microcontroller.
Further, the decision algorithm specifically includes the following formula:
wherein delta represents standard deviation, N is the number of sampled ADC voltage values, V i For the value of the ADC sampling voltage, V i Equal to V out Mu is N samples V i Average value of (2), namely:
wherein N is more than or equal to 1, and the specific decision algorithm implementation comprises the following steps:
step X01: the data buffer areas M with the same number as N are set for storing and calculating delta, and mu and delta are set to be calculated once for matching operation of a decision algorithm, wherein the calculation result of delta is a constant K;
step X02: performing one-time decision algorithm matching operation, and comparing the calculated delta with K according to the following rule;
when delta calculated by the decision matching algorithm is larger than K value calculated last time, the calculation and delta are invalid, and the V of the N outputs is immediately discarded i The data is re-buffered in region M and the algorithm then begins to re-match and calculate the N V of the next set of consecutive ADC sample inputs again i Data and carrying out decision algorithm matching operation again;
when delta calculated by the decision matching algorithm is smaller than the K value calculated last time, the delta is effective, K is replaced by delta calculated by the calculation and stored in the buffer area M;
step X03: by selecting V i Definition of N V i Minimum value V of voltage in sample min The method comprises the following steps:
V min =Min(V i )
wherein Min function is at V 0 ,V 1 ,V 2 ……V i The smallest one of the N samples is taken, and then V is obtained min
Further, the pressure threshold algorithm specifically includes the following formula:
V thr =V min -Δv
wherein V is thr Is the pressureThe threshold value, deltav, is the offset, is a scalar constant value, V min Is the set of N ADC sample voltages V i Minimum value of sample voltage.
The basic scheme of the application also provides a method capable of dynamically adjusting the pressure sensing trigger threshold, which comprises the following steps:
step A01: acquisition of pressure threshold V by cycle traversal of a microcontroller thr
Step A02: the newly calculated V obtained in the step A01 thr And is named: v (V) thr-new The pressure threshold V currently stored is fetched from the memory thr And is named: v (V) thr-old
Step A03: executing judgment conditions: comparative V thr-new V (V) thr-old If V thr-new >V thr-old Then V in EPROM of memory is not updated thr If V thr-new <V thr-old Then update V in EPROM of microcontroller thr As a new pressure threshold.
The principle and effect of this scheme lie in:
1. the application provides a pressure-sensitive film which is used as a variable resistor by the carried pressure-sensitive film, the pressure applied on the pressure-sensitive film can be converted into the resistance value of the variable resistor, when the pressure-sensitive film is not pressed, the resistance value of the variable resistor is infinite, when the pressure applied by the pressure-sensitive film is below the pressure-sensitive threshold and gradually increases, the resistance value of the variable resistor is located in a resistance value section with gradually decreasing trend, when the pressure applied by the pressure-sensitive film is above the pressure-sensitive threshold and gradually increases, the resistance value of the variable resistor gradually decreases along with the increase of the pressure applied, and the resistance value of the variable resistor decreases along with the increase of the pressure applied.
2. The application detects the voltage before and after being pressed by the ADC sampling detection circuit and the matched ADC sampling detection program which are arranged in the micro-control unit, and aims at the problem that the pressure sensing threshold value is lowered due to material fatigue in the long-term use process of the traditional dot matrix digital pen, so that the pressure sensing threshold value is lowered due to sensitivity lowering caused by material fatigue, the working state of the camera is changed due to pressure change when a user writes, and the recorded characters are further caused by continuous or continuous conditions.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram showing a circuit structure of a system and a method capable of dynamically adjusting a touch trigger threshold according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a microcontroller of a system and method for dynamically adjusting a touch trigger threshold according to an embodiment of the present application;
FIG. 3 is a schematic diagram showing algorithm steps of a system and method for dynamically adjusting a touch trigger threshold according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a microcontroller of a system and method for dynamically adjusting a touch trigger threshold according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a pressure sensitive film of a system and method for dynamically adjusting a pressure sensitive trigger threshold according to an embodiment of the present application;
FIG. 6 is a schematic diagram showing the pressure-resistance characteristics of a system and method for dynamically adjusting the trigger threshold of pressure sensing according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a pressure sensitive film of a system and method for dynamically adjusting a pressure sensitive trigger threshold according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating a system and a method for dynamically adjusting a touch trigger threshold according to an embodiment of the present application.
Detailed Description
In order to further describe the technical means and effects adopted by the present application for achieving the intended purpose, the following detailed description will refer to the specific implementation, structure, characteristics and effects according to the present application with reference to the accompanying drawings and preferred embodiments.
Reference numerals in the drawings of the specification include: a compression zone 1.
A system and method for dynamically adjusting a touch trigger threshold is shown in FIG. 1:
comprises a new pressure sensing trigger threshold system applied in a dot matrix digital pen.
In this embodiment, the improved dot matrix digital pen is a dot matrix digital pen commonly used in the prior art, and mainly comprises a pressure sensor, a high-speed camera, a main processor, a battery, a data memory and a bluetooth or USB communication module. The working principle of the traditional dot matrix digital pen is as follows: when the pen point is pressed down and reaches a pressure threshold value, the pressure sensor is triggered after receiving the pressure larger than the pressure threshold value, the built-in high-speed camera is started, the dot matrix passed by the pen point is photographed at the speed of 100 pieces per second, information such as dot matrix coordinates, note sequence, pressure data, movement speed and the like is transmitted to the built-in main processor, and finally, the information is output outwards through the Bluetooth or USB communication unit.
In the prior art, after the pressure sensor detects and transmits a pressure value signal to the main processor, the pressure sensing detection is generally completed by a main control CPU, and the main control CPU invokes the pressure sensing detection, namely the pressure sensing ADC sampling, at a high frequency in addition to the camera operation, decoding and the like. The pressure sensing detection in the prior art can cause the condition that the threshold value is reduced due to material fatigue, so that the problem that the pressure threshold value is reached when the pen point is subjected to slight pressure after a long time is caused, and the pressure sensing detection is triggered.
The embodiment aims at improving a pressure sensing system and a pressure sensing triggering threshold system of the dot matrix digital pen in the prior art. The pressure sensing circuit structure is mainly used for improving the pressure sensing circuit structure for sensing pressure and feeding back the pressure in the dot matrix digital pen.
In the present embodiment, the following abbreviations are used to refer to the corresponding elements, respectively:
ADC: an analog-to-digital converter; MCU: a micro control unit; v (V) ref : a reference voltage V; ringBuf: storing an annular queue; DMA: direct memory access. The RingBuf may also be referred to as a ring queue, and is a data structure in computer programming.
Specifically, the pressure sensing circuit includes a reference voltage V as an input power source ref In turn with reference voltage V ref Electrically connected pressure-sensitive film and fixed resistor R a In the pressure sensitive film and the fixed resistor R a The equivalent voltage nodes are also electrically connected with an operational amplifier U in turn 1 The micro control unit is used for transmitting signals to the main processor. Wherein the resistor R is of constant value a Is grounded as the negative electrode of the variable resistor R s In FIG. 1, the pressure-sensitive film is shown as a variable resistor R s And (3) representing.
In this embodiment, a software control subsystem for performing information interaction with the micro control unit is further provided. The software control subsystem comprises a ring-shaped queue memory and a software self-adaptive pre-judging algorithm carried in the micro control unit. The ring queue memory is also provided with a direct memory.
The micro control unit is also electrically connected with a main processor carried in the dot matrix digital pen in the prior art, and the main processor is used as a main control unit, so that signals are transmitted between the micro control unit and the main control unit.
In the present embodiment, the pressure sensing film is used as the pressure sensor for inputting pressure, and the variable resistor R is used when the pressure sensing film is not pressed s Is infinite, when the pressure of the pressure-sensitive film is below the pressure-sensitive threshold and gradually increases, the variable resistor R s The resistance value of the variable resistor R is gradually reduced in a resistance value interval, and when the pressure of the pressure sensitive film is above the pressure sensitive threshold value and gradually increases s Resistance of (c) increases with pressureAnd decreases.
The micro control unit is internally provided with a special ADC sampling detection program, the result of the ADC sampling detection program is stored by adopting a method of a circular queue memory, and before the circular queue memory stores ADC data, the ADC data is subjected to a software self-adaptive pre-judging method which comprises a threshold self-adaptive triggering algorithm, the pressure triggering threshold can be automatically adjusted, false triggering is prevented, and then all the read ADC sampling values which are larger than the threshold are put into the circular queue memory. Thus, the phenomena of false touch and continuous pen can be obviously reduced.
In this embodiment, the micro control unit is specially responsible for ADC sampling of pressure sensing, the sampling frequency may reach 1MHz, i.e. the sampling period is 1 microsecond (parts per million second), the sampling precision is 14 bits, i.e. the value is 0-16383, and if the reference voltage is 3.3V, the sampling progress may be 0.2014 millivolts (0.0002014V, about five thousandths of volts).
Specifically, the micro control unit is a micro program controller, and is hereinafter referred to as MCU. In this embodiment, the instruction architecture of the MCU is not limited, and the ARM-Cortex M series, RISC series, MIPIS series, etc. may be used, or the instruction bit number of the MCU may be limited, for example, 8-bit, 16-bit, 32-bit machines may be used. And the MCU main frequency is not limited, but the full-load power consumption is limited within 200mW, and the sleep power consumption is limited at microampere level.
In the embodiment, the construction of the hardware system is performed by taking a domestic MCU chip Takara Ling Wei DS-TLSR8250 as an example of a micro-program controller. The MCU is a system on a SOC chip, integrates the sampling function of an ADC (Analog to Digital Converter analog-to-digital converter), has the sampling resolution of over 8 bits, is not limited to specific resolution, supports high-frequency sampling, has the highest sampling rate of up to 1MHz or even higher, and has adjustable other lower sampling frequencies. Specifically, the pin connection relation of the micro-program controller is shown in fig. 4 of the specification:
wherein the Press_ADC pin of the MCU is a voltage sampling pin of a pressure sensing film, and a TLV379IDCKT operational amplifier U is arranged in the middle 1 If the chip isolation is not added, the Press_ADC pin of the MCU is directly connected to the variable resistor R shown in figure 1 s And a constant resistor R a Is directly connected to the operational amplifier U shown in figure 1 at the node of the equipotential voltage 1 Since the Press_ADC pin of MCU may have micro-current conduction, voltage division may occur, resulting in inaccurate sampling. And the MCU internal designs of each producer are different, so that an operational amplifier is added to isolate the current and the voltage of the point location for the safety device, so that the ADC sampling is more accurate.
In fig. 5, wherein an operational amplifier U 1 SMT-08002 is a pressure sensitive film with positive and negative legs as the variable resistor R shown in FIG. 1 s The greater the pressure applied to the pressure-sensitive film surface pressure-sensitive area, the variable resistance R s The smaller the resistance value of (C), the variable resistance R is under no pressure s Is infinite. Specifically, in this embodiment, the general structural composition of the pressure-sensitive film used is as shown in fig. 7:
the pressure-sensitive film consists of a polyester film with excellent comprehensive mechanical properties and environmental protection, a high-conductivity material, a graphene pressure-sensitive material and an adhesive material. The front and back surfaces are provided with double-sided adhesive tapes, so that the installation operation is convenient. The output interface is made of wear-resistant and oxidation-resistant materials, so that contact conduction of the metal elastic sheet or the thimble is facilitated. Receiving pressure through the pressure receiving area and taking the pressure received by the pressure receiving area as a variable resistor R s Is a pressure of the pressure sensor. The pressure sensing film is provided with a pressure receiving area, and the pressure receiving area receives pressure and senses the pressure. The pressure sensing film used in the embodiment is a film type pressure sensor, and is a film pressure sensor commonly used in the prior art, and the specific structure is not repeated.
In the actual use process, the variable resistor R s The resistance of (c) is not limited to the above-mentioned change.
Specifically, as shown in FIG. 5, SMT-08002 is used as the output voltage V of the resistor of the pressure sensitive film out The calculation formula is as follows:
wherein V is out Voltage value representing output voltage,R s Is the resistance value of the variable resistor after the pressure-sensitive film is pressed, R a Is the resistance value of a constant value resistor, V ref Is the voltage value of the reference voltage.
The variable resistance R is determined according to equation 1 s The pressure-resistance characteristics with pressure values are shown in fig. 6:
in the table, the pressure value is taken as the abscissa, and the variable resistor R is taken as s The reciprocal of the resistance of (c) is taken as the ordinate. As can be seen from fig. 6, the pressure F of the pressed region of the piezoelectric film is set at [0,10 ] (unit: gram) the variable resistance R of the piezoelectric film s Is infinite. When the pressure F is within the range of [10,500 ], the pressure F and the resistance value are 1/R s As shown in FIG. 6, the variable resistance R is gradually increased s The actual resistance of (c) gradually decreases.
It was thus demonstrated that when the pressure receiving region of the pressure-sensitive film is not acted upon by external pressure, the pressure-sensitive film is in an open state, and the variable resistor R is connected to the pressure-sensitive film s Is infinite; when the pressure is about 10g, the pressure-sensitive film sensor enters a trigger state, and the variable resistor R s The resistance value of (2) is less than 200KΩ; when the pressure is further increased, the variable resistance R s The resistance value of (2) is correspondingly reduced, and the variable resistor R is used when the pressure reaches 500g s The resistance of (2) is less than 2.5KΩ. Variable resistor R s The resistance of the pressure sensitive film is correspondingly changed along with the change of the external pressure applied to the pressure sensitive area.
However, due to the consistency of the pressure sensitive film production environment, 10 in the intervals of [0,10 ] and [10,500 ] is not constant, and a positive and negative drift value of 10+/-3 and a drift of [7, 13 ] are generated]I.e. production errors. That is, some dot matrix digital pens have a resistance value (original resistance value is infinite) at a pressure of 7 g, and some dot matrix pens have a resistance value at a pressure of 15g, which is different by 13 g. Variable resistor R at this time s The resistance value of (2) is infinite and corresponds to an open circuit, but the above situation is not within the consideration of the present embodiment.
In addition, in fig. 4, the MCU has an interrupt pin to tell the main control unit about the trigger event, and then the main control unit actively reads the pressure data stored in the ring queue inside the MCU.
The above is a specific improvement of the pressure sensing circuit structure in the pressure sensing system, and the following is a specific step of the self-adaptive pre-judging method and the annular queue memory carried in the MCU. The pre-judging method can automatically adjust the pressure trigger threshold value to prevent false triggering, and then all the read ADC sampling values larger than the threshold value are put into the annular queue memory. Thus, the phenomena of false touch and continuous pen are obviously reduced, and the error rate can be reduced by 80 percent.
As shown in fig. 2, which is a structural diagram of the internal logic of the MCU, the internal ADC samples the voltage of the ADC pin of the integrated circuit for high frequency sampling (measurement). In the embodiments per se, there are two methods to read the ADC samples (measurements) to the ADC pin voltage:
the method comprises the following steps: the register in the ADC sampling integrated circuit is read by a code program running on the CPU core of the MCU, so that the ADC pin voltage is obtained, and then written into the internal RAM of the MCU through a bus.
The second method is as follows: registers in the ADC sampling integrated circuit (ADC pin voltages are measured internally) are directly stored into the internal RAM by means of internal DMA, i.e. direct memory access (Direct Memory Access), without the CPU and code involvement in the MCU.
Note that in the first method, two key operations are performed before the ADC sampling data is stored in the internal RAM, and calculation and verification are performed by a decision algorithm matching and a pressure threshold algorithm, where the decision algorithm matching and the pressure threshold algorithm are sequentially performed and are the disassembling steps of the adaptive pre-judging algorithm. As shown in fig. 3 below, in method two, the same steps as in method one are also used. The first method differs from the second method only in that the acquisition of the ADC data source is different.
As shown in fig. 3, in the first and second methods, the data received by the register in the ADC sampling circuit and the data directly DMA-input to the register in the ADC sampling circuit of the internal RAM are both transferred to the decision algorithm for matching, and after matching, the result of the matching is solved by the pressure threshold algorithm and stored in the ring queue data structure in the internal RAM.
In fig. 6, the decision algorithm matching is to calculate δ based on the standard deviation formula:
where N is the number of ADC sample voltage values taken, i.e. the number of samples, the ADC sample voltage value V i ,V i Is sampled V out Mu is N samples V i Average value of (2), namely:
v of continuous ADC sampling input by standard square difference i Obtain effective filtering effect, and select a proper group of V i
In this embodiment, N is defined to be greater than or equal to 1, and the implementation of the specific decision algorithm includes the following steps:
step X01: the data buffer areas M with the same number as N are set for storing and calculating delta, and mu and delta are set to be calculated once for matching operation of a decision algorithm, wherein the calculation result of delta is a constant K;
step X02: performing one-time decision algorithm matching operation, and comparing the calculated delta with K according to the following rule;
when delta calculated by the decision matching algorithm is larger than K value calculated last time, the calculation and delta are invalid, and the V of the N outputs is immediately discarded i The data is re-buffered in region M and the algorithm then begins to re-match and calculate the N V of the next set of consecutive ADC sample inputs again i Data and carrying out decision algorithm matching operation again;
when delta calculated by the decision matching algorithm is smaller than the K value calculated last time, the delta is effective, K is replaced by delta calculated by the calculation and stored in the buffer area M;
step (a)X03: by selecting V i Definition of N V i Minimum value V of voltage in sample min The method comprises the following steps:
V min =Min(V i ) (equation 4)
Wherein Min function is at V 0 ,V 1 ,V 2 ……V i The smallest one of the N samples is taken, and then V is obtained min So CPU executes a decision algorithm matching operation to obtain M, delta, mu and V min
The pressure threshold algorithm step is as follows, and the pressure uniquely corresponds to the variable resistance R according to the pressure-resistance characteristic table of FIG. 6 s Resistance value of (1), variable resistance value R s The resistance value of (2) uniquely corresponds to the voltage V i Applying equations 1 and 4 yields V min Thereafter, the pressure threshold V thr The calculation method of (1) is as follows:
V thr =V min Δv (equation 5)
Where Deltav is the offset and is a scalar constant value, which in this embodiment may be designated V min 10% in size. In other embodiments the ratio of Δv is not limited. V (V) min Is the set of N ADC sample voltages V i Minimum value of sample voltage. And when the products leave the factory, pressure calibration can be carried out for each product. An initial value needs to be set for the pressure threshold as a criterion. Pressure threshold V thr The factory setting method comprises the following steps:
the first step: applying a force F to the pressed region along the vertical direction of the pressed region 0 For example, the force may be 10g, and in the present embodiment, the specific F is not limited 0 Size of the product.
And a second step of: giving instruction to the main control, the main control CPU reads a register in the ADC sampling circuit, and obtains the current pressure F by applying the formula 1 0 Corresponding to voltage value V 0
And a third step of: by V 0 Substitute V thr And V is taken thr Stored in EPROM (or FLASH) of MCU, the specific storage position is not limited in the embodiment, but the parameter can be ensured to be permanently stored after shutdown and power failure, and thenThe secondary boot can be quickly read by the CPU, and the storage position is readable and writable.
For this purpose, initially V thr It has been shown that the fatigue of the pressure sensitive membrane occurs due to long term compression, and the formulas 1 to 5 are cycled through each time the decision algorithm is run. The triggering threshold of the pressure sensitive film characteristic is reduced, and V thr Subject to V min So in order to prevent V thr Is greater than the initial value V 0 In the iterative calculation of the latest V using equations 1 to 5 thr Time (called V) thr-new ) Will compare the old V that has been previously stored in the EPROM thr-old If V thr-new >V thr-old Then V in EPROM is not updated thr
If V is thr-new <V thr-old Then update V in EPROM thr
The logic of the segment is expressed by the C language code as follows:
unsigned int v_thr_new=0;
unsigned int v_thr_old=0;
obtaining the current ADC sampling voltage value V i ,V i Is sampled V out Equation 1, equation 4 and equation 5 are applied
v_thr_new=get_current_vout();
Reading/writing the Vthr currently stored in EPROM
v_thr_old=get vthr_from_eprom();
/(judgement), and update Vthr
if(v_thr_new<v_thr_old)
write_vthr_to_eprom(v_thr_new)
When the above codes are executed by the CPU, it is noted that the frequency of operation of the decision matching algorithm and the pressure thresholding algorithm must be less than or equal to the ADC sampling frequency, otherwise repeated calculations may result.
The present application is not limited to the above embodiments, but is capable of modification and variation in detail, and other modifications and variations can be made by those skilled in the art without departing from the scope of the present application.

Claims (9)

1. A system for dynamically adjusting a touch trigger threshold, comprising: the voltage node between the voltage sensing film and the constant value resistor is also electrically connected with an operational amplifier, an analog-to-digital converter and a micro control unit in sequence, and the micro control unit is used for transmitting signals with a main processor;
the pressure-sensitive film is used as a variable resistor, when the pressure-sensitive film is not pressed, the resistance value of the variable resistor is infinite, when the pressure of the pressure-sensitive film is below a pressure-sensitive threshold value and gradually increases, the resistance value of the variable resistor is positioned in a resistance value interval in a gradually decreasing trend, and when the pressure of the pressure-sensitive film is above the pressure-sensitive threshold value and gradually increases, the resistance value of the variable resistor gradually decreases along with the increase of the pressure;
the device also comprises an ADC sampling detection circuit, an ADC sampling detection program and an annular queue memory, wherein the ADC sampling detection circuit is arranged in the micro-control unit, the ADC sampling detection program is matched with the ADC sampling detection circuit, and the annular queue memory is used for signal transmission with the micro-control unit.
2. The system for dynamically adjusting a trigger threshold of a pressure sensor of claim 1, wherein the output voltage of the variable resistor is calculated as follows:
wherein V is out Representing the voltage value of the output voltage, R s Is the resistance value of the pressed pressure sensitive film,R a Is the resistance value of a constant value resistor, V ref Is the voltage value of the reference voltage.
3. The system of claim 2, wherein the micro-control unit is a microcontroller.
4. A pressure threshold detection method according to claim 3, comprising the steps of:
step S01: the pressure sensing film is pressed, and when the pressure exceeds a pressure threshold, the resistance value of the pressure sensing film is gradually reduced, and an output voltage is generated through the operational amplifier;
step S02: sampling the output voltage by the microcontroller based on the ADC sampling detection circuit and the ADC sampling detection program to obtain a sampling voltage;
step S03: transmitting the voltage value of the sampling voltage to a decision algorithm for calculation, and transmitting the calculated result to a pressure threshold algorithm for solving;
step S04: the values solved by the pressure threshold algorithm are passed to the ring queue store.
5. The method for detecting a pressure threshold according to claim 4, wherein in step S01, the method for receiving, by the microcontroller, the voltage value of the sampling voltage based on the ADC sampling detection circuit and the ADC sampling detection program comprises the steps of:
the micro controller directly reads the register in the ADC sampling circuit, obtains the voltage of the ADC pin and then directly writes the voltage into the RAM in the micro controller through the bus.
6. The method for detecting a pressure threshold according to claim 4, wherein in step S01, the method for receiving, by the microcontroller, the voltage value of the sampling voltage based on the ADC sampling detection circuit and the ADC sampling detection program comprises the steps of:
registers in the ADC sampling integrated circuit are stored directly into the internal RAM by a direct memory in the microcontroller.
7. A method of pressure threshold detection according to any of claims 5 or 6, wherein the decision algorithm comprises the following:
wherein delta represents standard deviation, N is the number of sampled ADC voltage values, V i For the value of the ADC sampling voltage, V i Equal to V out Mu is N samples V i Average value of (2), namely:
wherein N is more than or equal to 1, and the specific decision algorithm implementation comprises the following steps:
step X01: the data buffer areas M with the same number as N are set for storing and calculating delta, and mu and delta are set to be calculated once for matching operation of a decision algorithm, wherein the calculation result of delta is a constant K;
step X02: performing one-time decision algorithm matching operation, and comparing the calculated delta with K according to the following rule;
when delta calculated by the decision matching algorithm is larger than K value calculated last time, the calculation and delta are invalid, and the V of the N outputs is immediately discarded i The data is re-buffered in region M and the algorithm then begins to re-match and calculate the N V of the next set of consecutive ADC sample inputs again i Data and carrying out decision algorithm matching operation again;
when delta calculated by the decision matching algorithm is smaller than the K value calculated last time, the delta is effective, K is replaced by delta calculated by the calculation and stored in the buffer area M;
step X03: by selecting V i Definition of NV i Minimum value V of voltage in sample min The method comprises the following steps:
V min =Min(V i )
wherein Min function is at V 0 ,V 1 ,V 2 ……V i The smallest one of the N samples is taken, and then V is obtained min
8. The method for detecting a pressure threshold according to claim 7, wherein the pressure threshold algorithm specifically comprises the following formula:
V thr =V min -Δv
wherein V is thr For the pressure threshold, deltav is the offset, is a scalar constant value, V min Is the set of N ADC sample voltages V i Minimum value of sample voltage.
9. A method for dynamically adjusting a touch trigger threshold in accordance with claim 8, comprising the steps of:
step A01: acquisition of pressure threshold V by cycle traversal of a microcontroller thr
Step A02: the newly calculated V obtained in the step A01 thr And is named: v (V) thr-new The pressure threshold V currently stored is fetched from the memory thr And is named: v (V) thr-old
Step A03: executing judgment conditions: comparative V thr-new V (V) thr-old If V thr-new >V thr-old Then V in EPROM of memory is not updated thr If V thr-new <V thr-old Then update V in EPROM of microcontroller thr As a new pressure threshold.
CN202310717969.XA 2023-06-16 2023-06-16 System and method capable of dynamically adjusting pressure sensing trigger threshold Pending CN116719429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310717969.XA CN116719429A (en) 2023-06-16 2023-06-16 System and method capable of dynamically adjusting pressure sensing trigger threshold

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310717969.XA CN116719429A (en) 2023-06-16 2023-06-16 System and method capable of dynamically adjusting pressure sensing trigger threshold

Publications (1)

Publication Number Publication Date
CN116719429A true CN116719429A (en) 2023-09-08

Family

ID=87874864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310717969.XA Pending CN116719429A (en) 2023-06-16 2023-06-16 System and method capable of dynamically adjusting pressure sensing trigger threshold

Country Status (1)

Country Link
CN (1) CN116719429A (en)

Similar Documents

Publication Publication Date Title
US6763320B2 (en) Data input device for individuals with limited hand function
US5561447A (en) Coordinate input apparatus
Kunjumon et al. Hand gesture recognition system for translating indian sign language into text and speech
JPS63184130A (en) Input/output device
CN104679367A (en) Transmitter and controlling method thereof
KR102061863B1 (en) Touch sensing device and driving method thereof
TWI567592B (en) Gesture recognition method and wearable apparatus
US10175807B2 (en) Support of narrow tip styluses on touch screen devices
CN110568945A (en) Dynamic calibration method for water outlet reference of active pen, active pen and electronic equipment
JP2839972B2 (en) Pressure-sensitive coordinate input device
US20220334671A1 (en) Touch screen controller for determining relationship between a user&#39;s hand and a housing of an electronic device
US20170131796A1 (en) Calibrating methodology of stylus pressure mapping curve for matching microsoft® window 10 standard in mass production
CN116719429A (en) System and method capable of dynamically adjusting pressure sensing trigger threshold
US9857890B2 (en) Information processing method and electronic apparatus
CN111507244B (en) BMI detection method and device and electronic equipment
CN112506366B (en) Processing method, terminal and storage medium for active pen writing abnormity
KR20120035711A (en) Electric writing device and driving method thereof
CN112486345B (en) Processing method, device, terminal and storage medium for active pen writing abnormity
US11216182B2 (en) Dynamic configuration of a virtual keyboard
US20150370397A1 (en) Systems and methods for character and command input
US9244538B2 (en) Using portable electronic devices for user input
CN115042546B (en) Force feedback intelligent pen based on touch Internet of things and writing gesture monitoring method
CN113268385B (en) Multi-finger pressing force phase coordination capacity measurement system and method based on visual sense
US20240118151A1 (en) Sensing data correction system and sensing data correction method
JP3357343B2 (en) I / O device

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