This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Waveshare RS485-CAN-HAT (MCP2515)
#1
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:
   
In the Signal K web interface the can0 says 'connected' and the can0 connection appears to be configured right:
   
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
Reply
#2
when I use 'ifconfig' i get:
   

Really stuck as to what to do next?
Reply
#3
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
Reply
#4
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.
Reply
#5
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
Reply
#6
(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/la...n_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/la...n_app.html

thanks
Jason
Reply
#7
(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/la...n_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/la...n_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.
Reply
#8
(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!
Reply
#9
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
Reply
#10
Thanks Holgar,

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

Thanks
Jason
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)