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
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.
3. Setup and Software Development
The LILYGO T-2CAN module supports development using both PlatformIO and Arduino IDE.
3.1 PlatformIO Setup
- Install Visual Studio Code and Python.
- Search for and install the PlatformIO IDE extension in VS Code.
- Clone the T-2Can repository from GitHub.
- Open
platformio.iniand uncomment the desired environment under[platformio]. - Click the "✓" icon to compile your code, then click the "→" icon to upload it to the board.
3.2 Arduino IDE Setup
- Install Arduino IDE.
- Add the ESP32 boards URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.jsonin the Arduino IDE Preferences. - Copy the project's
librariesfolder to your Arduino libraries folder. - 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 - 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=truetofalsein yourplatformio.inifile.
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.
7. Warranty and Support
For further technical documentation, support, or warranty information, please refer to the following resources:
- Official Documentation: A comprehensive user manual in PDF format is available. You can access it here: LILYGO T-2CAN User Manual (PDF).
- Datasheets:
- Software Development Resources:
- Contact: For specific product inquiries or support, please visit the LILYGO Official Store.