Site Information

 Loading... Please wait...

Blog

ESP32 Processor: CAN Bus Topology and Termination Resistors

Posted by Wilfried Voss on

This post is an excerpt from our application note Controller Area Network (CAN) Development with ESP32.

It is my experience that newcomers to the technology overlook the importance of termination resistors. Missing or misplaced resistors can lead to transmission errors or even prevent transmission altogether.

The general rule is that if you connect to an existing, fully functional network, you do not need to add any termination resistors. If you create a new network, please pay close attention to the topic as explained in the following.

The image above demonstrates a simple CAN network. All nodes are connected by two wires, CAN_H and CAN_L. The bus line is terminated by resistors, which are typically 120 Ω and are necessary to suppress any electrical reflections on the bus.

The termination resistors should always be connected at both ends of the bus; they should never be physically attached to a CAN node because removing this specific node would cause the bus to lose proper termination.

Note: The CAN standard allows for any bus topology, but a simple, straightforward architecture is advantageous for increased reliability. However, depending on the physical bus structure, it may be difficult to determine “both ends of the bus” and may require some trial and error.

According to ISO 11898-2, the termination resistor should be between 100…130 Ω, but typically 120 Ω, with a minimum power dissipation of 220 mW. Deviations from the nominal value of 120 Ω are possible, depending on the bus topology and the baud rate. As a rule of thumb, the lower the termination resistor, the fewer possible nodes in the network.

The wiring topology of a CAN network should be as straight as possible, using short cable lengths and avoiding complex network structures, even though almost any network structure is possible under CAN.

The maximum bus length (L) depends on the baud rate used. The table below displays some network topology parameters at the maximum baud rate of 1 Mbit/sec.

Parameter Maximum Length [ft] / [m]
L - Bus Length 120 / 40
l - Cable Stub Length 1 / 0.3
d - Node Distance 120 /40

The bus length can be significantly extended at lower baud rates. The following image demonstrates the relationship between CAN baud rate and maximum physical network length.


ESP32 WiFi, Bluetooth Classic, BLE, CAN Bus Module

ESP32 WiFi, Bluetooth Classic, BLE, CAN Bus Module

This board has an ESP32 WROOM-32 WiFi, Bluetooth Classic, BLE Module, and a CAN Bus port with a transceiver onboard. It also has 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. The ESP32 is a low-cost, low-power system-on-chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth. It employs a Tensilica Xtensa LX6 microprocessor in dual-core and single-core variations. 

It includes built-in antenna switches, RF baluns, a power amplifier, a low-noise receive amplifier, filters, and power management modules.  More Information...

Raspberry Pi Pico CAN Bus System with Micro-Python Pre-Installed

The Raspberry Pi PicoBoard is an inexpensive and versatile development board designed for the RP2040 microcontroller chip developed by Raspberry Pi. It features an RP2040 microcontroller chip with 2MB of Flash, and a micro-USB port for power, data, and programming. The 40-pin dip-style header provides 26 multi-function 3.3V GPIO, 23 digital-only GPIO, and three ADC-compatible [...]

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 »


Know OBD2 Before You Start That Development Project

We at Copperhill Technologies offer a variety of CAN (Controller Area Network) devices for developing automotive and industrial embedded systems. In that capacity, we receive frequent inquiries regarding OBD2 (Onboard Diagnostics).  OBD2, or Onboard Diagnostics Second Generation, is a vehicle diagnosis system found in modern cars and trucks. The OBD2 system collects data from sensors and [...]

Read More »


Arduino-Compatible Microsoft Azure Certified IoT Development Kit with Visual Studio Code Support

This Microsoft Azure Certified IoT DevKit (IOT-AZ3166) is an all-in-one kit optimized for prototyping and developing Internet of Things (IoT) applications leveraging Microsoft Azure services. It supplies an Arduino-compatible board with multiple peripherals such as an OLED display, sensors, hardware debugging chip (ST-Link), and security chip. The project collection offers creative examples for learning and reference, plus [...]

Read More »


Miniature Embedded Cortex-M7 Module for IIot Applications Supports up to Three CAN FD Ports

TQ announced their TQMa117xL system-on-chip (SOC) module to develop space-saving and energy-efficient control systems. The board supports up to three CAN FD interfaces.The module uses the power of the NXP i.MX RT1170 MCU. It comes a compact size of 31 mm x 31 mm (1.2 " x 1.2") and supplies all CPU signals via a total [...]

Read More »


Fast-Boot Your Raspberry Pi 3 Linux In Under Two seconds

Raspberry Pi enthusiasts are looking for a way to fast boot a Raspberry Pi mini-PC. They may be interested in a new project available via Github. The project describes the fast booting of a Raspberry Pi 32 Linux in under two seconds. Check out the video link below to demonstrate how quickly you can [...]

Read More »


Computer On Module With NXP i.MX 8M Mini CPU Supports Two CAN FD Ports, FreeRTOS, Linux

F&S Elektronik Systeme extended their product line of Picocore modules, which integrate up to two CAN (FD) Bus interfaces.The Picocore MX8M module utilizes the NXP i.MX 8M Mini CPU with one, two, or four ARM Cortex-A53 cores operating at 1.8 GHz plus a Cortex-M4 processor for real-time processing at 400 MHz. The boards use an adapted [...]

Read More »


A Beginner's Guide to SAE J1939 Embedded Software Development

Introduction Welcome to my beginner's guide! By opening this page, you have entered the first and probably most crucial stage toward developing your SAE J1939 project: Reading. Over the years, I dealt with many newcomers to the J1939 technology, some of them motivated by great product ideas. Others were thrown into a project because they were [...]

Read More »


STM32 Programming - Developing with FreeRTOS, Using Assembly, C/C++

The STM32F103 Arm Microcontroller and Embedded Systems: Using Assembly and C The STM32F103 microcontroller from ST is one of the most widely used ARM microcontrollers, and the blue pill board utilizes the STM32F103 microcontroller.  It comes at a low price, and it is widely available around the world. This book uses the blue pill board to discuss [...]

Read More »