Design a touchpad-based tablet

This design uses the touch buttons made by the pads on the PCB to form the touch area, realizing the hardware design of the touch tablet. The design uses the low-power MSP4302553 as the core of the touch detection of the tablet. Through the experimental research method, the touch button size and touchpad resolution on the PCB board, the wiring mode and distance of the button to the controller, and the distance between the buttons are analyzed. The impact on handwriting detection. On the basis of accurate detection of a single touch button, the selection of appropriate parameters completes the design of the tablet, and the accurate acquisition of the binary image of the user's handwritten input information is realized. Designing a touch tablet on the PCB has the characteristics of simple design, low cost, wear resistance and damage.

The traditional tablet has three types: resistive, capacitive, and electromagnetic pressure sensitive. The resistance and capacitance type tablet respectively determine the user input by changing the resistance value and the capacitance value; after the electromagnetic pressure type is applied by the tablet, the magnetic field generated by the surface circuit in a certain range forms a mutual inductance with the magnetic field generated in the stylus pen. Detection of user input. The three types of tabletes are combined with the touch screen as the input device, which inevitably has the disadvantages of being unable to withstand heavy pressure, poor wear resistance and high cost. The touchpad is designed directly on the PCB to form a tablet, and the capacitive touch handwriting input is realized, which compensates for the limitation of the touch screen input in some simple handwriting input environments.

The design of the touchpad area of ​​the tablet on the PCB board is based on the structure of the matrix keyboard. The main controller can implement the tablet detection with less I/O resources. The controller scans the touch buttons on the touch panel by the row and column, and records the state of each touch point, thereby obtaining a binary image of the user input information.

1 Single touch point accurate detection

1.1 Touch button capacitance distribution

The detection of the capacitive touch button is accomplished by a relaxation oscillator. When there is a touch action, the value of the key capacitance becomes larger, and the oscillation frequency of the relaxation oscillator is reduced. The main controller determines whether a touch action has occurred by detecting a frequency change of the relaxation oscillation.

The touch button capacitance distribution is shown in Figure 1. When there is no touch, the equivalent capacitance of the button is C1=Cg∥Cp∥Ctr∥Ce; and when there is touch, the equivalent capacitance of the button is C2=C1∥Cto. Therefore, the relaxation oscillation capacitance of the button when it is touched becomes larger than that when there is no button, and the oscillation frequency of the button B.jpg Reduced when there is no touch.

A.jpg

1.2 Fixed time gate variable electrode oscillation button detection

Since the equivalent capacitance of the button becomes large when a touch action occurs, the number of pulses of the button becomes small within a fixed time. Therefore, by detecting the number of pulses in both cases, it can be judged whether or not a touch action occurs. The principle of the fixed-time gate-changing electrode oscillation is shown in Figure 2.

C.jpg

The number of relaxation oscillator pulses when there is no touch in the time gate Tgate is recorded separately, and the relative change rate of the number of pulses can be obtained:

D.jpg

By comparing η with the reference relative change rate η0, it is possible to determine whether or not there is a touch action. When η"η0, it shows that the capacitance is obviously increased, there is a touch action; when η"η0, it means that the capacitance change is not obvious, there is no touch action. Therefore, the value of the reference value η is very critical, which directly determines the sensitivity and accuracy of the touch button.

1.3 Adaptive algorithm for single button detection

Due to the instability of air humidity, density, and the circuit environment on the PCB, C1 is not fixed when there is no button press, and there is a certain fluctuation. Therefore, if Key_LVL=N has no button-N, the button value is too small, that is, the selection of η0 is too small, then the change of N without the button may be misjudged as a touch action; and the value of Key_LVL is too large, that is, η0 is greater than The relative rate of change when there is a slight touch action may cause the touch action to be undetectable when it occurs, affecting the sensitivity of the button. The number of counting pulses in Tgate is N=Tgate/T, Tgate is the given counting time, T relaxation oscillation period, then the expression of Key_LVL is as follows:

E.jpg

If the environment in which the touch button is located is basically stable, then C1 and F.jpg , is given after the Tgate time is given. However, the actual environment is not stable, so in order to eliminate the impact of these changes on touch detection, the Key_LVL is modified based on the adaptive idea:

Key_LVLi=Key_LVLi-1+ΔM[i(i-1)]. (3)

Where ΔM[i(i-1)]. It is the correction value for each reference judgment, ΔM[i(i-1)].

It is the ΔMi(i-1) obtained by the difference of Key_LVL obtained twice before. However, the correction effect of such a small comparison result is not ideal and is greatly affected by environmental changes. Then, the Key_LVL value of the first 7 times is recorded, and the adjacent Key_LVL values ​​are made to be poor, and the weighted difference of 6 times is obtained, so ΔM[i(i-1)]. The amendments are as follows:

G.jpg

Where Ci-n is a weighting coefficient, indicating that the difference of each comparison is ΔM[i(i-1)]. The weight in the middle. In order to adapt to the change of environment, Ci-1...Ci-6 decreased in turn. Through several experimental tests, Ci-1=0.4, Ci-2=0.2, Ci-3=0.1, Ci-4=0.1 were selected in the system design. , Ci-5=0.1, Ci-6=0.1, the reference η0 can be automatically adjusted to reduce the influence of environmental factors. According to a large number of experimental measurement designs, η0=10% can detect the touch action more accurately.

Incremental Encoder

A-WXJ-1A-1

Incremental Encoder,Linear Scale Encoder,Dual Concentric Rotary Encoder,Dc Servo Motor Encoder

Yuheng Optics Co., Ltd.(Changchun) , https://www.yuhengcoder.com

Posted on