Pages

TFT LCD Touchscreen shield for Arduino – Review

I have recently bought one of the new TFT LCD touchscreen shields from Nuelectronics and this is my experience when using it with the library provided. There are two versions of the shield with the only difference I can see is that one has a 2.4″ display and the other has a 2.8″ display. Both offer the same display size of 320×240 pixels. These are priced at £25 for the 2.4″ and £35 for the 2.8″. The smaller display seems the better value in this case. If the larger display was closer to the smaller display price then I may have opted for this instead.

Hardware

Due to the size of the displays available, both the 2.4″ and 2.8″ use the same PCB. The problem with this is that it is larger than the regular Arduino shields. The distance between the two rows of pins is also slightly wider, at 50mm, than the normal 48mm, to accommodate the 2.8″ display. The pins are angled inwards slightly which makes for a very tight fit when plugged into an Arduino or clone.
The touchscreen on the LCD display has 4 icons that I presume are at the bottom but could equally be the top. The display carrier on the board I received keeps lifting up from the pcb. It appears to have been stuck down with double sided tape. I’m not prepared to try to remove the display and re-stick it, just yet.

The touchscreen has 4 icons along one edge. These are outside of the display area and can be used to trigger actions in your application without having to use up screen space with icons, if required. As with all touchscreens they can be easily scratched so I have added a screen protector using a spare Nintendo DS protector I had. I am also using a spare DS stylus too.

One major issue with the touchscreen controller is that the PENIRQ interrupt is not connected to the Arduino so you have no indication that the screen has actually been touched. I think this is a serious omission from this shield. You can test the PENIRQ signal by connecting a LED and current limiting resistor between holes 34 (Anode) and 36 (Cathode) on the double row of holes at the edge of the shield. The LED will be on until you touch the display. One way round this shortcoming could be to connect this pin to AD3 configured as a digital input and only take a reading when this was low. Another way would be to improve the reading capabilities to return and indicator to show the value was real and not noise.

From looking at the schematic for the shield, there doesn’t appear to be much I/O left for other use on the standard Arduino. All I can see is that AD3 to AD5 are free, therefore to connect anything else would require using the I2C/Wire library implemented on AD4 and 5.

Hardware used:

  • AD7843 – Touchscreen controller – Uses SPI long with SD card
  • ILI9325 – LCD controller – Uses parallel digital I/O

Software

The library provided is referred to as pre-release, which could mean that it is incomplete and an updated library will be available at some time in the near future. It is still usable, however there is no documentation and the code has very few comments so once the examples have been run you’re on your own! I plan on writing a new post to provide the missing information, watch this space.

The library provided includes classes for accessing SD card, touchscreen and LCD display. Other classes are included for drawing basic graphic elements and text. The one issue I have found so far is that with the circle drawing function, when the point goes outside of the display it is actually mirrored on the display so it looks like the edge of the circle has been folded in on itself. To fix this problem, edit file TFT_ILI9325.cpp and add the following at the beginning of the function putPixel:


if( x<0 || x >= GetWidth() || y < 0 || y >= GetHeight())
return;

I tried a simple drawing test where a small circle is drawn where the stylus touches, this didn’t appear to be as accurate as I hoped with some points being drawn in completely the wrong places!

I’ve not yet tried any of the other functions as this was only a quick late night test.

Examples

Two examples are provided, the first being a touch screen calibration utility. This lets you touch a series of points on the screen to provide calibration data that is then stored in the Arduino eeprom. This data can then be read when you come to use your own touchscreen application. The second part of the utility shows the X and Y coordinates as you drag a stylus across the screen.

I did notice that the values for the X axis seem to fluctuate quite a lot so the touchscreen reading functions need to be looked at in order to stabilise and provide more accurate readings. If there was no touches then it was still giving a reading which is not ideal.

The second example demonstrates reading bitmap images from the SD card in a simple slideshow. The images need to be in BMP format with a maximum resolution of 320×240 although I think this might actually want to be 240×320 as the display seems to be orientated vertically.

One issue with the bitmap display is that the images come out upside down and back to front so this needs to be looked at.

Conclusions

Overall a cheap introduction to big LCD resolution and touchscreen control for the Arduino, however to be any use the library needs to be documented fully and the problems fixed.Using the SD card to store images and icons can reduce the program memory requirements. I would see the display being more useful on an Arduino Mega once that version is available. It would then be able to utilise the 16 bit transfer mode and provide more memory and I/O to make it useful.

On the regular 168/328 based Arduino I see this having not much use other than as a testing and learning tool. However I could be proven wrong. Arduino Tetris anyone?

Bookmark this post: bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

7 comments to TFT LCD Touchscreen shield for Arduino – Review

  • […] This post was mentioned on Twitter by Andrew D Lindsay. Andrew D Lindsay said: New blog post on first use of the nuelectronics LCD touchscreen shield, http://bit.ly/doif10 […]

  • delphi

    Hi,

    I would like to buy this shield, to use with a RFID Reader ID-12 and a RTC.

    I just want to store the ID of the tag (ID of the employer), with the date of the “contact” in a SD Card. And if it is a valid Card, it shows a picture of the employer.

    Are there pins available to do that?

    Thanks a lot,
    Ribeiro

  • Administrator

    Hi,

    As I always say to myself and others who ask, anything is possible! In this case, it may be possible depending on the inputs you need for the rtc (usually I2C) and the RFID reader (unknown as I’ve not used one).

    The nuelectronics shield here only leaves about 3 or 4 analogue pins free, this does include the I2C pins so providing you can use these for the rfid reader then it could be possible.

    Thanks

    Andy

  • > On the regular 168/328 based Arduino I see this having not much use other than as a testing and learning tool. However I could be proven wrong. Arduino Tetris anyone?

    Tetris is not suitable for small touchscreen… Any other ideas? 😉

  • paulvvz

    Hi Andy,
    I bought this shield and was suprised by the following:
    When I use SPI (mySmartUSB light programmer) and Arduino IDE to burn a sketch (e.g. Blink), programming is succesful.

    After placing touch screen shield on the Arduino board and burning the same sketch, I get the following error:

    avrdude: stk500v2_command(): command failed
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override this check.

    Is this shield preventing SPI programming? I would expect still be able to program the Arduino with the shield installed.
    I tried to disable the LCD by disabling the 74VC245 data buffers by making the Analog pin 3 (H_LCD_nCS) high, without success.
    Any clues?

  • Hi,

    Have a look at http://www.shieldlist.org/nuelectronics/tft-2.8-lcd This shows what pins are left…which is not a lot!

    I dont think you cna use SPI with this shield. You can however just about use I2C.

    Cheers

    Andy

  • paulvvz

    Thanks Andy,
    So the only way to making software for this shield is: removing the shield, burn the program, connecting the shield, testing the software.
    And repeating this process until the software is bugfree.
    This looks like a burden to me.
    How have you tested the shield? By programming the Arduino without the shield connected?
    Paul