NMEA 2000 Shield

timolappalainen: As I have many times mentioned on this list I prefer at least Teensy 3.2. It draws only 90 mA current.

But before goint to hw, it is best to have some kind of idea about the goal. Either you did not mention what your IMU sends.

Haven't bought any components yet, I was hoping for good recommendations before I go out and spend money.

Yes, but I can not give any recommendations, if you do not define any goal. And what about IMU - do you have any? Do you have or have you planned to buy some MFD? What sensors you would like to have? Did you thought to use PC, phone tablet? Etc.

I was thinking of using the SparkFun 9DoF Razor IMU, can it be combined with your Teeny 3.2 setup in order to inject heading data to NMEA2000 network?

I would probably use my PC for starters to set everything up and monitor for correct operation, thereafter it should be externally powered and run as a standalone system as to have a stable heading on my Lowrance Elite 7Ti unit.

One company has started to make Teensy based sensor boards for NMEA2000. They contacted me due to my library and send me some sample boards. There is one nice ready IMU board. I can ask are they ready to sell.

On the other hand I have tested different IMU:s and none of then can not beat my GPS compass, which gives reliable 1 deg heading in any condition and boat tilt. You can get reasonable GPS compass in about 1000 € or spent 50-100 hours with IMU:s.

timolappalainen: One company has started to make Teensy based sensor boards for NMEA2000. They contacted me due to my library and send me some sample boards. There is one nice ready IMU board. I can ask are they ready to sell.

I'd be interested thanks

timolappalainen: You can get reasonable GPS compass in about 1000 € or spent 50-100 hours with IMU:s.

Lowrance Point 1 GPS/Heading antenna €280, but that defeats the object of accomplishing the task myself as a project.

Thanks for your input.

Hi Johannes and Timo,

A bit offtopic maybe. I have been building compass also. It works but accuracy is not within 1 deg more like 3 degs. Self made compass might be feasible to control tiller pilot as gyro and heel data is also available from IMU. I am using DUE for this as it was the first thing I bought for another purpose. Sparkfun has currently 3 products for this purpose. There are other sources also. For MPU 9250 there is no library from Sparkfun that would run on DUE. Haven't found elsewhere either. I am using LSM9DS1 which I can read to DUE. Otherwise ok but magnetometer needs temperature compensation and that I had to program on Arduino. I haven't found out how sensors own temperature compensation works. The sensor has temperature output but it looks like the resolution is a bit coarse compared to the slope of compensation needed. That limits the accuracy. LSM9DS1 means lot of calibration and each sensor needs its own calibration so if one needs to replace the sensor the calibration has to be done again. Third one on Sparkfun would be that razor Johannes mentioned. It uses MPU 9250. It is not clear to me if the libraries can be loaded to for example teensy as well. If so then why not to use MPU 9250 and some board that is easily CAN-compatible. MPU 9250 should have factory calibration data stored in it. I do not know if the sketches can use it. People mention good calibration is needed with MPU 9250 also. Some links worth checking:

http://sailboatinstruments.blogspot.fi/2014/08/a-low-cost-marine-compass-part-3.html http://sailboatinstruments.blogspot.fi/2016/04/building-your-own-nmea-2000-device.html (this made me buy DUE when I found out Garmin GNX 20 does not have shallow water alarm) http://www.pypilot.org/ https://github.com/seandepagnier/RTIMULib2 https://github.com/kriswiner/MPU9250 https://create.arduino.cc/projecthub/mitov/arduino-accelerometer-gyroscope-compass-mpu9250-i2c-sensor-79f5bf

Thanks Heikkif, I'll look at your links and see what I can find useful.

I see the Genuino 101 has onboard IMU, wonder if this is worth looking at and if it would be compatible with the Tweeny 3.2 setup to get IMU data onto the Can Bus network?

"I see the Genuino 101 has onboard IMU" It has gyro and accel but for compass magnetometer is also needed.

Heikkif: "I see the Genuino 101 has onboard IMU" It has gyro and accel but for compass magnetometer is also needed.

Aahaa, thanks mate


I want to try to use a DUE to translate all the analog engine data from my V8 to be shown on my Raymarine Axoim through NMEA2000.

To do so I wanted to play a bit with the DUE and the multidevice example file. I get this error while compiling it:

"In file included from /home/thomas/Arduino/libraries/NMEA2000_due-master/NMEA2000_due.cpp:28:0: /home/thomas/Arduino/libraries/due_can-master/src/due_can.h:23:24: fatal error: can_common.h: No such file or directory

include "

I added all the libraries from github which where asked for, also the due_can but without luck.

First I tried it under Windows but there I got a lot of error due to the path to the libraries as there where wirtten / instead of \ in the pathes (if this was the reason for).

So can you help to find why it wants the can_common.h even if it not existing in the due_can libraries or what I am doing wrong?

I just choosed the example "MultiDevice" and added the NMEA200_DUE librarie due to I want to use the Due.


