Stufin
Home Quick Cart Profile

Waveshare 3.5 inch Resistive screen IPS LCD screen for Raspberry pi3

Buy Now on Stufin

Component Name

Waveshare 3.5 inch Resistive Screen IPS LCD Screen for Raspberry Pi 3

Description

The Waveshare 3.5 inch Resistive Screen IPS LCD Screen is a high-quality display module specifically designed for the Raspberry Pi 3 single-board computer. This compact and lightweight display module integrates a resistive touchscreen and a high-brightness IPS LCD panel, providing an excellent visual experience for various IoT and robotics applications.

Functionality

The Waveshare 3.5 inch Resistive Screen IPS LCD Screen functions as a primary display device for the Raspberry Pi 3, enabling users to interact with their projects using a responsive and intuitive touchscreen interface. The display module receives video and touchscreen data from the Raspberry Pi 3 through a 4-wire SPI interface and a 5-pin FPC connector, respectively.

Key Features

  • Display Specifications:

Screen Size

3.5 inches

Display Type

IPS (In-Plane Switching) LCD

Resolution

480x320 pixels

Aspect Ratio

43

Brightness

250 cd/m

Viewing Angle

80/80/80/80 (Up/Down/Left/Right)

  • Touchscreen Specifications:

Touchscreen Type

Resistive

Touch Resolution

1024x1024

Touch Interface

5-pin FPC connector

  • Interface and Connectivity:

Display Interface

4-wire SPI

Connectivity

15-pin GPIO connector for Raspberry Pi 3

  • Power and Operating Conditions:

Power Supply

5V

Power Consumption

2.5W (typical)

Operating Temperature

-20C to 60C

  • Mechanical Specifications:

Module Size

56.5mm x 86.5mm x 12.5mm

Weight

Approx. 60g

  • Additional Features:

Supports Raspberry Pi 3B and 3B+ models

Compatible with Raspbian and other Linux-based operating systems

Includes a supporting bracket for easy mounting and installation

Display Controller

ST7789VW

Touch Controller

XPT2054-U

Power Management

Internal DC-DC converter

Certifications and Compliance

CE, FCC, and RoHS certified

Documentation and Resources

Detailed datasheet and user manual available on the manufacturer's website

Includes supporting libraries and example code for Raspberry Pi 3

The Waveshare 3.5 inch Resistive Screen IPS LCD Screen for Raspberry Pi 3 is an ideal solution for IoT and robotics projects that require a compact, high-quality display with touchscreen capabilities. Its compatibility with the Raspberry Pi 3 and support for various Linux-based operating systems make it an excellent choice for developers and makers.

