calibrate lcd touch screen made in china

Touch screens are finding their way into a variety of embedded products. Most touch-enabled devices will require a calibration routine. Here"s a good one.

Resistive-type touch screens are normally used in cost-conscious designs. Their construction is simple, their operation is well understood, and the hardware and software required to support them is readily available from multiple manufacturers.

Despite the advantages of resistive-type touch screens, devices equipped with them almost always require that a calibration algorithm be the first task to run when the final product comes out of the box. Calibration is necessary because it is difficult to perfectly align a touch screen"s coordinates to the display (LCD or otherwise) behind it. If a button or other “live” feature on the display is to be properly activated, the coordinates of the area touched on the screen must be sufficiently close to the coordinates of the feature on the display. Otherwise, the software may not correctly act upon the soft button presses.

This article proposes a calibration algorithm for resistive-type touch screens that is both efficient and effective. This algorithm was developed after identifying the sources of touch screen errors and deriving the optimum method for transforming the coordinates provided by the touch screen to match the coordinates of the display. The calibration method requires that three targets or test points-no more, no less-be displayed and touched in sequence to determine the screen"s individual calibration factors. These calibration factors are then used to translate screen coordinates into true display coordinates.

The cross section of a resistive-type touch screen is shown in Figure 1. The construction is simple. Two sheets of glass are brought together to form a sandwich, the interior glass surfaces having been coated with a thin layer of conductive material. Small glass beads maintain a nominal separation between the conductive surfaces. When a finger or stylus presses against the surface of the glass, the material bends just enough to contact the lower sheet. In this construction the spacing between beads determines the sensitivity of the screen. The closer the beads are, the higher the pressure that must be exerted before the top glass sheet will bend enough to make contact.

An equivalent resistive circuit is shown in Figure 2: a touch screen controller (digitizer or A/D) applies the V sources to the ends of one of the conductive layers, while the other conductive layer-on the opposite sheet of glass-plays the role of the potentiometer wiper. The Vtest value read by the digitizer depends on where the glass is touched and the conductive surfaces come into contact. The controller then translates the voltage reading into a binary quantity representing, for example, the X-coordinate of the point where the screen was touched. The voltage potential is then applied to the second surface"s endpoints and the first surface plays the role of the wiper, yielding a value that represents the Y-coordinate.

Controllers may collect 200 or more samples per second. The sampling rate usually depends on background noise and controller quality. A smart controller may also incorporate useful features like the ability to interrupt the CPU when a touch is detected, as well as the ability to sample continuously at a set rate as long as the screen is being touched. The device idles when the screen is not being touched.

Several sources of error affect the X and Y coordinates produced by the touch screen controller. The most important sources of error are electrical noise, mechanical misalignments, and scaling factors. User idiosyncrasies may also play a role if, for example, the finger or instrument used to activate the screen does not maintain continuous contact or pressure against it. Any of these errors can produce unusable data, and all need to be compensated for if the touch screen data is to be useful.

Electrical noise triggered by thermal or electromagnetic effects and system design weaknesses are omnipresent in all kinds of electrical systems. In the case of a touch screen, the A/D conversion is particularly susceptible to electrical noise because of the high input impedance of the A/D front-end circuitry. In addition to carefully laying out the printed circuit board containing the touch screen controller, noise problems are normally addressed by adding low-pass filtering to the A/D inputs. Software also comes to the rescue, usually discarding one or two of the least significant bits of the A/D conversion and implementing algorithms to remove from the sampled stream those data points that fall outside permissible ranges. The same software algorithms may remove errors introduced by the user. Such errors normally manifest themselves as sampled points that fall well outside permissible limits as the applied pressure varies.