I have not yet updated the docs. Collin has made some changes and it does not compile anymore and I have not had time to check those. Please remote you current due_can completely and install the one under my repositories: https://github.com/ttlappalainen/due_can

In c/c++ language one should use only /, since then code in compatible with Linux and Mac. Translator will take care of right way of pointing directories.

Also I do not any use for you to start with MultiDevice example. I prefere to use some simpler example like TemperatureMonitor.

Hi again Timo,

I soldered another MCP2562 with connections for DUE. Is it ok to post it to Kave Oy with your name?

Please send me personal message, so I'll give you address.

Hi Timo.

I'm quite new with Arduino but your work seems to be huge and amazing.

I would like to use the NEMA 2000 library to make a remote control for an Raymarine EV100 Autopilot. This new generation of autopilots talks with seatalkNG which is, I think NMEA2000. I want to use a 433Mghz remote.

Have you ever try this ? Do you think it could be doable ?

In advance, thanks

Yes it is doable. I have the same problem. But there is big challence, since all autopilot control commands are proprietary. This means that there is no documentations about them. So this requires bus traffic spying and some knowledge of the NMEA2000 protocol, since you have to read messages bit by bit to find out how autopilor will be controlled.

I have older model SPX-10 and I would imagine they use same protocol. Last summer I did some spying and I think I found a way to send course command to pilot and the way how to turn pilot on/off. Anyway I have not tried that yet.

So now it depends very much about you total skills can you do it or not.

Thank you for your answer.

My skills in C/C++ are almost at zero :( . I will try to investigate all of this and I will at first try to do an NMEA0183 -> NMEA2000 converter to train... I'll tell you if I go further.

But have you used other languages? C/C++ is not the easiest to start.

In my repository there is also NMEA0183 library, which I have used for my NMEA0183 -> NMEA2000 converter. There is also ready example.

Hello Timo,

I made to proto types of can adapters now. One for the 2560 and the other for the DUE.

So now my plan is to get the DUE to send GPS data from a Blox NEO-6m (NMEA2K based GPS) on the NMEA2K bus. I have a MFD from Raymarine (Axiom 9") which shell show all analog data from the engine and use the new build external GPS reciever.

I think the best is to start to simulate the engine temp as first try and get it shown on the MFD.

My problem is that I am a bit confused about what hae to be used (libray) where and how. I found the NMEA2K sender example. I guess this is the one to use with the CAN shield to send the messages on the bus. BUT do I have to use a seperate Arduino to convert the analg signal to nmea2k message which than will be send through the DUE which is running the sender library?

I have read a lot of sites from this post but this made it more worth?! :astonished:

So like I wrote the plan is to grap all analog data signals from the engine and drop it to the MFD through nmea2k.

Lets say I have engine coolant temp, rpm, oil pressure, battary voltage/charge, gasoline/hr, tank level, rudder position and air temp in the engine room.

How would you organize this and what is to be used where? I meen for example 2560 for coolant temp behind the DUE which is running the sender?

Would be great if you could help me to understand the general setup!

Thank you and happy holidays to all!


I rather prefer to take TemperatureMonitor as first example to make something work. You can run it either with Mega (2560) or DUE. It will compile on both without problems. Others have had problems with DUE to send data to bus for some reason, which is not yet clear for me. In any case load mcp_can and due_can libraries from my GitHub repository, since e.g. newest due_can on Collin repository does not work with NMEA 2000.

So in principle all your data "engine coolant temp, rpm, oil pressure, battery voltage/charge, gasoline/hr, tank level, rudder position and air temp in the engine room" can be collected with one board and send to bus. Practically this is not the point of NMEA 2000 bus. Instead you should have board there, where is you information to simplify cabling. So e.g. "engine coolant temp, rpm, oil pressure, air temp in the engine room" to one board near engine. Others could be on other board or what would be easiest if you think it on cabling view. E.g. I have NMEA 2000 cable going through the whole boat and in front I have depth/log device and on the other end there is autopilot. Other devices are between those. This is the idea of single bus system.

So you do not need to put 2560 behind DUE. Just simply read e.g. coolant temp on 2560 and send it to bus, if you have CAN BUS shield for 2560.

Anyway start with TemperatureMonitor and when you have that visible on MFD, continue developing. You can then find examples of other messages on example MessageSender.

Hey Timo,

thanks for your answer!

So since I would like to have an all in one solution later I think I start with the Due. For that I have build the "shield"m with the MCP2562 based on the pdf from the nmea library for the due.

When I try to compile the watertemp example with added nmea2000_due.h I get the error to use the mcp_can from collin. If I understood it right, I now edited the NMEA200_due.cpp and changed out the mcp_can from collin to the one from from your repository right (NMEA2000_mcp)?

If I do so I get a couple of error message reffering to the nmea2000_due complaining about can0 is not declared and so on. Aren' t all those part of the due_can library from collin? He is also writing the can_common is neccessary to use that library.

I tried at last now to load this libraries with the tempmonitor: