NMEA2000 to Bluetooth YAPP

AngusMcDoon

Well-Known Member
Joined
20 Oct 2004
Messages
9,046
Location
Up some Hebridean loch
Visit site
A few weeks ago I was dipping my toe into getting NMEA2000 working in a YAPP by reading atmospheric pressure from a BMP280 sensor and sending the reading out via NMEA2000. It was in this thread here...

NMEA2000 YAPP

and was just a breadboard prototype at that stage. I also hinted that as the processor board and processor I was using (ESP32 based DevKitC) had built in Bluetooth I might use that capability as well. As the project progressed, the Bluetooth bit became the major part, but the pressure sensor bit hung in there. The project is now mostly a NMEA2000 to NMEA0183 over Bluetooth converter with atmospheric pressure messages sent out on both interfaces. At the moment the data stream is NMEA2000 to NMEA0183 only - nothing goes the other way, although there's plenty of scope to add reverse direction if the need arises, for example autopilot messages from a chartplotter. The reason for this device is that I like using OpenCPN, but OpenCPN does nothing NMEA2000. However, it can interpret NMEA0183 messages and show boat data in panels, and can read messages from a Bluetooth connection. An additional use for having boat data available via Bluetooth is for an anchor watching app, but more about that later.

The project has moved on from a breadboard based furball of wires and now has a proper PCB and is mounted in a box. The circuit is pretty simple as most of the components are on the ESP32 based DevKitC dev board and the BMP280 pressure sensor board from Pimoroni. Power comes from the NMEA2000 12V line so there is a small circuit to bring that down to 5V. There is also an optically isolated NMEA0183 receive interface running at 38400 baud which can multiplex NMEA0183 messages from an AIS unit and send them to the Bluetooth stream. There is also a CAN line driver connected to the CAN-H and CAN-L lines on the NMEA2000 bus.

This is the board layout...

Untitled.jpg

Here's a 3D view...

Untitled2.jpg

and here it is in real life...

photo.jpg

There's a standard NMEA2000 connector on the side and a DIN socket for the NMEA0183 connection to the AIS transceiver...

photo(1).jpg

The software uses an open source NMEA2000 library...

GitHub - ttlappalainen/NMEA2000: NMEA2000 library for Arduino

The code is developed using Espressif's ESP-IDF framework, not Arduino. The above library is primarily created for use in Arduino projects so a small amount of modification was required.

This project is all open source, including the hardware design. It can be found here...

GitHub - miniwinwm/BlueBridge

The project is a Beta stage of development. Everything appears to work on my home test network but cannot be verified fully until my new boat arrives.

In addition to this hardware based project I am also developing an Android phone or tablet based anchor watching app that gets boat data in via Bluetooth monitoring depth, wind, position, SOG, heading and atmospheric pressure, sounding an alarm if any go beyond user defined limits. The boat data via Bluetooth comes from this device. This app project will be the subject of another post.
 

I could, but a Pi is overpowered in terms of computing power for what is needed, and consequently uses much more electrical power. Only the later ones have Bluetooth integrated. My ESP32 based device uses 36 mA to send the data out by Bluetooth. A Pi is also more expensive than a DevKitC board.

There are many different hardware variants that could do the job, but I select for low electrical power, low cost and suitable for the task. The ESP32 is about as cheap as you can get with Bluetooth integrated.
 
Last edited:
Top