Go Down

Topic: NMEA 2000 Shield (Read 350406 times) previous topic - next topic


yes agree with all your points.

Im learning more about instances at present ... the reader and simulator are brilliant ... for
working out the details that the mfrs "leave out" ....
I just put up every data item i can on screens - and then use your simulator to work out
what shows what ...
one of the confusing things ive discovered, (at least in raymarine world) is that
instance "0" is typically shown as "xxxx 1"
eg battery voltage sent as instance 0 is shown as "Battery Voltage 1"
and instance 1 shows up as "battery voltage 2" ... and so on.
likewise engine instance 0 (port engine) displays as  "alternator voltage 1" .

Im now imersing myself in understanding how your library works !
My plan is to inject onto NMEA a bunch of PGNs that are displayable on MFD,
but for which i dont have NMEA capable sensors (eg fuel tank, water tank, black tank, engine room temp, humidity and baro, domestic battery, generator battery, )
..let the fun begin!


My plan is to inject onto NMEA a bunch of PGNs that are displayable on MFD,
but for which i dont have NMEA capable sensors (eg fuel tank, water tank, black tank, engine room temp, humidity and baro, domestic battery, generator battery, )
..let the fun begin!
Interesting, but how would you display these values, does you MFD or chartplotter allow you to customize it to display all these fields?


E.g. Garmin GMI 20 has definable pages for 4 values on each page. B&G vulcan has also configurable data values. So yes, MFDs should have them othervice they are not MFD - just SFD (Some Function Display).


E.g. Garmin GMI 20 has definable pages for 4 values on each page. B&G vulcan has also configurable data values. So yes, MFDs should have them othervice they are not MFD - just SFD (Some Function Display).
That I understand, but humidity and engine room temp, are those actual values existing in the n2k protocol?


nmea protocol has a few PGNs relevant for "temperatures"
PGN 130310 environmental
PGN 130311 environmental
(cant remember which of above has "air temp" , "humidity" its assumed this is outside humidity,
these are the PGNs typically used by a weather station/wind instrument)
PGN130312 extended temperature
PGN 130316 extended temperature
across above, they support a number of different temperature types ("cabin", "engine room", "refrigerator"
"freezer", various "tanks", "air duct", "under bolts" ... and so on)

as timo says, it then becomes dependant on the display used (MFD, dedicated data display etc)
as to what PGNs it will support, and how it displays them (& any level of customisation ... eg renaming the way its displayed)

In my case Im interested in "engine" room data ..I dont have a weather station/wind sensor
so i will be using "humidity" to actually display the engine room humidity, and likewise "air temp"
for engine room temp - as my MFD (raymarine) doesnt support PGN instance for  "engine room temp"
(later on .. I might build a small dedicated display and use timos arduino libraries to display a bunch PGNs that are not supported by my MFD)
from what i can see - nmea protocol only supports one humidity instance.  but it certainly
supports multiple temp instances.


google the following
nmea technical bulletin PGN130316 feb 2015

.. it lists all the various source codes that corelate to the different temp types


If you are going to use my library, you will find possible values also in N2kMessages.h in tN2kTempSource enum definition.

Note also that 130316 is rather new PGN and old MFDs does not support it. You may need to use obsolete 130312 for temperature.


thx and noted,
a further check on my (very new) raymarine axiom - with the very latest lighthouse sw,
shows that it doesnt support either!! 130312 or 130316 (well at least according to the manual - which
ive already found one other PGN omission ... )
so at present i will likely have to fudge "engine room temp" to "air temp" PGN instance/source.
.. and hope that raymarine will add the additional PGNs over time .. ...
... its really making me think twice about a dedicated display (your library with a teensy and an OLED display) of the various PGNs that
are not supported! (eg exhaust gas temps , engine room temps, ...) .. anothet "to do list project"


It is very strange MFD, if it does not support 130312. And if it is new, it should read 130316, since 130312 and 130311 are obsolete. But maybe this is Raymarine logic.

How about 130311?

What do you mean with "air temp" PGN instance/source? PGN 130310, which is also obsolete.

Have you checked KBox: https://hackaday.io/project/11055-kbox


