NMEA 2000 Shield

thank you Timo ! I'll try. So I anderstand that if I have a compass in n2k bus , it is possible to calculate true wind direction (listenAndNode) Am I wright ? openskipper dont want to work when I plug n2k compass to the bus.I think it doesn't like high data refresh.

Yes. Then you need tom make similar message handler as in example DataDisplay. I need to add heading parser function to N2kMessages module. Which PGN your compass is sending - PGN 127250? Which GPS compass you have?

I have 10Hz compass and lot of other data coming to OpenSkipper, so I do not think this is the problem with it. Other possibility is that some definition is wrong.

WoW ! It's working ! I connected magnetic encoder as5040 as wind direction sensor , IR couple from old mouse as wind speed sensor , potentiometer as rudder sensor. I have edded rudder to simple wind monitor . Everything working great . now I am trying to edd tft lcd with beautifull graphics. Need some more time and alcohol to solve bugs , but already it is a greate step. thank you Timo!

i

Another newbie question has arisen as my own project develops. The Due I am using to output the data, transmits the 0183 sentences down the serial port, but I guess this is RS232 protocol.

I believe NMEA0183 is TTL or at least different; at the moment my instrumentation will not read what the due is outputting. How do I convert it, invert it, change it?

Thanks

timolappalainen: Hi,

You can find NMEA2000 library and samples on https://github.com/ttlappalainen. The best would be to use Arduino Due, since it needs only MCP2562 tranceiver for connecting to the bus. It also has 8 byte double for better calculations.

My own setup is running and it has also 3 NMEA0183 inputs for combiner and tranfer data to N2kBus. So with Arduino Due and 4 extra chips this replaces 4 devices: NMEA0183 combiner (e.g. Brookhouse), NME0183->N2k (Actisense), N2k->PC (Actisense), MOB device.

hello,

my first post here, but have being working on arduino Uno -> NMEA0183 and have a few sketches working for specific things already posted in the YBW forum. One is for rudder angle (IIRSA) which I now have to convert to NMEA2000 (should be 127245) as my Garmin GMI10 doesn't support this sentence.

Have a few bits of kit, 3 Uno's relay/wifi/ethernet/Serial->TTL, etc shields but NOT a Due, nor a CAN BUS gate/shield.

Could you please recommend a setup that will work with minimum effort and debugging? I'm ok with a soldering gun, but not particularly good in reading graphs (talking about building the CAN BUS interface in hardware using the MCP2562 tranceiver you mention). Are there any readymade shields that would plug on the Due that will work with your code? Planning to order tonight so that I can get the N2K project moving using your notes and code. I can see the CAN BUS Seeed and the SparkFun one, are they any good?

thank you very much!

cheers

Vassilis

skyflyer: Another newbie question has arisen as my own project develops. The Due I am using to output the data, transmits the 0183 sentences down the serial port, but I guess this is RS232 protocol.

I believe NMEA0183 is TTL or at least different; at the moment my instrumentation will not read what the due is outputting. How do I convert it, invert it, change it?

Thanks

hi there, I know it's a month old question, just in case you haven't figured it out you need an RS232 - > TTL converter, a few on ebay for 1-2euro each. In theory (haven't tried it) the new IDE supports software serial and it should work without h/w will try (maybe later on tonight and can report back)

cheers

V.

I have built and published an Arduino-based marine engine monitoring system at https://bitbucket.org/R_P_Ryan/enginemonitor/wiki/Home.

It reads nine sensors and displays the data on 16 X 2 LCD, with a "next" button to display the next sensor: 1. Raw water in temp 2. Raw water out temp 3. Coolant entering the heat exchanger temp 4. Coolant exiting the heat exchanger temp 5. Cylinder head temp 6. Engine room temp 7. Oil temp 8. Exhaust gas temp 9. RPM

There is demand to publish the data to NMEA 2000 displays.

What is the best way to approach this?

Thanks, Robert

HI ttlappalainen, your work on this project is very much appreciated and impressively done. I have a Mega and a CANbus shield but am having problems with sending data on my n2k network to a Raymarine a98. The arduino code (your tempmonitor) initializes the canbus shield correctly (though I had to change the CSpin to 10), but i get Write Failed messages when it runs. Does the code need to get a response form the n2k network or should it just be writing out the data? My TX and RX LEDs on the CANbus shield remain constantly lit. I am able to see the correct data when using the Actisense reader s/w and uncommenting the appropriate lines of code. I see nothing on the Raymarine MFD. Thanks for any help you can provide.

Timo, Your code is fantastic and all working great as you documented. Thanks for the tremendous effort. I am using a Mega with CANBus shield. I had to connect Pin 53 of mega to pin 9 of Canbus shield to make it work. I am displaying RPM, OIl Pressure, Coolant Temp and Battery V on a Raymarine a98 MFD. I am curious about the SetN2kPGN127489 function as it appears not to make use of the boolean alarm flags. Your N2kMESSAGES.CPP code seems to not assign the enginesStatus1 and 2 messages into PGN messages.

I would have expected to see:

N2kMsg.AddByte(engineStatus1P2); // Discrete Status1 N2kMsg.AddByte(engineStatus1P2); // Discrete Status1 N2kMsg.AddByte(engineStatus2); // Discrete Status 2 N2kMsg.AddByte(0);

right after the building of the engineStatus1x bytes. Is this correct? Thanks, Heatz

Hi,

I'm looking for the NMEA PGN 127245 Rudder field format for SW programming. Can anyone help me, please?

Thanks!

Jan Richard

Hi, is it possible to use this module http://www.14core.com/wiring-the-mcp2515-controller-area-network-can-bus-diagnostics/ with NMEA2000 library?

Do I understand correctly that for use of the library to Maple Minnie I need additional Shield?

Hi, Great work you have done. I have managd to setup an Arduino due with a mcp2562 as described in the documentation from timolappalainen. I’m trying to communicate with a Garmin 721xs but I experience several problems.

It works if I use ActisenseListenerSender and run it with the nmea simulator by timolappalainen from openskipper. I do not receive all info sent. The wind data, tank and RPM does not show on the garmin unit. However fuel rate, engine temp, oil temp works among others. All simulated devices appears in the list of devices on the garmin unit.

So now to the real trouble If I use some of the other exampels as message sender or temp monitor. It shows up in the list and I receive data. Not complete but some of the data works. Then after 30-60 seconds it stops and the unit disappears from the list of devices. If I look on the traffic on the serial bus (usb), I still receive data from the garmin unit and the arduino seams to still send data. So I guess that its been kicked out by the garmin unit of some reason. If I just initiate the Arduino and disable it from sending messages, then its stays in the list on the garmin unit.

I guess that I probably missed something important…. I have been reading through most of the documentation and libraries. I have to say that I’m impressed even if I do not understand even half.

I’m happy for all kind of support to get this to work.

Hello everyone, I am a complete Noob to Arduino and forums in general so I hope I do not insult anyone with my first post. I would like to use the Arduino to receive depth data from my Raymarine NMEA 2000 depth sounder to control a fishing downrigger. The Arduino would adjust the depth of my fishing gear based on the information sent from my depth sounder. I'm okay with the mechanical aspects but have really no idea about the programming end of things. I would appeciate any oppinion on the "do-ability" of this project as well as the level of programming complexity (ie. Likelihood of existing libraries for the programming). I have spent some time searching the forum and the web for similar projects and I think others have done similar things but have not found anyone who has taken depth information from a NMEA 2000 system. Thank you in advance and forgive me if I posted this in the wrong place.

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.