Hardware Pinout Reference
M5Stack StickC Plus 2 (Stick3) ↔ MCP2515 CAN Bus Module — SPI wiring for Jeep Grand Cherokee OBD-II
M5Stack StickC Plus 2
ESP32-PICO-V3-02 · 3.3 V GPIO
MCU
ESP32-PICO-V3-02
Flash
8 MB
GPIO Voltage
3.3 V
SPI Bus
VSPI / HSPI
WiFi
802.11 b/g/n
USB
Type-C
MCP2515 CAN Bus Module
SPI CAN Controller · TJA1050 Transceiver
Interface
SPI
CAN Spec
2.0A / 2.0B
Max Speed
1 Mbps
Crystal
8 MHz
Supply
3.3 V / 5 V
Transceiver
TJA1050
Physical Pin Identification Guide
The M5Stack StickC Plus 2 has no G-number labels on the hardware. Use the diagrams below to identify each pin by its physical position on the connector.
Bottom HAT Connector — 8-pin header (underside of device)
bottom edge (USB-C side faces up)
← Pin 1 (GND) Pin 8 (3V3) →
Grove Port — 4-pin JST connector (right side of device)
How to orient the connector: Hold the StickC Plus 2 with the screen facing you and the USB-C port at the top. The 8-pin HAT header is on the bottom edge. Pin 1 (GND, black) is on the left, Pin 8 (3V3, red) is on the right. The small triangle or notch on the PCB silkscreen marks Pin 1.
SPI Signal Wiring
| M5Stick Pin | Function | Wire | MCP2515 Pin | Function |
|---|---|---|---|---|
| G0 | SPI MOSI | SI | MOSI In | |
| G36 | SPI MISO | SO | MISO Out | |
| G26 | SPI CLK | SCK | Clock | |
| G25 | SPI CS | CS | Chip Select | |
| G37 | INT (optional) | INT | Interrupt |
Power & Ground
| M5Stick Pin | Function | Wire | MCP2515 Pin | Function |
|---|---|---|---|---|
| 3V3 | 3.3 V Out | VCC | Power In | |
| GND | Ground | GND | Ground |
CAN Bus → OBD-II Connector
MCP2515 Module Output
OBD-II J1962 Connector (relevant pins)
Wiring Overview Diagram
M5Stack StickC Plus 2 MCP2515 Module
┌─────────────────────┐ ┌──────────────────┐
│ G0 (MOSI) ────────┼──── yellow ──────┼── SI │
│ G36 (MISO) ────────┼──── blue ──────┼── SO │
│ G26 (CLK) ────────┼──── orange ──────┼── SCK │
│ G25 (CS) ────────┼──── green ──────┼── CS │
│ G37 (INT) ────────┼──── purple ──────┼── INT (optional) │
│ 3V3 ────────┼──── red ──────┼── VCC │
│ GND ────────┼──── black ──────┼── GND │
└─────────────────────┘ │ │
│ CANH ───────────┼── OBD-II Pin 6
│ CANL ───────────┼── OBD-II Pin 14
└──────────────────┘Verify your MCP2515 breakout board operates at 3.3 V. Some modules are 5 V only and will damage the M5Stack GPIO pins.
The MCP2515 requires a crystal oscillator. Most breakout boards include an 8 MHz crystal — set CAN library clock to MCP_8MHZ.
Jeep Grand Cherokee HS-CAN runs at 500 kbps. Set MCP2515 bitrate to CAN_500KBPS in firmware.
The OBD-II port is located under the dashboard on the driver side. Pin 16 is +12 V battery, pin 4/5 are chassis/signal ground.
Use twisted-pair wire for CANH/CANL runs longer than ~10 cm to reduce noise.
The MCP2515 module typically includes a built-in 120 Ω termination resistor. The Jeep bus already has terminators — you may need to remove the module resistor if you see bus errors.
Recommended Arduino/ESP32 library: mcp_can by coryjfowler (GitHub: coryjfowler/MCP_CAN_lib).
Arduino / M5Stack Firmware Snippet
#include <M5StickCPlus2.h>
#include <mcp_can.h>
#include <SPI.h>
#define CAN_CS_PIN 25 // G25
#define CAN_INT_PIN 37 // G37 (optional)
MCP_CAN CAN(CAN_CS_PIN);
void setup() {
M5.begin();
SPI.begin(26, 36, 0, 25); // SCK=G26, MISO=G36, MOSI=G0, CS=G25
if (CAN.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) == CAN_OK) {
Serial.println("MCP2515 init OK");
}
CAN.setMode(MCP_NORMAL);
}
void loop() {
if (CAN.checkReceive() == CAN_MSGAVAIL) {
long unsigned int rxId;
unsigned char len;
unsigned char rxBuf[8];
CAN.readMsgBuf(&rxId, &len, rxBuf);
// Process OBD-II frame here
}
}