Mechanical misalignments and scaling factors are the errors addressed by the calibration algorithm proposed in this article. Consider the images in Figure 3. The circle represents an image shown by the LCD under the touch screen; the ellipse represents an exaggerated set of coordinates that the touch screen could produce if the user were to trace the round image shown by the LCD. The reconstructed image appears rotated, translated, and scaled by a different factor in each direction. The challenge for the calibration algorithm is to translate the set of coordinates reported by the touch screen into a set of coordinates that accurately represent the image on the display.

To derive a general solution to the problem, it is convenient to describe each point as a mathematical quantity. We see from Figure 4 that it is possible to describe each point on the display as a vector PD and its corresponding equivalent, as reported by the touch screen, as a vector P.

It is also reasonable to assume that P and PD are related by a quantity that transforms the display coordinates into the apparent touch screen coordinates, like this:

where M is the appropriate transformation matrix and the object of this exercise. If we can assign values to the elements of the transformation matrix M, then we can solve for all PD points given the P points reported by the touch screen.

Let us proceed under the assumption that each display point can be obtained from a corresponding touch screen point, but that the touch screen point has suffered rotation, scaling, and translation.

If we express the points as (X,Y) pairs based on the vector"s length and angle, both the display and touch screen points in question can be represented by the following equations:

If the reported touch screen points have experienced rotation because of touch screen misalignment, and qr = qD – q is the angular misalignment of the reported point, an intermediate point is expressed by:

Each of the X and Y dimensions is also scaled by its own factor, which we will call KX and KY. Accounting for scaling produces the following equation, which comes closer to describing a display point in terms of screen point coordinates:

We can now make a key, pragmatic assumption in order to represent Equation 5 in a form that will enable us to solve for its unknown quantities. While the touch screen may be rotated with respect to the display, the rotation angle qr should be sufficiently small that we can assume sinqr

The advantage of Equation 7 is that we have expressed actual display coordinates in terms of touch screen coordinates. Restating the above equation we get:

The previous equations seem almost intuitive. Remember, though, that they are only valid when the angular misalignment between the display and the touch screen is small.

Common calibration algorithms use data from two to as many as five sample points to collect calibration information. The exercise above assumes that display point coordinates can be calculated from touch screen coordinates, and that by making simple assumptions we can obtain calibration data by using three sample points-no more, no less. Three sample points are needed because Equations 9a and 9b each contain three unknowns. With three sample points we can obtain sufficient information to set up and solve the simultaneous equations.

Sample points should also be selected based on practical considerations. They must yield non-redundant simultaneous equations, they must not be too close to the edge of the touch screen (where non-linearities are more likely to occur) and they must be widely spaced to minimize scaling errors. The set of points shown in Figure 5 labeled P0, P1, and P2 meet the suggested requirements. Those points are roughly 10% off the edge of the screen, as far apart as the display geometry allows, and yield the following non-redundant equations:

We need to solve for A, B, C, D, E, and F. Once these parameters are known, obtaining display coordinates is as simple as plugging the raw touch screen data back into Equation 9.

The code in sample.c assumes that your device implements a routine to collect calibration data before attempting to use these functions. An outline of the proposed calibration process is shown in Listing 1. After taking those steps, the calibration procedure is complete and your applications can begin receiving accurate position information from the touch screen system. The function getDisplay-Point() is intended to be called within the touch screen controller"s interrupt routine, after the routine has filtered and debounced the data coming out of the digitizer. In a typical implementation, calling getDisplayPoint() would be the last step needed before a point of touch screen data could be placed in the user-input queue.

1. Call setCalibrationMatrix() with a perfect set of values (see sample.c) to set the touch screen driver to provide raw (non-translated) data. This way you do not need to build special functions to access the data. Instead you simply get coordinates from the same mechanism as your program.

calibrate lcd touch screen made in china

In the previous article, I described the steps needed to install an LCD touchscreen on the Raspberry Pi. In this article, I will show you how to adjust the screen rotation of the LCD to landscape mode, and will show you how to calibrate the touchscreen pointer for optimal accuracy. Just follow the steps below to compete the process of setting up your Raspberry Pi LCD touchscreen:

