Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use ESP32-CYD-2.8: Examples, Pinouts, and Specs

Image of ESP32-CYD-2.8
Cirkit Designer LogoDesign with ESP32-CYD-2.8 in Cirkit Designer

Introduction

The ESP32-CYD-2.8 is a versatile development board that integrates the powerful ESP32 microcontroller with a 2.8-inch touchscreen display. This combination makes it an excellent choice for Internet of Things (IoT) applications, user interface (UI) projects, and other embedded systems requiring both connectivity and an interactive display. The ESP32-CYD-2.8 supports Wi-Fi and Bluetooth connectivity, making it ideal for smart home devices, industrial automation, and portable monitoring systems.

Explore Projects Built with ESP32-CYD-2.8

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Sensor Monitoring System with OLED Display and E-Stop
Image of MVP_design: A project utilizing ESP32-CYD-2.8 in a practical application
This circuit features an ESP32 microcontroller that interfaces with a variety of sensors and output devices. It is powered by a Lipo battery through a buck converter, ensuring a stable voltage supply. The ESP32 collects data from a DHT11 temperature and humidity sensor and a vibration sensor, controls a buzzer, and displays information on an OLED screen. An emergency stop (E Stop) is connected for safety purposes, allowing the system to be quickly deactivated.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Portable NFC/RFID Reader with OLED Interface
Image of omnitool: A project utilizing ESP32-CYD-2.8 in a practical application
This circuit features an ESP32 microcontroller connected to a 0.96" OLED display via I2C (SCK and SDA lines), multiple pushbuttons interfaced to various GPIO pins for input, and a LiPoly battery connected through a TP4056 charging/protection module to power the system. A step-up boost power converter adjusts the battery voltage to supply the ESP32 and OLED display. The toggle switch controls the power flow from the battery to the converter, enabling an on/off functionality for the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered ESP32-C3 Interactive Control Panel
Image of GTV-Transmitter Advanced: A project utilizing ESP32-CYD-2.8 in a practical application
This circuit features an ESP32-C3 microcontroller connected to various input devices and an OLED display. The input devices include two KY-023 Dual Axis Joystick Modules for directional input and a Rotary Encoder for incremental input, both interfaced with the ESP32-C3's GPIO pins. The circuit also includes a power management system with a Polymer Lithium Ion Battery, a JST connector, and a toggle switch to control power to an LED indicator.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based CO Sensor with OLED Display
Image of ESP32-ME2-CO: A project utilizing ESP32-CYD-2.8 in a practical application
This circuit features an ESP32 microcontroller interfaced with a 0.96" OLED display and an ME2-CO carbon monoxide sensor. The ESP32 reads data from the CO sensor and displays the information on the OLED screen, providing a compact solution for monitoring CO levels.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32-CYD-2.8

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of MVP_design: A project utilizing ESP32-CYD-2.8 in a practical application
ESP32-Based Sensor Monitoring System with OLED Display and E-Stop
This circuit features an ESP32 microcontroller that interfaces with a variety of sensors and output devices. It is powered by a Lipo battery through a buck converter, ensuring a stable voltage supply. The ESP32 collects data from a DHT11 temperature and humidity sensor and a vibration sensor, controls a buzzer, and displays information on an OLED screen. An emergency stop (E Stop) is connected for safety purposes, allowing the system to be quickly deactivated.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of omnitool: A project utilizing ESP32-CYD-2.8 in a practical application
ESP32-Based Portable NFC/RFID Reader with OLED Interface
This circuit features an ESP32 microcontroller connected to a 0.96" OLED display via I2C (SCK and SDA lines), multiple pushbuttons interfaced to various GPIO pins for input, and a LiPoly battery connected through a TP4056 charging/protection module to power the system. A step-up boost power converter adjusts the battery voltage to supply the ESP32 and OLED display. The toggle switch controls the power flow from the battery to the converter, enabling an on/off functionality for the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GTV-Transmitter Advanced: A project utilizing ESP32-CYD-2.8 in a practical application
Battery-Powered ESP32-C3 Interactive Control Panel
This circuit features an ESP32-C3 microcontroller connected to various input devices and an OLED display. The input devices include two KY-023 Dual Axis Joystick Modules for directional input and a Rotary Encoder for incremental input, both interfaced with the ESP32-C3's GPIO pins. The circuit also includes a power management system with a Polymer Lithium Ion Battery, a JST connector, and a toggle switch to control power to an LED indicator.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32-ME2-CO: A project utilizing ESP32-CYD-2.8 in a practical application
ESP32-Based CO Sensor with OLED Display
This circuit features an ESP32 microcontroller interfaced with a 0.96" OLED display and an ME2-CO carbon monoxide sensor. The ESP32 reads data from the CO sensor and displays the information on the OLED screen, providing a compact solution for monitoring CO levels.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Microcontroller: ESP32 dual-core processor
  • Display: 2.8-inch TFT touchscreen (320x240 resolution)
  • Connectivity: Wi-Fi 802.11 b/g/n, Bluetooth 4.2 (Classic and BLE)
  • Operating Voltage: 3.3V
  • Input Voltage Range: 5V (via USB) or 3.3V (via external power supply)
  • Flash Memory: 4MB
  • SRAM: 520KB
  • GPIO Pins: 28 (including ADC, DAC, PWM, I2C, SPI, UART)
  • Touchscreen Controller: XPT2046 (SPI interface)
  • Dimensions: 85mm x 55mm
  • Power Consumption: ~240mA (active), ~10mA (deep sleep)

