Go Down

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

Rfritz

Look at these from digikey:

APC1760-ND $4.24

waterproof O-ring and mounting nut included.

Adrculda

Look at these from digikey:

APC1760-ND $4.24

waterproof O-ring and mounting nut included.
Thank you :)

nilsal

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?

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 https://github.com/peppeve/CAN_BUS_Shield and install it.

jukkap

Hi Timo,

Here is some deteails what I forgot mention.

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.

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.

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.

timolappalainen

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.

jukkap

Ok.

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

nilsal

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.
Thanks, change of library did the trick!

timolappalainen

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 https://github.com/thomasonw/avr_can". 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.

timolappalainen

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.

gibas

Hi,

I'm new to these foruns. First of all thanks to everyone for sharing the information. I'm trying to send data from Arduino battery monitor example sketch to my N2k bus consisting of Garmin 720, 2 GMI10, one VHF 300i and 1 Airmar Intelliducer. I have one MCP2515 controller with TJA1050 transceiver working at 8 Mhz. From what I've realized the library is set for 16 Mhz as default. How can I change it to 8Mhz?

Thanks for your answers,

Gibas

timolappalainen

Hi,

You should edit beginning of you BatteryMonitor sample with #define USE_MCP_CAN_CLOCK_SET 8:
...
#include <Arduino.h>
//#define N2k_CAN_INT_PIN 21
#define USE_MCP_CAN_CLOCK_SET 8
#include <NMEA2000_CAN.h>       // This will automatically choose right CAN library and create suitable NMEA2000 object
#include <N2kMessages.h>
...

gibas

Hi,

As described in the begining of NMEA200_Can.h file.... I don't know how I've missed it. Thanks for your fast reply.

Regards,

Pedro

Tlam

Hi!


I have trouble with 127506 PGN DC Detailed status.

I write any value of field 3 and display - "0%" !!!


timolappalainen

Hi,

Which display you use? Do you have right type for value?

There is example MessageSender, which also sends that message as sample. I just tested that with NMEA Reader and it shows values as they have been set on sample code. One can test MessageSender code with single board by setting NMEA2000.EnableForward(true); on setup and then opening NMEA Reader to board port. You can test your code in this way too.

Go Up