TTGO T-CAN485 – An ESP32 board with RS485, CAN bus interfaces

LilyGO is regularly bringing ESP32 boards to market for specific applications, and their latest TTGO T-CAN485 connects ESP32 to CAN bus and RS485 industrial control interfaces.

The board also takes 5 to 12V power input via a 2-pin terminal, comes with a microSD card for data storage, a USB Type-C port and CH340K serial chip for programming and debugging, plus a 12-pin GPIO header, some buttons, and an RGB LED.

TTGO T-CAN485

TTGO T-CAN485 board specifications:

  • SoC – Espressif System ESP32 dual-core processor @ up to 240 MHz with 2.4 GHz Wi-Fi, Bluetooth 4.2 LE connectivity
  • Storage – 4MB flash, microSD card socket
  • Industrial control interfaces
    • CAN bus via 3-pin terminal block
    • RS485 via 3-pin terminal block
  • Expansion – Unpopulated 12-pin header with 8 GPIOs configurable as UART, SPI, I2C, plus VDD, GND
  • Debugging – USB-C port for serial access via CH340K USB to TTL chip
  • Misc- Reset and Boot buttons, WS2812 RGB LED
  • Power Supply – 5 to 12V via 2-pin terminal
  • Dimensions – 10.7 x 3.5 x 1.1 cm (including connectors); PCB only: 8 x 3.5 cm

 

ESP32 RS485 & CAN BusThe company provides RS485, RS485-Modbus, and CAN Bus samples for Arduino and PlatformIO on Github. We’re also told CAN bus may not work with some versions of ESP32, and a register must be changed:

Depending on the ESP32 chip, the CAN controller register IER parameter needs to be changed. If it is a V3 version chip, you can use 0xEF, otherwise, use 0xFF.

IER stands for “Interrupt Enable Register”. It would have been extra nice to be a bit more specific, but at least it gives a starting point to what needs to be changed if the CAN bus does not work.

LilyGO sells TTGO T-CAN485 board on Aliexpress for $11.43 excluding shipping and taxes. It’s not the first ESP32 board that supports RS485 or CAN Bus, but it may be the first to support both. Alternative ESP32 CAN Bus boards include CANLite or CAN32, while RS485 is supported on M5Stack Atom DTU LoRaWAN Kit and MiniLink IIoT Node with the last two also featuring LoRaWAN connectivity.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
7 Comments
oldest
newest
Dejan Markovic
Dejan Markovic
2 years ago

This is just what I was looking for. Thank you!

M T
M T
2 years ago

It would be cool if they would create those CAN interfaces with isolation by default. In industrial environment you do not want to take chances. Replacing 15$ thingie could be extremely costly.

Beat Gerber
Beat Gerber
2 years ago

And supporting 24V would be a nice thing

Peera Hongwitayakorn
Peera Hongwitayakorn
2 years ago

Do you know how to get debug from arduino ide?

DLU
DLU
2 years ago

is there a modbus rtu rs485 example that works showing which pins to use?

Zeeshan Shamsi
Zeeshan Shamsi
1 year ago

Can you recommend any din rail housing for above?

Hans
Hans
1 year ago

Just to save someone else 3 hours of googling trying to figure out what this cryptic instruction actually means:

Depending on the ESP32 chip, the CAN controller register IER parameter needs to be changed. If it is a V3 version chip, you can use 0xEF, otherwise, use 0xFF.

You can change the value from 0xef to 0xff on line 229 of the file CAN.c in the ESP32-Arduino-CAN library:

MODULE_CAN->IER.U = 0xef; //ESP32 V3 0XEF    ESP32 NOT V3 0XFF

Do note it is set to 0xef by default, so if you have a V3 ESP32 you do not need to change anything.

Boardcon Rockchip and Allwinner SoM and SBC products