lilygo T-2CAN

Contents
LILYGO Logo

LILYGO T-2CAN Dual-Channel CAN Communication Module User Manual

Model: T-2CAN

1. Overview

The LILYGO T-2CAN is a compact dual-channel CAN communication module. It is built around the ESP32-S3-WROOM-1U microcontroller, which features 16 MB Flash and 8 MB OPI PSRAM. This module is designed to provide two independent CAN buses, making it suitable for industrial-grade CAN bus applications and IoT gateways.

Key Features:

  • ESP32-S3-WROOM-1U dual-core LX7 @ 240 MHz, 16 MB Flash, 8 MB OPI PSRAM, Wi-Fi + BT 5.0
  • CAN bus 1: external MCP2515 controller via SPI (CAN 2.0B, up to 1 Mb/s)
  • CAN bus 2: ESP32-S3 built-in TWAI controller (CAN 2.0B)
  • 12-24 V DC wide-range input, signal isolation (SGND/DGND)
  • IPEX antenna interface, QWIIC expansion interface
  • Dimensions: 18 x 39 x 91 mm
LILYGO T-Lite module, a similar LILYGO product, showing a compact development board with a USB-C port and various pins.
Figure 1: Example of a LILYGO module (T-Lite), illustrating the compact design typical of LILYGO products.

2. Specifications

Feature Specification
MCU ESP32-S3-WROOM-1U (MCN16R8)
Flash 16 MB
PSRAM 8 MB (OPI PSRAM)
CAN Bus 1 MCP2515 (SPI, CAN 2.0B, up to 1 Mb/s)
CAN Bus 2 ESP32-S3 built-in TWAI (CAN 2.0B)
Wi-Fi 2.4 GHz 802.11 b/g/n
Bluetooth Bluetooth 5.0 LE
USB 1 x Type-C (USB + OTG)
Power Input 12-24 V DC or 5 V/500 mA USB
Expansion 2 × QWIIC + 2 × 2.54 mm 13-pin headers
Antenna IPEX interface
Buttons RESET + BOOT
Dimensions 18 x 39 x 91 mm

Pin Diagram

The T-2CAN module features a detailed pinout for various functionalities. Below is a textual representation of the key pin assignments and interfaces. For a complete visual pinmap, please refer to the official documentation or the PDF manual.

  • Type-C USB: For power and data communication.
  • QWIIC: GND, 3V3, IO1, IO2.
  • DC Input: 12-24V.
  • Antenna: IPEX1 interface.
  • CAN Bus A (MCP2515):
    • CS: IO10
    • SCLK: IO12
    • MOSI: IO11
    • MISO: IO13
    • RST: IO09
    • CAN H, CAN L, S GND, D GND
  • CAN Bus B (ESP32-S3 TWAI):
    • CAN H, CAN L, S GND, D GND
  • Buttons: Reset, Boot (IO00).
  • 2.54mm Headers: Various GPIOs and power pins.
LILYGO T-Embed (K230-A) module, showing a compact board with various connectors and components.
Figure 2: Example of a LILYGO T-Embed module, illustrating the typical layout and components of LILYGO development boards.

3. Setup and Software Development

The LILYGO T-2CAN module supports development using both PlatformIO and Arduino IDE.

3.1 PlatformIO Setup

  1. Install Visual Studio Code and Python.
  2. Search for and install the PlatformIO IDE extension in VS Code.
  3. Clone the T-2Can repository from GitHub.
  4. Open platformio.ini and uncomment the desired environment under [platformio].
  5. Click the "✓" icon to compile your code, then click the "→" icon to upload it to the board.

3.2 Arduino IDE Setup

  1. Install Arduino IDE.
  2. Add the ESP32 boards URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json in the Arduino IDE Preferences.
  3. Copy the project's libraries folder to your Arduino libraries folder.
  4. In Tools → Board, configure the following settings:
    Arduino IDE Setting Value
    Board ESP32S3 Dev Module
    Upload Speed 921600
    USB Mode Hardware CDC and JTAG
    USB CDC On Boot Enabled
    USB Firmware MSC On Boot Disabled
    USB DFU On Boot Disabled
    CPU Frequency 240 MHz (WiFi)
    Flash Mode QIO 80 MHz
    Flash Size 16MB (128Mb)
    Core Debug Level None
    Partition Scheme 16M Flash (3MB APP/9.9MB FATFS)
    PSRAM OPI PSRAM
    Arduino Runs On Core 1
    Events Run On Core 1
  5. Click Upload to flash your program to the board.

3.3 Dependent Libraries

For software development, the following libraries are typically used:

4. Operating Instructions

The T-2CAN module is designed for CAN communication and IoT gateway applications. Here are some basic operational examples:

4.1 Example Support

Example PlatformIO/Arduino ESP-IDF Description
can ✓ Basic CAN communication example
Original_Test ✓ Factory test program with CAN bus testing

These examples can be found in the T-2Can GitHub repository and serve as a starting point for developing your applications.

5. Maintenance

To ensure the longevity and proper functioning of your LILYGO T-2CAN module, follow these general maintenance guidelines:

  • Handling: Always handle the module with care, avoiding static discharge. Use anti-static precautions when working with the board.
  • Cleaning: Keep the board clean and free from dust and debris. Use a soft, dry brush or compressed air for cleaning. Avoid using liquids or harsh chemicals.
  • Storage: Store the module in a dry, cool environment, away from direct sunlight and extreme temperatures.
  • Power Supply: Ensure you use a stable and appropriate power supply (12-24 V DC or 5 V/500 mA via USB) to prevent damage to the components.

6. Troubleshooting

6.1 Common Issues and Solutions

Q: Why does my board keep failing to upload programs?
A: Hold down the BOOT button on the module and try uploading again. This often helps the board enter bootloader mode for successful program flashing.
Q: Why is there no serial data output from the UART interface?
A: The project defaults to USB CDC as Uart0. To resolve this, set "USB CDC On Boot" to Disabled in your Arduino Tools menu. Alternatively, if using PlatformIO, change -DARDUINO_USB_CDC_ON_BOOT=true to false in your platformio.ini file.

6.2 User Tips

  • Battery Issues: Some users have reported receiving modules with over-discharged batteries (e.g., below 1V). If your module does not power on or immediately shuts off when disconnected from USB, check the battery voltage. Contact the seller if the battery is defective.
  • Screen Fragility: While the device is generally rugged, the screen can be delicate. Handle with care to avoid damage.
A person using a multimeter to check the voltage of a small battery, showing a reading of 0.05V.
Figure 3: Checking battery voltage with a multimeter. A low reading (e.g., 0.05V shown) indicates an over-discharged battery.

7. Warranty and Support

For further technical documentation, support, or warranty information, please refer to the following resources:

Ask a question about this manual

Ask about setup, troubleshooting, compatibility, parts, safety, or missing instructions. Manuals+ will review the question and use this page’s manual context to help answer it.

After a successful submission, we securely hash the supplied account or form email before sending it to Microsoft Advertising for conversion attribution. Privacy details.