This is a custom, machine assembled, CAN shield designed to fit the 30 pin ESP32 DevKit1 board version. It is equipped with a CAN transceiver. This shield can operate with power ranging from 7 volts to 15.5 volts, which means you can connect it directly to a car battery thanks an efficient buck converter.
CAN
The shield complements the ESP32 CAN controller by adding a CAN transceiver offering:
- Data Rates: up to 1 Mbps
- Compatible With ISO 11898-2
- Cross-wire protection
- Over temperature (thermal shutdown) protection
- EMI and ESD bus protection using NUP2105
Power
The shield can be efficiently powered by 12V automotive source through its onboard buck converter, offering:
- Max Input Voltage:
- without enabling the voltage divider: 24 Volt
- with the voltage divider enabled: 15.5 Volt
- Max Input Current: 2 Amp
- Frequency: 570 kHz
- Outputs 3.3V to the ESP32 board
- Overvoltage transient protection
- Thermal shutdown protection
120Ω & ADC Features
By default, the shield comes with a voltage divider on GPIO32 and a 120Ω CAN termination resistor disabled. These features can be activated by soldering solder-jumpers on the shield, labeled ‘ADC D32’ and ‘CAN 120’ respectively.
LEDs
The shield includes three LEDs. The first is a Red LED, which is always on when the shield is powered. The second and third LEDs are Blue and Green and are connected to GPIO26 and GPIO27 for general usage.
Modes
The shield offers two operational modes: RW and R. Toggle between these modes using a physical switch connected to the CAN transceiver:
|
Wiring
|
Schematic
Programming
You have the option to code the ESP32 directly with:
- Espressif IoT Development Framework – TWAI (Two Wire Automotive Interface) [Advanced]
- Arduino using one of the following:
- Sandeep Mistry’s Arduino-CAN library
- Collin Kidder’s ESP32-CAN library – [sample code]
- Espressif’s TWAI API – [sample code]
Reminder: Ensure to correctly assign pins for your CAN library: use GPIO05 for CAN_RX and GPIO04 for CAN_TX.
Arduino [ESP32-CAN sample code]
Changes since v1.0
- Version 1.0: the original shield
- Version 1.1: added a voltage divider on GPIO32, a 120Ω CAN termination resistor, and a physical toggle switch enabling the CAN transceiver to toggle between “Listen-only” and “Do-Not-Transmit” modes.
- Version 1.2 (current): added an OBD2 connector pinout, an extra LED on GPIO27, layout improvement, larger text, relocation of solder-jumpers to the top side, and the creation of a custom 3D printable case.
Video Overview of the Original v1.0
(*) are affiliate links.