1. First we need to change the setting for screen rotation in the /boot/cmdline.txt file. This setting is called fbtft_device.rotate=X. By default, this is set to X=0, which results in a portrait mode screen orientation. In order to switch the orientation to landscape mode, change fbtft_device.rotate=0 to fbtft_device.rotate=90. Enter sudo nano /boot/cmdline.txt at the command prompt. There should only be one line in this file. Go to the end of it and you will find the fbtft_device.rotate=X setting. Change the value from 0 to 90:

However, if you try to touch the screen now, you will find that the pointer movement does not correspond to your finger movement. This is because the LCD screen driver and the touchscreen controller driver have separate settings for screen rotation. We need to change the rotation of the touchscreen controller driver to match the rotation of the LCD screen driver.

2. You probably noticed that dragging your finger to the right moves the pointer up, not to the right. This indicates that the x and y axes of the touchscreen are swapped. To correct this, we need to swap the x axis for the y axis. This can be done by changing the swap_xy=X parameter in /etc/modules.

Now if you drag your finger around the screen, you will notice that the y axis (up and down) is correctly aligned with the motion of your finger. However, the x axis (left and right) is still inverted. To fix this, we need to install two more kernel modules, xinput and evtest. xinput is a Linux utility that will allow us to configure input device settings for the touchscreen controller, and evtest is an input device event monitor and query tool.

After the Pi finishes rebooting, you should notice that when you move your finger across the touch screen, the pointer should follow correctly in both axes. If you are using the Raspberry Pi 2 Model B, you will need to complete the calibration steps below before the pointer follows your finger correctly (and make sure that you have enabled startx to load automatically – see step 6 in this article).

You can rotate the screen 90 degrees (as we did in this tutorial) and the power connector will be at the bottom of the screen, but you can also rotate it 270 degrees so that the power connector is at the top of the screen. To do this, simply enter fbtft_device.rotate=270 in the /boot/cmdline.txt file. Then change the DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 0 1 line in the /etc/X11/xinit/xinitrc file to DISPLAY=:0 xinput --set-prop "ADS7846 Touchscreen" "Evdev Axis Inversion" 1 0. All you need to do is switch the values of the 0 and 1 at the end of this line.

Now that we have our LCD touchscreen up and running, the final step in the installation is the calibration of touch control. This will make the pointer much more accurate and easier to use.

2. Now we need to install the calibration tool we will be using, xinput_calibrator; and other filters for controlling the touchscreen response. Install the tslib library by entering aptitude install libts-bin:

3. The calibration tool we will use is called ts_calibrate. We will also be using a program to check the results of the calibration called ts_test. In order to use ts_calibrate and ts_test, we must first set proper environmental variables. Enter export TSLIB_TSDEVICE=/dev/input/event0 into the command prompt, then enter export TSLIB_FBDEVICE=/dev/fb1:

4. Now we can use ts_calibrate. Enter ts_calibrate at the command prompt (make sure you are still in root mode) to run the ts_calibrate program. The program will consecutively display five crosses on different parts of the screen, which you need to touch with as much precision as possible:

Drag the cross around the screen and observe how closely it follows your finger or stylus to test the accuracy of the calibration. Now press the “Draw” button to enter the drawing mode:

This is kind of a long process, but it is well worth it if you want to get the LCD touchscreen set up properly. So if you have any trouble setting this up or have anything to say, please leave a comment below. Also, if you found this article useful, please share it with your friends!

calibrate lcd touch screen made in china

Raspberry Pi leads out 40 GPIO pins, while the screen leads out 26 pins. When connecting, pay attention to the corresponding pins and Raspberry Pi pins.

5) Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for more than 10 seconds to display normally. But the touch is abnormal at that time, and the touch needs to be calibrated as the following steps.

3. After reboot, touch will work normally under normal circumstances. But for different resistance screens, the accuracy of using the default calibration parameters may not be very suitable.

