OpenMarine
MCP2515 - Printable Version

+- OpenMarine (http://forum.openmarine.net)
+-- Forum: OpenPlotter (http://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (http://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: MCP2515 (/showthread.php?tid=1774)

Pages: 1 2


MCP2515 - jim321 - 04-20-2019

i have one of those cheap mcp2515 can bus modules.
i followed directions on this page and got it to show up connected in signalk under the data provider i set up.
my module was a little different i cut the trace on the bottom of the board to separate the voltages.
https://vimtut0r.com/2017/01/17/can-bus-with-raspberry-pi-howtoquickstart-mcp2515-kernel-4-4-x/
screenshots 1 canbus connected, 2 settings in openplotter, 3 signalk data provider


RE: MCP2515 - leif_klasson@hotmail.com - 05-22-2019

(04-20-2019, 05:11 PM)jim321 Wrote: i have one of those cheap mcp2515 can bus modules. ......
Perfect, I just started a bit with thsi last night, but run into other problems, will contonue tomorrow. And I have exatly those modules MCP 2515, so good tip about 5/3.3 V.
I think you can solve it by two resistors also, if you don't like to change the module:
https://www.hackster.io/youness/how-to-connect-raspberry-pi-to-can-bus-b60235
/Leif


RE: MCP2515 - jim321 - 05-22-2019

i have another one ordered it should be here this week i will do further testing after it arrives.
i sent data with vcan but the bus needs two devices so it gets an ack.on can0


RE: MCP2515 - jim321 - 05-26-2019

well i spent two days playing and have had no success yet.
the second node is an arduino mega running the example datadisplay2.from the nmea2000 library 
i never get any results with candump on the pi
i am completely lost now, so i'll let it simmer for awhile..

i am not sure how signalk's nmea2k thing works, i was under the impression that it sends the converted data to the bus
canboatjs can0 ?
they both work with loopback


RE: MCP2515 - BellaX - 05-26-2019

Hi Jim,

I made my own interface but didn´t find the time to bring it up.

[Image: ce5621a79b_album.jpg]


I have a Sontheim "CANfox" Interface and a Peak Systems CAN Interface here. (plus Software)
I am using them for car electronics development but it should work for NMEA 2k as well.

I am a complete newbie on NMEA 2k but if i can help out, please give me some
instructions what to install or what to test.

Best,
Chris


RE: MCP2515 - jim321 - 05-26-2019

i tried to use the arduino mega with the actisenselistener example as a usb can device in op  instead of using can0 connected to the pi's spi
then set it up in signalk 
still no luck
[attachment=448] [attachment=449]

how can i verify signalk is converting sk to n2k.?

i don't even need n2k i'm just trying to learn about it, i guess i like the frustration Smile


RE: MCP2515 - leif_klasson@hotmail.com - 06-03-2019

(05-22-2019, 07:27 AM)leif_klasson@hotmail.com Wrote:
(04-20-2019, 05:11 PM)jim321 Wrote: i have one of those cheap mcp2515 can bus modules. ......
Perfect, I just started a bit with thsi last night, but run into other problems, will contonue tomorrow. And I have exatly those modules MCP 2515, so good tip about 5/3.3 V.
I think you can solve it by two resistors also, if you don't like to change the module:
https://www.hackster.io/youness/how-to-connect-raspberry-pi-to-can-bus-b60235
/Leif

Hm, made first attempts last week. I was wrong about using two resistors for adjusting the level, this is needed between the two ICConfused on the module. So ended up in same solution, broke up the 5V line on bottom of board, added a wire and then got possibility for 3.3 and 5V. But, no luck, when restaretd the PI after all setup, no can0 device is available :-(.

Will check all my wirings... using end resistance of 120 ohm for N2K, but no other devices on N2K network for the moment.

/Leif


RE: MCP2515 - leif_klasson@hotmail.com - 06-12-2019

Hm, can't get it to work :-(.

I have tested with both variants of overlay:

Code:
dtoverlay=spi1-1cs

AND:

dtoverlay=spi-bcm2835-overlay

Setup 2 Teensy 3.2, one using "Nmea simulator" and one using "Nmea Reader". Both using 115200 as serial speed.
And here I can see a lot of messages. Then added MCP2515 module (incl 3.3V + 5V fix) to Raspberry, also on same N2k network. Adjusted speed in Raspberry also to 115200.

I can see the device can0, "cansend" gives no errors, but no messages at all with candump? And also no extra signalk paths in Dashboard. Also setup N2K both in openplotter and Signalk server according to above.

Any tips?

/Leif


RE: MCP2515 - jim321 - 06-12-2019

i am waiting again on another module i want to try with two unmodified modules and two arduinos.
i have a module + arduino mega with actisense gateway "usb to openplotter", i can see the messages from sk n2k plugin blinking the light on the arduino
i should have more info next week..


RE: MCP2515 - e-sailing - 06-12-2019

(06-12-2019, 10:51 AM)leif_klasson@hotmail.com Wrote: Then added MCP2515 module (incl 3.3V + 5V fix) to Raspberry, also on same N2k network. Adjusted speed in Raspberry also to 115200.
N2K has a fixed speed of 250k. Adjust MCP2515 to 250k