OpenMarine
Waveshare RS485-CAN-HAT (MCP2515) - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: Waveshare RS485-CAN-HAT (MCP2515) (/showthread.php?tid=3303)

Pages: 1 2


Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-02-26

I have added a Waveshare RS485-CAN-HAT to my Pi 4 with OP2 installed.  I enabled SPI and hit the 'Add MCP2515 device' button.  I pressed the 'Add connection' button:
[attachment=1352]
In the Signal K web interface the can0 says 'connected' and the can0 connection appears to be configured right:
[attachment=1353]
interestingly, if I change from 'Canbus (Canboatjs)' to 'Canbus (Canboat)' can0 says 'Started' - not sure if this is of interest?

I have the H and L connected to the seatalk NG can High and Can Low from a NG backbone with two terminators and a Raymarine Axiom MFD as an input and I don't see any sources on the MFD or incoming messages on the data browser in Signal K

I have the Signal K to Nmea2000 configured to output just COG and SOG to limit traffic for now but still do not see any source in the MFD or anything incoming to signal K

Does anybody have any ideas what is wrong?

I did notice that on this page that the recommendation for this device is:
Code:
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000

but I have 
Code:
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25
not sure if this is the source of an issue, but it doesn't fix it


RE: Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-02-27

when I use 'ifconfig' i get:
[attachment=1355]

Really stuck as to what to do next?


RE: Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-02-28

This is now working!

the issue was that I had not powered the Seatalk NG bus, I had powered the Axion MFD directly, but not powered the Seatalk NG connector.  The connections to the RS485-CAN-Hat is just the blue and white wire - no power.

So we can confirm that the Waveshare RS485-CAN-HAT (MCP2515) works and cost <$17


RE: Waveshare RS485-CAN-HAT (MCP2515) - Guttagrynna - 2021-04-14

Thanks for your posts. I got one of these the other day and now I just got it to work after changing oscillator frequency to 12000000. For some reason I had it set to 8000000. I have a small test network at home with a B&G Triton2 display where i can now see a compass heading.

And as you say, it's good value. I bought a PiCAN-M HATat around 100 Euros but it doesn't play well with my PiJuice HAT in some respects, so I believe I will stick to this solution and maybe sell the PiCAN-M.


RE: Waveshare RS485-CAN-HAT (MCP2515) - SCarns - 2021-04-14

That's great! I was about to suggest you look in the MFD and see if it sees anything on the STNG backbone. But, glad you figured it out.

Not familiar with the Waveshare RS485-CAN-HAT. I run the Rusoku TouCAN Marine USB adapter, which I thought was a good deal at $70 US. Got it to use the TouCAN plugin in OpenCPN, but have grown up to a full-blown SignalK setup since then, so I used the TouCAN adapter as the interface. Works fine, but I like the price of the Waveshare and have found their stuff to be quality. I have their USB hat for Pi4 and an RS-485 USB adapter for a solar project I was working on.

Good post! Thanks for sharing!

Steve


RE: Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-04-14

(2021-04-14, 07:45 PM)Guttagrynna Wrote: Thanks for your posts. I got one of these the other day and now I just got it to work after changing oscillator frequency to 12000000. For some reason I had it set to 8000000. I have a small test network at home with a B&G Triton2 display where i can now see a compass heading.

And as you say, it's good value. I bought a PiCAN-M HATat around 100 Euros but it doesn't play well with my PiJuice HAT in some respects, so I believe I will stick to this solution and maybe sell the PiCAN-M.

Great News - Glad it helped you!

after my experience, I did go ahead and write the manual page for it:

https://openplotter.readthedocs.io/en/latest/can/can_app.html

Could you check through this page and any additions you think are necessary could be added (either you add or let me know and I can add)

A section on the PiCAN-M HAT would be good if you could write one?

(2021-04-14, 08:04 PM)SCarns Wrote: That's great! I was about to suggest you look in the MFD and see if it sees anything on the STNG backbone. But, glad you figured it out.

