First of all, a few important notes that you should definitely pay attention to.
Fig.: Garmin GPSmap 420 (Garmin)
Depending on the model, older Garmin devices from the GPSmap series do not have an interface for NMEA2000 to enable data exchange with other devices. The interface signals for devices of the GPSmap 400/500 series are shown in the following figure as an example.
Fig.: Connection cable GPSmap 400/500 series (Garmin)
The CANet However, the interface does not correspond to the NMEA2000 standard, so that the signals from devices from other manufacturers cannot be processed. Although CANet is also based on CAN, it uses other protocols that are not compatible with NMEA2000. Garmin now only uses NMEA2000. However, this is not always the case with many older devices. In this list you can check which older devices are already using NMEA2000 and which are based on CANet.
If you have a device with a CANet interface and want to use this device on the NMEA2000 bus, you need a gateway to translate the signals between NMEA0183 and NMEA2000. Such a NMEA2000 gateway was developed by Andreas and is based on a M5Stack Atom CAN Bus Kit with an RS485 bus module. We cannot use this gateway directly on the Garmin device because the Garmin's NMEA0183 interface is not compatible with RS422 or RS485. Unfortunately, a proprietary format is used. The interfaces are based on 5V TTL signals, which are also inverted. The interface has the following technical specification:
- Communication type: Serial, 8N1, RS232-like
- Signal level: 5V TTL, inverted
- Unipolar data transmission
- Reference potential: GND
- Duplex mode (send and receive at the same time)
- Speed: 4800 bds NMEA standard (above NMEA high speed switchable to 38400Bd if AIS signals are to be processed)
This results in the need to invert the signals. This can be done with a simple logic module 74HC04. This chip has 6 inverters, of which we need two. One for the RX signal (receive) and one for the TX signal (send).
Fig.: Logic chip 74HC04
Table of contents
M5Stack Atomic DIY Proto Kit
To be able to use the NMEA2000 gateway firmware, we use a M5Stack Atomic DIY Proto Kit. The DIY Proto Kit consists of a housing and a breadboard on which you can place your own circuit. On the poto kit a M5Stack Atom Light be set up with an ESP32.
Fig.: Proto Kit (M5Stack)
Fig.: M5Stack Atom Light (M5Stack)
circuit
The idea behind the circuit is that the TTL signals from the RS232 interface (RX, TX) are used and inverted by the Atom Light via the pin header. The inverted signals are connected to the Garmin device via screw contacts. The NMEA2000 bus is connected via a CAN bus unit with a connection cable to the Atom Light.
The circuit in the following picture is not entirely to scale and serves as a rough guide. An SMD IC must be used as the IC so that the IC does not protrude too high in the housing and the Atom Light can still be plugged in. The connections on the breadboard are realized with lacquer-insulated threading wire. This is not necessarily recommended for beginners and more experienced people. If there is interest, we may also create a small matching circuit board. Sign up via this Contact form.
Fig.: Wiring on the PCB of the Proto Kit
In the end, the finished structure should look like the image below. The connections to the CAN bus and the Garmin device are labeled in the picture.
Fig.: Proto Kit with Atom Light and CAN unit
Programming the Atom Light
The Atom Light now needs to be programmed with the NMEA2000 gateway firmware. For this you invite yourself current firmware from GitHub and follow the Flash Instructions in this description.
After the firmware is flashed and functional, connect to the WiFi network ESP32NMEA2K and the password esp32nmea2k. Then use the address in a web browser ESP32NMEA2k.local or the IP address 192.168.15.1. You will then land on the NMEA2000 gateway user interface. To save your changes you will be prompted for a Admin password asked. The initial password is esp32admin.
In the Garmin device, the interface is on NMEA standard placed. In the NMEA2000 gateway under the tab Config go to Serial port and set the baud rate there to a speed of 4800 Bd. Should they use a higher speed in the Garmin device because they NMEA high speed use, then set a speed of 38400 Bd.
Danger! At the low speeds of 4800 Bd, you have to be careful not to send too much data in too short a time, because the interface speed doesn't always allow for this. A character is transmitted with approx. 10 bits. With 4800 Bd you can therefore transmit a maximum of 480 characters per second. They come together quite quickly with a few longer GPS telegrams if some other data should be added. Specific telegrams can be specifically excluded from transmission via special filters in the gateway. This reduces the amount of data and higher transmission rates can be used.
You can monitor and track the current data traffic on the status page in the NMEA2000 gateway. When they line up Serial in/out open you can see in detail which telegrams are transmitted via the NMEA0183 interface from the Garmin device. This gives you a good diagnostic option for troubleshooting. If telegrams are missing, look in the Garmin manual to find out how to unlock the respective telegrams for transmission. Depending on the configuration, it may well be that not all telegrams are transmitted.
Fig.: NMEA2000 gateway web interface
NMEA0183 traffic on the external interface
The following table shows the respective NMEA0183 telegrams that are received or sent by a Garmin device. The information relates to the GPSmap 400/500 series.
NMEA0183 receive | meaning |
AIS | AIS information |
DCS | Digital Selective Calling Information |
DPT | water depth |
MTW | water temperature |
VHW | Speed through the water |
MWV | Relative wind speed and direction |
NMEA0183 transmit |
|
GBS | GPS satellite fault detection |
GGA | GPS data |
GNS | Fix position data |
HDT | true heading |
VTG | Speed over ground |
XTE | course deviation |
RTE | route |
AM | Waypoint Alert |