Pin Configuration

  • Waveshare 3.5 inch Resistive screen IPS LCD screen for Raspberry Pi 3 Pinout Explanation
  • The Waveshare 3.5 inch Resistive screen IPS LCD screen is a compact and vibrant display designed specifically for the Raspberry Pi 3. This display features a resistive touchscreen and IPS LCD technology, providing a great user experience. The screen connects to the Raspberry Pi 3 through a 40-pin GPIO header. Here's a detailed explanation of each pin and how to connect them:
  • Pins 1-2: VCC (3.3V) and GND
  • Pin 1: VCC (3.3V) - Power supply pin for the display. Connect to the 3.3V power pin on the Raspberry Pi 3.
  • Pin 2: GND - Ground pin for the display. Connect to a GND pin on the Raspberry Pi 3.
  • Pins 3-6: Resistive Touch Screen Connections
  • Pin 3: YP (Touch Screen Y+)
  • Pin 4: XM (Touch Screen X-)
  • Pin 5: XP (Touch Screen X+)
  • Pin 6: YN (Touch Screen Y-)
  • These pins connect to the resistive touchscreen controller on the display. They should be connected to the corresponding pins on the Raspberry Pi 3 as follows:
  • YP (Pin 3) -> GPIO 17
  • XM (Pin 4) -> GPIO 23
  • XP (Pin 5) -> GPIO 24
  • YN (Pin 6) -> GPIO 25
  • Pins 7-10: LCD Control Signals
  • Pin 7: CLK (Clock Signal)
  • Pin 8: DSI (Data Signal)
  • Pin 9: DEN (Data Enable)
  • Pin 10: VSYNC (Vertical Sync)
  • These pins control the LCD display. Connect them to the corresponding pins on the Raspberry Pi 3 as follows:
  • CLK (Pin 7) -> GPIO 18
  • DSI (Pin 8) -> GPIO 19
  • DEN (Pin 9) -> GPIO 20
  • VSYNC (Pin 10) -> GPIO 21
  • Pins 11-12: Backlight Control
  • Pin 11: BKL (Backlight Enable)
  • Pin 12: PWM (Backlight PWM Control)
  • These pins control the backlight of the display. Connect them to the corresponding pins on the Raspberry Pi 3 as follows:
  • BKL (Pin 11) -> GPIO 22
  • PWM (Pin 12) -> GPIO 13 ( Note: This pin is used for PWM control, which can be configured to adjust the backlight brightness)
  • Pins 13-26: GPIO and SPI Connections
  • Pins 13-26: Unused GPIO pins ( Reserved for future use)
  • These pins are not used in this particular display configuration. However, they can be used for other purposes or future expansion.
  • Pins 27-28: Power and Ground
  • Pin 27: VCC (3.3V) - Power supply pin for the display ( duplicate of Pin 1)
  • Pin 28: GND - Ground pin for the display (duplicate of Pin 2)
  • These pins are duplicate power and ground connections. They can be connected to the power and ground pins on the Raspberry Pi 3 or used for other purposes.
  • Connection Structure
  • To connect the Waveshare 3.5 inch Resistive screen IPS LCD screen to the Raspberry Pi 3, follow this structure:
  • 1. Connect the VCC (3.3V) pin on the display to the 3.3V power pin on the Raspberry Pi 3.
  • 2. Connect the GND pin on the display to a GND pin on the Raspberry Pi 3.
  • 3. Connect the resistive touchscreen pins (YP, XM, XP, and YN) to the corresponding GPIO pins on the Raspberry Pi 3 (GPIO 17, 23, 24, and 25).
  • 4. Connect the LCD control signals (CLK, DSI, DEN, and VSYNC) to the corresponding GPIO pins on the Raspberry Pi 3 (GPIO 18, 19, 20, and 21).
  • 5. Connect the backlight control pins (BKL and PWM) to the corresponding GPIO pins on the Raspberry Pi 3 (GPIO 22 and 13).
  • Important Notes
  • Ensure that the display is properly connected to the Raspberry Pi 3 before powering it on.
  • Properly configure the Raspberry Pi 3 to use the display by editing the /boot/config.txt file and adding the necessary display settings.
  • The display may require additional configuration and calibration for optimal performance. Refer to the Waveshare documentation and Raspberry Pi 3 documentation for more information.
  • By following this pinout guide and connection structure, you should be able to successfully connect the Waveshare 3.5 inch Resistive screen IPS LCD screen to your Raspberry Pi 3.

Code Examples

Waveshare 3.5 inch Resistive Screen IPS LCD for Raspberry Pi 3
Overview
The Waveshare 3.5 inch Resistive Screen IPS LCD is a compact and high-resolution display designed specifically for the Raspberry Pi 3. This LCD screen features a resistive touchscreen, allowing users to interact with their Raspberry Pi projects in a intuitive and user-friendly manner. With a resolution of 480x320 pixels and a 3.5-inch diagonal size, this display is perfect for a wide range of applications, from DIY projects to industrial control systems.
Technical Specifications
Display Size: 3.5 inch
 Resolution: 480x320 pixels
 Touch Type: Resistive
 Interface: SPI
 Power Supply: 5V
 Operating Temperature: -20C to 70C
