Waveshare Touch Issue

I am using Waveshare Pico-ResTouch-LCD-3.5 (https://www.waveshare.com/wiki/Pico-ResTouch-LCD-3.5) with Arduino library TFT_eSPI (GitHub - Bodmer/TFT_eSPI: Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips). LCD portion works fine but I cannot get the touchscreen to function correctly. I can read the raw x, y, and z data but it is very erratic. The z value is around 2500 when the screen isn't being pressed. The x and y values jump all over the place while pressing a single point with a stylus. I figured since the z value was always high that I must have a defective unit so I ordered another one but am getting the same results. The touch controller is a XPT2046 (https://www.waveshare.com/w/upload/b/b0/XPT2046.pdf). I do not understand how the data is retrieved from reading the datasheet. Anyone had luck getting this setup to work? Any help would be appreciated. Thanks.

Example of erratic data. When x = 0 and y = 7936 the screen is not being touched.

All devices share the ground reference?

Your linked documents state:

In some applications, external capacitors may be required across the touch screen for filtering noise picked up by the touch screen (e.g., noise generated by the LCD panel or backlight circuitry).

First help, first aid is read and follow this topi: How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

Code and schematics please.

xfpd, thanks for your response. I did notice that on the datasheet and I also noticed that the Waveshare board doesn't have caps on the touchscreen, just decoupling caps on the power. And I don't see anywhere to add them either. Surely someone out there has used the touch on this device with success, maybe I just got 2 bad ones in a row....I did order them from the same guy on eBay.

Tech supp

Thanks for that. I contacted them and they were no help. I even tried editing the TFT_eSPI library so that it would take 5 samples, reject the high and low, and average the remaining. Even after all that I am unable to get consistent results from either unit. I've given up on the Waveshare unit. I've ordered the 3.2" from PJRC.com. xfpd I appreciate you taking the time to help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.