LILYGO T-2CAN

Contents

LILYGO T-2CAN ESP32-S3 Development Board User Manual

Model: T-2CAN

1. Introduction

The LILYGO T-2CAN is a versatile development board featuring the ESP32-S3 microcontroller and a stand-alone CAN controller. It integrates wireless connectivity (Wi-Fi and Bluetooth) with robust CAN bus communication capabilities, making it ideal for various embedded projects, industrial automation, and automotive applications. This manual provides essential information for setting up, operating, and maintaining your T-2CAN board.

Front and back view of the LILYGO T-2CAN development board
Figure 1: LILYGO T-2CAN Development Board (Front and Back)

2. Specifications

The LILYGO T-2CAN board is equipped with the following technical specifications:

Specifications table for LILYGO T-2CAN
Figure 2: LILYGO T-2CAN Specifications
Table 1: LILYGO T-2CAN Key Specifications
Feature Detail
MCU ESP32-S3
FLASH Memory 16MB
PSRAM 8MB
Wireless Connectivity 2.4G Wi-Fi (802.11 b/g/n), BLE 5
CAN Controller MCP2515 (Stand-Alone, SPI Interface)
CAN Protocol CAN V2.0B at 1 Mb/s
CAN Filters/Masks Six 29-bit filters, Two 29-bit masks
CAN Interfaces 2 x CAN
Onboard Functions BOOT + Reset Button, Debugging
Power Supply (USB) DC 5~12V (via USB Type-C), 5V 500mA
Power Supply (Terminal) DC 12~24V (via terminal block)
Dimensions 18 x 39 x 91mm
Developable Platforms Arduino IDE, VS Code
Origin Mainland China
Dimensions of the LILYGO T-2CAN board
Figure 3: LILYGO T-2CAN Board Dimensions

3. Package Contents

Upon receiving your LILYGO T-2CAN development board, please verify that all components are included:

  • 1 x T-2CAN Development Board
  • 1 x Antenna
Shipping list showing 1 x 2CAN board and 1 x Antenna
Figure 4: Package Contents

4. Setup Guide

Follow these steps to set up your LILYGO T-2CAN development board:

4.1 Powering the Board

  • USB Power: Connect the board to your computer using a USB Type-C cable. The board can be powered via the USB port (DC 5~12V input, 5V 500mA output). This connection also facilitates programming and debugging.
  • External Power: For standalone applications, you can provide external power via the DC 12~24V terminal block. Ensure correct polarity when connecting external power.

4.2 Pinout Diagram

Understanding the pinout is crucial for connecting peripherals and sensors. Refer to the detailed pinout diagram below:

Detailed pinout diagram for the LILYGO T-2CAN board
Figure 5: LILYGO T-2CAN Pinout Diagram

Key pin functions include:

  • USB Type-C: Power, programming, and serial communication.
  • QWIIC: I2C interface for easy connection to QWIIC-compatible modules.
  • DC 12~24V: External power input terminals.
  • CAN A/B: Connections for two independent CAN bus interfaces (CANLA, CANHA, CANLB, CANHB, DGNDA, SGNDA, DGNDB, SGNDB).
  • GPIO Pins: General Purpose Input/Output pins for various digital and analog functions.
  • SPI Pins: Dedicated pins for the SPI interface to the MCP2515 CAN controller (CS, SCLK, MISO, MOSI).
  • BOOT & Reset Buttons: For entering bootloader mode and resetting the ESP32-S3.

4.3 Development Environment

The LILYGO T-2CAN board supports popular development environments:

  • Arduino IDE: Install the ESP32 board package for Arduino IDE.
  • VS Code: Use the PlatformIO extension for VS Code to develop for ESP32-S3.

Refer to the official ESP-IDF documentation or LILYGO's GitHub repositories for detailed setup instructions for your chosen development environment.

5. Operating Instructions

5.1 Basic Operation

  1. Connect Power: Supply power via USB Type-C or the DC terminal block as described in the Setup Guide.
  2. Upload Firmware: Connect the board to your computer via USB. Use your chosen IDE (Arduino IDE or VS Code with PlatformIO) to write and upload your code to the ESP32-S3.
  3. Monitor Serial Output: Open the serial monitor in your IDE to view debug messages and program output.

