MCP2515 ESP32 Interface Design


Below is a recommended design approach for interfacing an MCP2515-E/SO CAN controller with an ESP32-S3-WROOM. In this design the MCP2515 is powered at 5 V while the ESP32-S3 “works” at 3.3 V, so careful attention must be given to signal-level translation on the SPI bus. You will also need to add a CAN transceiver since the MCP2515 provides only the CAN protocol interface (not the physical layer).
Below is a high-level connection table showing the main interfaces and the recommended supporting components:

Table


Signal/ConnectionESP32-S3-WROOM SideMCP2515-E/SO SideNotes & Supporting Components
Power Supply3.3 V supply (VDD)5 V supply (VDD)Use decoupling capacitors (e.g., 0.1 µF + 10 µF) at each device’s VDD rail
GroundGNDGNDCommon ground must be shared between both devices
SPI Clock (SCK)ESP32-S3 SCKMCP2515 SCKRoute through a 3.3V-to-5V level shifter
SPI Master Out, Slave In (MOSI/ SI)ESP32-S3 MOSIMCP2515 SIUse a bidirectional level translator (e.g., TXB0104) to convert 3.3 V → 5 V
SPI Master In, Slave Out (MISO/ SO)ESP32-S3 MISOMCP2515 SOThe level translator may be needed in the reverse direction (or check if MCP2515 SO is 3.3 V‐tolerant)
SPI Chip Select (CS)ESP32-S3 GPIO (CS for SPI)MCP2515 CSRoute through level shifter if not 5V tolerant
Interrupt (INT)ESP32-S3 GPIO (interrupt input)MCP2515 INTConnect directly (verify voltage levels or add a resistor divider if needed)
CAN Bus Interface–MCP2515 CAN TXD / RXDConnect CAN TXD/RXD from MCP2515 to a CAN transceiver (e.g., SN65HVD230); then attach the CANH/CANL lines with proper termination (120Ω resistor at each end of the bus)
Additional Design Considerations
  • Voltage Level Translation:
    Because the ESP32-S3 operates at 3.3 V and the MCP2515 at 5 V, use a bidirectional level shifter on all SPI signals that go from the ESP32-S3 to the MCP2515. Verify whether the MCP2515’s MISO output is 5 V and whether the ESP32-S3’s inputs are 5 V tolerant. If not, add appropriate level translation.
  • CAN Transceiver:
    The MCP2515 only implements the CAN protocol interface; a separate CAN transceiver (such as the SN65HVD230 or a similar part) is required to drive the CAN bus lines. Ensure you follow the transceiver’s layout guidelines (including the recommended termination resistor on the bus).
  • Decoupling & Bypass Capacitors:
    For both the MCP2515 and level shifter, place bypass/decoupling capacitors as close to the power pins as possible. The recommended values (for example, 0.1 µF in parallel with 10 µF) will help filter high-frequency noise.
  • PCB Layout:
    Keep the SPI traces as short as possible to reduce noise. A solid ground plane is very important for high-speed digital signals and proper CAN bus performance.
This design overview should give you enough details to start wiring your schematic. You can add each part using Flux’s library search and place components accordingly. Feel free to ask if you need further details or have any questions about implementing any of these connections.
I need to choose a bidirectional level shifter for the SPI signals. @library find a 3.3V-to-5V level translator similar to TXB0104.
Below are two recommended bidirectional translators that meet your requirements for a 3.3V-to-5V level shifter for SPI signals similar to the TXB0104:

Table


Part NameManufacturerMPNPackage CodeDatasheetLibrary Link
SN74LVCC4245ANSRTexas InstrumentsSN74LVCC4245ANSRSOP‑24_L15.0-W5.4-P1.27-LS7.8-BLDatasheetView in Library
74LVCH2T45GN,115Nexperia74LVCH2T45GN,115XSON‑8_L1.2-W1.0-P0.30-BL2407241043_Nexperia-74LVCH2T45GN-115_C548927.pdfView in Library
Explanation
  • SN74LVCC4245ANSR
    This Texas Instruments device is designed for high-speed voltage translation between 3.3V and 5V domains. Its SOP‑24 package is well suited for supporting multiple SPI signals (SCK, MOSI, CS, and possibly MISO) while maintaining bidirectional communication.
  • 74LVCH2T45GN,115
    The Nexperia part supports low-voltage operation on one side (3.3V) and handles 5V on the other. Its bidirectional function and XSON‑8 footprint make it a good alternative for your SPI level shifting needs.
Both parts are highly capable of managing the speed and voltage levels required for SPI interfacing between an ESP32-S3 and an MCP2515. Feel free to review each part and select the one that best fits the layout and availability in your project.
Select TI part
Compare options
Check footprint details

Name
Pin #
Type
Section
Pin Group
Orientation
Order
Sub-symbol
Terminal Type
TXCAN
1
Unspecified
output
RXCAN
2
Unspecified
INPUT
CLKOUT/SOF
3
Unspecified
output
~TX0RTS
4
Unspecified
INPUT
~TX1RTS
5
Unspecified
INPUT
~TX2RTS
6
Unspecified
INPUT
OSC2
7
Unspecified
output
OSC1
8
Unspecified
INPUT
VSS
9
Unspecified
powerIn
~RX1BF
10
Unspecified
output
~RX0BF
11
Unspecified
output
~INT
12
Unspecified
output
SCK
13
Unspecified
INPUT
SI
14
Unspecified
INPUT
SO
15
Unspecified
output
~CS
16
Unspecified
INPUT
~RESET
17
Unspecified
INPUT
VDD
18
Unspecified
powerIn

MCP2515-E-SO