Hello,
I am trying to connect mcp2515 to esp32 wroom32 to read data from a car.
Pins I use - mcp to esp:
CS to 5
SO to 19
SCK to 18
SI to 23
INT to 2(here if I use 5v from esp when upload the code, returns connection error) not sure whats wrong
Right now I am using 12V and a step down to 5V to power the Canbus.
Did anyone used this before, any good libraries or sample codes to sniff?
thanks.
ESP32 and MCP2515 CAN BUS
Re: ESP32 and MCP2515 CAN BUS
with this config sometimes works, sometime stops here
any ideea what I am doing wrong?
I am using coryjfowler's https://github.com/coryjfowler/MCP_CAN_lib with CAN_receive example.
Code: Select all
rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
Entering Configuration Mode Successful!
Setting Baudrate Successful!
MCP2515 Initialized Successfully!
MCP2515 Library Receive Example...
I am using coryjfowler's https://github.com/coryjfowler/MCP_CAN_lib with CAN_receive example.
Re: ESP32 and MCP2515 CAN BUS
Hi,
Is it possible to connect 2 or more MCP2515 CAN controllers with 1 ESP32 SPI and just control thru different SC pins?
Anybody has suggestion which library to use?
Thanks,
Julius
Is it possible to connect 2 or more MCP2515 CAN controllers with 1 ESP32 SPI and just control thru different SC pins?
Anybody has suggestion which library to use?
Thanks,
Julius
-
- Posts: 2
- Joined: Tue Feb 28, 2023 8:14 pm
Re: ESP32 and MCP2515 CAN BUS
Did you ever get this working? If so, could you please post the circuit diagram you used. I am wondering if the connections between the ESP32 and the MCP2515 CAN chip have to be voltage-level adjusted since they operate at 3.3V and 5V respectively? E.g. See "Bidirectional Logic Level Shifter Circuit" in https://maker.pro/custom/tutorial/how-t ... t-voltages. Or would a resistor voltage divider be sufficient for voltages going to the EPS32 and direct connect for the signals going in the other direction?
Thanks,
David Cyr
Thanks,
David Cyr
-
- Posts: 2
- Joined: Tue Feb 28, 2023 8:14 pm
Re: ESP32 and MCP2515 CAN BUS
The Cory Fowler library has an example of accessing two CAN networks. Did that not help?
Re: ESP32 and MCP2515 CAN BUS
For anybody coming here, the issue is the tranceiver needs 5v not just 3.3 that the esp supplies from is pin operating voltage.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], ignisuti and 89 guests