• sales


Raspberry Pi 3.5inch DPI LCD User Guide


Raspberry Pi 3.5inch Capacitive Touch LCD, DPI, 640×480


  • 3.5inch IPS Display, 640×480 hardware resolution.
  • Designed for Raspberry Pi, based on Raspberry Pi 40pin GPIO interface.
  • Using DPI666 interface of Raspberry Pi to drive LCD, refresh rate up to 60Hz.
  • Drive capacitive touch through I2C interface of Raspberry Pi, 5-points touch, toughened glass panel, hardness up to 6H.
  • Supports Raspbian and Kali systems.
  • With high-fidelity speakers and 3.5mm audio output. (Note: Pi4B doesn’t support audio output temporarily)

How to use

This LCD can support Raspbian and Kali systems.

Please download the latest version of the image on the https://www.raspberrypi.org/software/

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

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

3) Open the Win32DiskImager.exe 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(/boot/), add the following code at the end of config.txt:

  1. gpio=0-9=a2
  2. gpio=12-17=a2
  3. gpio=20-25=a2
  4. dtoverlay=dpi18
  5. enable_dpi_lcd=1
  6. display_default_lcd=1
  7. extra_transpose_buffer=2
  8. dpi_group=2
  9. dpi_mode=87
  10. dpi_output_format=0x6f006
  11. hdmi_timings=640 0 20 10 10 480 0 10 5 5 0 0 0 60 0 60000000 1
  12. dtoverlay=waveshare-35dpi-3b-4b
  13. dtoverlay=waveshare-35dpi-3b
  14. dtoverlay=waveshare-35dpi-4b

5)Download the 3.5inch DPI LCD DTBO: 3.5DPI_DTBO.zip and extract 3 dtbo files. Copy these three files to the overlays directory (/boot/overlays/), as shown in the following figure:

6) Save and quit the TF card safely, and insert the TF card into the Raspberry Pi.

7) Insert the 4inch DPI LCD (B) into the 40PIN GPIO interface of the Raspberry Pi, power on the Raspberry Pi, and wait for about ten seconds to display normally.

Rotation(Working with Raspberry Pi)

Display Rotating

Add this statement in the config.txt file (the config file is located in the root directory of the TF card, which is named /boot):

  1. display_rotate=1 #1:90;2: 180; 3: 270

Note: For Raspberry Pi 4, you need to comment out dtoverlay=vc4-fkms-V3D.
And then restart the Raspberry Pi after saving.

  1. sudo reboot

Touch Rotating

After the display is rotated, the position of touch is incorrect because the touch doesn’t change with the display angle. So the touch also needs to be modified.

1.Install libinput.

  1. sudo apt-get install xserver-xorg-input-libinput

If the system you installed is Ubuntu. The installation code is:

  1. sudo apt install xserver-xorg-input-synaptics

2.Create the xorg.conf.d directory under /etc/X11/ (if the directory already exists, proceed directly to step 3).

  1. sudo mkdir /etc/X11/xorg.conf.d

3.Copy the 40-libinput-conf file to the directory you created just now.

  1. sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/

4.Edit this file.

  1. sudo nano /etc/X11/xorg.conf.d/40-libinput.conf

Find the part of the touchscreen, add the following statement inside, and then save the file.

  1. Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

Similar to the picture below:

5. save and reboot your Pi

sudo reboot

After completing these steps. The LCD could rotate 90 degrees both display and touch function.


90 degree: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

180 degree: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"

270 degree: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 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:


Modify this code to

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


sudo reboot

Turn on/off HDMI output

You can use the following commands to disable/enable the displaying.

vcgencmd display_power 0
vcgencmd display_power 1


The pins labeled "NC" below means that those pins of Raspberry Pi are not occupied by the LCD, and the user can use them for other applications.

1NCHanging in the air
25VPower positive (5V power input)
3VSYNCVertical sync
45VPower positive (5V power input)
5HSYNCHorizontal sync
7B2RGB signal cable
8G4RGB signal cable
10G5RGB signal cable
11G7RGB signal cable
12PWMbacklight control
13TP_INTTouch Panel interrupt
15R4RGB signal cable
16R5RGB signal cable
17NCHanging in the air
18R6RGB signal cable
19TP_SDAI2C SDA for touch panel
21B7RGB signal cable
22R7RGB signal cable
23TP_SCLI2C SCL for touch panel
24B6RGB signal cable
26B5RGB signal cable
27LCD_CLKLCD clock
28DELCD data enable
29B3RGB signal cable
31B4RGB signal cable
32G2RGB signal cable
33G3RGB signal cable
35NCHanging in the air
36G6RGB signal cable
37NCHanging in the air
38R2RGB signal cable
40R3RGB signal cable