Getting Started
To get started with the Waveshare 3.5 inch Resistive Screen IPS LCD, you'll need to:
1. Connect the display to your Raspberry Pi 3 using the SPI interface.
2. Install the necessary drivers and libraries on your Raspberry Pi.
3. Configure the display settings using the provided scripts and configuration files.
Code Examples
### Example 1: Displaying an Image using Python
In this example, we'll demonstrate how to display an image on the Waveshare 3.5 inch Resistive Screen IPS LCD using Python.
Hardware Requirements
Raspberry Pi 3
 Waveshare 3.5 inch Resistive Screen IPS LCD
 Breadboard and jumper wires
Software Requirements
Raspbian OS
 Python 3.x
 Pygame library
Code
```python
import pygame
import pygame.freetype
# Initialize pygame
pygame.init()
# Set up the display
screen = pygame.display.set_mode((480, 320))
# Load an image
image = pygame.image.load("image.png")
# Display the image
screen.blit(image, (0, 0))
pygame.display.flip()
# Run indefinitely until the user exits
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
```
Example 2: Creating a GUI using Tkinter
In this example, we'll demonstrate how to create a simple GUI using Tkinter on the Waveshare 3.5 inch Resistive Screen IPS LCD.
Hardware Requirements
Raspberry Pi 3
 Waveshare 3.5 inch Resistive Screen IPS LCD
 Breadboard and jumper wires
Software Requirements
Raspbian OS
 Python 3.x
 Tkinter library
Code
```python
import tkinter as tk
# Create a Tkinter window
window = tk.Tk()
window.title("Waveshare 3.5 inch Resistive Screen IPS LCD")
# Set up the display
window.geometry("480x320")
# Create a label
label = tk.Label(window, text="Hello, World!")
label.pack()
# Create a button
button = tk.Button(window, text="Click me!")
button.pack()
# Run the GUI event loop
window.mainloop()
```
Example 3: Reading Touchscreen Input using C
In this example, we'll demonstrate how to read touchscreen input using C on the Waveshare 3.5 inch Resistive Screen IPS LCD.
Hardware Requirements
Raspberry Pi 3
 Waveshare 3.5 inch Resistive Screen IPS LCD
 Breadboard and jumper wires
Software Requirements
Raspbian OS
 GCC compiler
 WiringPi library
Code
```c
#include <wiringPi.h>
#include <wiringPiSPI.h>
#define TS_CS 5 // Touchscreen chip select pin
#define TS_CLK 6 // Touchscreen clock pin
#define TS_DIN 7 // Touchscreen data in pin
#define TS_DOUT 8 // Touchscreen data out pin
#define TS_IRQ 9 // Touchscreen interrupt pin
int main() {
    wiringPiSetup();
// Initialize the touchscreen
    pinMode(TS_CS, OUTPUT);
    pinMode(TS_CLK, OUTPUT);
    pinMode(TS_DIN, OUTPUT);
    pinMode(TS_DOUT, INPUT);
    pinMode(TS_IRQ, INPUT);
while (1) {
        // Read touchscreen data
        uint16_t x, y;
        readTouchscreenData(&x, &y);
// Print the touchscreen coordinates
        printf("Touchscreen coordinates: (%d, %d)
", x, y);
delay(50);
    }
return 0;
}
void readTouchscreenData(uint16_t x, uint16_t y) {
    // Send the read command to the touchscreen
    digitalWrite(TS_CS, LOW);
    digitalWrite(TS_CLK, LOW);
    digitalWrite(TS_DIN, LOW);
// Read the touchscreen data
    x = readTouchscreenByte();
    y = readTouchscreenByte();
digitalWrite(TS_CS, HIGH);
}
uint16_t readTouchscreenByte() {
    uint16_t data = 0;
for (int i = 0; i < 16; i++) {
        digitalWrite(TS_CLK, HIGH);
        data |= (digitalRead(TS_DOUT) << i);
        digitalWrite(TS_CLK, LOW);
    }
return data;
}
```
These code examples demonstrate the basic usage of the Waveshare 3.5 inch Resistive Screen IPS LCD with the Raspberry Pi 3. You can use these examples as a starting point for your own projects, or modify them to suit your specific needs.