NMEA 2000 Shield

Hello, I´ve been keeping on trying to find out why I get kicked out from the Garmin unit. I have made some interesting observations. When I watch the traffic sent from the Arduino with the temature monitor program.

If I comment: “ // SendN2kTemperature();” so it doesn’t send any messages. it will stay in the list in the Garmin unit.

The traffic looks as follows:

CAN device ready Start address claim Pri:6 PGN:60928 Source:22 Dest:255 Len:8 Data:FB,FF,5F,2E,0,A0,64,40 Pri:6 PGN:126996 Source:22 Dest:255 Len:134 Data:FF,FF,9A,2,45,78,63,61,6C,69,62,75,72,20,58,2D,31,31,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,2E,32,2E,30,2E,31,30,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,2E,30,2E,30,2E,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,30,39,37,31,34,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FF,FF Pri:6 PGN:60928 Source:22 Dest:0 Len:8 Data:FB,FF,5F,2E,0,A0,64,40

Pri:6 PGN:60928 Source:22 Dest:0 Len:8 Data:FB,FF,5F,2E,0,A0,64,40

And there after keep on sending PGN:60928 with a few seconds interval. However when uncomment: “ // SendN2kTemperature();” and I send a message, the traffic looks as follows. I Have noticed that it stops sending PGN:60928. Instead it send only PGN:13031. See under. I guess that this could be the reason? Are there any way of getting it to send PGN:60928 frequently?


CAN device ready Start address claim Pri:6 PGN:60928 Source:22 Dest:255 Len:8 Data:FB,FF,5F,2E,0,A0,64,40 Pri:6 PGN:126996 Source:22 Dest:255 Len:134 Data:FF,FF,9A,2,45,78,63,61,6C,69,62,75,72,20,58,2D,31,31,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,2E,32,2E,30,2E,31,30,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,2E,30,2E,30,2E,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,30,39,37,31,34,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FF,FF Pri:6 PGN:130310 Source:22 Dest:255 Len:8 Data:16,C1,70,FF,FF,FF,FF,FF

Pri:6 PGN:130310 Source:22 Dest:255 Len:8 Data:16,C1,70,FF,FF,FF,FF,FF

I have figured out that, if I do send an address claim by using “NMEA2000.SendIsoAddressClaim();” every 2000 milliseconds, It works well with the Garmin 721xs. Then everything seems stable. The RPM data works now. It seems to be just a setting in the garmin that was the issue.

Is this the correct way of solving my issue?

Hello, I'm trying to use the Mega and the Can-Bus shield in order to get readings from my NMEA 2000 "Intelliducer" from Garmin. When I was attempting to use the temperature monitor sample code, "CAN device failed to open" from the NMEA2000.SetForwardType(tNMEA2000::fwdt_Text); part of the code. Even though on my Can-Bus shield, the RX led is flashing.

Any idea why it's failing to "open" to the device which I'm assuming it's not communicating with it???

heryoon:
Hello, I’m trying to use the Mega and the Can-Bus shield in order to get readings from my NMEA 2000 “Intelliducer” from Garmin.
When I was attempting to use the temperature monitor sample code,
“CAN device failed to open”
from the
NMEA2000.SetForwardType(tNMEA2000::fwdt_Text); part of the code.
Even though on my Can-Bus shield, the RX led is flashing.

Any idea why it’s failing to “open” to the device which I’m assuming it’s not communicating with it???

I got the same issue with my mega when the MCP2515 where not hooked up correctly. So I think that its caused when there are no working communication to the can controller.

heryoon: Hello, I'm trying to use the Mega and the Can-Bus shield in order to get readings from my NMEA 2000 "Intelliducer" from Garmin. When I was attempting to use the temperature monitor sample code, "CAN device failed to open" from the NMEA2000.SetForwardType(tNMEA2000::fwdt_Text); part of the code. Even though on my Can-Bus shield, the RX led is flashing.

Any idea why it's failing to "open" to the device which I'm assuming it's not communicating with it???

I had issues getting my mega to work with the Canbus shield. Turned out I had the wrong MISO pin selected (or something like that). I posted about this somewhere, but can't seem to remember at this time.

