3.5inch HDMI LCD

From Diustou Wiki
Revision as of 09:25, 23 March 2021 by Admin (talk | contribs) (Text replacement - "{{SERVERNAME}}/w/upload" to "{{SERVERNAME}}/en/w/upload")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
3.5inch HDMI LCD
3.5inch HDMI LCD, 480x320, IPS
3.5inch-HDMI-LCD-1.jpg

480x320, 3.5inch Resistive Touch Screen LCD, HDMI interface, IPS Screen, Designed for Raspberry Pi

Information

Categories: OLEDs / LCDs, LCD, Raspberry Pi LCD

Brand: Waveshare

Description
Features

---

Interfaces

RPiHDMI

Related products

{{{related}}}

Introduction

480x320, 3.5inch Resistive Touch Screen LCD, HDMI interface, IPS Screen, Designed for Raspberry Pi

Features

  • 480x320 hardware resolution, configurable by software. (up to 1920x1080)
  • Resistive touch control
  • It is compatible and can be directly inserted in any version of Raspberry Pi (For the Raspberry Pi 1 B and Raspberry Pi Zero, HDMI cable is required and should be purchase separately).
  • Provide driver. (support Raspbian\Ubuntu\Kali and Retropie system).
  • Also works as a computer monitor, in this case, the touch panel is unavailable and HDMI cable is required
  • When only used for display, does not occupy any I/O resources (using touch function will occupy I/O resources).
  • Multi-languages OSD menu, for power management, brightness/contrast adjustment, etc.
  • Supports HDMI audio output

Video

https://youtu.be/IfNH5s7vLbI

Getting Started

Hardware Connection

Hardware connection
  1. Plug the LCD to your Raspberry Pi:
    • There are 40 pins on Raspberry Pi Model A+/B+/2 B/3 B but only 26 pins on the LCD, so you should pay attention to connecting the pins to your Pi accordingly.
  2. Connect the HDMI Connector to both the HDMI interfaces on the LCD and the Pi.
    • You should connect the LCD to Raspberry Pi Model B or Raspberry Pi Zero with an HDMI cable rather than an HDMI Connector.

Install the touch driver

You can enable the touch in two ways: Method 1. install driver to your Raspbian/Ubuntu Mate OS. Method 2. use the Ready-to-use image file of which LCD driver was pre-installed. Method 1. Driver installation 1) Download the Raspbian / Ubuntu Mate image from Raspberry Pi website and extract it on a PC. 2) Connect your micro SD card to the PC and write the image to the card using Win32DiskImager. How to write an image to a micro SD card for your Pi? See RPi Image Installation Guides for more details) 3) 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. max_usb_current=1 hdmi_group=2 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0 hdmi_drive=1 4) Connect the TF card to the Raspberry Pi, start the Raspberry Pi, and then log in to the Raspberry Pi terminal (you can connect the Raspberry Pi to the HDMI display or log in remotely with SSH). 5) Then open a terminal to install the touch driver which can be found in the /boot/ directory. Note: Please make sure your Pi is connecting to the internet. git clone https://github.com/waveshare/LCD-show.git cd LCD-show/

  1. There are two LCD resolution modes, choose one of the two to execute.

./LCD35-HDMI-480x320-show ./LCD35-HDMI-800x480-show Touch function will work after restart. For ease of use, you can set the screen orientation, see: #Screen orientation settings.

If the Raspbain you use is Lite version. You should use commands below to install driver

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

  1. There are two LCD resolution modes, choose one of the two to execute.

./LCD35-HDMI-480x320-show lite ./LCD35-HDMI-800x480-show lite Method 2. Using Ready-to-use image The image file with pre-installed driver is located in the IMAGE directory of the CD, or you can download it from #Image. Extract the .7z file and you will get an .img file. Write the image to your micro SD card (How to write an image to a micro SD card for your Pi? See RPi Image Installation Guides for more details). Then insert the card to your Pi, power up and enjoy it.

Audio out from HDMI

There is a 3.5mm jack on the LCD, which is used to play HDMI audio. Steps to use this jack: sudo nano /boot/config.txt # edit the configuration file Modify this line: hdmi_drive=1 to hdmi_drive=2 Exit with save: Hit ctrl + x -> Y reboot # system reboot apt-get install mplayer # install mplayer mplayer music.mp3 # play music

Custom resolution

The hardware resolution of this LCD is 480x320 but you can change the resolution by software. In Raspbian, these resolution settings can work properly 480×320 800×480 800×600 1024×768 1152×864 1280×720 1280×768 1280×800 1280×960 1280×1024 1360×768 1366×768 1440×900 1600×900 1600×1024 1680×1050 The resolution can be configured by editing the /boot/config.txt file. Modify the line where hdmi_cvt is located, e.g. to change the resolution from 480x320 to 800x480, modify: hdmi_cvt 480 320 60 6 0 0 0 to hdmi_cvt 800 480 60 6 0 0 0 Note: Due to its own hardware resolution limitation, we recommend to use 480×320 800×480 800×600 resolution. Although other resolutions are supported, the display effect is not good due to the small screen size.

