lcd touch screen calibration made in china
GreenTouch was established in 2009,covers an area of 9,000 square meters andfocus on touch products thirteen years.It has passed ISO9001 quality management system and ISO14001 environmental management system certification.Its products have passed CE, FCC, RoHS,CCC,CB,UL(power adapter),HDMI certifications,etc. GreenTouchprovides customers with one-stop industrial display and commercial display touch solutions.Its products are widely used in industrial control,finance,commerce and other industries,and have formed stable and long-term cooperative relations with many domestic and foreign brand enterprises.
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:
This calibration data will be written to a calibration file called /etc/pointercal. To view the contents of this file, enter cat /etc/pointercal at the root command prompt.
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!
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.
#Modify the relevant command line in the 99-calibration.conf file, and it will take effect after rebooting the system. The following are the default calibration parameters. If you need to use specific calibration parameters, please pay attention to the order of the Calibration parameter values.
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.
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.
#Modify the relevant command line in the 99-calibration.conf file, and it will take effect after rebooting the system. The following are the default calibration parameters. If you need to use specific calibration parameters, please pay attention to the order of the Calibration parameter values.
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?
You can do verification measurements to assess the display chain"s (display profile - video card and the calibration curves in its gamma table - monitor) fit to the measured data, or to find out about the soft proofing capabilities of the display chain. You can also do a profile or device link (3D LUT) self check without having to take any further measurements by holding the “alt” key on your keyboard.
To check the fit to the measurement data, you have to select a CGATS testchart file containing device values (RGB). The measured values are then compared to the values obtained by feeding the device RGB numbers through the display profile (measured vs expected values). The default verification chart contains 26 patches and can be used, for example, to check if a display needs to be re-profiled. If a RGB testchart with gray patches (R=G=B) is measured, like the default and extended verification charts, you also have the option to evaluate the graybalance through the calibration only, by placing a check in the corresponding box on the report.
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 :)
There are currently two slightly different paths depending if a testchart or reference file is used for the verification measurements, as outlined above. In both cases, Argyll"s xicclu utility is run behind the scenes and the values of the testchart or reference file are fed relative colorimetrically (if no whitepoint simualtion is used) or absolute colorimetrically (if whitepoint simulation is used) through the profile that is tested to obtain corresponding L*a*b* (in the case of RGB testcharts) or device RGB numbers (in the case of XYZ or L*a*b* reference files or a combination of simulation profile and testchart). If a combination of simulation profile and testchart is used as reference, the reference L*a*b* values are calculated by feeding the device numbers from the testchart through the simulation profile absolute colorimetrically if whitepoint simulation is enabled (which will be the default if the simulation profile is a printer profile) and relative colorimetrically if whitepoint simulation is disabled (which will be the default if the simulation profile is a display profile, like most RGB working spaces). Then, the original RGB values from the testchart, or the looked up RGB values for a reference are sent to the display through the calibration curves of the profile that is going to be evaluated. A reference white of D50 (ICC default) and complete chromatic adaption of the viewer to the display"s whitepoint is assumed if “simulate whitepoint relative to display profile whitepoint” is used, so the measured XYZ values are adapted to D50 (with the measured whitepoint as source reference white) using the Bradford transform (see Chromatic Adaption on Bruce Lindbloom"s website for the formula and matrix that is used by DisplayCAL) or with the adaption matrix from the profile in the case of profiles with "chad" chromatic adaption tag, and converted to L*a*b*. The L*a*b* values are then compared by the generated dynamic report, with user-selectable critera and ΔE (delta E) formula.
It sets the nominal (target) L* value to the measured L* value and a*=b*=0, so the profile is effectively ignored and only the calibration (if any) will influence the results of the gray balance checks. Note that this option will not make a difference for a “Single curve + matrix” profile, as the single curve effectively already achieves a similar thing (the L* values can be different, but they are ignored for the gray balance checks and only influence the overall result).
If you enable “Use absolute values” on a report, the chromatic adaptation to D50 is undone (but the refrence white for the XYZ to L*a*b* conversion stays D50). This mode is useful when checking softproofing results using a CMYK simulation profile, and will be automatically enabled if you used whitepoint simulation during verification setup without enabling whitepoint simulation relative to the profile whitepoint (true absolute colorimetric mode). If you enable “Use display profile whitepoint as reference white”, then the reference white used for the XYZ to L*a*b* conversion will be that of the display profile, which is useful when verifying video calibrations where the target is usually some standard color space like Rec. 709 with a D65 equivalent whitepoint.
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).
I have a machine with Ubuntu 12.04 installed, with dual monitor, via VGA and DVI Interface. The monitor is one touch screen and the other one is regular LCD Monitor.
The touch screen is made in China with some unknown brand, and I am using eGalax Driver. The touch screen is now detected and works, but i need to do some calibration since it does not correctly perform click on touch.
The problem is, when I’m using xinput_calibrator, it shows 4 crosses to be clicked on, because I’m using dual monitor, the crosses is now show 2 on the touch screen (touchable) and the others on the other monitor which is regular non-touch monitor.
i tried to unplug the second monitor and then redo the calibration with xinput_calibration, and then saved it. Restart, all accuracy is fine, and the touch screen is working perfectly. BUT when then the 2nd monitor (Samsung LCD TV, via HDMI) is replugged, the touchscreen calibration was simply like gone, the accuracy is now lost. Touch on a point, the system click on another.
In general, Android handheld devices use a PCAP touchscreen, which cannot be calibrated.It is possible to modify the "Touch screen profile" on the mobility devices with Android.Navigate to "Settings" > "Honeywell settings" > "Touch screen profiles"Options are:
Note:the CT40 has different touchscreen hardware on older manufactured units do not support touchscreen profiles. CT40 devices manufactured in 2020-05 will have new BOE LCD screen and will support the touchscreen profiles. Check PUN 20-14
Hi and thanks for reply. Actually I found AD7873 which calculate the pressure also and we can use it to say if the pressure is below some value, just ignore it. But I want to know what can we do when we have ad7843. I mean let say I have AD7843 and i want to use it as a touch screen controller. But the pressure of the people is different for a amount of area ( not just one point). what can I do then? How can I solve this pressure issue by ad7843? how can we find out the number is correct and the number shows the right position?
It would be nice if every display was calibrated exactly the same way straight from the factory, but the reality is that even though default color profiles are much better than they were a few years ago, taking the time to adjust a few settings can give your screen a little bit more “pop.”
Windows 11 and 10 have a built-in app that can help simplify this process. It won’t offer the same results as professional calibration tools, but it should at least be an improvement over the default settings. (It’s also much cheaper; professional calibration products can be quite expensive.) Here’s how to calibrate your screen in Windows 11 or 10, without breaking the bank. Note that our screenshots come from Windows 11, but the steps are the same in the prior operating system.
3. Follow the on-screen instructions or click ‘Next’.Windows will helpfully explain that you can manage your display settings on most monitors by pressing some kind of menu button. If you can’t modify those settings to your liking, just click the “Next” button.
Your screen is now calibrated! Windows 11 can’t handle everything, which is why the brightness and contrast sections are optional, but even adjusting the gamma and color balance settings can make a difference. Now you have a choice to make: Move on to the ClearType Tuner, which changes how text is displayed, or leave all these display settings aside so you can use your newly calibrated monitor to look at something other than display management tools.