the (very latest - last month) Raymarine Lighthouse 3 sw lists support for only
PGN 130310 & 13011 ... 312, 316 not listed  .. and yes agree it should support the new ones .. but doesnt appear to ... Im trying to get some clarity from them .
seems they are struggling with the feature set in the new LH3 (android? based OS)

To fudge a engine room temp - i was going to encode this as "air temp" (because i dont have a
environmental sensor  on. my network)
... and hope that raymarine add support for 130316 in the future....

I looked at k-box - however my boat has multiple 24V battery banks ... and its analog inputs
are shown as "up to 23V ... way to low for a nominal 24V bank)
I also already have 2 NMEA0183 convertors on my 2k network,
likewise i have a autopilot with its own heading rate sensor.
..so im struggling with the value that k-box adds for me ?
 I do like the inertial unit for pitch/roll, and barometer. 
I dont see temp/humidity listed? which im also interested in.
so i will have another look at it ... perhaps its expandable ..


hi timo.
not sure where to put this question, its partly related to the arduino & nmea2k library,
but if I should put it elsewhere or start a new thread pls advise.

I want to capture a "log" from nmea2k data to be able to post process and then display
a selection of data  to be able to plot fuel economy vs a range or parameters that
typically impact consumption. (eg  eng RPM, eng load %, eng fuel rate, pitch and roll, true wind speed and direction,
fuel tank level, water tank level..)

using teensy listener/sender  - with actisense reader and EBL reader I can display n2k data,
and capture logs in "√čBL format"
but i need to get data into excel or similar to be able to do some post process computations and
then graph data. EBL reader doesnt have any options to save out to excel or other formats?

Ive had a look at "openskipper" - which i note can ingest the data from actisense listener
in real time..
however im struggling with understanding how/if it could achieve what im trying to do?

 is there a simpler way to get decoded nmea2k data from activelistener into "logged" excel format?
(i prefer excel because i need to write some formulas for computing average fuel rate, economy,
and then do some graphing) ... and I understand excel (but not xml . cs etc)


I have same problem. I have logged everything for 2-3 years with OpenSkipper. In main window with right click you can start Track. Unfortunately this log format is OpenSkipper specific - timestamp+N2k and I have not yet wrote a parser for that. I am going do, but when? I use OpenSkipper for logging, since I have it anyway open for providing data as web server.

One option would be to make own logger.  Take a look in to the example DataDisplay2. You could clone that and format output to .csv and then just log terminal data. If you need quick temporary solution, this could be the fastest one.

Currently thread is OK, since it partially belongs to shield.



I need to convert the RPM signal from gasoline to diesel.
The story:
I had last year a V8 gasoline engine in my boat but this year I have dropped that engine out and have put a 6 cylinder diesel engine.

Also, I bought a completely new set of instruments last year but for gasoline engines. (RPM)
I can choose on the RPM meter from 4 to 12 cylinder. With the V8 I had 8 pulses per RPM.
With the diesel engine, the puls is coming from the flywheel and give 1 puls per RPM like I know.
So now my plan is to convert the 1 puls up to 4 pulses per RPM so I get shown the correct RPM on the gasoline RPM meter.

Since Teensy or Arduino just can handle 3 V / 5 V max it have to go through a transistor as well I guess.

The same Teensy shell deliver the RPM sentence to the MFD as well I thought (EngineSpeed Rapid).

Can somebody help here with a code example for the pulse conversion?

Thank you!


I am not sure did I understood your problem. If you just want to measure some input frequency (RPM) check https://www.pjrc.com/teensy/td_libs_FreqCount.html


Aug 13, 2018, 03:30 pm Last Edit: Aug 13, 2018, 06:25 pm by autopilotNOR
Hi Timo,

I have a question regarding SetN2kEngineDynamicParam. I am building a device to read the FuelRate based on impulses per ml by fuel flow.

If I want to send the result now do I have to send now the hole SetN2kEngineDynamicParam block or can I just update the FuelRate?

How does the code line looks like to just send the FuelRate then?

The other values are coming from a different device (or shell come from a different device in the future).

Another question:

I want to use some code to calculate the flow rate which uses an external interrupt. Will this affect the library for example during sending the messages? I could imagine that this affects the rapi data for example..


Go Up