Screen orientation settings

After touch driver installed, the screen orientation can be set by these commands:

  • 0 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show 0 ./LCD35-HDMI-800x480-show 0

  • 90 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show 90 ./LCD35-HDMI-800x480-show 90

  • 180 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show 180 ./LCD35-HDMI-800x480-show 180

  • 270 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show 270 ./LCD35-HDMI-800x480-show 270

if you use Raspbian-lite version
  • 0 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show lite 0 ./LCD35-HDMI-800x480-show lite 0

  • 90 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show lite 90 ./LCD35-HDMI-800x480-show lite 90

  • 180 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show lite 180 ./LCD35-HDMI-800x480-show lite 180

  • 270 degree rotation

cd LCD-show/

  1. Choose one of the two to execute

./LCD35-HDMI-480x320-show lite 270 ./LCD35-HDMI-800x480-show lite 270

Touch screen calibration

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.

  • Run the following command to install:
sudo apt-get install xinput-calibrator 
  • Click the "Menu" button on the taskbar, choose "Preference" -> "Calibrate Touchscreen".
  • Finish the touch calibration following the prompts. Maybe rebooting is required to make calibration active.
  • You can create a 99-calibration.conf file to save the touch parameters (not necessary if file exists).
sudo mkdir /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
  • Save the touch parameters (may differ depending on LCD) to 99-calibration.conf, as shown in the picture:

5inch HDMI LCD FAQ1.jpg

  • Press the keys Ctrl+X, and select option Y to save the modification.
  • The modification will be valid after rebooting the system. Enter the following command for system reboot:
sudo reboot

Install virtual keyboard

1.Execute the following code to install the corresponding software.

sudo apt-get update
sudo apt-get install matchbox-keyboard
sudo nano /usr/bin/toggle-matchbox-keyboard.sh

2.Copy the following content to toggle-matchbox-keyboard.sh, save and exit.

#!/bin/bash
#This script toggle the virtual keyboard
PID=`pidof matchbox-keyboard`
if [ ! -e $PID ]; then
killall matchbox-keyboard
else
matchbox-keyboard &
fi

3.Execute the following code.

sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh
sudo mkdir /usr/local/share/applications
sudo nano /usr/local/share/applications/toggle-matchbox-keyboard.desktop

4.Copy the following content to toggle-matchbox-keyboard.desktop, save and exit.

[Desktop Entry]
Name=Toggle Matchbox Keyboard
Comment=Toggle Matchbox Keyboard`
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True

5.Execute the following code, this step must use the "pi" user authority, if you use the administrator authority, the file will not be found.

sudo nano /etc/xdg/lxpanel/LXDE-pi/panels/panel

6.Find the code similar to the following.(the icon of different versions may be different)

Plugin {
type = launchbar
Config {
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}

7. Add the following code to add a Button item, as shown below.

Button {
id=/usr/local/share/applications/toggle-matchbox-keyboard.desktop
}

RPILCD-INSTALL-KEYBOARD01.png 8. Execute the following code to restart the system, you can see a virtual keyboard icon in the upper left corner of the LCD.

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

Resource

User Manual

Driver

The driver can be downloaded from github

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


Image

3D Drawing

Demo video

Software

General Tutorial Series

FAQ

Question:
Why does the touchscreen not work well?
Answer:

Now, we only provide touch screen drivers for Raspbian and Ubuntu Mate. How to install the driver? See:#Method_1._Driver_installation


Question:
Why does the image provided on the wiki does not work on my Pi?
Answer:
  • The image provided may differ depending on batches, however, some Images are just available for Pi 2 (or before, but not for Pi 3). In such cases, you can download the latest version from Raspberry Pi website and install the driver. See:#Method_1._Driver_installation
  • Make sure the hardware connection is correct and connects fine.
  • Make sure you've written the image to your SD card using the software File:Win32DiskImager.zip rather than just copy and paste.
  • When the Raspberry Pi starts normally, the PWR light is always on and the ACT light is blinking. If you find that both lights are always on, it may be that the TF card failed to burn the image or the TF card is in poor contact with the Raspberry Pi.
  • It is strongly recommended to use a stand-alone 5V/3A power adapter because the USB port of PC might not have enough power to support the Pi and LCD.


Question:
Could I only connect the HDMI cable?
Answer:
No, the HDMI interface is only used for display. You also need to insert the GPIO for touching and power. BTW, you can also connect the external power adapter to the USB interface for power if LCD has an external power interface.


Question:
What is the working temperature of this LCD?
Answer:
The working temperature is 0°C -- 70°C


Question:
What are the power requirements?
Answer:
When working with 5V input, the current is about 500mA with back light on and 30mA with back light off.


Question:
What is the operating current of 3.5inch HDMI LCD?
Answer:
With 5V, the operating current of 3.5inch HDMI LCD is about 0.5A



Support

Icon-mail.png Contact us

Working hours: 09:00-18:00 (UTC+8 Monday to Saturday)