Not familiar with the Waveshare RS485-CAN-HAT. I run the Rusoku TouCAN Marine USB adapter, which I thought was a good deal at $70 US. Got it to use the TouCAN plugin in OpenCPN, but have grown up to a full-blown SignalK setup since then, so I used the TouCAN adapter as the interface. Works fine, but I like the price of the Waveshare and have found their stuff to be quality. I have their USB hat for Pi4 and an RS-485 USB adapter for a solar project I was working on.

Good post! Thanks for sharing!

Steve

Thanks Steve!

If you look at the CAN page of the documents - you will see it there is nothing in the CAN_USB section, it would be great if you updated that section with your experience:

https://openplotter.readthedocs.io/en/latest/can/can_app.html

thanks
Jason


RE: Waveshare RS485-CAN-HAT (MCP2515) - T3chfr3ak72! - 2021-04-17

(2021-04-14, 08:17 PM)Techstyle Wrote:
(2021-04-14, 07:45 PM)Guttagrynna Wrote: Thanks for your posts. I got one of these the other day and now I just got it to work after changing oscillator frequency to 12000000. For some reason I had it set to 8000000. I have a small test network at home with a B&G Triton2 display where i can now see a compass heading.

And as you say, it's good value. I bought a PiCAN-M HATat around 100 Euros but it doesn't play well with my PiJuice HAT in some respects, so I believe I will stick to this solution and maybe sell the PiCAN-M.

Great News - Glad it helped you!

after my experience, I did go ahead and write the manual page for it:

https://openplotter.readthedocs.io/en/latest/can/can_app.html

Could you check through this page and any additions you think are necessary could be added (either you add or let me know and I can add)

A section on the PiCAN-M HAT would be good if you could write one?

(2021-04-14, 08:04 PM)SCarns Wrote: That's great! I was about to suggest you look in the MFD and see if it sees anything on the STNG backbone. But, glad you figured it out.

Not familiar with the Waveshare RS485-CAN-HAT. I run the Rusoku TouCAN Marine USB adapter, which I thought was a good deal at $70 US. Got it to use the TouCAN plugin in OpenCPN, but have grown up to a full-blown SignalK setup since then, so I used the TouCAN adapter as the interface. Works fine, but I like the price of the Waveshare and have found their stuff to be quality. I have their USB hat for Pi4 and an RS-485 USB adapter for a solar project I was working on.

Good post! Thanks for sharing!

Steve

Thanks Steve!

If you look at the CAN page of the documents - you will see it there is nothing in the CAN_USB section, it would be great if you updated that section with your experience:

https://openplotter.readthedocs.io/en/latest/can/can_app.html

thanks
Jason

Thank you so much for sharing this my friend. I checked the page and documents, and I think it doesn't need anything extra.


RE: Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-04-17

(2021-04-17, 01:30 AM)T3chfr3ak72! Wrote: Thank you so much for sharing this my friend. I checked the page and documents, and I think it doesn't need anything extra.

thanks for the feedback!


RE: Waveshare RS485-CAN-HAT (MCP2515) - holgerw - 2021-04-17

Hello Techstyle

thanks for your documentation. but please add something about Termination of the CAN Bus. This involves 2 Terminators (just normal Resistors a 120Ohm). They should be at both Endpoints of the Bus, and ONLY there. Their Function is to minimize the Reflectons of the Endpoints.

Now if you put an new Device inside your Bus be shure to remove it´s intern Restistor between the H & L Contacts. Most CAN Hats have these default active. You are able to measure the Resistor between H & L - if ist ca. 120 Ohms the you have to remove it! Be shure to disable the Power before the Measurement, otherwise you get irregular Results.

To be shure your Boat CAN-Bus is correct terminated, Power it down first - and the measurement shoult be ca. 60 Ohm. (2x120Ohm = 60Ohm). You can add many Devices inbetween, but disable their internal Resistors first.

Holger


RE: Waveshare RS485-CAN-HAT (MCP2515) - Techstyle - 2021-04-18

Thanks Holgar,

I will update to add a small section describing using terminating resistors.

Thanks
Jason