Calibrate 4-wire resistive touch panel

Hello all,

Looking for some advice on how to calibrate a 4-wire resistive touch panel for a BALL & PLATE project I am working on. I do not have a camera to visually do it but i heard there are ways to use an Arduino and and LCD to display x and y coordinates which I can then use to set the calibration point. Any suggestions or advice on how to proceed would be appreciated.

As well on any forums or sites that offer tutorials for Arduino coding. I am new to Arduinos and want to learn how to code so I can complete my project.

Thanks again all

I have been tinkering around with a Color Weather Station and the kind of calibration you want to do is done in that program.

It's written for the ESP8266 but maybe you can get some ideas. Look at 'esp8266-weather-station-color.ino' around line 170 or so.

Don

Post a link to the actual display that you are using. e.g. Ebay sale.

You get 3 types of Touch Screen 1. 4-wire bare resistive Touch Panel. connect to an Arduino with pins called XP, XM, YP, YM. 2. SPI controller e.g. XPT2046 already wired to a resistive panel. 3. I2C controller e.g. FT5206 already wired to a capacitive panel.

You have (1). So you need TouchScreen.h library.

It is unlikely that you own a bare Touch Panel that is NOT glued to a TFT screen.

David.

Hello David,

I have posted the link for the screen I purchased below.

https://www.ebay.ca/itm/15-inch-4-wire-Resistive-industrial-322-247mm-322mm-247mm-Touch-Screen-Panel/122045152619?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

Thank you for your assistance.

Lucas

Ah-ha. So you have a monsterTouch Panel with nothing to attach it to !!

You can still use TouchScreen.h or similar library. Exactly the same as if you were reading the Touch Panel glued to a 2.0 inch TFT display.

The principles are exactly the same. i.e. the library will place a voltage across the XM, XP pins and you read the Analog result with the YP pin. This determines the X coordinate.

The raw results are not very consistent. The "usability" depends on how well the library processes the data. Most of the "TouchScreen.h" style of libraries do not do a very good job.

So have no illusions about your monster 322mm panel. You will be lucky to get 2mm resolution. Fine for buttons on a Touch keyboard. Not much good for technical drawing.

Your question is about calibration. You can adapt a regular TFT_Touch Calibration sketch. This would display cross-hairs at strategic points on a screen. You just need to draw the cross-hairs with a felt tip and follow instructions on a Serial terminal instead of a TFT.

David.

Oh that is quite the explanation. Thank you again for your help. I am quite new to projects in general as I am currently in school for Electrical Engineering and need to design and construct a project for a report. So I am building a Ball & Plate project. Do you think the "monster" screen I bought will suffice? Or should I have looked for something else?

Regards,

Lucas

I have no idea what a Ball and Plate is.

There are two types of Touch usage.

  1. finger size buttons or gestures.
  2. accurate capture of a “pointy” stylus.

Both can be done with a resistive screen. The library needs to make multiple reads and calculate the “best” value. Obviously (1) is less critical than (2).

David.