NMEA 2000 Shield

It is possible, but does not make sense.

GPS message is so standard that should not be any differencies between devices. Normally you have this kind of problems with e.g. tank or temperature sensors. Some manufacturers has used proprietary messages instead of standard messages, so other manufacturer does not understant those messages. But I doubt that with GPS.

The easies way to spy network traffic is to buy e.g. Actisense NGT-1. If you like to build your own, Buy Teensy 3.2 and necessary parts or Teensy 3.2 breakout board with can (e.g. https://copperhilltech.com/teensy-3-2-with-can-bus-breakout-board/) and use my library example ActisenseListener.

Thanks for the quick reply!

I can see that the data is getting to the Garmin plotter because i was able to to capture some of the network traffic with the plotter diagnostic menu. The plotter (and another Garmin multiplication display) that are connected to the network shows the satellite view with about 10 sats, but for some reason it ignore the gnss position message, acting like it doesn't get a position from the GPS, that what makes me believe that perhaps there is some compatibility issue.
here is the message that i captured -

129029 GNSS Position Data Simrad 0x005A472045382B006C3E41DC69A90600B432A266DB09EF7089EDFFFFFFFFFF12FC003C0064005CF9FFFF00
once ill get a message from a Garmin GPS, ill might be able to compare the two.

Both of the devices are certified and i opened a ticket with Garmin with the debug info, but since its an old plotter it might take a while until they will release an update (if ever)

Thanks again,
Sglard

Hello, i'm glad i've found this thread, it has been very helpful the last few weeks. I've been tinkering with an arduino Due and MCU9250 tilt compensated compass, and after managing to get a good reading of the compass I added a CAN transceiver to feed heading data to the navigation system of a sailboat.

Using the amazing library provided by timolappalainen i made it work! Besides heading, the compass also sends the attitude (roll, pitch), but i'm stuck on an specific propietary PGN from B&G, that allows to set the offset (magnetic deviation of the compass, not the magnetic variation/declination) from the navigation system.
The problem is that when i set the offset from the B&G Triton screen, it gives me an (unspecified) error.

I've identified the message sent with the desired offset, it's the 130845 and it's listed in the canboat repo (https://raw.githubusercontent.com/canboat/canboat/master/analyzer/pgn.h) as "Simnet: Compass Heading Offset". Using the log output from the nmea2000 library i captured the message, but it seems that the triton is expecting an acknowledge or confirmation message from the arduino compass.

Does anyone know how to send that ack? i've been reading everything i coud find about nmea2000 but it's not clear to me how to do it.

Thanks in advance!

Have you read the message 130845 from bus sent by Triton, when you try to set offset?

Do you know anybody having e.g. presision compass so that you could spy communication between them?

The problem with NMEA2000 is that it is hard to get desricption for messages - specially for proprietary. From pgn.h desrciption for 130845 it is not clear for me is that status message or commanding message.

But why do you need to use that message, if compass is your own? You could set offset through serial port. Also for defining compass magnetic deviation you need to have full 360 deg table e.g. with 10 deg separation. Deviation table will then also include errors caused by boat.

thanks for the answer!

Have you read the message 130845 from bus sent by Triton, when you try to set offset?

yes, i captured these (there is another one, 130822, at the end) when i set the offset at the triton.

492219 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:20,E,41,9F,16,FF,FF,FF
492219 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:21,0,0,0,1,5D,F2,FF
492221 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:22,FF,FF,FF,FF,FF,FF,FF
492741 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:40,E,41,9F,16,FF,FF,FF
492741 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:41,0,0,0,1,5D,F2,FF
492744 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:42,FF,FF,FF,FF,FF,FF,FF
493267 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:60,E,41,9F,16,FF,FF,FF
493267 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:61,0,0,0,1,5D,F2,FF
493270 Pri:3 PGN:130845 Source:6 Dest:255 Len:8 Data:62,FF,FF,FF,FF,FF,FF,FF
499117 Pri:3 PGN:130822 Source:6 Dest:255 Len:8 Data:C1,1,13,FC,2,2C,0,0
499119 Pri:3 PGN:130822 Source:6 Dest:255 Len:8 Data:C2,48,6F,FF,FF,FF,FF,FF
499495 Pri:3 PGN:130822 Source:6 Dest:255 Len:8 Data:E0,F,13,99,FF,1,0,1
499495 Pri:3 PGN:130822 Source:6 Dest:255 Len:8 Data:E1,3,0,FC,2,7D,0,0
499497 Pri:3 PGN:130822 Source:6 Dest:255 Len:8 Data:E2,BD,8C,FF,FF,FF,FF,FF

Do you know anybody having e.g. presision compass so that you could spy communication between them?

no...unfortunately i don't. I've read manuals from several manufacturers but there is no mention of that pgn.

But why do you need to use that message, if compass is your own? You could set offset through serial port.

For ease of use, just that. The backup plan is to point the sailboat north using a standart compass and use a button in the arduino to take the actual reading and use it as an offset, saving that value in flash. Right know i'm hardcoding it.

Also for defining compass magnetic deviation you need to have full 360 deg table e.g. with 10 deg separation. Deviation table will then also include errors caused by boat.

i've saw that tables, but aren't they used in standart compasses? In this case, using an electronic compass integrated with the nmea2000 bus, the two methods i've learned to calibrate the compass are the offset to compensate for the misalignation between the x axis of the compass and the sailboat's keel, and doing 720 degree (or 390, depending on manufacturer) turns to negate the hard and soft iron distortions of the boat.

I'll move forward with the backup plan, implementing a way to set the offset directly in the arduino.

So it seem to have 500 ms timeout and then try again. You could try to respond with simple ACK message (PGN 59392).

SetN2kPGNISOAcknowledgement(N2kMsg,0,0xff,130845UL);
NMEA2000.SendMsg(N2kMsg);

If it does not help, then you need to find a compass for testing.

Or does it matter, if Triton does not get ack? You get offset from PGN 130845 and start to use that.

Electric compasses (except GPS and true Gyro) has also variable error. They are measuring magnetic fields as traditional compass. Magnetic fields will be also disturbed by ship and depends of the compass position on the ship. So if you want to have it accurate, you should run a table with 5-10 deg period. Old compasses were calibrated by running circles with constant speed. I do not know how they do it now by moving 8 track like with cell phone. Byt I think it may be difficult to fix compass to boat and move whole system with 8 track.

I'll try the ack as soon as i can test it on the boat and let you know.

I also forgot to tell you that i can't parse the pgn 130845. I couldn't find the procedure for that message. I was planning to code it but i have to learn how, from others in you library.

For calibration, i've done it moving the compass around its three axes on the position where i will fix it to the boat (as recomended in forums and libraries) and then use the offset to compensate for any (linear) deviation on the measurement.

Hi,

Does anyone here have a Simrad AP44 Autopilot Controller with a B&G MFD or Triton2 who's able to capture some N2K traffic? Preferably during boot and then pressing the standby/auto/wind/+-10/+-1 buttons.

I've got an Beneteau Oceanis 40 with Raymarine Tridata (ST60) sensors and a CW80 MFD. Recently I've added a B&G Triton2 and it's showing most of the data. It won't however show the AutoPilot info, and I want it to. I also want to be able to control the AP from the b&G Vulcan 12" that I'm planning to install.

My plan is now to capture the Raymarine communication PGNs and convert them to Simrad AP44 Autopilot Controller messages and by doing so fooling the B&G MFD and Triton2 into thinking 'it's one of them'.

I'm planning to first make it work SignalK, to see if it's simple enough that I can program it onto Arduino.

Gentlemen please forgive me if this has been answered in this thread. I did look through but could not find a solution. I would like to run a basic RPM and Temperature NMEA2000 transmitter from my outboard on Atmega328 (uno or pro mini).

I cannot seem to get any of the example code to compile in a small enough memory space even after doing: NMEA2000.SetN2kCANMsgBufSize(2); & NMEA2000.SetN2kCANSendFrameBufSize(15).

Does anyone have an example that compiles for uno that I can work off?

Thank you Timo for this library! :slight_smile:

Read through Getting TemperatureMonitor up and running on Arduino Uno · Issue #20 · ttlappalainen/NMEA2000 · GitHub

It may help or not anymore, since on later updates I do not try to support so low memory devices as Uno. I rpefer to change to some more powerful device like Teensy 3.2 or ESP32.

JCW:
Gentlemen please forgive me if this has been answered in this thread. I did look through but could not find a solution. I would like to run a basic RPM and Temperature NMEA2000 transmitter from my outboard on Atmega328 (uno or pro mini).

I cannot seem to get any of the example code to compile in a small enough memory space even after doing: NMEA2000.SetN2kCANMsgBufSize(2); & NMEA2000.SetN2kCANSendFrameBufSize(15).

Does anyone have an example that compiles for uno that I can work off?

Thank you Timo for this library! :slight_smile:

Hi, I will try to help you, but
1st I have to know how do you acquire the rpm signal from your engine and how this signal like
2nd what kind temperature do you want to send(outside,engine) and how this signal like
In last why don't switch to arduino mega who can handle more signal and have more memory?

Hi All, has anyone tried and, hopefully, been successful setting a waypoint on a Garmin or other plotter using a non-proprietary PGN? There are a number of PGNs related to waypoints and routes, but it seems most of them involve fetching route and waypoint data from a plotters database. Is there one to insert a waypoint into a database?

I have also seen PGNs that refer to distance to a "mark" or distance between two "marks" but apparently no way to create a "mark."

Hi Timo,

I have a new engine which have a J1939 bus connection and what I could find until now is that nmea2k is a subject of J1939 right? The manufacturer delivers a NMEA2K converter for 500 € but as this brand new engine already break my finance plan completly for this year I thought to build it my self.

Is one of your libraries doing the conversion job already, or do you know an open project doing this?

Regards,
Thomas

I am sorry, but I have not searched open source converters.

With my library you can easily make device, which sends engine information out ot reads it in from N2k. But I do not know which messages your engine will send. If you find messages and their descriptions, it is not hard to read them and do conversion. E.g. Teensy 3.5 and 3.6 has two internal CAN controller, so one could be as J1939 and other N2k. Just need tranceivers. For N2k side I prefer isolated one to avoid ground loop in your system.

On the other hand, what information you want to get? E.g. Teensy has good ADC converter for reading engine analog sensors and with FreqCounter library you can easily read RPM from e.g. alternator W. Not so elegant.

Hi Timo,

I did some research and I have a following (newbie) question regarding my issue - simrad gps that doesnt talk to a garmin plotter - (NMEA 2000 Shield - #860 by sglard - Other Hardware Development - Arduino Forum)

after talking with both simrad and garmin and sending my network debug information to garmin. It seems that while the pgn is in the correct structure, simrad are using some invalid values and this is the reason why the garmin plotters ignores them.

My plan is to compare the gps pgn from simrad with a pgn from a working gps, and to create a device that will read the simrad pgns from the network and will resend them with adjusted values.

What would be a good approach. using a single nmea 2000 network to both receive and send? or would it be better to have a board with two can interfaces with two nmea 2000 networks, one is connected only to the Simrad gps and the second will be connected to the rest of the boat network and will submit the adjusted pgn?

Thanks again
Sg

Before doing anything I prefere to find out what is going wrong. I tested you sample message with my simulator and Actisense NMEA Reader and did not see any problem. With Simulator and Teensy with library example ActisenseListenerSender you can send messages to N2k bus. Simulator has special feature, where you can send messages directly with hex data. This is the way I tested your message with Actisense Reader. If I would have Garmin plotter, I could test does it work with it.

I can not say which way is better. If you can choose on your plotter, which GPS source to use, then you can have them on same bus. In this case your device would act just an other GPS on the system. If you separate your GPS behind own bus, you can program your "converter" to lie that it is Simrad GPS.

I would start with Teensy 3.5 or 3.6 and first test with simulator how to get it working. Then it is easy to test on one bus and if necessary add own bus for Simrad.

Thanks Timo for your detailed reply!

Here the reply that i got from garmin:

Our engineering found the following issues with the output sentences of the GS25:
“The COG in PGN 129026 being sent is invalid. Also the fix information in the PGN being sent is invalid. For our MFDs to recognize a GPS source that source must be providing valid Fix, Time, Position, Track and Velocity information.”

I suspect that their plotter is ignoring the pgn when the boat is not moving since the Track and Velocity are marked as invalid (ffff) instead of 0 or something else (i asked them about it but they didn't provide any more details).

I Just got my Teensy 3.5 and the other can transceiver components from your schematics, i will start experiment with it and hopefully i will have more insights.

Thanks again for this amazing project and your ongoing support!

In a way Simrad works right and Garmin handles it wrong. If GPS receiver is not moving, it can not know COG and sending "not available" (which is not invalid) is right behaviour. Velocity could be sent as 0. Welcome to great standard!

Hi
I'm interfacing my old NMEA 0183 instruments to my new B&G Vulcan.

Compass and AIS is working fine, thanks Timo for the Github repositories.

I,m now building an interface for my old tillerpilot. Its working fine, can follow a course, Wind angle, and track between waypoints, etc. It is simulating the Simrad AP44 Display

My problem is, that it is not recognized by Vulcan or Triton2 display

Do anyone know about the protocol for B&G/Simrad NAC-2 autopilot computer and AP44 controller?

SetProductInformation ????
SetDeviceInformation ????

PGN:59904, 59392, 60160, 60416, 60928, 60416, 126208, 126996 wich are all ISO PGNs

Regards
Peter

Hi,

Thanks Timo for great job!

May be stupid question, but should I feed with 12 volts NMEA socket on my MFD Lowrance HDS Live, when testing my NMEA device (teensy, sender only)?

If I connect my device to ActisenseListener (based on 2-nd teensy) work ok. If I connect to MFD - it not see:(. Only as idea, perhaps mfd check nmea bus with power feed and not start.