Go Down

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

stspanhe

Hi All,
Working on a project, Boat Computer. A Arduino Mega Pro and Nextion Display. I want to be able to send NMEA2000 data via MCP2515.
To try it I have setup the Folowing
AT Mega 2560 with MCP2515 Module (Int 21) with ActisenseListener -> AT Mega 2560 Pro with MCP2515 Module (Int 3). WindMonitor. Se attched picture and programs.

 

It seems like the WindMonitor transmit messages.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CAN device ready
Start address claim for device 0
241 : Pri:6 PGN:60928 Source:23 Dest:255 Len:8 Data:1,0,C0,FF,0,82,AA,C0
495 : Pri:7 PGN:126993 Source:23 Dest:255 Len:8 Data:60,EA,0,FF,FF,FF,FF,FF
1245 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
2246 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
3247 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
¨~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But Nothing is received by ActisenseListener???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CAN device ready


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have read and tried to get the most out of this forum.
All tips for troubleshooting and help are very welcome.
PS Dowloaded and used all "fresh" Librarys from Timo.

The goal of my project will be to send and receive data from my NMEA network, which today only includes a Raymarine Element 7s. :)

THX Henrik

ciccioc74

#901
May 14, 2020, 10:19 am Last Edit: Jun 03, 2020, 02:56 pm by ciccioc74
Hi everyone. Thanks to TIMO for the extraordinary work. I have 2 questions:
 
1) I should add the PGN 0x1FE07 (here the documentationhttp://www.nmea.org/Assets/20130905 amendment at 2000 201309051 watermaker input setting and status pgn 130567.pdf)  (it is well documented by NMEA) and also on the work of kees verruijt (canboat). Do you prefer to do it yourself and make the changes public or do you give me any advice on how to do it?

2) A bidirectional data exchange is provided with this PGN (for example, for the flaps I can check their status but also change the position). It is not clear to me how to put the PGN in the library.


stolid

902 comments, spanning close to 10 years.... can we get a new, updated how-to post with all the common questions and issues addressed? I have a project I'd like to start, but I can't possibly read 901 other messages to make sure I am up to speed on this project. Halp!

My rough project idea: I want to talk to a Simarine PICO system (https://www.simarine.net) and put that data into mqtt/influx/home assistant somehow. I see builds for the arduino so putting the data into mqtt seems very possible, but I'd like to maybe have an ODRIOD-H2 run the code since I know it has the horsepower.

Where to begin.......

timolappalainen

Hi everyone. Thanks to TIMO for the extraordinary work. I have 2 questions:
 
1) I should add the PGN 0x1FE07 (here the documentationhttp://www.nmea.org/Assets/20130905 amendment at 2000 201309051 watermaker input setting and status pgn 130567.pdf)  (it is well documented by NMEA) and also on the work of kees verruijt (canboat). Do you prefer to do it yourself and make the changes public or do you give me any advice on how to do it?

2) A bidirectional data exchange is provided with this PGN (for example, for the flaps I can check their status but also change the position). It is not clear to me how to put the PGN in the library.


It is under development. Please see https://github.com/ttlappalainen/NMEA2000/pull/174

ciccioc74


timolappalainen

902 comments, spanning close to 10 years.... can we get a new, updated how-to post with all the common questions and issues addressed? I have a project I'd like to start, but I can't possibly read 901 other messages to make sure I am up to speed on this project. Halp!