You can perform touch calibration by clicking the Raspberry Pi icon on the taskbar, selecting Preferences -> Calibrate Touchscreen, and following the displayed prompts.

4. After calibration, the following data will be displayed. If you want to save these touch values, you can replace the data in the red circle with the data in the corresponding position in 99-calibration.conf.

Power: turn on/off the back light. If you needn"t use the LCD for a long time, you can turn off the back light with this button to reduce the comsuption

The installation of xserver-xorg-input-evdev and xinput-calibrator in Ubuntu system reports an error, so the touch cannot be used normally. How to solve it?

The installation of xserver-xorg-input-evdev and xinput-calibrator in Kali system reports an error, so the touch cannot be used normally. How to solve it?

Since the first-generation Raspberry Pi released, Waveshare has been working on designing, developing, and producing various fantastic touch LCDs for the Pi. Unfortunately, there are quite a few pirated/knock-off products in the market. They"re usually some poor copies of our early hardware revisions, and comes with none support service.

calibrate lcd touch screen made in china

Using the simulation profile as display profile will override the profile set under “Settings”. Whitepoint simulation does not apply here because color management will not be used and the display device is expected to be in the state described by the simulation profile. This may be accomplished in several ways, for example the display may be calibrated internally or externally, by a 3D LUT or device link profile. If this setting is enabled, a few other options will be available:

This depends on the chart that was measured. The explanation in the first paragraph sums it up pretty well: If you have calibrated and profiled your display, and want to check how well the profile fits a set of measurements (profile accuracy), or if you want to know if your display has drifted and needs to be re-calibrated/re-profiled, you select a chart containing RGB numbers for the verification. Note that directly after profiling, accuracy can be expected to be high if the profile characterizes the display well, which will usually be the case if the display behaviour is not very non-linear, in which case creating a LUT profile instead of a “Curves + matrix” one, or increasing the number of measured patches for LUT profiles, can help.

Note that both tests are “closed-loop” and will not tell you an “absolute” truth in terms of “color quality” or “color accuracy” as they may not show if your instrument is faulty/measures wrong (a profile created from repeatable wrong measurements will usually still verify well against other wrong measurements from the same instrument if they don"t fluctuate too much) or does not cope with your display well (which is especially true for colorimeters and wide-gamut screens, as such combinations need a correction in hardware or software to obtain accurate results), or if colors on your screen match an actual colored object next to it (like a print). It is perfectly possible to obtain good verification results but the actual visual performance being sub-par. It is always wise to combine such measurements with a test of the actual visual appearance via a “known good” reference, like a print or proof (although it should not be forgotten that those also have tolerances, and illumination also plays a big role when assessing visual results). Keep all that in mind when admiring (or pulling your hair out over) verification results :)

calibrate lcd touch screen made in china

Come the present invention is described in further detail the process that touch panel coordinates is mapped to the LCD coordinate below in conjunction with accompanying drawing and specific embodiment, but can not limit protection scope of the present invention with this.

LCD=160px, in order to improve counting yield, the distance at upper right, upper left, bottom right, 4 of lower-lefts and edge is L=5px, promptly predefined 5 point coordinate are (64,80), (5,5), (5,155), (123,5), (123,155), px represents with the pixel to be unit.

Please see Figure 4, Fig. 4 is the touch panel coordinates mapping area of the present invention to obtaining after touch-screen is calibrated in the mobile phone, this zone is determined by the touch-screen checking procedure, and be divided into mid point and central point according to touch-screen four limits, touch-screen is divided into four zones, in mapping process, only there is the contact of dropping in this zone to be only effective contact and can be mapped as effective LCD coordinate in the corresponding region of lcd screen, its mid point S represents the coordinate figure of user contact at touch-screen.

1. the user carries out 5 calibrations to touch-screen, and 5 are default center, upper right, upper left, bottom right, five the LCD coordinate points in lower-left:

A) user enters the touch screen calibration interface.The user is when opening mobile phone for the first time, and program can show the touch screen calibration interface in start-up phase, and the user also can be at " touch screen calibration " is selected " in system"s setting in the menu " option unlatching touch screen calibration interface in addition;

