Site Information

 Loading... Please wait...

Blog

ESP32 Development Kits with Onboard CAN Bus Controller

Posted by Wilfried Voss on

The ESP32 is a low-cost, low-power system-on-chip microcontroller with integrated WiFi and dual-mode Bluetooth. It is equipped with a Tensilica Xtensa LX6 microprocessor in dual-core and single-core versions. The microcontroller features built-in antenna switches, RF balun, power amplifiers, low-noise receive amplifiers, filters, and power management modules. It is the successor to the ESP8266 SoC.

ESP32-DevKitC V4 board

There are multiple variants of the ESP32 and its associated development boards. However, my preferred choice is the ESP32-DevKitC V4 board due to its affordability and user-friendly interface. This board consists of the ESP-WROOM-32 as the main module and additional hardware for programming the ESP32 and conveniently connecting it to the GPIO Pins.

The ESP32 includes a CAN Bus controller compatible with the NXP SJA1000, making it compliant with the CAN 2.0B (ISO 11898, also known as Classical CAN) specification.

Nevertheless, as with the SJA1000, the ESP32 CAN Bus controller only provides the data link layer and the physical layer signaling sublayer. As a result, an external transceiver module is needed to convert the ESP32's CAN-RX and CAN-TX signals into CAN_H and CAN_L bus signals. The transceiver, such as the MCP2551 or SN65HVD23X, ensures compatibility with ISO 11898-2.

Consequently, when using the ESP32-DevKitC V4 board, you will require extra hardware in the form of a CAN (Classical CAN or CAN FD) breakout board. However, it is important to note that the ESP32's internal CAN controller does not support CAN-FD and is not CAN-FD tolerant. To use CAN-FD with the ESP32, you need to employ CAN-FD breakout boards that are accessible per the ESP32’s SPI ports. I will address the use of CAN FD controllers in a separate post.

The next logical step toward a CAN application with the ESP32 would be to use a breadboard, which will require wires and the assurance that the connections are solid. If this is not your preference, we offer two hardware variants.

ESP32 WiFi, Bluetooth Classic, BLE, CAN Bus Module

Our ESP32 WiFi, Bluetooth Classic, BLE, and CAN Bus Module comes with an onboard ESP32 WROOM-32 WiFi, Bluetooth Classic, and BLE Module and a CAN Bus port with a transceiver. Also onboard are an RGB LED and IO pins on a 0.1" pad.

Programming is accomplished through the popular Arduino IDE connected to the USB-to-Serial converter with a USB-C connector, automatic bootloader, and reset. Furthermore, we provide multiple programming examples.

espBerry - ESP32 Development Board with Dual Isolated CAN Bus HAT

The espBerry DevBoard expands the CAN capabilities by supporting up to two CAN controllers (Classical CAN and CAN FD). It combines the ESP32-DevKitC development board with any Raspberry Pi HAT by connecting to the onboard RPi-compatible 40-pin GPIO header.

The Dual Channel CAN Bus expansion HAT, designed for the Raspberry Pi, supports the full CAN2.0 Standard. It features multiple onboard protection circuits, high anti-interference capability, and reliable operation, which makes it suitable for applications such as automotive devices or industrial automation.

The HAT is well documented, and multiple code samples use the C programming language under the Arduino IDE.

Please feel free to work through the online documentation to determine which hardware option works best for you. In addition, I am working on a detailed application note, Controller Area Network (CAN) Development with ESP32. This is a work in progress, but I already included numerous links to additional ESP32 and CAN Bus resources.


Electronics Projects with the ESP8266 and ESP32: Building Web Pages, Applications, and WiFi Enabled DevicesElectronics Projects with the ESP8266 and ESP32: Building Web Pages, Applications, and WiFi Enabled Devices

Copperhill Technologies highly recommends using this book for your wireless application projects. Yes, many good books and free online resources are available these days, but this is the book we are using. It made our approach to Bluetooth, BLE, and WIFI a breeze. Programming wireless applications without hassles was fun, and we will share them on this web page.

Projects throughout the book utilize the wireless functionality and processing power of the ESP microcontrollers. Projects are built in the Arduino IDE, so you don't need to download other programming software. In addition, mobile apps are now ubiquitous, making the app build projects of the book very relevant, as are the web page design projects.

