E-Paper Display Wiring
E-Paper Display Wiring
Overview
Section titled “Overview”This section covers the hardware connection between an ESP32 and an e-paper display module. Proper wiring is critical for reliable communication and display operation. After completing this section, you will be able to:
- Identify the pin functions on Waveshare e-paper displays
- Wire the e-paper display to ESP32 using SPI interface
- Understand the role of each connection pin
- Verify the wiring with a test sketch
Prerequisites
Section titled “Prerequisites”Before starting this section, please ensure:
- Basic understanding of SPI communication protocol
- Familiarity with ESP32 GPIO pins
- ESP32 development board (recommended: ESP32 DevKit or XIAO ESP32-C3)
- Waveshare e-paper display (any size, 2.13” recommended)
- Jumper wires (female-female)
- Breadboard (optional)
Key Concepts
Section titled “Key Concepts”SPI Interface Overview
Section titled “SPI Interface Overview”The e-paper display communicates with the ESP32 via SPI (Serial Peripheral Interface), a synchronous serial communication protocol that uses four main signals:
ESP32 ─────────────────────── E-Paper Display │ ├── SCK (Serial Clock) ─────→ SCK ├── MOSI (Master Out Slave In) ──→ DIN ├── CS (Chip Select) ───────→ CS └── DC (Data/Command) ─────→ DC
Additional signals: ├── RST (Reset) ───────────→ RST └── BUSY ──────────────────→ BUSYSignal Descriptions:
| Signal | Direction | Function |
|---|---|---|
| SCK | ESP32 → Display | Serial clock signal |
| MOSI/DIN | ESP32 → Display | Data sent to display |
| CS | ESP32 → Display | Active-low chip select |
| DC | ESP32 → Display | Data (HIGH) or Command (LOW) |
| RST | ESP32 → Display | Hardware reset |
| BUSY | Display → ESP32 | Display busy indicator |
Pin Mapping
Section titled “Pin Mapping”Waveshare 2.13” E-Paper (Recommended Pinout):
| E-Paper Pin | Description | ESP32 GPIO |
|---|---|---|
| VCC / 3.3V | Power (3.3V) | 3.3V |
| GND | Ground | GND |
| DIN / MOSI | SPI data input | GPIO 23 |
| SCK / CLK | SPI clock | GPIO 18 |
| CS | Chip select | GPIO 5 |
| DC | Data/command | GPIO 17 |
| RST | Reset | GPIO 16 |
| BUSY | Busy status | GPIO 4 |
Note: These pin assignments are configurable in software. The above uses the most common defaults for ESP32.
Alternative Pin Mapping for XIAO ESP32-C3:
| E-Paper Pin | ESP32-XIAO C3 Pin |
|---|---|
| VCC | 3.3V |
| GND | GND |
| DIN / MOSI | GPIO 3 |
| SCK / CLK | GPIO 2 |
| CS | GPIO 5 |
| DC | GPIO 4 |
| RST | GPIO 6 |
| BUSY | GPIO 7 |
Implementation Steps
Section titled “Implementation Steps”Step 1: Prepare the Hardware
Section titled “Step 1: Prepare the Hardware”Gather the following components:
Required:- ESP32 development board × 1- Waveshare e-paper display (2.13") × 1- Female-to-female jumper wires × 8- Micro USB cable × 1- Breadboard (optional but helpful)Step 2: Connect Power Lines
Section titled “Step 2: Connect Power Lines”Start by connecting power and ground:
ESP32 3.3V ──────────── E-Paper VCCESP32 GND ──────────── E-Paper GNDWarning: Do not use 5V! E-paper displays require 3.3V power. Connecting 5V can permanently damage the display.
Step 3: Connect SPI Data Lines
Section titled “Step 3: Connect SPI Data Lines”Connect the SPI communication lines:
ESP32 GPIO 23 ───────── E-Paper DIN (MOSI)ESP32 GPIO 18 ───────── E-Paper SCK (CLK)ESP32 GPIO 5 ───────── E-Paper CSESP32 GPIO 17 ───────── E-Paper DCStep 4: Connect Control Lines
Section titled “Step 4: Connect Control Lines”Connect the remaining control signals:
ESP32 GPIO 16 ───────── E-Paper RSTESP32 GPIO 4 ───────── E-Paper BUSYComplete Wiring Diagram
Section titled “Complete Wiring Diagram”┌────────────────────────────────────────────────────────┐│ ESP32 DevKit ││ ││ 3.3V ──────────────────────────────────────────────────┼──→ VCC (E-Paper)│ GND ──────────────────────────────────────────────────┼──→ GND (E-Paper)│ GPIO 23 (MOSI) ────────────────────────────────────────┼──→ DIN│ GPIO 18 (SCK) ────────────────────────────────────────┼──→ SCK│ GPIO 5 (CS) ────────────────────────────────────────┼──→ CS│ GPIO 17 (DC) ────────────────────────────────────────┼──→ DC│ GPIO 16 (RST) ────────────────────────────────────────┼──→ RST│ GPIO 4 (BUSY) ────────────────────────────────────────┼──→ BUSY└────────────────────────────────────────────────────────┘Verification
Section titled “Verification”Visual Inspection
Section titled “Visual Inspection”After wiring, perform these checks:
- VCC is connected to 3.3V (not 5V)
- GND is connected
- All SPI pins are connected to the correct GPIOs
- No loose connections
- Jumper wires are fully inserted
Power-On Test
Section titled “Power-On Test”Upload this minimal wiring test sketch:
#include <SPI.h>
// Pin definitions#define EPD_CS 5#define EPD_DC 17#define EPD_RST 16#define EPD_BUSY 4
void setup() { Serial.begin(115200);
// Initialize control pins pinMode(EPD_CS, OUTPUT); pinMode(EPD_DC, OUTPUT); pinMode(EPD_RST, OUTPUT); pinMode(EPD_BUSY, INPUT);
digitalWrite(EPD_CS, HIGH);
// Reset display digitalWrite(EPD_RST, LOW); delay(10); digitalWrite(EPD_RST, HIGH); delay(10);
// Check BUSY signal int busyState = digitalRead(EPD_BUSY); Serial.print("BUSY pin state: "); Serial.println(busyState);
Serial.println("Wiring test complete!");}
void loop() { // Nothing to do here}Expected Output:
BUSY pin state: 1Wiring test complete!Troubleshooting
Section titled “Troubleshooting”Issue 1: Display Shows Nothing
Section titled “Issue 1: Display Shows Nothing”Symptoms:
- Screen remains completely white or blank
- No visible change after uploading sketch
Possible Causes:
- Power connections reversed
- Loose jumper wires
- Display not receiving power
Solutions:
# 1. Verify power with multimeter# Check voltage between VCC and GND on e-paper header- Check that all jumper wires are fully seated
- Verify ESP32 is powered (USB connected, onboard LED on)
- Try reseating the display connector
Issue 2: Display Shows Partial Update Artifacts
Section titled “Issue 2: Display Shows Partial Update Artifacts”Symptoms:
- Ghosting or previous image remnants
- Random pixels or lines on screen
Possible Causes:
- BUSY pin not connected or misconfigured
- Timing issues with initialization
Solutions:
- Verify BUSY pin connection
- Check pin assignments match the code
- Ensure proper initialization sequence (reset → wait → init)
Issue 3: SPI Communication Fails
Section titled “Issue 3: SPI Communication Fails”Symptoms:
- Compilation succeeds but display doesn’t respond
- Serial monitor shows initialization errors
Solutions:
- Double-check all SPI pin connections
- Verify GPIO numbers in code match physical connections
- Test with a different SPI bus speed (lower)
Best Practices
Section titled “Best Practices”- ✅ Use female-to-female jumper wires for temporary prototyping
- ✅ Keep wires short (< 20cm) to avoid signal degradation
- ✅ Add a 10µF capacitor between VCC and GND near the display for stable power
- ❌ Avoid using 5V on any e-paper pins
- ❌ Don’t hot-plug the display while the ESP32 is powered
- ❌ Don’t exceed 10cm wire length for BUSY signal in noisy environments
Summary
Section titled “Summary”- E-paper displays use SPI interface — requiring 6 signal lines (SCK, MOSI, CS, DC, RST, BUSY) plus power
- 3.3V only — e-paper displays are not 5V tolerant
- Pin assignments are configurable — the GxEPD2 library allows custom pin mapping
- BUSY signal is critical — the display needs time to complete its internal refresh cycle
- Always verify wiring with a test sketch before building complex applications
References
Section titled “References”Target Audience: Alibaba.com IoT Pre-sales Engineers
Status: ✅ Completed