{"id":145,"date":"2019-11-20T11:35:44","date_gmt":"2019-11-20T11:35:44","guid":{"rendered":"https:\/\/open-boat-projects.org\/?page_id=145"},"modified":"2022-01-07T10:04:46","modified_gmt":"2022-01-07T10:04:46","slug":"nmea2000-and-esp32","status":"publish","type":"page","link":"https:\/\/open-boat-projects.org\/en\/nmea2000-and-esp32\/","title":{"rendered":"NMEA2000 and ESP32"},"content":{"rendered":"<p><a href=\"https:\/\/open-boat-projects.org\/en\/wichtige-hinweise\/\" target=\"_blank\" rel=\"noopener\"><em><strong>First of all, a few important notes that you should definitely pay attention to.<\/strong><\/em><\/a><\/p>\n<p>NMEA2000 is increasingly replacing NMEA0183 as the standard. Unfortunately, NMEA2000 is a very complex protocol and for a long time it was hardly possible to realize your own projects. That has changed with the NMEA2000 library by Timo Lappalainen (<a href=\"https:\/\/github.com\/ttlappalainen\/NMEA2000\">https:\/\/github.com\/ttlappalainen\/NMEA2000<\/a>).<\/p>\n<p>The library supports different microcontrollers, including the ESP32. The ESP32 from Espressiv is very powerful and, thanks to WLAN and CAN bus interface, ideal for your own projects.<\/p>\n<p>The projects described here use the NMEA2000 library and the ESP32 (<a href=\"https:\/\/www.amazon.de\/AZDelivery-NodeMCU-Development-Nachfolgermodell-ESP8266\/dp\/B071P98VTG\">ESP32 NODE MCU)<\/a>. Programming is very easy in the Arduino development environment.<\/p>\n<p>The projects are documented in detail on GitHub (including hardware and software): <a href=\"https:\/\/github.com\/AK-Homberger\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/AK-Homberger<\/a>.<\/p>\n<p>The following projects have been implemented so far and can easily be copied or modified \/ expanded:<\/p>\n<ul>\n<li>NMEA2000 to NMEA0183 WiFi Gateway<\/li>\n<li>NMEA2000 M5Stack Data Display<\/li>\n<li>NMEA2000 Data Transmitter<\/li>\n<li>NMEA2000 Data Recorder<\/li>\n<\/ul>\n<p>The essential components for the trade fair were put together on a demo board. This allows the interaction of the components to be clearly illustrated:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-545\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L.jpg\" alt=\"\" width=\"2353\" height=\"1699\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L.jpg 2353w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L-300x217.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L-1024x739.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L-768x555.jpg 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L-1536x1109.jpg 1536w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/NMEA2000ES32-L-2048x1479.jpg 2048w\" sizes=\"auto, (max-width: 2353px) 100vw, 2353px\" \/><\/p>\n<p>The Seatalk autopilot remote control is also included on the demo board, but is explained on a separate page (<a href=\"https:\/\/open-boat-projects.org\/en\/diy-fernbedienung-fur-autopilot-raymarine\/\">https:\/\/open-boat-projects.org\/diy-fernbedienung-fur-autopilot-raymarine\/<\/a>).<\/p>\n<p>The simulator board is only for the trade fair and is used for demonstration purposes. It receives simulated data from a PC via USB-serial, converts them into NMEA2000 PGNs and sends them to the CAN bus. The simulator was built with the <a href=\"https:\/\/github.com\/ttlappalainen\/NMEA2000\/tree\/master\/Examples\/ActisenseListenerSender\">ActisenseListenerSender <\/a>realized by Timo Lappalainen. The WiFi gateway receives the NMEA2000 data from the CAN bus and thus supplies other exhibits on the exhibition stand with simulated data.<\/p>\n<p><strong>NMEA2000 to NMEA0183 WiFi Gateway<\/strong><\/p>\n<ul>\n<li>The <a href=\"https:\/\/github.com\/AK-Homberger\/NMEA2000WifiGateway-with-ESP32\">WiFi gateway<\/a> receives the data from the NMEA2000 CAN bus and converts it to NMEA0183.<\/li>\n<li>The NMEA0183 data are provided via WLAN (NMEA0183 via TCP, port 2222).<\/li>\n<li>The data can be displayed \/ used by many components. For example: OpenCPN, AVnav, tablet with NMEA software, ...).<\/li>\n<li>The gateway also delivers the data in JSON format. The data can then be viewed wirelessly with the M5Stack data display.<\/li>\n<li>The project on GitHub also contains a NMEA0183 multiplexer (serial input for AIS data) and voltage \/ temperature monitoring. However, these functions are optional.<\/li>\n<\/ul>\n<p>WiFi gateway prototype:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-621\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/WiFi-Gateway-Prototype-1-1024x768.jpg\" alt=\"\" width=\"713\" height=\"534\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/WiFi-Gateway-Prototype-1-1024x768.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/WiFi-Gateway-Prototype-1-300x225.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/WiFi-Gateway-Prototype-1-768x576.jpg 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/WiFi-Gateway-Prototype-1.jpg 1280w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/p>\n<p>M5Stack and AVnav on 7 &quot;car radio with data from the WiFi gateway:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-627\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/IMG_1169.jpg\" alt=\"\" width=\"715\" height=\"536\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/IMG_1169.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/IMG_1169-300x225.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/IMG_1169-768x576.jpg 768w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>NMEA2000 M5Stack Data Display<\/strong><\/p>\n<ul>\n<li>The <a href=\"https:\/\/m5stack.com\/\">M5Stack<\/a> is a finished product with an ESP32 and housing. The integrated display, the built-in rechargeable battery and the buttons make it particularly suitable for displaying NMEA data.<\/li>\n<li>The version of the <a href=\"https:\/\/github.com\/AK-Homberger\/M5Stack-Wifi-NMEA-Display-JSON\">Data displays<\/a> (top left) receives the data wirelessly from the WiFi gateway in JSON format.<\/li>\n<li>The data types can easily be expanded. So far, the following data is displayed: LAT \/ LON, COG, SOG, heading, STW, rudder angle, water depth, triplog, sumlog and the data from the NMEA2000 data transmitter: temperature, diesel tank and engine speed.<\/li>\n<li>On <a href=\"https:\/\/github.com\/AK-Homberger\/M5Stack-NMEA-2000-Display-CAN-BUS\">GitHub<\/a> A version of the display is also available that reads and displays the data directly from the NMEA2000 bus. Optionally, the M5Stack module also functions as a WiFi gateway. This means that an NMEA2000 to NMEA0183 WLAN gateway can be implemented without soldering.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-622\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/M5Stack-Display-CAN-Bus-1024x768.jpg\" alt=\"\" width=\"719\" height=\"539\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/M5Stack-Display-CAN-Bus-1024x768.jpg 1024w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/M5Stack-Display-CAN-Bus-300x225.jpg 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/M5Stack-Display-CAN-Bus-768x576.jpg 768w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/M5Stack-Display-CAN-Bus.jpg 1280w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p><strong><br \/>\nNMEA2000 Data Transmitter<\/strong><\/p>\n<ul>\n<li>The <a href=\"https:\/\/github.com\/AK-Homberger\/NMEA2000-Data-Sender\">NMEA2000 Data Transmitter<\/a> measures different values in the boat (here temperature, tank level, engine speed) and sends them as NMEA2000 data.<\/li>\n<li>This NMEA2000 data can be received and displayed by almost all modern multifunctional displays.<\/li>\n<li>The temperature is measured by a DS18B20 sensor (can be easily expanded with additional sensors).<\/li>\n<li>The circuit on GitHub is designed for a TGT 200 tank sensor from Philippi (resistance 5-180 Ohm).<\/li>\n<li>The engine speed is measured on the alternator (terminal W).<\/li>\n<li>The circuit and the program can easily be expanded for further measurement data.<\/li>\n<li>For the demo board, the tank level and the engine speed are simulated using potentiometers.<\/li>\n<\/ul>\n<p><strong><br \/>\nNMEA2000 Data Recorder<\/strong><\/p>\n<ul>\n<li>The <a href=\"https:\/\/github.com\/AK-Homberger\/NMEA2000-VoyageDataRecorder\">NMEA2000 Data Recorder<\/a> reads all data from the NMEA2000 bus and saves it on an SD card.<\/li>\n<li>The data can be saved in different formats: NMEA0183, Seasmart, Actisense).<\/li>\n<li>In addition to the ESP32 (here Node MCU), only an SD card and a CAN bus transceiver are required.<\/li>\n<li>An M5Stack module can also be used as an option. This already contains an SD card reader.<\/li>\n<li>The data recorder is not included on the demo board.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-546\" src=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/ESP32-SD.png\" alt=\"\" width=\"584\" height=\"524\" srcset=\"https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/ESP32-SD.png 891w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/ESP32-SD-300x269.png 300w, https:\/\/open-boat-projects.org\/wp-content\/uploads\/2019\/12\/ESP32-SD-768x689.png 768w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>First, a few important tips that you should definitely observe. NMEA2000 is increasingly replacing NMEA0183 as the standard. Unfortunately, NMEA2000 is a fairly complex protocol and for a long time it was hardly possible to implement your own projects. This has changed with Timo Lappalainen&#039;s NMEA2000 Library (https:\/\/github.com\/ttlappalainen\/NMEA2000). The library supports different microcontrollers, including the ESP32. The ESP32... <a href=\"https:\/\/open-boat-projects.org\/en\/nmea2000-and-esp32\/\" class=\"more-link\">Read more <span class=\"screen-reader-text\">NMEA2000 and ESP32<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[40,39,37],"tags":[],"class_list":["post-145","page","type-page","status-publish","hentry","category-openhardware","category-opensource","category-projects"],"_links":{"self":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/comments?post=145"}],"version-history":[{"count":53,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/145\/revisions"}],"predecessor-version":[{"id":2479,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/pages\/145\/revisions\/2479"}],"wp:attachment":[{"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/open-boat-projects.org\/en\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}