5.2 CAN Bus Communication

The T-2CAN board features two independent CAN bus interfaces, controlled by the MCP2515 stand-alone CAN controller via SPI. To use the CAN functionality:

  • Wiring: Connect your CAN devices to the CAN A and CAN B terminals. Ensure proper termination resistors are used on the CAN bus if required by your network topology.
  • Software Library: Utilize a suitable CAN library for the MCP2515 controller within your ESP32-S3 code. Libraries are available for both Arduino and PlatformIO environments.
  • Configuration: Configure the CAN controller for the desired baud rate (up to 1 Mb/s) and other parameters (e.g., filters, masks) according to your CAN network specifications.

5.3 Wireless Connectivity

The ESP32-S3 provides 2.4GHz Wi-Fi (802.11 b/g/n) and Bluetooth Low Energy (BLE 5) capabilities. Ensure the included antenna is connected to the IPEX1 connector for optimal wireless performance.

  • Wi-Fi: Use the ESP-IDF or Arduino Wi-Fi libraries to connect to Wi-Fi networks, host access points, or implement Wi-Fi Direct.
  • Bluetooth: Utilize the ESP-IDF or Arduino BLE libraries to create Bluetooth Low Energy applications, such as beacons, GATT servers, or clients.

6. Maintenance

To ensure the longevity and reliable operation of your LILYGO T-2CAN board, follow these general maintenance guidelines:

  • Keep Dry: Protect the board from moisture and humidity.
  • Cleanliness: Keep the board free from dust and debris. Use a soft, dry brush or compressed air for cleaning. Avoid using liquids or solvents.
  • Static Protection: Handle the board with care, especially in environments prone to static electricity. Use anti-static precautions when working with the board.
  • Temperature: Operate the board within its specified temperature range. Avoid extreme heat or cold.
  • Physical Protection: Consider housing the board in an appropriate enclosure to protect it from physical damage.

7. Troubleshooting

If you encounter issues with your LILYGO T-2CAN board, consider the following troubleshooting steps:

  • No Power/LEDs Off:
    • Check USB cable connection and ensure it's a data-capable cable, not just charging.
    • Verify power supply (USB or external DC) is providing the correct voltage and current.
    • Try a different USB port or power adapter.
  • Upload Errors:
    • Ensure the correct board and COM port are selected in your IDE.
    • Press and hold the BOOT button, then press and release the Reset button, then release the BOOT button to enter bootloader mode before uploading.
    • Check for driver issues for the USB-to-serial converter.
  • CAN Communication Issues:
    • Verify CAN bus wiring (CAN H, CAN L, GND) and ensure proper termination resistors are in place.
    • Check the baud rate configuration in your code matches the CAN network.
    • Ensure the MCP2515 library is correctly initialized and configured.
  • Wi-Fi/Bluetooth Connectivity Problems:
    • Ensure the antenna is securely connected to the IPEX1 connector.
    • Verify Wi-Fi credentials (SSID, password) in your code.
    • Check for interference from other 2.4GHz devices.

8. User Tips

  • Always refer to the official LILYGO GitHub repositories for the latest examples, libraries, and documentation specific to the T-2CAN board.
  • When working with CAN bus, pay close attention to wiring and termination to avoid communication errors.
  • For advanced debugging, consider using a logic analyzer to inspect SPI communication with the MCP2515 or CAN bus signals.

9. Warranty and Support

LILYGO is committed to providing quality products and support. For any inquiries or issues, please refer to the following guidelines:

Customer service notes from LILYGO
Figure 6: LILYGO Customer Service Notes

9.1 Customer Service

  • Unclear Orders/Products: If you have any questions about your order or the product upon receipt, please do not hesitate to contact LILYGO customer service for a satisfactory solution.
  • Damaged Packages: In case the package is damaged due to external force or transportation, please provide clear pictures of the logistics label, carton/bag, and the damaged product. LILYGO will work with the Logistics Service Provider to offer a solution.
  • Customization & Bulk Orders: For customization requests, bulk purchases, or any other product-related questions, feel free to contact LILYGO customer service.

9.2 Open Source Community

LILYGO actively supports the open-source community. Many thoughts are integrated into their products, and they encourage users to share their projects. You can find more information and community support through LILYGO's official channels and GitHub repositories.

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.