ESP32-CAN-X2

Revision as of 01:05, 1 November 2023 by Brentp (talk | contribs) (Made more concise)

Introduction

ESP32-CAN-X2 is an ESP32-based development board specifically designed for CAN communication. This board has all the features of a modern ESP32 development board, integrated Wi-Fi and Bluetooth, along with the extended CAN controller. Autosport Labs has specifically designed it for CAN communication along with fast processing and computation options.

This is a complete how-to-use guide and this user guide will describe each and every step to use the board and harness the maximum potential of the board.

Features

Features of ESP32-CAN-X2 development board:

  • Based on ESP32-SE-WROOM-1-N8R8 microcontroller powerful dual-core Xtensa LX6 CPU running at up to 240 MHz.
  • 384 KB ROM, 512 KB SRAM, 16 KB SRAM in RTC, 8 MB PSRAM
  • Two LED’s : LED PWM & LED communication
  • Integrated Wi-Fi (802.11b/g/n) and Bluetooth capabilities
  • Reset and Boot push button
  • USB-C type socket for flashing, and power supply
  • Integrated antenna for long range communication
  • Additional CAN communication controller CAN using MCP2515
  • 6-pin header is strategically positioned at the top for CAN communication
  • ESP32-CAN-X2 supports an additional external CAN transceiver
  • Easy-to-interface programming. Required no external debugger for flashing
  • Integrated CAN transceivers
  • Configurable CAN termination resistors, which can be disabled via breakable jumpers
  • Flexible power supply options
  • Support of a wide choice of commonly used Integrated Development Environments (IDEs)
  • Comprehensive free software libraries and examples for CAN communication

Getting started

This section will provide you with comprehensive information about the ESP32-CAN-X2 development board's key components, mechanical layout, power rating, & requirements. This detailed information helps you to use the board effectively and efficiently in your projects.

Key Components of ESP32-CAN-X2 Development Board

Figure 1 given below indicates the important key components of the ESP32-CAN-X2 Development Board and their location on the board.

Figure 1

Microcontroller

The ESP32-CAN-X2 Development Board is designed around the ESP32-S3-WROOM-1-N8R8 microcontroller in a 40-pin package. The connections between the development board and the microcontroller is straightforward, where the majority of GPIO pins are directly connected with the external headers, SV1 & SV2, and some pins are reserved internal connections between the board and CAN controllers. The internal connections between the microcontroller and CAN controllers are shown in the CAN controller heading given below. The microcontroller pin layout is shown in Figure 2 given below.

Figure 2

External Connection Header

In addition to the microcontroller, external headers, SV1 & SV2, are the two other important components of this development board. SV1 is the left side dual row header and the SV2 is the right side dual row header. Both of these headers have 20 pins available for connection. These headers provide connections for GPIOs, power output, ground (GND), power input, and CAN communication pins. Both of these header pinouts have standard size, allowing users to connect them using jumper wires, a breadboard, or even solder wires permanently onto the development board. However, while doing the wire connection the customer must make sure that none of them get short circuit. The details regarding the pin's names, numbers, outputs, and functions are given in the Board Pinout section below.

CAN Controllers

The MCP2515 external connected CAN communication controller, and ESP-32 built-in CAN communication controller are two other main components of this development board.

The MCP2515, operating as the second external CAN controller in this development board, is a specialized component designed for Controller Area Network (CAN) applications. Its features include:

  • Implements CAN V2.0B at up to 1 Mb/s.
  • High-Speed SPI Interface (10 MHz)
  • Interrupt Output Pin with selectable enables
  • Multiple receive and transmit buffers
  • Low-Power CMOS Technology: - Operates from 2.7V-5.5V, 5 mA active current (typical), 1 μA standby current

The internal CAN controller also works at CAN V2.0. The internal CAN supports two message formats:

  • Base frame format (11-bit ID)
  • Extended frame format (29-bit ID)

Internal pinout connection between the CAN controllers and ESP32

Internal pinout connections of the CAN controllers:

  • CAN 1: This is a built-in CAN controller and its RX is connected to IO6 of the microcontroller and TX is connected to IO7 of the microcontroller. The connections are shown in Figure 3 given below
  • CAN 2: This is the externally connected controller and this controller CS, MOSI, CLK, and MISO are connected at pin numbers 1O10, 1011, 1012, and 1O13 respectively. The connections are shown in Figure 3 given below

Figure 3

6 pin JST-PH Connector

In addition to the 40 pinouts of the Header SV1 and SV2, the ESP32-CAN-X2 development board also provides an additional 6-pin connector header at the top of the board to supports CAN communication. This header makes wiring the device more convenient and robust. The CAN communication connection pinout details are given in the pinout section below.

USB-C Socket

The ESP32-CAN-X2 development board has one USB-C port. This port is used for multiple functions: it powers the board, allows programming, and facilitates serial communication both ways. However, it is important to note that when powering the board through the USB-C port, please ensure the voltage does not exceed 5V @ 2A or 3.3V @ 1A.

Board Layout

Mechanical board outline physical dimensions:

  • Width  : 42.10 mm
  • Length : 72 mm

The board top view is shown in the Figure 4 given below.

Figure 4

Power Ratings & Environmental Requirements

Power Options

The ESP32-CAN-X2 development board is flexible in its power input, and it provides multiple power input options. Power can either be supplied via the VIN pin, or via USB-C connector. Any voltage input either via USB or VIN is stepped down to 3.3 V via a voltage regulator.

Pin Voltage

All digital & analog pins on the ESP32-CAN-X2 development board are 3.3 V. Do not connect any higher voltage devices to any of the pins as it will risk damaging the board.

VIN Rating

The recommended input voltage rating for the development board is 3-12V. Please do not attempt to power the board with a voltage outside the recommended range, particularly not higher than 12V.

Operating Current

The typical operating current of ESP32-CAN-X2 development board is 105mA and maximum operating current is 500mA ( peak, during transmission )

Power Consumption

The normal power consumption of the board is 330mW and peak power consumption is 1.65W

Operating Temperature

Temperate rating is -40°C to +85°C

CAN bus information

...brief information about what CAN bus is all about, links to external resources...

Board Pinout

...a visually appealing graphic showing the board pinout...

Flashing firmware

...how to flash the firmware...

Sample Arduino Project

https://github.com/autosportlabs/ESP32-CAN-X2