Intermittent touch function with 2.8" TFT

Status
Not open for further replies.

Fins

Member
I am using the 2.8" ILI9341 TFT with touchscreen with a Teensy 3.2, both purchased directly from pjrc.com. The TFT works as expected, however the touchscreen will sometimes get stuck in a "self triggering mode" as if there are continual touches near coordinates x = 180 to 225, y = 230 to 255, with z = 2500 to > 3000, as determined from some test code. If I press a finger near the four touchscreen connections at the upper left of the display I can sometimes/usually get the continual touches to stop and the touchscreen will work normally, at least for a while. The display worked fine in my breadboard; however it is now soldered into a PCB prototype so replacement (i.e. trying another TFT) is not easy. Sometimes on power up everything will work just fine. The display was never abused and always handled in a static-safe environment. Details are as follows:

The libraries used are:
Code:
#include <ILI9341_t3.h>
#include <XPT2046_Calibrated.h> 
#include <SPI.h>

Outputs are initialized in Setup:
Code:
  pinMode(TFT_CS, OUTPUT);          // Set chip selects high for deselect
  digitalWrite(TFT_CS, HIGH);
  pinMode(TS_CS, OUTPUT);
  digitalWrite(TS_CS, HIGH);
  pinMode(TFT_DC, OUTPUT);

The program waits for touches as follows:
Code:
      while (!ts.touched()) delay(100);  // Wait for touch
      TS_Point p = ts.getPoint();          // Read touchscreen x, y coordinates and z pressure

and everything works fine when the TFT is not in its spastic mode.

Regarding hardware, the TFT interfaces directly to the Teensy 3.2 at 3.3 V I/O. VCC is +5 V, RESET is 3.3 V, both with 0.1 uf decoupling. The Teensy 3.2 is powered from a MC7805 regulator which is battery powered. Good ground planes and decoupling on the PCB. I could include a schematic but there is a lot of other non-germane circuitry (nothing RF, or even AC or switching when the problem occurs).

This certainly seems like an intermittent hardware problem with the display, but since this is my first experience with the Teensy and TFT display I wanted to seek the expertise of this forum.

1. Have others seen similar problems using the ILI9341 TFT with touchscreen?
2. Any hardware recommendations to improve the reliability of the touchscreen?
3. Anything I am overlooking anything before attempting to desolder the display from my PCB?
 
Been working on a setup using a T3.2 with a PJRC ILI9341 and a T4 with 4x Adafruit Neotrellis, communicating with the T3.2 via serial. Powered via a 15v wallwart followed by a 5V@2.1 amp switchmode. The ILI9341 is powered from the main +5v rail as is the T4 and Neotrellis.

Have had no issue with touch behavior after uploading to the T3.2 but have observed no touch output at times after cycling power. Initially thought the touch connector, top left of screen was dodgy. Short story, tried four other displays and every one behaves the same. Discovered that cycling power OFF for at least a couple of seconds yielded correct Touch behavior so my hacker instinct thinks that the XP-2046 needs a little more time for everything to discharge before you get a clean restart .

Using that as a lens to view your query, wondering if the MC7805's +5v output risetime is not what the XP-2046 needs to see.
 
Thanks MatrixRat for the suggestions. I have not seen any correlation with how long power has been off. The spurious touch readings occur whether the power is quickly reset or off for an extended period of time. I will look further at the MC7805 risetime. I have also thought the top left part of the screen, where the touchscreen connections are, was dodgy as well, as sometimes I can get the spurious touches to stop by pressing there. However, this is not repeatable. I have located the XPT2046 datasheet but not had time to review it yet. Do you know if there any sort of touchscreen reset, preferably software?
 
As a follow up, the touchscreen display itself was the cause of the problem I described above. I had hoped for a simpler solution as the display had tested correctly in a breadboard and had now been soldered into a custom PCB. The continuous touches registered by the touchscreen have now gone from intermittent to continuous touches, without any changes. Other identical displays work correctly on other PCBs.
 
Status
Not open for further replies.
Back
Top