3.2 tft lcd 320x480 made in china
In this Arduino touch screen tutorial we will learn how to use TFT LCD Touch Screen with Arduino. You can watch the following video or read the written tutorial below.
As an example I am using a 3.2” TFT Touch Screen in a combination with a TFT LCD Arduino Mega Shield. We need a shield because the TFT Touch screen works at 3.3V and the Arduino Mega outputs are 5 V. For the first example I have the HC-SR04 ultrasonic sensor, then for the second example an RGB LED with three resistors and a push button for the game example. Also I had to make a custom made pin header like this, by soldering pin headers and bend on of them so I could insert them in between the Arduino Board and the TFT Shield.
Here’s the circuit schematic. We will use the GND pin, the digital pins from 8 to 13, as well as the pin number 14. As the 5V pins are already used by the TFT Screen I will use the pin number 13 as VCC, by setting it right away high in the setup section of code.
I will use the UTFT and URTouch libraries made by Henning Karlsen. Here I would like to say thanks to him for the incredible work he has done. The libraries enable really easy use of the TFT Screens, and they work with many different TFT screens sizes, shields and controllers. You can download these libraries from his website, RinkyDinkElectronics.com and also find a lot of demo examples and detailed documentation of how to use them.
After we include the libraries we need to create UTFT and URTouch objects. The parameters of these objects depends on the model of the TFT Screen and Shield and these details can be also found in the documentation of the libraries.
So now I will explain how we can make the home screen of the program. With the setBackColor() function we need to set the background color of the text, black one in our case. Then we need to set the color to white, set the big font and using the print() function, we will print the string “Arduino TFT Tutorial” at the center of the screen and 10 pixels down the Y – Axis of the screen. Next we will set the color to red and draw the red line below the text. After that we need to set the color back to white, and print the two other strings, “by HowToMechatronics.com” using the small font and “Select Example” using the big font.
TFTdisplays moduleare liquid-crystal display panel with thin-film transistor technology, bonding with IC driver, backlight unit, and flex cable, sometimes assemble control board with difference interface. TFT display is active display with high contrast than monochrome lcd, TheTFTdisplay technology could offers full RGB display in wide range display colors and tunes, high display resolution. We could get rich colors, detailed images, clear and bright graphics display from a tft lcd module.
Maclight provide wide range tft lcd display module from small sizes to medium sizes. Our small tft lcd sizes( diagonal size of tft active area) have 0.9” tft lcd, 1.8” tft lcd, 2.2” tft lcd, 2.4”tft lcd, 2.8” tft lcd display module, 3.2” tft lcd, 3.5” tft lcd module, 4.3” tft display module, 5” tft lcd, 5.6” tft display, 5.7 inch tft, 7” tft lcd, medium sizes tft module such as 8” tft lcd, 9” tft, 10.1” tft lcd display module, 12.1” tft lcd, and so on. Our wide range standard tft lcd module could meet the most of application for industrial, medical, automotive application. Such as industrial control system, coffee machine, medical equipment, POS system, GPS navigator, white goods, kitchen display, cooking machine, energy control display, IOT, and etc.
Maclighttft lcd module including standard tft-lcd modules, wide viewing angle IPS tft lcd, sunlight readable tft lcd display with high brightness tft and transflective tft lcd, reflective tft, Wide temperature tft lcd, bar type tft lcd, and smart tft lcd module with serial interface for industrial display application. Resistive touch panel and projected capacitive touch screen (PCAP) with tft lcd, in landscape or portrait type. Beside color tft display, we have monochrome tft lcd with high transmissive ratio and power saving for special application such as 3D printer mask screen.
Our tft lcd module have variety interface including MCU, RGB,TTL, LVDS, MIPI DSI, serial SPI, I2C interface. The tft lcd display resolution from such as 80x160 pixels, QVGA 240X320, HVGA 320X480, VGA 640X480 tft lcd display module, and high resolution such 1024X600, 1024X768, 1280X800, FHD 1920X1080 resolution.
The RPi LCD can be driven in two ways: Method 1. install driver to your Raspbian OS. Method 2. use the Ready-to-use image file of which LCD driver was pre-installed.
3) Connect the TF card to the Raspberry Pi, start the Raspberry Pi. The LCD will display after booting up, and then log in to the Raspberry Pi terminal,(You may need to connect a keyboard and HDMI LCD to Pi for driver installing, or log in remotely with SSH)
1. Executing apt-get upgrade will cause the LCD to fail to work properly. In this case, you need to edit the config.txt file in the SD card and delete this sentence: dtoverlay=ads7846.
This LCD can be calibrated through the xinput-calibrator program. Note: The Raspberry Pi must be connected to the network, or else the program won"t be successfully installed.
This 2.8" screen works well but may be too small and too expensive (35€) as far as Chinese clones are concerned. So let"s configure a 3.2" TFT screen from Waveshare that can be found on Banggood for less than 15€.
The screen is the following: a 3.2" TFT LCD touchscreen display module for the Raspberry Pi B+, B, A+. Its resolution is the same as the 2.8": 320x240. It is in fact a Waveshare screen.
Get the files waveshare35a-overlay.dtb and waveshare32b-overlay.dtb for the WaveShare 3.2" 320x240 display and the WaveShare 3.5" 320x480 display respectively. For the new version 4.4 kernels, we need to rename the dtb files to dtbo files to match the new overlay tree name. Rename waveshare35a-overlay.dtb to waveshare35a.dtbo and waveshare32b-overlay.dtb to waveshare32b.dtbo and copy them to the /boot/overlays directory.
As described on this site, it is not recommended to use this screen for gaming. With twice as many pixels to push on the screen, the PiTFT 3.5" is significantly slower than its more compact brothers and we strongly advise against it for games. Now you know!
Get the files waveshare35a-overlay.dtb and waveshare32b-overlay.dtb for the WaveShare 3.2" 320x240 screen and the WaveShare 3.5" 320x480 screen respectively. For the new version 4.4 kernels, we need to rename the dtb files to dtbo files to match the new overlay tree name. Rename waveshare35a-overlay.dtb to waveshare35a.dtbo and waveshare32b-overlay.dtb to waveshare32b.dtbo and copy them to the /boot/overlays directory
In my humble opinion, if you have the 3.5" (C) LCD for Raspberry Pi (480x320; 125Mhz), it should work, but with the 3.5" (B) LCD for Raspberry Pi (480x320; IPS), you won"t be able to get 60fps!