# LILYGO T-Relay

> ESP32 development board with 4 onboard HRS4H-S-DC5V relays, 4MB flash, 8MB PSRAM, WiFi, BLE 4.2, and optocoupler-isolated GPIO expansion — designed for wireless remote switch control of AC/DC loads.

## Quick Facts

- **Brand:** LILYGO
- **Board Type:** ESP32
- **Price:** ~$10.01
- **Product Readiness:** developer
- **CPU:** ESP32
- **CPU Architecture:** Xtensa LX6
- **RAM:** 520KB SRAM
- **PSRAM:** 8MB
- **Flash:** 4MB
- **USB:** Micro USB (via T-U2T programmer)
- **Power:** 5V
- **Operating Voltage:** 3.3V

## Connectivity

- **Wifi:** 802.11 b/g/n
- **Bluetooth:** BLE 4.2

## Open Source

- **Firmware:** Yes
- **Schematics:** No
- **PCB Layout:** No

## Compatible Firmware

esphome, arduino, esp-idf

## Use Cases

- home-automation
- smart-switch
- industrial-iot

## Components

- **ESP32** (mcu): Dual-core 240MHz Xtensa LX6 with WiFi and BLE 4.2 — [Datasheet](https://openhardware.directory/r?to=https%3A%2F%2Fwww.espressif.com%2Fsites%2Fdefault%2Ffiles%2Fdocumentation%2Fesp32_datasheet_en.pdf&ref=openhardware.directory&product=lilygo-t-relay&source=md-export)
- **HRS4H-S-DC5V** (relay): 4 groups of DC 5V HRS4H relays with blue LED indicators, controlled via dedicated GPIO pins with optocoupler isolation — [Datasheet](https://openhardware.directory/r?to=https%3A%2F%2Fwww.te.com%2Fusa-en%2Fproduct-HRS4H-S-DC5V.html&ref=openhardware.directory&product=lilygo-t-relay&source=md-export)
- **CH9102** (usb-serial): USB to serial converter for programming and debug output — [Datasheet](https://openhardware.directory/r?to=https%3A%2F%2Fwww.wch-ic.com%2Fproducts%2FCH9102.html&ref=openhardware.directory&product=lilygo-t-relay&source=md-export)

## Protocols

- **UART**
- **SPI**
- **I2C**
- **CAN**
- **I2S**
- **SDIO**

## Available Software

- **[Arduino IDE]()** (open-source)
- **[ESP-IDF]()** (open-source)
- **[ESPHome]()** (open-source)

## Description

## Overview

The LILYGO T-Relay is an ESP32-based relay control board featuring 4 groups of HRS4H-S-DC5V relays with blue LED status indicators. Each relay is mapped to a dedicated GPIO pin (K1→GPIO21, K2→GPIO19, K3→GPIO18, K4→GPIO5), and the board includes 16 expansion GPIO pins with optocoupler isolation for safe interfacing with external circuits. Powered via DC 5V, it connects over WiFi 802.11 b/g/n and BLE 4.2, with support for UART, SPI, I2C, CAN, I2S, and SDIO interfaces. Programming is done via the T-U2T USB-to-TTL programmer (sold separately) or any compatible USB-serial adapter.

## Where to Buy

- [LILYGO Official](https://openhardware.directory/r?to=https%3A%2F%2Flilygo.cc%2Fproducts%2Ft-relay&ref=openhardware.directory&product=lilygo-t-relay&source=md-export) — $10.01

## Resources

- [product](https://openhardware.directory/r?to=https%3A%2F%2Flilygo.cc%2Fproducts%2Ft-relay&ref=openhardware.directory&product=lilygo-t-relay&source=md-export)
- [github](https://openhardware.directory/r?to=https%3A%2F%2Fgithub.com%2FXinyuan-LilyGO%2FLilyGo-T-Relay&ref=openhardware.directory&product=lilygo-t-relay&source=md-export)

## Tags

`esp32`, `relay`, `home-automation`, `remote-switch`, `iot`

## Images

![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/d6a9c125da7c.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/556d8e351f23.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/3d5b681fb7d4.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/c703d0339d1c.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/1d1ad874e0e9.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/1264b8bb9bff.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/8bb58533c7b9.jpg)
![LILYGO T-Relay](https://nbg1.your-objectstorage.com/openhardware-directory/entities/lilygo-t-relay/b8ad66f76041.jpg)

---
[View full device page](https://openhardware.directory/devices/lilygo-t-relay)