My rough project idea: I want to talk to a Simarine PICO system (https://www.simarine.net) and put that data into mqtt/influx/home assistant somehow. I see builds for the arduino so putting the data into mqtt seems very possible, but I'd like to maybe have an ODRIOD-H2 run the code since I know it has the horsepower.

Where to begin.......
Will you do the work and collect list of common issues? I do not have time.

In support they say: "We do not support NMEA 0183 and 2000 protocols yet. However, a bidirectional module will be available for purchase in Q3 2019." So for now this is wrong topic.

FXVT

Bonjour Timo,

I intend to buy the new TEENSY 4.0.
Do you think it will work as well as a Teensy 3.2 or 3.6  with your library ?

What kind of transceiver I must add to plug it with my N2K network ?
I will prefer a ready-made board instead of something to solder.

Thank you.
FX VAN THUAN

stspanhe

Hi Again, Just a small uppdate.
I never got the Arduino Mega to work with the reading, however i got it to send NK2 data and it was recived by Raymarine Element 7s.
I did try change the Crystal to 16Mhz on MCP2515 and change the settings accordingly. But this without success.
I kind of gave up with the Mega :smiley-confuse:
For info i got MessageSender to ActisenseListener working between Arduino DUE and ESP32.

Hi All,
Working on a project, Boat Computer. A Arduino Mega Pro and Nextion Display. I want to be able to send NMEA2000 data via MCP2515.
To try it I have setup the Folowing
AT Mega 2560 with MCP2515 Module (Int 21) with ActisenseListener -> AT Mega 2560 Pro with MCP2515 Module (Int 3). WindMonitor. Se attched picture and programs.

 

It seems like the WindMonitor transmit messages.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CAN device ready
Start address claim for device 0
241 : Pri:6 PGN:60928 Source:23 Dest:255 Len:8 Data:1,0,C0,FF,0,82,AA,C0
495 : Pri:7 PGN:126993 Source:23 Dest:255 Len:8 Data:60,EA,0,FF,FF,FF,FF,FF
1245 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
2246 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
3247 : Pri:2 PGN:130306 Source:23 Dest:255 Len:8 Data:1,6,4,17,22,2,FF,FF
¨~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But Nothing is received by ActisenseListener???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CAN device ready


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have read and tried to get the most out of this forum.
All tips for troubleshooting and help are very welcome.
PS Dowloaded and used all "fresh" Librarys from Timo.

The goal of my project will be to send and receive data from my NMEA network, which today only includes a Raymarine Element 7s. :)

THX Henrik


stspanhe

Trying to Compile NMEA2000ToWiFiSeaSmart for my ESP32 Devkit V1 with Arduino IDE.
But i will get the error message below. I don't know what to do I guess its my lack of programming skills that makes me confused.  :smiley-confuse:

-----------------------------------------------------------------------------------------------------------

Arduino: 1.8.12 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"

NMEA2000ToWiFiAsSeaSmart:32:17: error: conflicting declaration 'tNMEA2000_esp32 NMEA2000'

 tNMEA2000_esp32 NMEA2000;

                 ^

In file included from \\ST0255\users$\STSPANHE\Privat\Arduino\ESP32 Code\NMEA2000ToWiFiAsSeaSmart\NMEA2000ToWiFiAsSeaSmart.ino:5:0:

\\ST0255\users$\STSPANHE\Privat\Arduino\libraries\NMEA2000-master\src/NMEA2000_CAN.h:121:12: note: previous declaration as 'tNMEA2000& NMEA2000'

 tNMEA2000 &NMEA2000=*(new tNMEA2000_esp32());

            ^

Multiple libraries were found for "WiFi.h"
 Used: C:\Users\stspanhe\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
 Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1

conflicting declaration 'tNMEA2000_esp32 NMEA2000'

------------------------------------------------------------------------------------------------------------------
Anybody knows what what causes the errors?


timolappalainen

Bonjour Timo,

I intend to buy the new TEENSY 4.0.
Do you think it will work as well as a Teensy 3.2 or 3.6  with your library ?

What kind of transceiver I must add to plug it with my N2K network ?
I will prefer a ready-made board instead of something to solder.

Thank you.
FX VAN THUAN

Unfortunately I have not had time to write "driver" for Teensy 4. On the other hand even Teensy 3.2 can handle rather big projects and Teensy 3.6 even much bigger.

