2.4" TFT touch display partially works

Did you run the Calibration sketch?

Did you run the TouchShield sketch?

Regarding life expectancy. Current Mcufriend pcb design will damage the Uno 3.3V regulator. Definitely on 3.5 inch screens. Probably on many 2.4 inch screens.

David.

no , i did not run touchscreen_caliber_native.

shall I use external power supply for Uno or screen instead of USB of laptop.

USB of laptop is fine.

If your TFT screen feels warm it will damage the small 3.3V regulator chip on the Uno. (assuming your Mcufriend pcb has an empty U5 footprint)

If your TFT screen feels warm and you have an old pcb with regulator U1 the Uno regulator is safe.

If your TFT screen lights but is not warm everything is OK. (with old or new pcb)

David.

To use the new caliberation settings you must map the values from Point p = ts.getPoint() e.g.
x = map(p.x,LEFT,RT,0,tft.width());
y = map(p.y,TOP,BOT,0,tft.height());
swap p.x and p.y if diff oreintation

MCUFRIEND_kbv ID=0X9340 240 x 320

Portrait Caliberation 240x320
x = map(p.x, LEFT=919, RT=243,0,240)
Y = map(p.y, TOP=533, BOT=413,0,320)

Landscape Caliberation 320x240
x = map(p.x, LEFT=533, RT=413,0,240)
Y = map(p.y, TOP=243, BOT=919,0,240)

mcufreind TouchScreen_Calibr_native example gave above result
(note:- calibration gave different values when tried next time)
Now what should I do to run mcufriend's button example whose ON/OFF buttons are working after pressing on other locations.

1 week ago i bought this mcufriend 2.4" touch in mumbai.
Touchscreen is warm and also colors are faded/whitish but i can see/press buttons.
Though it worked well for 1 day.

If we supply 3.3V from external source to screen will it save Uno?

Kindly suggest.

  1. slightly warm is ok. hot is bad. measure the Arduino current e.g. with a DMM

  2. yes, connecting Shield 3.3V pin to external 3.3V means it still gets hot but the Uno chip is safe.

  3. a typical 2.4 inch TFT backlight needs about 30-50mA. A "hot" screen might be taking 200mA

  4. the Uno 3.3V pin is maximum 50mA

  5. your Calibration is wrong.

  6. copy-paste from the Serial Terminal and post it here.

  7. there is a new Calibration sketch on GitHub https://raw.githubusercontent.com/prenticedavid/MCUFRIEND_kbv/master/examples/TouchScreen_Calibr_native/TouchScreen_Calibr_native.ino

The cross-hairs change colour BLUE-WHITE-RED instead of just changing from GRAY-WHITE-GRAY

David.

Output of MCUFRIEND_kbv Touch_shield_new example on screen :-

ID = 0x9340
screen size 240x320

Portrait values
LEFT = 907 , RT = 136
TOP = 942 , BOT = 139

Wiring is
YP=15 , XM=16
YM=7 , XP=6

button_simple example not working properly as buttons are working after pressing on other location.
I am using external 5V inplace of 3.3V , now screen is not getting hot but its still faded.

TouchScreen_Calibr_native example giving following output:-

TouchScreen.h GFX Calibration
Making all control and bus pins INPUT_PULLUP
Typical 30k Analog pullup with corresponding pin
would read low when digital is written LOW
e.g. reads ~25 for 300R X direction
e.g. reads ~30 for 500R Y direction

Testing : (A1, D7) = 27
Testing : (A2, D6) = 31
Diagnosing as:-
XM,XP: (A1, D7) = 27
YP,YM: (A2, D6) = 31
ID = 0x9340

cx=851 cy=926 cz=494 LEFT, TOP, Pressure
cx=521 cy=913 cz=372 LEFT, MIDH, Pressure
cx=194 cy=922 cz=253 LEFT, BOT, Pressure
cx=195 cy=573 cz=427 MIDW, TOP, Pressure
cx=200 cy=230 cz=583 MIDW, BOT, Pressure
cx=512 cy=228 cz=615 RT, TOP, Pressure
cx=849 cy=234 cz=662 RT, MIDH, Pressure
cx=853 cy=578 cz=561 RT, BOT, Pressure
MCUFRIEND_kbv ID=0x9340 240 x 320

const int XP=7,XM=A1,YP=A2,YM=6; //240x320 ID=0x9340
const int TS_LEFT=946,TS_RT=319,TS_TOP=522,TS_BOT=411;
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=946, RT=319, 0, 240)
y = map(p.y, TOP=522, BOT=411, 0, 320)
Touch Pin Wiring XP=7 XM=A1 YP=A2 YM=6
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=522, RT=411, 0, 320)
y = map(p.x, TOP=319, BOT=946, 0, 240)

Kindly suggest.

Your TouchScreen is working perfectly. You should press the highlighted cross-hair. You appear to be pressing cross-hairs in the wrong order.

  1. Does your pcb have a U1 regulator ?

  2. Can you measure current ? e.g. DMM

  3. Does your screen get hot ?

  4. Or just slightly warm ?

  5. Can you see the cross-hairs in the Calibrate program ?

  6. Can you replace the Calibrate INO with the link in #44 ?

  7. Can you ask a neighbour or school friend for help ?