B) enter the touch screen calibration interface after, tracking cross will appear at central authorities successively, the upper left corner, the upper right corner, the lower left corner and the lower right corner, to shown in Fig. 2-5, the user clicks one by one according to screen prompt as Fig. 2-1;

C) the handset processes chip is with the touch panel coordinates of 5 clicks of recording user, if 5 the contact coordinate values that above-mentioned steps obtains and the difference of the preceding contact coordinate value that once obtains are all in the mobility scale of allowing, then report is calibrated successfully and is finished calibration, continues calibration otherwise forward step b) to.

2. the handset processes chip is based on the LCD coordinate figure and the mapping line segment proportional relation of touch-screen line segment on the LCD screen of 5 the touch panel coordinates value of being obtained in 5 calibration processes, LCD dimensional parameters, 5 former settings, determine the touch panel coordinates of four angular vertexs, here, 5 calibration coordinate touch panel coordinates values obtaining in step 1 are respectively A " (405,514), B " (595,814), C " (134,816), D " (700,124), E " (150,119):

A) after calibrating successfully, we can obtain 5 touch panel coordinates, but (as Fig. 2-2 to 2-5) is set for convenient click of user near 4 some positions on summit, be B " (595,814), C " (134,816), the D " (700 among Fig. 3-1,124), E " (150,119), can not represent the apex coordinate that touch-screen is real, i.e. B, C, D, E among Fig. 3-1.In order to obtain four angular vertex coordinates of touch-screen, as also needing the reorientation apex coordinate.We are to calculate the process that summit B coordinate illustrates the apex coordinate reorientation, and as Fig. 3, Fig. 3-1 is four angular vertex touch-screen synoptic diagram, and Fig. 3-2 is for being four angular vertex LCD synoptic diagram, and the user is A at touch screen center point, corresponding lcd screen A

α = 2 · L W LCD - 2 · L , β = 2 · L H LCD - 2 · LThe apex coordinate computing formula can be expressed as,

Lcd(123,155); The touch panel coordinates of these four calibration points is B " (595,814) C " (134,816) D " (700,124) E " (150,119); And four jiaos of fixed point coordinates of lcd screen are: B

Lcd(128,160); Then according to formula 1, the touch panel coordinates that can get four angles is respectively A (405,514), B (612,834), and C (112,837), D (725,99), E (129,93) is shown in Fig. 3-1.

E), can be according to these 5 the mid point U that calculate the lcd screen four edges shown in Fig. 3-1, V, P, four points of Q, concrete computing method are as follows:

Got A (405,514), B (612,834), C (112,837), D (725,99), E (129,93) according to formula 2~formula 5, obtains coordinate U (375,835), V (443,97), P (661,514), Q (119,514), this 9 touch-screen of naming a person for a particular job is divided into 4 zones, is respectively by B, and 1 district that U, A, P surround is by U, 2 districts that C, Q, A surround, by P, A, V, 3 districts that D surrounds, by A, 4 districts that Q, E, V surround, as shown in Figure 4.

3. each user contacts touch-screen, the touch panel coordinates and the proportional principle of parallel lines separated time section of four angular vertexs that 2. the handset processes chip obtains according to step, the gained touch panel coordinates is mapped to LCD screen coordinate, on the LCD screen, shows, set above-mentioned coordinate figure and be expressed as S (x

B) calculation level S is to the vertical line distance on four limits, region, and as Fig. 5, some S represents the coordinate figure of user contact at touch-screen, and some S drops on one of 4 zones, and 4 line segments of being drawn by a S are respectively the vertical lines to four limits, its region.Set the four angular coordinate value and be respectively A (x

C) according to a S to the vertical line distance on four limits, region, as shown in Figure 5, calculation level S is to the mapping value of LCD coordinate, and shows on LCD;