Hey guys... My plan is to use a Garmin GFS10 for fuel consumption and level alongside an Arduino DUE faced with Engine Data Acquisition ( It's and older boat, not fuel injected ) and everything is analog. With that being said I would like to use this as an performance tracking tool and as backup if one of those gauges start to "lie".

Would like to add the following items into the NMEA2000 Stream with the DUE. - Engine RPM ( I will have to devise a simple circuit as the only signal I have is from the coil ) - Engine Water Temp - Port Exhaust Temp - Starboard Exhaust Temp - Water Temp / Speed ( Using Mercruiser 859223 Unit ) - Heading / Compass - Trim / Tilt

I'm going to be using an Lowrance Elite 7Ti as an display unit.

Hi Guys,

I have not followed this forum for a while, since I should get messages by email and I have not got any until now. So I have thought this has been dead. Here are some late answers.

Please check arduino library on https://github.com/ttlappalainen/NMEA2000 . It has been developed more and used by several projects. Under documents there are drawings to make own devices and how to start with library. Under examples there are ready code e.g. for sending some temperatures.

Adrculda: So for sending engine RPM you just use: SetN2kEngineParamRapid(N2kMsg, EngineInstance, RPM); NMEA2000.SendMsg(N2kMsg);

For engine water temp you need to use SetN2kEngineDynamicParam(N2kMsg, 1,N2kDoubleNA,N2kDoubleNA,EngineWaterTemp,N2kDoubleNA,N2kDoubleNA,N2kDoubleNA); NMEA2000.SendMsg(N2kMsg);

And for temperatures as in example TemperatureMonitor.ino SetN2kTemperature(N2kMsg, 1, 1, N2kts_ExhaustGasTemperature, ExhaustTempPort); NMEA2000.SendMsg(N2kMsg); SetN2kTemperature(N2kMsg, 1, 2, N2kts_ExhaustGasTemperature, ExhaustTempStarboard); NMEA2000.SendMsg(N2kMsg);

Hobbe1979: PGN 60928 is only for address claiming and it will be done only when requested. So that should ne be sent frequently. Unfortunately some units expects it. E.g. my Garmin GMI 20 does not.

Dick3: In NMEA2000 library there is ready function SetN2kRudder. If you need to know how data is build, read code on N2kMessages.cpp.

Enzycal: Yes you can. It is almost the same as my sample schematic: https://github.com/ttlappalainen/NMEA2000/blob/master/Documents/ArduinoMega_CAN_with_MCP2515_MCP2551.pdf

Hello,

My goal is to get speed information from Raymarine a67 and display it in another display/meter.

Problem is that when Raymarine contacts satellites, NMEA messages ends from Raymarine and Raymarine don´t receve any messages from AT90CAN128.

When Raymarine is tested indoors and it can´t get satellites, system shows work just fine. For example it ansewers ISO reguest speed IDE: 59904 Data: 128259 (speed), even without address claim.

What would be the solution?

  1. Should i pay attension something in address claim? (Field informations, Device instance, Manufacturercode etc.)

  2. Should Product Information(126996) be send, even Raymarine or ohter nodes don´t request it? (Tryed to send, but Raymarine not seems to understand message)

  3. Or should i give up and by Actisense NGT-1 ISO? Could it be the solution of this project. Any experiences from Actisence?

Harware setup: -AT90CAN128 -MCP2551 -Raymarine a67

Thanks,

Jukka Penttinen

Hi jukkap,

First do you use my NMEA2000 library with NMEA2000_avr? Have you tested just listen traffic on bus by using example ActisenseListener and do you get it right? What is your other display?

  1. I have tested a lot with Garmin GMI 20 and it seem to be rather flexible. With my current address claiming code it works fine. But some other system required that address claiming should be sent every 2 sec. So who can say about Raymarine does it accept only registered manufacturer instead my default 2046, which is the highest possible value.

  2. In principle there is no need to send product information without request. Devices should register devices on the bus by address claiming and if they are interested about sender, then they should request product information.

  3. I have NGT-1 ISO and it is good. After writing NMEA2000 library I have done everything with with it and NGT is just as a spare on boat.

If you are located in near Turku I would be interested to test your MFD with Arduinos.

So...

Went Ahead and Ordered a waterproof enclosure and will be using an AMP seal connector for the sensor inputs from the engine.

Does anyone know what the part number for the NMEA2000 connectors are ?? I'm almost sure TE / AMP would be the one to supply them...

Look at these from digikey:

APC1760-ND $4.24

waterproof O-ring and mounting nut included.

Rfritz: Look at these from digikey:

APC1760-ND $4.24

waterproof O-ring and mounting nut included.

Thank you :)

