Difference between revisions of "5inch HDMI LCD"

From Waveshare Wiki
Jump to: navigation, search
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Modules| ]][[category:Multi Color LCD| ]][[Category:Raspberry Pi LCD]][[Category:Raspberry Pi| ]]
+
{{Infobox item|colorscheme=blue
[[http://www.waveshare.net/wiki/5inch_HDMI_LCD 中文]]
 
 
 
{{Infobox item
 
 
|name=[[5inch HDMI LCD]]
 
|name=[[5inch HDMI LCD]]
 +
|name2=5inch HDMI LCD (with bicolor case)
 
|brief=Designed for Raspberry Pi
 
|brief=Designed for Raspberry Pi
 
|img=[[File:5inch-HDMI-LCD_l.jpg|250px|link=http://www.waveshare.com/5inch-HDMI-LCD.htm]]
 
|img=[[File:5inch-HDMI-LCD_l.jpg|250px|link=http://www.waveshare.com/5inch-HDMI-LCD.htm]]
 +
|img2=[[File:5inch-HDMI-LCD-Bicolor-Holder-3.jpg|300px|link=http://www.waveshare.com/5inch-hdmi-lcd-with-bicolor-case.htm]]
 
|caption=5 inch Resistive Touch Screen LCD, HDMI interface, Designed for Raspberry Pi
 
|caption=5 inch Resistive Touch Screen LCD, HDMI interface, Designed for Raspberry Pi
 +
|caption2=5inch HDMI LCD + Bicolor case
 
|platform=Raspberry Pi
 
|platform=Raspberry Pi
|category=[[:Category:Multi Color LCD|Multi Color LCD]], [[:Category:Raspberry Pi LCD|Raspberry Pi LCD]]
+
|category=[[:Category:OLEDs / LCDs|OLEDs / LCDs]], [[:Category:LCD|LCD]], [[:Category:Raspberry Pi LCD|Raspberry Pi LCD]]
 
|userdefinedinfo=Part Number|userdefinedvalue=5inch HDMI LCD
 
|userdefinedinfo=Part Number|userdefinedvalue=5inch HDMI LCD
|manufacturer=Waveshare
+
|brand=Waveshare
 +
|{{#urlget:amazon|default}}=display
 
|website_cn=[http://www.waveshare.net/ 官方中文站点]
 
|website_cn=[http://www.waveshare.net/ 官方中文站点]
 
|website_en=[http://www.waveshare.com/ Waveshare website]
 
|website_en=[http://www.waveshare.com/ Waveshare website]
 +
|interface1 =RPi I/Os
 +
|interface2 =HDMI
 +
|related=
 
}}
 
}}
{{RPi LCD User Manual}}
+
== Introduction ==
{{Resource list|
+
5 inch Resistive Touch Screen LCD, HDMI interface, Designed for Raspberry Pi
*[http://www.waveshare.com/product/5inch-HDMI-LCD.htm Introduction]
+
 
 +
{{Amazon|{{#urlget:amazon|default}}=display
 +
|More = [http://www.waveshare.com/5inch-HDMI-LCD.htm More]}}
 +
{{5inch HDMI LCD User Manual}}
 +
== Resources ==
 
*[http://www.waveshare.com/w/upload/3/3e/RPi-LCD-User-Manual.pdf User manual]
 
*[http://www.waveshare.com/w/upload/3/3e/RPi-LCD-User-Manual.pdf User manual]
{{RPi_LCD_Application_Notes}}
+
*[http://www.waveshare.com/w/upload/e/ef/5inch-HDMI-LCD-Bicolor-Holder-LCD-assemble.jpg How to install 5inch Bicolor case]
{{RPi_Software}}
+
=== Software ===
{{5INCH_HDMI_LCD_IMAGE}}
+
*[http://www.waveshare.com/w/upload/d/d7/Panasonic_SDFormatter.zip Panasonic SDFormatter]
}}
+
*[http://www.waveshare.com/w/upload/7/76/Win32DiskImager.zip Win32DiskImager]
 +
*[http://www.waveshare.com/w/upload/5/56/Putty.zip PuTTY]
 +
<!-- {{5INCH_HDMI_LCD_IMAGE}} -->
 +
=== Driver ===
 +
{{5INCH_HDMI_LCD_DRIVER}}
 +
=== Image ===
 +
Description: if you felt hard to install driver, try the image with driver pre-installed.
 +
* [https://docs.google.com/uc?id=0B-Z1UZhyKaZ0ZmhMbHVyUVNvVEk&export=download RPi-5inch-HDMI-LCD-GPIO-Touch-800x480-Raspbian-160715.7z]
 +
=== LCD Panel Dimension ===
 +
* [http://www.waveshare.com/w/upload/e/e6/5inch-hdmi-lcd-%26-5inch-hdmi-lcd-b-panel-dimension.pdf 5inch HDMI LCD panel dimension]
 +
 
 
==FAQ==
 
==FAQ==
{{FAQ box|How to apply the RPi LCD in a custom Raspbian system mirror image?
+
{{RPI HDMI GPIO LCD FAQ}}
|
+
{{FAQ|What are the power requirements?
Firstly, you should make sure the custom mirror image used can boot to desktop. Run the following command:
+
|When working with 5V input, the current is about 235mA with back light on and 45mA with back light off.}}
 
+
== Anti-Piracy ==
sudo raspi-config
+
{{RPi LCD Anti-Piracy}}
 
+
== <font color=red>Beware of knock-offs</font> ==
Check the configuration: Enable Boot to Desktop/Scratch -> Desktop Log in as user ‘pi’ at the graphical desktop
+
{{Beware of knock-offs}}
 
 
Download [http://www.waveshare.net/w/upload/7/73/LCD-show.tar.gz RPi LCD driver] and unzip it. Copy the file LCD-show.tar.gz into your custom mirror image via the network or an U disk. Run the following command:
 
tar xvf LCD-show.tar.gz
 
cd LCD-show/
 
*For 3.2inch RPi LCD (B), run the command:
 
sudo ./LCD32-show
 
*For 3.5inch RPi LCD (A), run the command:
 
sudo ./LCD35-show
 
*For 4inch RPi LCD (A), run the command:
 
sudo ./LCD4-show
 
*For 5inch HDMI LCD, run the command:
 
sudo ./LCD5-show
 
 
 
Then, wait a few minutes, the system will restart automatically. When finished, the RPi LCD is ready to use.
 
 
 
To switch to HDMI display, run the command:
 
 
 
sudo ./LCD-hdmi
 
}}
 
 
 
{{FAQ box|The system mirror image cannot run after updated. Why?
 
|
 
You should update the mirror image in the same manner as the method shown below, otherwise the system mirror image may not run after updated:
 
 
 
sudo apt-mark hold raspberrypi-bootloader
 
sudo apt-get update
 
sudo apt-get upgrade
 
}}
 
 
==Support==
 
==Support==
 
{{Service00}}
 
{{Service00}}
 +
 +
[[Category:OLEDs / LCDs|OLEDs / LCDs]] [[Category:LCD|LCD]] [[Category:Raspberry Pi|Raspberry Pi]] [[Category:Raspberry Pi LCD|Raspberry Pi LCD]]

Revision as of 09:02, 28 September 2017

5inch HDMI LCD
Designed for Raspberry Pi
5inch-HDMI-LCD l.jpg

5 inch Resistive Touch Screen LCD, HDMI interface, Designed for Raspberry Pi
5inch HDMI LCD (with bicolor case)
5inch-HDMI-LCD-Bicolor-Holder-3.jpg

5inch HDMI LCD + Bicolor case
{{{name3}}}

{{{name4}}}

{{{name5}}}

Introduction

5 inch Resistive Touch Screen LCD, HDMI interface, Designed for Raspberry Pi

More

Getting Started

Hardware Connection

1. Connect the GPIO interface:

Raspberry Pi leads out 40 GPIO pins, while the screen leads out 26 pins. When connecting, pay attention to the corresponding pins and Raspberry Pi pins.

2. Connect the HDMI connector to the HDMI port of the screen and the Pi.

Note: Raspberry Pi Zero / Zero 2 W needs an additional HDMI cable for connection.

3. Turn the Backlight on the back of the LCD to "ON".

5inch-HDMI-LCD-Manual-02-Pi-4B.jpg
5inch-HDMI-LCD-Manual-02-Pi3B+.jpg

Software Setting

This LCD can support Raspberry Pi OS / Ubuntu / Kali / Retropie systems.

Please download the latest version of the image on the Raspberry Pi official website.

1) Download the compressed file to the PC, and unzip it to get the .img file.

2) Connect the TF card to the PC, and use SDFormatter software to format the TF card.

3) Open the Win32DiskImager software, select the system image downloaded in step 1, and click 'Write' to write the system image.

4) After the image has finished writing, open the config.txt file in the root directory of the TF card, add the following code at the end of config.txt, then save and quit the TF card safely.

hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

5) Insert the TF card into the Raspberry Pi, power on the Raspberry Pi, and wait for more than 10 seconds to display normally. But the touch is abnormal at that time, and the touch needs to be calibrated as the following steps.

Touch calibration

The display can be calibrated via xinput-calibrator.

1. Execute the following command to install the relevant software:

sudo apt-get install xserver-xorg-input-evdev xinput-calibrator

If the execution fails, you can check here. #Some possible problems

2. Execute the following commands:

sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf

Add the following code to 99-calibration.conf:

Section "InputClass"
        Identifier      "calibration"
        MatchProduct    "ADS7846 Touchscreen"
        Option  "Calibration"   "208 3905 288 3910"
        Option  "SwapAxes"      "0"
        Option "EmulateThirdButton" "1"
        Option "EmulateThirdButtonTimeout" "1000"
        Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

3. After reboot, the touch will work normally under normal circumstances. But for different resistance screens, the accuracy of using the default calibration parameters may not be very suitable.

You can perform touch calibration by clicking the Raspberry Pi icon on the taskbar, selecting Preferences -> Calibrate Touchscreen, and following the displayed prompts.

4. After calibration, the following data will be displayed. If you want to save these touch values, you can replace the data in the red circle with the data in the corresponding position in 99-calibration.conf.

5inch-HDMI-LCD-Manual-02-01.jpg

Screen orientation settings

Update software version

Raspberry Pi OS Bullseye branch needs to update the software version, and this step can be omitted for other systems.

sudo apt-get update
sudo apt-get full-upgrade

Raspberry Pi OS and Kali display rotation

First check whether the KMS or FKMS driver is loaded on the system you are using.

Check method: In /boot/config.txt, check whether the line dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d is turned on.

With KMS or FKMS driver loaded

Use the following command for display rotation:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
#Enter the command corresponding to the display rotation angle at the end of the autostart file, and it will take effect after rebooting the system.
#0: rotate 0 degrees; 1: rotate 270 degrees; 2: rotate 180 degrees; 3: rotate 90 degrees
xrandr -o 1
No KMS or FKMS driver loaded

Use the following command for display rotation:

sudo nano /boot/config.txt
#Enter the command corresponding to the display rotation angle at the end of the config.txt file, and it will take effect after rebooting the system.
#0: rotate 0 degrees; 1: rotate 90 degrees; 2: rotate 180 degrees; 3: rotate 270 degrees
display_rotate=3

Ubuntu display rotation

First check whether the KMS or FKMS driver is loaded on the system you are using.

Check method: In /boot/firmware/config.txt, check whether the line dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d is turned on.

With KMS or FKMS driver loaded

Use the following methods for display rotation.

Note: For different versions of Ubuntu systems, the interface may be different. Generally, you can find the Displays application and rotate it.

GPIO-HDMI-Manual-01.png

GPIO-HDMI-Manual-02.png

GPIO-HDMI-Manual-03.png

Execute the command to rotate the Ubuntu login interface. If the Ubuntu login interface is not opened, this step can be omitted:

#For 32-bit systems, execute the following command, replace your_user with the currently logged in user name
sudo cp /home/<your_user>/.config/monitors.xml /var/lib/lightdm/.config
#For 64-bit systems, execute the following command, replace your_user with the currently logged in user name
sudo cp /home/<your_user>/.config/monitors.xml /var/lib/gdm3/.config
sudo chown gdm:gdm /var/lib/gdm3/.config/monitors.xml

Execute the following command to rotate the command line display during startup:

sudo nano /boot/firmware/cmdline.txt
#Add the following code at the end to rotate the command line
#rotate 0 degrees
fbcon=rotate:0 video=HDMI-A-1:800x480M@60,rotate=0
#Rotate 90 degrees
fbcon=rotate:3 video=HDMI-A-1:800x480M@60,rotate=90
#rotate 180 degrees
fbcon=rotate:2 video=HDMI-A-1:800x480M@60,rotate=0
#rotate 270 degrees
fbcon=rotate:1 video=HDMI-A-1:800x480M@60,rotate=270
No KMS or FKMS driver loaded

Rotation is relatively simple, just use the following command to display rotation:

sudo nano /boot/firmware/config.txt
#Enter the command corresponding to the display rotation angle at the end of the config.txt file, and it will take effect after rebooting the system.
#0: rotate 0 degrees; 1: rotate 90 degrees; 2: rotate 180 degrees; 3: rotate 270 degrees
display_rotate=3

Add touch rotation parameter

sudo nano /usr/share/X11/xorg.conf.d/99-calibration.conf
#Modify the relevant command line in the 99-calibration.conf file, and it will take effect after rebooting the system. The following are the default calibration parameters. If you need to use specific calibration parameters, please pay attention to the order of the Calibration parameter values.
#touch rotate 0 degrees:
Option "Calibration" "208 3905 288 3910"
Option "SwapAxes" "0"
#touch rotate 90 degrees:
Option "Calibration" "3905 208 288 3910"
Option "SwapAxes" "1"
#touch rotate 180 degrees:
Option "Calibration" "3905 208 3910 288"
Option "SwapAxes" "0"
#touch rotate 270 degrees:
Option "Calibration" "208 3905 3910 288"
Option "SwapAxes" "1"

Disable power saving

If you want to keep the display turning on all the time, you can disable the power saving function.
Modify file lightdm.conf

sudo nano /etc/lightdm/lightdm.conf

Find the [SeatDefaults] option and uncomment the line"xserver-command", modify it as below:

#xserver-command=X

Modify this code to

xserver-command=X -s 0 -dpms
  • -s # –Disable the display protecting.
  • dpms Disable power saving.

Reboot

sudo reboot

Interface

PIN NO. SYMBOL DESCRIPTION
1, 17 3.3V Power positive (3.3V power input)
2, 4 5V Power positive (5V power input)
3, 5, 7, 8, 10, 11, 12, 13, 15, 16, 18, 24 NC NC
6, 9, 14, 20, 25 GND Ground
19 TP_SI SPI data input of Touch Panel
21 TP_SO SPI data output of Touch Panel
22 TP_IRQ Touch Panel interrupt, low level while the Touch Panel detects touching
23 TP_SCK SPI clock of Touch Panel
26 TP_CS Touch Panel chip selection, low active

Some possible problems

Touch jitter so obvious, how to solve it?

De-jitter parameters can be set to solve the problem of touch jitter, but at the cost of sacrificing a part of the sensitivity.

Since the ads7846.dtbo provided by Raspberry Pi by default has no de-jitter parameters, you can increase the de-jitter parameters by modifying and replacing ads7846.dtbo

Specifically, the anti-shake function can be added in the following method:

1.Execute the following command:

wget https://files.waveshare.com/upload/2/29/Ads7846_waveshare.zip
unzip Ads7846_waveshare.zip
cd ads7846_waveshare
sudo cp ads7846_waveshare.dtbo /boot/overlays/

2.Execute the following command:

sudo nano /boot/config.txt
#Comment out the following line:
#dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
#Add the following command at the end of the config.txt file, it will take effect after rebooting the system.
dtoverlay=ads7846_waveshare

Related reference documents:ads7846-overlay.dts ads7846.txt

The installation of xserver-xorg-input-evdev and xinput-calibrator in Ubuntu system reports an error, so the touch cannot be used normally. How to solve it?

Note: The Ubuntu system may not be able to access the default source due to network problems in some regions, resulting in an installation error.

Solution 1, update the source:

1. Execute the command to view the current version:

lsb_release -c -s

For example, after execution, the system version may be: groovy

2. Execute the commands:

#backup the original source
sudo mv /etc/apt/syntaxhighlights.list /etc/apt/syntaxhighlights.list.old
sudo nano /etc/apt/syntaxhighlights.list

Add the following code and save:

#If your system version is not groovy, please replace the following groovy with the version name obtained in step 1
deb http://old-releases.ubuntu.com/ubuntu/ groovy universe main
deb http://old-releases.ubuntu.com/ubuntu/ groovy-security main universe
deb http://old-releases.ubuntu.com/ubuntu/ groovy-updates main universe

3. Execute the command to update:

sudo apt-get update

4. After the update is complete, run #Touch calibration again.

If the above source fails, the following methods can be used:

Solution 2, directly find the download address of the two applications, download and install directly

For 32-bit systems, execute the following commands:

wget http://deb.debian.org/debian/pool/main/x/xserver-xorg-input-evdev/xserver-xorg-input-evdev_2.10.6-2_armhf.deb
sudo dpkg -i xserver-xorg-input-evdev_2.10.6-2_armhf.deb
wget wget http://mirrors.ustc.edu.cn/debian/pool/main/x/xinput-calibrator/xinput-calibrator_0.7.5+git20140201-1+b2_armhf.deb  
sudo dpkg -i xinput-calibrator_0.7.5+git20140201-1+b2_armhf.deb

For 64-bit systems, execute the following commands:

wget http://deb.debian.org/debian/pool/main/x/xserver-xorg-input-evdev/xserver-xorg-input-evdev_2.10.6-2_arm64.deb
sudo dpkg -i  xserver-xorg-input-evdev_2.10.6-2_arm64.deb
wget http://mirrors.ustc.edu.cn/debian/pool/main/x/xinput-calibrator/xinput-calibrator_0.7.5+git20140201-1+b2_arm64.deb
sudo dpkg -i xinput-calibrator_0.7.5+git20140201-1+b2_arm64.deb

The installation of xserver-xorg-input-evdev and xinput-calibrator in Kali system reports an error, so the touch cannot be used normally. How to solve it?

Note: The Kali system may not be able to access the default source due to network problems in some regions, resulting in an installation error.

Solution 1, update the source:

1. Execute sudo su to obtain administrator privileges. The default password is kali.

2. Execute the command:

wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

3. Execute the command to modify the source:

nano /etc/apt/syntaxhighlights.list

Comment out the original source and modify it to:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free

Save and exit.

4. Execute the command to update:

apt-get update --fix-missing

5. After the update is complete, run #Touch calibration again.

If the above source fails, the following methods can be used:

Solution 2, directly find the download address of the two applications, download and install directly

For 32-bit systems, execute the following commands:

wget http://deb.debian.org/debian/pool/main/x/xserver-xorg-input-evdev/xserver-xorg-input-evdev_2.10.6-2_armhf.deb
sudo dpkg -i xserver-xorg-input-evdev_2.10.6-2_armhf.deb
wget wget http://mirrors.ustc.edu.cn/debian/pool/main/x/xinput-calibrator/xinput-calibrator_0.7.5+git20140201-1+b2_armhf.deb  
sudo dpkg -i xinput-calibrator_0.7.5+git20140201-1+b2_armhf.deb

For 64-bit systems, execute the following commands:

wget http://deb.debian.org/debian/pool/main/x/xserver-xorg-input-evdev/xserver-xorg-input-evdev_2.10.6-2_arm64.deb
sudo dpkg -i  xserver-xorg-input-evdev_2.10.6-2_arm64.deb
wget http://mirrors.ustc.edu.cn/debian/pool/main/x/xinput-calibrator/xinput-calibrator_0.7.5+git20140201-1+b2_arm64.deb
sudo dpkg -i xinput-calibrator_0.7.5+git20140201-1+b2_arm64.deb

Resources

Software

Driver

The driver can be downloaded from github

git clone https://github.com/waveshare/LCD-show.git

Image

Description: if you felt hard to install driver, try the image with driver pre-installed.

LCD Panel Dimension

FAQ

 Answer:
The LCD must have a driver installed for normal use. For details, please refer to the relevant introduction in the user manual.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Since the Raspberry Pi image and version are frequently updated, if you encounter a situation where the LCD cannot be used normally, please download the latest version of the image provided by us or from the official website of Raspberry Pi and install the latest driver provided by us.
  • Make sure the hardware connection is correct and the contact is good.
  • Make sure that TF card programming is normal.
  • When the Raspberry Pi starts normally, the PWR light is always on, and the ACT light is flashing. If it is found that both lights are always on, it may be that the TF card is not successfully programmed to the image or the TF card is in poor contact with the Raspberry Pi.
  • It is recommended to use a 5V 2.5A power adapter for the Raspberry Pi. If the Raspberry Pi is powered by the USB port of the PC, the Raspberry Pi may not be able to start normally due to an insufficient power supply.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
Commercial grade (0~70 degrees Celsius).
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
When working with 5V input, the current is about 200mA.
{{{3}}}
{{{4}}}

{{{5}}}


 Answer:
When working with 5V input, the current is about 235mA with back light on and 45mA with back light off.
{{{3}}}
{{{4}}}

{{{5}}}


Anti-Piracy

Since the first-generation Raspberry Pi released, Waveshare has been working on designing, developing, and producing various fantastic touch LCDs for the Pi. Unfortunately, there are quite a few pirated/knock-off products in the market. They're usually some poor copies of our early hardware revisions, and comes with none support service.

To avoid becoming a victim of pirated products, please pay attention to the following features when purchasing:

RPi-LCD-Anti-Piracy.jpg

(Click to enlarge)

Beware of knock-offs

Please note that we've found some poor copies of this item in the market. They are usually made of inferior materials and shipped without any testing.

You might be wondering if the one you're watching or you've purchased in other non-official stores is original, feel free to contact us.

Support

Support

If you require technical support, please go to the Support page and open a ticket.