Personally, I would never buy a Shield that does not have an AMS1117 regulator chip. (U1)
If your screen gets hot I would take it back to the shop. Get your money back.

Please answer each of my numbered questions. They don't need more than Yes or No.

David.

With button_simple example , touch working below / above ON button , no effect after pressing OFF.
I am surprised both calibration examples working fine with touching crosshairs but not buttons of
button_simple example.

Cross hair I pressed in clockwise direction.

  1. No AMS1117 regulator on mcufriend touchscreen.
  2. Can't measure small current.
  3. I gave 5V at 3.3V of touchscreen now its not getting hot, back light is brighter ,screen still faded.
    It worked great for 1 day without fading.
  4. Previously it was getting hot.
  5. & 6. I uploaded your suggest program from #44 link where crosshairs were changing white to red
    and found following on serial monitor

TouchScreen.h GFX Calibration
Making all control and bus pins INPUT_PULLUP
Typical 30k Analog pullup with corresponding pin
would read low when digital is written LOW
e.g. reads ~25 for 300R X direction
e.g. reads ~30 for 500R Y direction

Testing : (A1, D7) = 27
Testing : (A2, D6) = 31
Diagnosing as:-
XM,XP: (A1, D7) = 27
YP,YM: (A2, D6) = 31
ID = 0x9340

cx=849 cy=923 cz=499 LEFT, TOP, Pressure
cx=845 cy=577 cz=579 LEFT, MIDH, Pressure
cx=844 cy=225 cz=680 LEFT, BOT, Pressure
cx=544 cy=920 cz=410 MIDW, TOP, Pressure
cx=540 cy=226 cz=625 MIDW, BOT, Pressure
cx=210 cy=928 cz=271 RT, TOP, Pressure
cx=219 cy=579 cz=425 RT, MIDH, Pressure
cx=220 cy=224 cz=597 RT, BOT, Pressure
MCUFRIEND_kbv ID=0x9340 240 x 320

const int XP=7,XM=A1,YP=A2,YM=6; //240x320 ID=0x9340
const int TS_LEFT=874,TS_RT=187,TS_TOP=946,TS_BOT=201;
PORTRAIT CALIBRATION 240 x 320
x = map(p.x, LEFT=874, RT=187, 0, 240)
y = map(p.y, TOP=946, BOT=201, 0, 320)
Touch Pin Wiring XP=7 XM=A1 YP=A2 YM=6
LANDSCAPE CALIBRATION 320 x 240
x = map(p.y, LEFT=946, RT=201, 0, 320)
y = map(p.x, TOP=187, BOT=874, 0, 240)

*** UNUSUAL CALIBRATION RANGES 745 -687

  1. Which values to be changed in button_simple example after receiving values from
    TouchScreen_calibr_native example.

Kindly suggest.

(1). The pcb design is WRONG
(3). you should never apply 5V to the 3.3V pin on the Uno.
(4). the backlight is powered by the 3.3V pin. If it was hot with 3.3V, it would be HOTTER with 5V.
Almost certainly you have damaged something.

(5) I could see that you pressed the cross-hairs in clockwise direction.
(6) Your calibration looks normal.

Your photo shows an appalling display. Take it back to the shop.
Ask the shop to replace it. Make sure that the replacement is not hot i.e. in the shop.

Copy-paste the Calibration results to the Button_Simple or Touch_Shield sketches:

const int XP=7,XM=A1,YP=A2,YM=6; //240x320 ID=0x9340
const int TS_LEFT=874,TS_RT=187,TS_TOP=946,TS_BOT=201;

I would try another Uno. You have probably damaged your Uno and/or the Shield.

David.

I copy pasted the calibration results in button_simple example and its working...Thank you.

const int XP=7,XM=A1,YP=A2,YM=6; //240x320 ID=0x9340
const int TS_LEFT=874,TS_RT=187,TS_TOP=946,TS_BOT=201;

I have connected 5V external power supply to 3.3 pin of mcufriend 2.4" touchscreen.
It solved heating problem at bottom of screen.

Kindly suggest

I have connected 5V external power supply to 3.3 pin of mcufriend 2.4" touchscreen.
It solved heating problem at bottom of screen.

Kindly suggest

Ohms Law works differently on the Indian mainland.

We do not understand how. We do not understand why. We can only believe your experience.

And make suggestions for Ohms Law observant countries.

David.

Hi...
thanks for your support.
I am facing one strange behavior of mcufriend 2.4" touch screen with Uno.
The "button_simple" example works precisely with Laptop USB (thanks for #44 link).
But when I use 9V external power supply, both buttons' touch area shifts 80% towards bottom.
Both buttons/rectangle shapes on TFT are as expected and reacting after pressing below buttons.

Note:- mcufreind touchscreen doesn't have 3.3V U5 regulator.

With 5V USB of Laptop -> "button_simple" example -> pressing on letter 'O' of "ON" button
pixel_x = 51 , pixel_y = 197
With 9V adapter -> "button_simple" example -> pressing on letter 'O' of "ON" button
pixel_x = 41 , pixel_y = 166

After modifying code as :
on_btn.press(down && on_btn.contains((pixel_x + 10), (pixel_y + 30)));
button working fine.

Kindly help.