In Electronics Projects with the ESP8266 and ESP32, you'll see how easy and practical it is to access information over the internet, develop web pages, build mobile apps to remotely control devices with speech recognition, or incorporate Google Maps in a GPS route tracking app.

More Information...

Classical CAN (CC), the Original CAN Bus Technology

This post is an excerpt from our application note  Controller Area Network (CAN) Development with ESP32. Note: The term “Classical CAN” was introduced in the ISO 11898-1: 2016 Standard. Classical CAN represents the basis for CAN FD (and CAN XL), meaning they share the same features and advantages, as explained in the previous chapter. While CAN FD adds [...]

Read More »


SAE J1939 Functional Safety Communications Protocol & Trailer Safety Assurance

Commercial road and off-highway vehicles, as well as off-road construction machines, frequently utilize J1939-based application layers. In response to the growing need for functional safety, SAE has created specific protocols for CAN CC (classic) and CAN FD: J1939-76 and J1939-77, respectively. An article on the CiA (CAN-in-Automation) website discusses the SAE standards for functionally safe communications on CAN [...]

Read More »


PCI Express Board Integrates 4 High-Speed CAN/CAN FD Ports

Kvaser has introduced their compact M.2 PCIe, a highly integrated embedded CAN Bus board that adds four high-speed CAN/CAN FD channels to any host computer with PCI Express connectivity and an available B or M keyed M.2 slot. The embedded board provides four distributed CAN CC (Classic CAN) or CAN FD transceivers, adding CAN CC and CAN [...]

Read More »


ESP32: CAN Bus Programming with MCP2515 and MCP2517FD

For good reasons, the ESP32 processor is a prevalent choice for embedded hardware development. Besides considerable memory resources, it provides various hardware features for many applications, most prominently the Internet of Things (IoT). All that comes with more than reasonable price tags, specifically when you use one of the multiple ESP32 development modules. And since [...]

Read More »


Kvaser's Leaf Supports Classical CAN, CAN FD in Silent Mode

Every professional CAN Bus development, may it be Classical CAN, CAN FD, or higher layer protocols such as SAE J1939, requires a data monitoring device for proof of functionality. Kvaser has introduced such a device, the Leaf v3 interface supporting Classical CAN and CAN FD in optional Silent Mode. The Leaf series depicts one of the straightforward [...]

Read More »


Automotive Development Module has CAN FD, LIN, Ethernet Port

Renesas has launched a software development board featuring the R-Car S4 System-on-Chip (SoC). The scope of delivery includes the Whitebox SDK open-source software. The R-Car S4 facilitates the launch of Car Server/CoGW with high performance, high-speed networking, high security, and high functional safety levels required as E/E architectures grow into domains and zones. The R-Car S4 solution [...]

Read More »


Industrial Strength Dual CAN FD Interface in Mini PCIe Form

The  VL-MPEu-C1 module by Versalogic, compliant with the Mini PCIe format, is a tiny and rugged dual-channel CAN Bus add-on interface. It supports CAN-FD for high-speed data transfer but is still fully compatible with CAN 2.0 A and CAN 2.0 B (Classical CAN). It supports additional CAN functions, including message acceptance filtering, listen-only mode, and wake-up [...]

Read More »


Programmable CAN Bus to USB, Bluetooth, BLE, WiFi Gateway

For the longest time, I had resisted the idea of creating my version of a CAN-to-USB gateway, primarily due to the vast competition. A professional CAN/J1939 development requires a professional CAN-to-PC solution to monitor data traffic. I am pleased with the PEAK PCAN-USB device, as shown in the above image. However, not everybody is willing [...]

Read More »


PCIe Board with 4-Port Isolated CAN FD for Applications

Sunix (Taiwan) manufactures CAN (FD) interface cards for commercial, agricultural, military, government, recreational, and other industries. Their recently introduced CAN4F00SI PCIe card offers four isolated CAN FD ports. The interface cards can self-diagnose and repair data errors to meet the demand for accurate UAV (Unmanned Aerial Vehicle) control in mission-critical applications. The mission computers, autopilot computers, actuators, [...]

Read More »