david_1234
Posts: 8
Joined: Mon Jan 01, 2018 2:14 pm

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Mon Jan 01, 2018 4:21 pm

I did everything like it say in the guide

but I don't get the can interface
any idea why ?

I havetry 2-3 times - I get no error in any step ,
but I don't have "can" interface.

The mcp2515 is connected as shown in the setup

I'm using raspberry pi 2 Model B - Jessie 4.9.35-V7

waht am I doing wrong ?


Thanks ,

david_1234
Posts: 8
Joined: Mon Jan 01, 2018 2:14 pm

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Mon Jan 01, 2018 5:27 pm

don't know what I did - but I reinstall everything and now it's working :-)


now I want to do this :
run a pyton code that take the data and solve it as a simple massage
for example:
when I get 18FE320 - I will decode it as "door open"

how can I do this ?

Thanks ,

User avatar
saper_2
Posts: 226
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Thu Jan 04, 2018 12:21 pm

david_1234 - for reinstalling, something u must have broken/not installed.

As for what u want, ask uncle google: https://goo.gl/e7NZmB .

Stafan Willms
Posts: 1
Joined: Sat Feb 17, 2018 12:59 pm

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Sat Feb 17, 2018 1:18 pm

Hi,

thanks to this nice quick-guide i managed to access the CAN bus of my heating system at home with my pi. I can send requests with the "cansend" command and search for the response with the "candump" command. But this searching for the response is pain in the ass, and for my project i am serching for an way to get the direct response to my specific request automatic. Does anybody know if there is an command that i can use, that works in some way like this:

Code: Select all

 pi@raspberrypi:~ $  somecommand can0 580#31000C00000000
can0 180   [7] B2 00 0C 00 19 00 00       <--- direct response to my request
 pi@raspberrypi:~ $
Thanks for your help and sorry if my english is creepy.

Stefan

scorpion_08
Posts: 2
Joined: Thu Mar 08, 2018 6:43 am

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Thu Mar 08, 2018 6:46 am

pi@raspberrypi:~ $ sudo ip link set can0 up type can bitrate 1000000
RTNETLINK answers: Numerical argument out of domain

when i set data rate to 1mbs, there appears an error. can you help in this regard.

david_1234
Posts: 8
Joined: Mon Jan 01, 2018 2:14 pm

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Thu Mar 15, 2018 3:19 pm

Cansome one help or guide me ?
when I connect the canbus to my car i get a lot of data
I want to see only the data I want
for example
only PID 156,111,164,265
how Do I do this?
is it something in the canutilitis I need to do ?
cansniffer?
or I need to write an external code that will read the candump and show mw only what I want ?

Thanks ,

andminsk
Posts: 4
Joined: Thu Mar 22, 2018 5:16 pm

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Tue Apr 03, 2018 3:03 pm

Hi to all?
Does anybody know - is it possible to monitor 2-3 CAN bus line with one Pi?
Using several MCP2515

gaffer206
Posts: 4
Joined: Thu Dec 20, 2012 12:09 am

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Thu Apr 05, 2018 6:30 am

andminsk wrote:
Tue Apr 03, 2018 3:03 pm
Hi to all?
Does anybody know - is it possible to monitor 2-3 CAN bus line with one Pi?
Using several MCP2515
You might look at https://www.sg-electronic-systems.com/e ... 2-canberry

gaffer206
Posts: 4
Joined: Thu Dec 20, 2012 12:09 am

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Thu Apr 05, 2018 6:35 am

Hi,

I've got one of these modules to try to talk to some NMEA2000 devices. A couple of questions.

How important do you think the 1uF tantalum is if the 5V supply is a good one nearby?

I had a look at the TJA1050 specs and it says the RXD pin can be 0.7 VCC which at 5V would be 3.5 V which is more than the maximum 3.3 V input for the Pi. Have you done anything about this? Do you consider it a problem?

cheers

Julian

User avatar
saper_2
Posts: 226
Joined: Sun Aug 03, 2014 10:08 am
Location: PL

Re: [quick-guide] CAN bus on raspberry pi with MCP2515

Mon Apr 16, 2018 10:08 pm

gaffer206 wrote:
Thu Apr 05, 2018 6:35 am
Hi,

I've got one of these modules to try to talk to some NMEA2000 devices. A couple of questions.

How important do you think the 1uF tantalum is if the 5V supply is a good one nearby?
I always put right beside the IC always a cap 100n fo generic digital or MCU (unless datasheet suggest more) chip, for line/bus drivers I usually put on power trace close to the chip a ceramic(or tantalum) 1+uF and ceramic 100n - the 100n might be not necessary but I never had any problems where the power supply was the culprit thanks to my caution :)
gaffer206 wrote:
Thu Apr 05, 2018 6:35 am
I had a look at the TJA1050 specs and it says the RXD pin can be 0.7 VCC which at 5V would be 3.5 V which is more than the maximum 3.3 V input for the Pi. Have you done anything about this? Do you consider it a problem?
U don't connect bus driver to Rpi , bus driver (MCP2551/TJA1050/etc) first need to be connected to CAN bus controller which is the MCP2515.

If u actually read my first post then U should see that I disconnected the CAN bus driver from 3,3V and connected it's power to 5V while keeping the MCP2515 powered from 3,3V. For MCP2515 this is no problem , we only have to worry for the side of MCP which talk to RPi - so that's why I power MCP2515 from 3,3V.
TJA1050: 0,7Vcc=3,5V -> I see this in output but in "conditions" columns (and this refer for RXD pin max currents) , not the min-max columns. Beside VIH is 2V this is much below 3,3V Vcc of MCP2515 :)

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests