MCP2515 CAN bus module (TJA1050, SPI) with ESP32

Supply 5 V Bus SPI
INTSCKSISOCSGNDVCCHL

Pins and ESP32 wiring

PinRoleESP32 pinNotes
INTInterruptD35LOW on a CAN event. 5 V when powered from 5 V: use a divider
SCKSPI clockD18
SISPI MOSID23
SOSPI MISOD195 V when powered from 5 V: use a divider or level shifter
CSSPI chip selectD5
GNDGroundGND
VCCPowerVINNeeds 5 V for the TJA1050 transceiver: use VIN
HNot wired to the ESP32—CAN high. To the bus, never to the ESP32
LNot wired to the ESP32—CAN low. To the bus, never to the ESP32

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.