Calculation level S is to the vertical line distance on four limits, region, as Fig. 5.According to the vertical line distance of a S to four limits, region, calculation level S by formula 8,9, obtains T (111,119) to the mapping value of LCD coordinate, and after LCD showed this point, the effect on touch-screen as shown in Figure 6.

In order to compare the result of calculation of mapping method of the present invention and traditional mapping method, we mark three horizontal lines and three perpendicular line with felt pen on the LCD screen.Fig. 7 has shown the track of original contact on the touch-screen, and as can be seen, touch-screen itself exists significantly, and track and the angle of transverse axis and the desirable an angle of 90 degrees of vertical line on touch-screen differs greatly.The tradition mapping method can"t be eliminated inclination existing in the touch panel coordinates owing to used fixing mapping formula, and result of calculation has been introduced in this inclination, effect such as Fig. 8-2 of showing on the LCD screen.And the inventive method has compensated the touch-screen distortion dynamically in mapping process and the coordinate offset that causes, the final display effect on its LCD screen shown in Fig. 8-1, successful elimination inclination, user"s the touch-screen of having reduced is imported.

calibrate lcd touch screen made in china

Using the simulation profile as display profile will override the profile set under “Settings”. Whitepoint simulation does not apply here because color management will not be used and the display device is expected to be in the state described by the simulation profile. This may be accomplished in several ways, for example the display may be calibrated internally or externally, by a 3D LUT or device link profile. If this setting is enabled, a few other options will be available:

This depends on the chart that was measured. The explanation in the first paragraph sums it up pretty well: If you have calibrated and profiled your display, and want to check how well the profile fits a set of measurements (profile accuracy), or if you want to know if your display has drifted and needs to be re-calibrated/re-profiled, you select a chart containing RGB numbers for the verification. Note that directly after profiling, accuracy can be expected to be high if the profile characterizes the display well, which will usually be the case if the display behaviour is not very non-linear, in which case creating a LUT profile instead of a “Curves + matrix” one, or increasing the number of measured patches for LUT profiles, can help.