I've tried to build the TemperatureMonitor program for mega it gives the error message:

C:\Users\Nils\Documents\Arduino\libraries\NMEA2000_mcp-master/NMEA2000_mcp.h:62:84: error: 'MCP_16MHz' was not declared in this scope ...

If I build it with due settings it works. Unfortunately I don't have a duo board. If I try to define MCP_16MHz

ifndef MCP_16MHz

define MCP_16MHz 1

endif

I get:

C:\Users\Nils\Documents\Arduino\libraries\NMEA2000_mcp-master\NMEA2000_mcp.cpp:60:148: error: no matching function for call to 'MCP_CAN::MCP_CAN()'...

I think I have followed the instruction in Arduino NMEA2000 library 02.02.2016 pdf file Does anybody know what can be wrong?

I tested with latest libraries and seem to work.

Note that you should not use original Seed studio can bus shield library. MCP_16MHz has been defined in developed version of CAN_BUS_Shield library in file mcp_can_dfs.h on line 250. If you do not have that, delete your Arduino\libraries\CAN_BUS_Shield-master and download it from https://github.com/peppeve/CAN_BUS_Shield and install it.

Hi Timo,

Here is some deteails what I forgot mention.

timolappalainen: First do you use my NMEA2000 library with NMEA2000_avr?

No. When I start this project I found some C CAN example from AvrFreaks harwared with AT90CAN128. For me Adruino isn´t so familar yet, but maybe I should exlore it.

timolappalainen: Have you tested just listen traffic on bus by using example ActisenseListener and do you get it right?

I have´n test bus any other device but follow bus traffic from Raymerine. Raymarine stops sending messages when it reachs satellites. Now I´m gonna order Actisence so I can listen bus traffic and maybe get proceed this project by that.

timolappalainen: What is your other display?

My plan is to get old Sumlog knotmeter to display speed from Raymarine == Retrometer ;)

Here is some tests what I´m done whit my devices.

Raymerine gets AddClaim SpeedReguest Traffic on bus Satellites done Tx + Rx (checked from Raymarine)

F F F T F T T T T T F F And correction my previous message: I have to AddressClaim before can get or send any messages on bus. So, thats seems to be OK.

Summary: I get that Actisense and see how does it works then. Tanks for all so far. I raport results when I get that Actisense.

PS: Timo, I live in Vaasa and sail under WSF. Let me know if you are sailing here Kvarken.

You could try with my library before ordering NGT-1. If you just load my library, stuff for avr and try with example ActisenseListener, you should be able to see all traffic on bus with Actisense NMEA Reader.

Ok.

Maybe i should test it. Do I have to do some modifications to code when i use AT90CAN128 prosessor?

timolappalainen:
I tested with latest libraries and seem to work.

Note that you should not use original Seed studio can bus shield library. MCP_16MHz has been defined in developed version of CAN_BUS_Shield library in file mcp_can_dfs.h on line 250. If you do not have that, delete your Arduino\libraries\CAN_BUS_Shield-master and download it from GitHub - peppeve/CAN_BUS_Shield: Can Bus Mcp2515 8/16 MHz oscillator and install it.

Thanks, change of library did the trick!

JukkaP. I have not tested avr chips, but thomasonw used them and made the code. On library readme it says: “To use avr processors internal CAN you need also NMEA2000_avr library and avr_can library, which you can download from GitHub - thomasonw/avr_can: Object oriented canbus library for Atmel AVR CPUs used with the Arduino IDE.”. So if you have selected avr board, the #include <NMEA2000_CAN.h> in example ActisenseListener should automatically select right libraries for you - you must have installed them ofcoarse.

Example ActisenseListener does not show itself on bus at all - it simply listens. To send some data e.g. temperatures, there is example TemperatureMonitor, which should work as well. I have tested all examples with DUe and Mega boards by using both Garmin GMI20 and NMEAReader. Some examples has been also tested with Teensy boards. I do not have avr boards, but thomasonw developed something by using my library.

Hi all,

For building NMEA2000 devices, check this link: https://hackaday.io/project/11055-kbox It has build in several hw components for boating solutions. Available code has been build by using my NMEA2000 library.