logo elektroda
logo elektroda
X
logo elektroda

Lilygo T-Connect with ESP32 - CAN bus and three RS485 on one board

p.kaczmarek2  9 1152 Cool? (+3)
📢 Listen (AI):

TL;DR

  • Lilygo T-Connect industrial board pairs an ESP32-S3-WROOM-1 with up to three RS485 buses and one CAN line.
  • It uses removable TD501D485H-A RS485 and TD501MCANFD CAN modules, plus USB-C, hardware USB, and a 7-12 V DC power section.
  • The tested version is N16R8, with 16 MB Flash and 8 MB RAM, and the board cost around PLN200.
  • APA102 LEDs blinked with FastLED, and RS485 loopback traffic sent on one port was received and verified on another.
  • A full four-RS485 setup is impossible because the ESP32 hardware only provides three UART controllers.
Generated by the language model.
LilyGO T-Connect board with ESP32 module, green screw terminals, and a connected USB‑C cable
Here I will introduce the Lilygo T-Connect industrial board distinguished by its simultaneous support of up to three RS485 buses and one CAN line. I ordered it from China for around PLN200.
Clear plastic case with LILYGO T-Connect board; label reads “ESP32-S3 RS485/CAN Bus” Clear plastic case with black foam and a label with barcode and Chinese text
We open the distinctive box and pull out the plate. What strikes you immediately is the ESP32-S3-WROOM-1 module which is the heart of the T-Connect, here in the N16R8 version, i.e. with 16 MB Flash and 8 MB RAM.
LilyGO T-Connect board with ESP32 module, three RS485 modules, and green screw terminal blocks
In the corner we have a power section with a voltage-reducing inverter, allowing the whole thing to run on 7-12 V DC, a USB C connector and a QWIIC with UART. There is no USB to UART converter, as the ESP32-S3 supports hardware USB. In addition, we have two rows of goldpins with GPIO, ground, 3.3 V and 5 V pinout, and four APA102 LEDs.
LilyGO T-Connect PCB with ESP32-S3-WROOM-1 module, USB-C port, and GPIO header pins
The RS485 and CAN modules are interchangeable - they can be removed from the board.
LilyGO T-Connect board with ESP32-S3, RS485/CAN screw terminals, and lit status LEDs
RS485 is supported by the TD501D485H-A and CAN by the TD501MCANFD, both with insulation up to 2500 V.
Graphic of LilyGO T-Connect ESP32-S3 board with RS485 and CAN modules and labeled specifications
The pin map is shown in the graphic below:
Pin map of the LilyGO T-Connect board with ESP32-S3, RS485/CAN terminals, and APA102 LEDs
Dimensions:
LilyGO T-Connect board with green screw terminals and labeled dimensions 94×83×13 mm
GitHub of the project:
https://github.com/Xinyuan-LilyGO/T-Connect




Demo LED
I use Visual Code with the PlatformIO extension for this type of project. PIO does not have natively uploaded tiles from T-Connect, but on their repository you can download the missing files. They contain board configurations, flash memory, etc. In this case I have the 16 MB version. Below is the file I used - I gave it to the boards folder:
Code: JSON
Log in, to see the code

The next file to edit is platformio.ini, which is the project configuration. I have named it APA102 Blink, because with these four LEDs I want to blink. There I selected the appropriate platform (espressif32 @6.5.0), selected the board and partitions, and added the library to handle the LEDs - fastled/FastLED. I also enabled PSRAM and USB mode there.
Code: Ini
Log in, to see the code

How does the APA102 work? The APA102 is an individually addressable colour LED with SPI communication.
Pinout diagrams and photos of APA102 and APA102C LED packages, both 5×5 mm
I have put the pin definitions, for now only from the APA102, in pin_config.h:
Code: C / C++
Log in, to see the code

It remains to write the actual program. This is essentially an example from FastLED, showing a simple colour animation.
Code: C / C++
Log in, to see the code

The result is this simple animation:






Demo RS485
The second thing I would like to show is the RS485 demo. Basically it is crucial here, it is what this board was created for. There could be as many as 4 RS485 lines on the board, but the ESP32 only has 3 hardware UART controllers, so one will be inactive. I started by writing the pins into the code:
Code: C / C++
Log in, to see the code

The TD501MCANFD and TF501D485H locations can be swapped if necessary, they are not soldered. RS485 is simply the physical layer of the UART, so we use the HardwareSerial classes here normally. With begin we set the baud and the pins.
Code: C / C++
Log in, to see the code

My demo sequentially sends writes through the first port and receives them from the second port. After receiving, it checks to see if what was expected has arrived. You still need to connect these two ports together:
Lilygo T-Connect board with USB connected and screw terminals; green and red LEDs lit
As you can see, everything works. The data is transferred correctly:
Screenshot of RealTerm showing RS485 logs with repeated “PING:216–226” messages and OK statuses.

CAN bus activation
Basically everything as in the topic below, just set the appropriate pins:
How to establish a CAN connection between two ESP32s using the LilyGO T-CAN485 as an example?

Summary
Very nice board, I also like the modularity for CAN and RS485, although it's a bit of a shame that ESP hardware only has three UARTs, so it won't be possible to have four RS485 active at once. In addition, I like the conveniently routed GPIOs and up to four coloured LEDs, on which you can conveniently show various operating and error statuses.
Do you see a use for a board with as many as three RS485?

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14390 posts with rating 12311 , helped 650 times. Been with us since 2014 year.

Comments

oscil1 08 Mar 2026 20:37

To use this for erial is annoying, because after a reset you lose the connection - and comX initialises again, which disconnects. Not very convenient. Convenient for hardware debugging instead - this USB... [Read more]

gulson 09 Mar 2026 22:07

The remark about JTAG on the ESP32-S3 is basically accurate, but that would have to be a separate discussion. Demonstrating the basic functions of the board (LEDs, RS485, CAN) is the standard format... [Read more]

oscil1 10 Mar 2026 10:19

Such a gold "industry" standard with ESP32 is ESP32-IDF. Platformio is convenient for hobbyists (but is this board of any use in a hobbyist setting?) and for simple projects. ESP32-IDF, however, requires... [Read more]

TechEkspert 10 Mar 2026 19:31

I was interested in these interchangeable interface modules, I wonder what their lifespan is? I read the material about CAN and I wonder in which projects CAN will be better than Modbus RTU and... [Read more]

oscil1 10 Mar 2026 22:55

- Modbus-RTU is a master slave system and the slave will not transmit anything until the master asks it to. In CAN - there is no such structure - each module can transmit, have priorities - which makes... [Read more]

TechEkspert 10 Mar 2026 23:29

It will be interesting to see if one day the T1L single-pair ethernet will make its way onto a wider scale. [Read more]

oscil1 11 Mar 2026 00:26

It's already popular - but you didn't ask about SPE. Even in one car you now have CAN, CAN FD and SPE [Read more]

TechEkspert 11 Mar 2026 19:16

All in all, SPE and T1L are topics I would like to read about on the electrode right after the practical guide Modbus RTU and CAN. I've seen a few demos from Microchip of a single pair ethernet, they... [Read more]

oscil1 11 Mar 2026 23:55

In fact, IMO the 10BASE-T1S is interesting because it enables the so-called miultidrop. [Read more]

%}