Note that both tests are “closed-loop” and will not tell you an “absolute” truth in terms of “color quality” or “color accuracy” as they may not show if your instrument is faulty/measures wrong (a profile created from repeatable wrong measurements will usually still verify well against other wrong measurements from the same instrument if they don"t fluctuate too much) or does not cope with your display well (which is especially true for colorimeters and wide-gamut screens, as such combinations need a correction in hardware or software to obtain accurate results), or if colors on your screen match an actual colored object next to it (like a print). It is perfectly possible to obtain good verification results but the actual visual performance being sub-par. It is always wise to combine such measurements with a test of the actual visual appearance via a “known good” reference, like a print or proof (although it should not be forgotten that those also have tolerances, and illumination also plays a big role when assessing visual results). Keep all that in mind when admiring (or pulling your hair out over) verification results :)

calibrate lcd touch screen made in china

Hoping I can find some help. This is starting to drive my crazy. I bought a replacement digitizer for my Nintendo switch and cannot seem to get one working. Every one I try recognizes touch inputs on the border of the screen but nothing in the middle. At first I thought it was just a bad part, but I have now tried three from amazon and one from iFixit. In order to narrow down the problem, every time I try a defective digitizer I also plug in my old one and test it as well. The old one has no problems other than a large scratch and sometimes reports ghost taps, other than that it will recognize touches on all parts of the screen. I’ve tried this several times now with four different digitizers. Please help! I’m going crazy

Thanks to @metrons for finding a solution (works for non-patched switches). According to CTCaer on github (writer of Hekate), there are four versions of the switch digitizer. These are not cross compatible unless you re-calibrate your touchscreen using third-party software (e.g. Hekate). If you have an older non-patched switch, load Hekate and try the touchscreen calibration under “tools”. Make sure to use the latest version of Hekate, as only the newer ones have joy-con support allowing you to navigate to the calibration utility without touch. If the calibration fails, it most likely means you have a loose connection or the digitizer is trashed; try unplugging and reinserting the ribbon cable (worked for me).

calibrate lcd touch screen made in china

I broke the tablet monitor and ordered digitizer+display on ebay. The seller made a mistake, so those parts were delivered separately. After I install it, I found the touch screen is totally inverted! It feels like the touch screen should turn 180 degree, but I can"t do that because the connection is fix at right top.

calibrate lcd touch screen made in china

When using the Raspberry Pi as a server or industrial monitoring device, it is naturally inevitable to be combined with a touch screen. This article will explain in detail how to connect an external capacitive touch monitor with Raspberry Pi, and execute the touch calibration program to obtain more sensitive and precise touch operation.

calibrate lcd touch screen made in china

Come the present invention is described in further detail the process that touch panel coordinates is mapped to the LCD coordinate below in conjunction with accompanying drawing and specific embodiment, but can not limit protection scope of the present invention with this.

LCD=160px, in order to improve counting yield, the distance at upper right, upper left, bottom right, 4 of lower-lefts and edge is L=5px, promptly predefined 5 point coordinate are (64,80), (5,5), (5,155), (123,5), (123,155), px represents with the pixel to be unit.

Please see Figure 4, Fig. 4 is the touch panel coordinates mapping area of the present invention to obtaining after touch-screen is calibrated in the mobile phone, this zone is determined by the touch-screen checking procedure, and be divided into mid point and central point according to touch-screen four limits, touch-screen is divided into four zones, in mapping process, only there is the contact of dropping in this zone to be only effective contact and can be mapped as effective LCD coordinate in the corresponding region of lcd screen, its mid point S represents the coordinate figure of user contact at touch-screen.

1. the user carries out 5 calibrations to touch-screen, and 5 are default center, upper right, upper left, bottom right, five the LCD coordinate points in lower-left:

A) user enters the touch screen calibration interface.The user is when opening mobile phone for the first time, and program can show the touch screen calibration interface in start-up phase, and the user also can be at " touch screen calibration " is selected " in system"s setting in the menu " option unlatching touch screen calibration interface in addition;

B) enter the touch screen calibration interface after, tracking cross will appear at central authorities successively, the upper left corner, the upper right corner, the lower left corner and the lower right corner, to shown in Fig. 2-5, the user clicks one by one according to screen prompt as Fig. 2-1;

C) the handset processes chip is with the touch panel coordinates of 5 clicks of recording user, if 5 the contact coordinate values that above-mentioned steps obtains and the difference of the preceding contact coordinate value that once obtains are all in the mobility scale of allowing, then report is calibrated successfully and is finished calibration, continues calibration otherwise forward step b) to.

2. the handset processes chip is based on the LCD coordinate figure and the mapping line segment proportional relation of touch-screen line segment on the LCD screen of 5 the touch panel coordinates value of being obtained in 5 calibration processes, LCD dimensional parameters, 5 former settings, determine the touch panel coordinates of four angular vertexs, here, 5 calibration coordinate touch panel coordinates values obtaining in step 1 are respectively A " (405,514), B " (595,814), C " (134,816), D " (700,124), E " (150,119):

A) after calibrating successfully, we can obtain 5 touch panel coordinates, but (as Fig. 2-2 to 2-5) is set for convenient click of user near 4 some positions on summit, be B " (595,814), C " (134,816), the D " (700 among Fig. 3-1,124), E " (150,119), can not represent the apex coordinate that touch-screen is real, i.e. B, C, D, E among Fig. 3-1.In order to obtain four angular vertex coordinates of touch-screen, as also needing the reorientation apex coordinate.We are to calculate the process that summit B coordinate illustrates the apex coordinate reorientation, and as Fig. 3, Fig. 3-1 is four angular vertex touch-screen synoptic diagram, and Fig. 3-2 is for being four angular vertex LCD synoptic diagram, and the user is A at touch screen center point, corresponding lcd screen A