For Teensy 3.6 there is "Dual CAN-Bus adapter" and for Teensy 3.2 http://skpang.co.uk/catalog/teensy-canbus-breakout-board-include-teensy-32-p-1507.html. Those have problem that they are not isolated from NMEA2000 bus.

What kind of interface you are looking for. I know company, who has different kind of proper boards.

timolappalainen

NMEA2000ToWiFiAsSeaSmart:32:17: error: conflicting declaration 'tNMEA2000_esp32 NMEA2000'

 tNMEA2000_esp32 NMEA2000;
Something does not match. If you look code on https://github.com/ttlappalainen/NMEA2000/blob/master/Examples/ESP32/NMEA2000ToWiFiAsSeaSmart/NMEA2000ToWiFiAsSeaSmart.ino there is not that definition on line 17.

You are conflicting since you use #include <NMEA2000_CAN.h> and then you redefine  tNMEA2000_esp32 NMEA2000; You should either use common #include <NMEA2000_CAN.h> or forced method
#include <NMEA2000_esp32.h>       // https://github.com/ttlappalainen/NMEA2000_esp32
...
tNMEA2000 &NMEA2000=*(new tNMEA2000_esp32(GPIO_NUM_32,GPIO_NUM_34));

Also you get warning about wifi library, since you have it loaded on your libraries and on ESP32 framework. This is drawback of simple Arduino environment that you can not have project depended libraries.

FXVT

Unfortunately I have not had time to write "driver" for Teensy 4. On the other hand even Teensy 3.2 can handle rather big projects and Teensy 3.6 even much bigger.

For Teensy 3.6 there is "Dual CAN-Bus adapter" and for Teensy 3.2 http://skpang.co.uk/catalog/teensy-canbus-breakout-board-include-teensy-32-p-1507.html. Those have problem that they are not isolated from NMEA2000 bus.

What kind of interface you are looking for. I know company, who has different kind of proper boards.
Bonjour Timo,

Thank you for your prompt reply.
Actually I am tented to buy a Teensy 4.0 because of his power and above all because of the price. It is cheaper than a 3.6 and a 3.2 and much much more powerfull.
Today I have 2 arduino Uno devices (Ok..I know... ;-)  )with your library.
The first one interfaces a BMV700 Victron Battery Monitor to the N2K network and the other catches the engine temperature , RPM and the fridge temperature and send them to the network as well.
and I'd like to merge the 2 sketches in one in order to have less connexions.
These 2 sketches are "time sensible" and I gess it will work better with a more powerfull microcontroller.
May be a Teensy 3.2 will be enough but for the same price, or even cheaper, I can get the new 4.0

Merci.
FX VAN THUAN

stspanhe

Thanks Timo,
I did chose the  "#include <NMEA2000_CAN.h>"  that sorted things out.
It seems both sending and receiving is working fine with DUE and ESP32.
But for Arduino Mega i can only send messages and unfortunately not receive. :(

You are conflicting since you use #include <NMEA2000_CAN.h> and then you redefine  tNMEA2000_esp32 NMEA2000; You should either use common #include <NMEA2000_CAN.h> or forced method
#include <NMEA2000_esp32.h>       // https://github.com/ttlappalainen/NMEA2000_esp32

timolappalainen

Teensy 4 is indeed interesting, but as I said the driver is not yet ready and I can not give schedule. I have Teensy 4 waiting time for it.

I used Teensy 3.2 for reading NMEA0183, translating it to NMEA2000, reading some inputs and sending them to NMEA2000, converting NMEA2000 to USB as NMEA0183 etc. Also controlling touch display. Lot of things. Then moved to 3.6 due to SD card. I think power will not be the problem in your case.

Heikkif

Couple of questions:

How does one detect if certain message is being sent at bus and it is fresh?

What is the type of heading reference at N2kHeading for arduino? I see that one can send true heading but for receiving more variables are needed like variation, deviation and reference.

Go Up