MCP2515 CAN bus module (TJA1050, SPI) with ESP32
Supply 5 V
Bus SPI
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| INT | Interrupt | D35 | LOW on a CAN event. 5 V when powered from 5 V: use a divider |
| SCK | SPI clock | D18 | |
| SI | SPI MOSI | D23 | |
| SO | SPI MISO | D19 | 5 V when powered from 5 V: use a divider or level shifter |
| CS | SPI chip select | D5 | |
| GND | Ground | GND | |
| VCC | Power | VIN | Needs 5 V for the TJA1050 transceiver: use VIN |
| H | Not wired to the ESP32 | — | CAN high. To the bus, never to the ESP32 |
| L | Not 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
- Microchip MCP2515 datasheet, SPI interface, INT output; supply 2.7 to 5.5 V
- NXP TJA1050 datasheet, Supply 4.75 to 5.25 V
Try it in 3D in BoardPilot
Related parts
ADXL362 ultra-low-power accelerometer (SPI)ArduCAM Mini 2MP camera (OV2640, SPI)AS5048A magnetic angle encoder (SPI)MAX31855 K-type thermocouple breakoutMAX31856 universal thermocouple amplifierMAX31865 PT100/PT1000 RTD amplifier
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.