Pin Configuration and Descriptions

The ESP32-CYD-2.8 features a variety of pins for interfacing with external components. Below is the pinout description:

Pin Name Type Description
VIN Power Input Input voltage (5V) for powering the board via USB or external power supply.
GND Ground Ground connection.
3V3 Power Output 3.3V output for powering external components.
GPIO0 Digital I/O General-purpose I/O pin, also used for boot mode selection.
GPIO2 Digital I/O General-purpose I/O pin.
GPIO4 Digital I/O General-purpose I/O pin, supports PWM and ADC.
GPIO12-19 Digital I/O General-purpose I/O pins, support SPI, I2C, UART, PWM, and ADC.
GPIO21 Digital I/O General-purpose I/O pin, often used for I2C SDA.
GPIO22 Digital I/O General-purpose I/O pin, often used for I2C SCL.
GPIO25-27 Digital I/O General-purpose I/O pins, support DAC and ADC.
T_CS Digital I/O Chip select pin for the touchscreen controller (XPT2046).
T_IRQ Digital Input Interrupt pin for the touchscreen controller.
T_CLK Digital Output Clock pin for the touchscreen controller (SPI interface).
T_MOSI Digital Output Data input pin for the touchscreen controller (SPI interface).
T_MISO Digital Input Data output pin for the touchscreen controller (SPI interface).

Usage Instructions

How to Use the ESP32-CYD-2.8 in a Circuit

  1. Powering the Board:

    • Connect the board to a 5V USB power source or provide 3.3V to the VIN pin.
    • Ensure the power supply can provide at least 500mA to avoid instability.
  2. Connecting the Touchscreen:

    • The touchscreen is pre-wired to the ESP32 via SPI. Use the T_CS, T_CLK, T_MOSI, and T_MISO pins for communication.
    • The T_IRQ pin can be used to detect touch events.
  3. Programming the ESP32:

    • Use the Arduino IDE or ESP-IDF to program the ESP32.
    • Install the necessary libraries for the touchscreen (e.g., TFT_eSPI and Adafruit_GFX).
  4. Interfacing with Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other devices.
    • Configure the pins in your code according to the peripheral's requirements.

Important Considerations and Best Practices

  • Voltage Levels: Ensure all connected peripherals operate at 3.3V logic levels to avoid damaging the ESP32.
  • Touchscreen Calibration: Some applications may require touchscreen calibration for accurate input.
  • Power Consumption: Use deep sleep mode to reduce power consumption in battery-powered applications.
  • Heat Management: Avoid prolonged operation at high loads to prevent overheating.

Example Code for Arduino IDE

Below is an example of initializing the touchscreen and displaying text on the screen:

#include <TFT_eSPI.h>  // Include the TFT library
#include <SPI.h>       // Include the SPI library

TFT_eSPI tft = TFT_eSPI();  // Create TFT object

void setup() {
  tft.init();               // Initialize the display
  tft.setRotation(1);       // Set display orientation
  tft.fillScreen(TFT_BLACK); // Clear the screen with black color

  tft.setTextColor(TFT_WHITE, TFT_BLACK); // Set text color (white on black)
  tft.setTextSize(2);       // Set text size

  tft.setCursor(10, 10);    // Set cursor position
  tft.println("Hello, ESP32!"); // Print text to the screen
}

void loop() {
  // Add your code here for touchscreen interaction or other tasks
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The touchscreen is not responding:

    • Ensure the SPI connections (T_CS, T_CLK, T_MOSI, T_MISO) are properly configured in your code.
    • Verify that the touchscreen library is installed and correctly initialized.
  2. The display shows a blank screen:

    • Check the power supply to ensure the board is receiving sufficient voltage.
    • Verify that the display initialization code is correct.
  3. Wi-Fi or Bluetooth is not working:

    • Ensure the ESP32 firmware is up to date.
    • Check that the correct Wi-Fi credentials or Bluetooth pairing settings are used.
  4. The board overheats during operation:

    • Reduce the workload by optimizing your code.
    • Use a heatsink or improve ventilation around the board.

FAQs

  • Can I use the ESP32-CYD-2.8 with a battery?
    Yes, you can power the board using a 3.7V LiPo battery with a suitable voltage regulator.

  • What is the maximum resolution supported by the touchscreen?
    The 2.8-inch TFT display supports a resolution of 320x240 pixels.

  • Is the touchscreen multitouch capable?
    No, the touchscreen supports single-touch input only.

  • Can I use the ESP32-CYD-2.8 with other development environments?
    Yes, the board is compatible with ESP-IDF, PlatformIO, and other ESP32-supported environments.