ESP32-CAN-X2
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.
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.
External Connection Header
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
- 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
6 pin JST-PH Connector
The ESP32-CAN-X2 development board 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.
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
The ESP32-CAN-X2 board has 40 pins across its two headers, SV1 & SV2 headers, and a 6-pin header at the top. This guide explains the pin functionalities of the board. The pin configuration of development board shown in Figure 5 given below.
Left Header (SV2) Pinout (Top to Bottom)
The pin count start from the top of the left header, and the pin details are as following :
Pin | Function | Description |
---|---|---|
1 | CAN1H/2.7D | high-level signal for the first CAN channel. |
2 | CAN1L/2.7D | low-level signal for the first CAN channel |
3 | CAN2H/2.7C | high-level signal for the second CAN channel |
4 | CAN2L/2.7C | low-level signal for the second CAN channel |
5 | RX Pin | USART RX |
6 | TX Pin | USART TX |
7-20 | GPIO Pins | GPIO's |
Right Header (SV1) Pinout (Bottom to Top )
The pin count start from bottom to top and details are as following :
Pin | Function | Description |
---|---|---|
1-11 | GPIO Pins | GPIO's |
12-13 | Vin | Voltage Input |
14-15 | 5V | 5 Voltage Output |
16-18 | GND | Ground |
19-20 | 12 Vin | 12 Voltage Input |
Top Header Pinout
The header supports CAN communication. Pin count start at the left viewing the board from the top. Pinout configuration of header is shown in Figure 6 given below.
Pin | Function | Description |
---|---|---|
1 | CAN1L/2.7A | low-level signal for the first CAN channel |
2 | CAN2L/2.7B | low-level signal for the second CAN channel |
3 | CAN2H/2.7B | high-level signal for the second CAN channel |
4 | GND | Ground |
5 | CAN2H/2.7A | high-level signal for the first CAN channel |
6 | +12V_ Aux | 6-12v power supply |