α = 2 · L W LCD - 2 · L , β = 2 · L H LCD - 2 · LThe apex coordinate computing formula can be expressed as,

Lcd(123,155); The touch panel coordinates of these four calibration points is B " (595,814) C " (134,816) D " (700,124) E " (150,119); And four jiaos of fixed point coordinates of lcd screen are: B

Lcd(128,160); Then according to formula 1, the touch panel coordinates that can get four angles is respectively A (405,514), B (612,834), and C (112,837), D (725,99), E (129,93) is shown in Fig. 3-1.

E), can be according to these 5 the mid point U that calculate the lcd screen four edges shown in Fig. 3-1, V, P, four points of Q, concrete computing method are as follows:

Got A (405,514), B (612,834), C (112,837), D (725,99), E (129,93) according to formula 2~formula 5, obtains coordinate U (375,835), V (443,97), P (661,514), Q (119,514), this 9 touch-screen of naming a person for a particular job is divided into 4 zones, is respectively by B, and 1 district that U, A, P surround is by U, 2 districts that C, Q, A surround, by P, A, V, 3 districts that D surrounds, by A, 4 districts that Q, E, V surround, as shown in Figure 4.

3. each user contacts touch-screen, the touch panel coordinates and the proportional principle of parallel lines separated time section of four angular vertexs that 2. the handset processes chip obtains according to step, the gained touch panel coordinates is mapped to LCD screen coordinate, on the LCD screen, shows, set above-mentioned coordinate figure and be expressed as S (x

B) calculation level S is to the vertical line distance on four limits, region, and as Fig. 5, some S represents the coordinate figure of user contact at touch-screen, and some S drops on one of 4 zones, and 4 line segments of being drawn by a S are respectively the vertical lines to four limits, its region.Set the four angular coordinate value and be respectively A (x

C) according to a S to the vertical line distance on four limits, region, as shown in Figure 5, calculation level S is to the mapping value of LCD coordinate, and shows on LCD;

Calculation level S is to the vertical line distance on four limits, region, as Fig. 5.According to the vertical line distance of a S to four limits, region, calculation level S by formula 8,9, obtains T (111,119) to the mapping value of LCD coordinate, and after LCD showed this point, the effect on touch-screen as shown in Figure 6.

In order to compare the result of calculation of mapping method of the present invention and traditional mapping method, we mark three horizontal lines and three perpendicular line with felt pen on the LCD screen.Fig. 7 has shown the track of original contact on the touch-screen, and as can be seen, touch-screen itself exists significantly, and track and the angle of transverse axis and the desirable an angle of 90 degrees of vertical line on touch-screen differs greatly.The tradition mapping method can"t be eliminated inclination existing in the touch panel coordinates owing to used fixing mapping formula, and result of calculation has been introduced in this inclination, effect such as Fig. 8-2 of showing on the LCD screen.And the inventive method has compensated the touch-screen distortion dynamically in mapping process and the coordinate offset that causes, the final display effect on its LCD screen shown in Fig. 8-1, successful elimination inclination, user"s the touch-screen of having reduced is imported.

calibrate lcd touch screen made in china

Can you imaging that you have a Raspberry Pi or banana Pi, or beagle bone development board, or you just want to make a portable media center. you can use this screen to create your own funny staff, such as making robot"s face, making Ironman helmet and so on. you just need a good monitor screen to finish your design. the following one is your best choice.

There is a easy way to setup resolution of your screen by a shell script, you can download the scripts by git tool and use it to change resolution for your screens as following steps:

It is a easy way to calibrate touch screen by using script, so if you do not know much about the command line operation, you can follow the steps to calibrate your touch screen.