MCP2515 CAN Bus Module Tutorial with Arduino and Linux

preview_player
Показать описание
In this video, I demonstrate how to use the MCP2515 CAN Bus Module to transmit data from an Arduino that's connected over SPI to a CAN receiver connected to my Linux virtual machine.

[MCP2515 CAN Bus Module]

[Arduino MCP2515 CAN library]

[USB CAN Converter Module]

[Setting up a Linux VM with CAN tools]
Рекомендации по теме
Комментарии
Автор

Thank you boss! I'm 1st year out of school and I'm making a can bus reader and I'm going to shoot data to a screen and display rpms and other vehicle data. I will use esp32 as well as a stm32. I want to try using this chip as well as trying the onboard controllers and i will do what you did in the esp32 video and use just transceiver(the stm32 nucleo has built in "bxCan"). I need to buy you a coffee or very helpful as well as the article you shared from circuit state saved my life!

Bravo_L
Автор

Thanks for producing theses videos. My interest is producing can obd2 messages from engine sensors on esp32, so that Android with Tourque app can display on tablet. I have been using a ObdLinkMX+ for years on my daily driver truck, so that is helping me learn. Thanks again

stevecarlisle
Автор

1:33 Here's probably an interesting twist to the CAN bus set up on Linux: Instead of this _specific_ CAN-to-USB converter, which appears to be automatically recognized by socketcan, use an Arduino with MCP2515 to act as such a device. The Arduino already has the USB serial line to the PC that many of these devices actually use, so it's primarily about implementing a protocol that Linux already understands. Then it "just" needs to forward any message received from the MCP2515 (i.e., from the CANbus) to the PC via the serial link, and vice versa. One can probably tweak the Linux side to accept the USB device ID that the Arduino uses, because I don't think you really can control that on the Arduino.

benhetland
Автор

Hey, I really liked the video! Me and my friends are working on a similar system with a raspberry pi pico for a couple months now. We are trying to read an 8byte address from a car’s ecu. Do you know if the library can be edited to have that 8 byte address and if the CAN module with the MCP2515 and the TJA is able to convert from CAN to SPI (essentially reading CAN onto a microcontroller) if you can help, we’ve been suffering through the months with many many dead ends, and we’ll love if you could

NOT_JON
Автор

Can you please present any project you made Canbus data displayed in nextion touch screen as desh

palanik
Автор

How are you reading the transmitted data? Are you using openmoko, is it a software for linux?

renansaraivadossantos
Автор

Good day to you so I am seeking to make a custom gauge cluster using master slave combo with uno r3 and mega r3. I want to connect to combination meter to the OEM gauge cluster for my 2006 honda cbr1000rr... Will make a tutorial on how to connect for the master to read the can bus from the meter send that data to the slave and the slave display it on a tft, hmi, or oled screen?

deemorris
Автор

Good job
If you want to send data like you did you can leave the int pin disconnected

MGsyd
Автор

I'm trying to use this Arduino to CAN, to send a message to an automotive module. Any chance I could get some help? I've done the setup you show but the CANInterpreter isn't seeing the messages.

kylenorseth
Автор

tricky question, is ths possible?? :
So car ECU ----> Arduino Nano33 ----> MCP2515 I connect the processed data back to the Arduino Nano 33??)---> And I want to push all processed data via Wifi ---> my phone
Is this possible? :D
(background: I want to process the ECU logs form my car, and have a realtime view on oil temp and things, I have a CANbus translator cript from the ECU already. And have a phone app which can process the CANbus data.)
Million thanks!!!!

FreestylerAlbert
Автор

I have a doubt with cross compatibility between 3.3V microcontroller transreciever Physical layer and 5V microcontroller I have used MCP2515 with Arduino

Is it going to be problem If I use another node with 3.3V transreciever with MCP2515 module

One of your earlier videos had TJA1050 needed power recycling
Is there fixes as this is deal breaker
For Permanent designs

anush_udupi
Автор

HI thanks for your video, I watched again and again, and I tried by myself, one question about MCP2515 library, because I need send a message with RTR, but in the example code, I did not find the rtr option, did you face the same problem and solve it? thanks!!

robfei-ub
Автор

Hello @EV_engineer, thanks a lot for this video, but I USB-CAN-A with me instead of the device that you have used, could you please let me know how to do the same project with my device, thanks in advance :)

sanjayns
Автор

I'm just looking for a way to communicate with my R48 2000e3 rectifier to reduce the voltage but I'm lost here

felixkrocher
Автор

I have a question for you if you don't mind. I'm using a flat screen car radio in my home for music, I'd like to control the volume with the canbus that's on the radio wirelessly, with an esp32 and the Blink app. I just don't know how to built a canbus to make it work. Do you have any ideas that could help me?

allanadams
Автор

I've seen how two Arduinos with two MC2515s communicate between each other, but not sure how your setup works? In my project, I installed VB with Ubuntu and extensions in Win10. Installed Can-Utils and have my Arduino and MC2515 running a sketch that compiles, uploads, and runs in VB. In the Ubuntu terminal window, lsusb returns the following: Bus 002 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM), however, when I type ip link ls, the Arduino isn't listed and no Bus0? Next I tried "sudo ip link set up can0 type can bitrate After asking for my password, I get "Cannot find device "can0"." How do I initialize can0? Thanks

Explore-Gobal
Автор

Can i change from linux to be a heavy equipmen data ?

muhammadalfadhil
Автор

sorry, I am not familiar with spi.h, I using mega, but I dont know how to connect with 2515, which pin should connect with?

robfei-ub
Автор

You are the best! Thank you. Please come to Uzbekistan and marry my daughter.

kme
Автор

Ahahah nice video but wow that is a big fuss in the era of iot 😅

tba