NMEA 2000 Shield

Hi Timo,
I try the library with an arduino mega and works ok with my raymarine a98 mfd, but when I do a scan device on the mfd the arduino didn’t appear ,I try also with raymarine manufacturer code.
I notice with Nmea reader the Product Information is not tx as you can see in attached screenshot,only device information are sent
Maybe the 2 problem are connected?
Any solution?
Thanks

reader.jpg

In principle every MFD should see request product information, when any device informs itself on the bus. I have noticed that all devices does not do that. You could try to send product information in every 2 sec with command NMEA2000.SendProductInformation to see does that make any difference. If it works it may still mean that there is something wrong, but we get a bit more information.

If you have real Actisense NGT-1, that is very strich and request information from all devices.

timolappalainen: In principle every MFD should see request product information, when any device informs itself on the bus. I have noticed that all devices does not do that. You could try to send product information in every 2 sec with command NMEA2000.SendProductInformation to see does that make any difference. If it works it may still mean that there is something wrong, but we get a bit more information.

If you have real Actisense NGT-1, that is very strich and request information from all devices.

Hi Timo, when try to add the command NMEA2000.SendProductInformation; I have an error "Arduino: 1.8.5 (Windows XP), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

NMEA2000.SendProductInformation;

^

exit status 1 statement cannot resolve address of overloaded function

NMEA2000.SendProductInformation();

timolappalainen: NMEA2000.SendProductInformation();

Now is working and MFD display it

Thanks a lot

What PGN's are included in the library? I would like to send the fuel flow through the PGN 127489 (Fuel rate) to a NMEA 2000 network with Garmin MFD's.

Regards

Please check N2kMessages.h function SetN2kPGN127489 or it's alias SetN2kEngineDynamicParam

Has anyone managed to add esp8266 board to create wifi hotspot and upload all nmea2000 data to wifi? This way the data could be read on mobile or tablet with suitable app. Could this be integrated to Timo's library in way or other?

Hi all, has anyone already built a fuel monitor?

I'm looking for suitable flow sensors for Arduino/Teensy 3.2, i need a couple because i have a diesel engine with also the return-to-tank. And i'm not sure about measurement range needed (Yanmar says, at 3200rpm maximum fuel feed pump volume 6,5 litres/min).

I tried, but not finished yet. I bought two FCH-Mini sensors http://www.tedcomp.se/produkter/flodesmatare/flodesmatare-fch-mini/ with 9000 p/l resolution. My engine fuel flow is between 0.25-0.6 l/m. One problem is with low RPM, when fuel flow is very small and due to pulsation pump. Both fuel lines seem to require good pulsation dampers, which I do not have yet. Without dampers fuel sensors seem to calculate back and forward causing false counting.

You can test you ranges simply:

  • just open line between electric pump and engine and let it run fuel e.g. 10 seconds to some cup big enough and measure litres. Be careful, since free flow may be pretty big.
  • open line between tank and return pipe and run engine freely for e.g. 30 sec and measure litres.
  • repeat above for 3000 RPM.

With Teensy you can then measure both frequencies with FreqMeasureMulti GitHub - PaulStoffregen/FreqMeasureMulti: Measures the elapsed time during each cycle of up to 8 input frequencies.. Anyway you will need some low pass filtering for measurements.

How to connect esp32 to NMEA?

  • Download NMEA2000 and NMEA2000_esp32 libraries.
  • Connect e.g. MCP2562 tranceiver TX (pin 1) to Esp32 GPIO 16 and RX (pin 4) to GPIO 4.
  • Try example NMEA2000ToWiFiAsSeaSmart.
  • If you use other pins, you have to add to NMEA2000ToWiFiAsSeaSmart.ino above line #include lines
#define ESP32_CAN_TX_PIN GPIO_NUM_xx
#define ESP32_CAN_RX_PIN GPIO_NUM_yy

timolappalainen: I bought two FCH-Mini sensors http://www.tedcomp.se/produkter/flodesmatare/flodesmatare-fch-mini/ with 9000 p/l resolution.

Hi Timo thank you for help, it looks like a nice sensor.

There is a version with built-in PT100, do you think is useful to compensate for density variations? Temperature before and after the engine can be quite different. And yes, i fear that pulsation dampers are indispensable me too... :-(

timolappalainen: - Connect e.g. MCP2562 tranceiver TX (pin 1) to Esp32 GPIO 16 and RX (pin 4) to GPIO 4.

Thx. Can I use module sach https://ru.aliexpress.com/item/MCP2515-CAN-Bus-TJA1050-SPI-Arduino-V2/32858503783.html?af=208&aff_platform=default&cpt=1555009938551&afref=&cn=42ppt9cipxogprc6d5je2o5p0z2f9xiv&dp=v5_42ppt9cipxogprc6d5je2o5p0z2f9xiv&onelink_item_from=32858503783&onelink_thrd=0.0&onelink_page_from=ITEM_DETAIL&cv=0&onelink_item_to=32858503783&pvid=e372b7fb-d175-448f-b2e9-a3f07e0b3f8b&onelink_duration=0.822145&sk=ccfBY4yg&aff_trace_key=eae1b09afa824914960414239fcae9ba-1555009938551-03155-ccfBY4yg&onelink_status=noneresult&scm=1007.22893.125779.0&terminal_id=ffc9f15ca425414b973194b92768577c&onelink_page_to=ITEM_DETAIL

popeye_70: There is a version with built-in PT100, do you think is useful to compensate for density variations? Temperature before and after the engine can be quite different.

I prefer to do it somehow. I did not notice that version, so I have planned to use 1-wire sensors.

maxik: Can I use module sach https://ru.aliexpress.com/item/MCP2515-CAN-Bus-TJA1050-SPI...

Yes, but then you need to force code to use mcp_can instead of internal can controllor. Also that seem to be with 8MHz clock, so you have to set that too.

And why you would like to use external controller, while there is build in CAN?

timolappalainen: And why you would like to use external controller, while there is build in CAN?

Only becose I have this board now but dont have MCP2562 :-)

I prefer to use internal can and just tranceiver. Anyway there is some instructions on post 694 to force mcp_can and clock.

I found you was use https://ru.aliexpress.com/item/SN65HVD230-CAN-bus-transceiver-communication-module-for-arduino/32693908062.html?af=208&aff_platform=default&cpt=1555258161604&afref=&cn=43ppykvl8luepb2vp9uwk354ui4tgwwr&dp=v5_43ppykvl8luepb2vp9uwk354ui4tgwwr&onelink_item_from=32693908062&onelink_thrd=0.0&onelink_page_from=ITEM_DETAIL&cv=0&onelink_item_to=32693908062&pvid=8dfcafcb-a429-4441-abe1-7d530eefad0e&onelink_duration=1.569596&sk=ccfBY4yg&aff_trace_key=3b2571d572c04e168a620c0fb6589eed-1555258161604-01832-ccfBY4yg&onelink_status=noneresult&scm=1007.22893.125779.0&terminal_id=ffc9f15ca425414b973194b92768577c&onelink_page_to=ITEM_DETAIL

can i use this board instead mcp2562? I found it in my home %-)

It should work.

In picture it has termination resistor on the board. Take care that you have exactly 2 termination resistor on whole N2k bus. Resistors has to be on end of the bus and any drop cable must not exceed 6 m.