NMEA 2000 powered Raspberry Pi

Running a Raspberry Pi aboard a boat has been a popular thing to do for a number of years. I’ve had them on every boat since the Pi first came out. Connecting them to a NMEA 2000 network, and powering them off a DC battery bank has required a bit more work up until now.

Why a Pi?

There are many reasons to have a Raspberry Pi connected to your boat network that I can think of. My main reason is to run a Signal K server on it, have it connected to my NMEA 2000 network, and leverage the hundreds of plugins and pieces of software that you can install to create dashboards, gather data, set alarms and alerts, and so much more.

In addition, you can run OpenCPN or OpenPlotter and have a fully functioning boat control, autopilot, chart, etc. system that has features just like the big vendors.

On sailboats in particular, I loved having a Pi on board because I could have an always-on computer that didn't take a ton of power, had a decent amount of CPU power, and use it to monitor things while I was away.

The old way…

The first step in connecting a Pi to the boat was to find a proper power supply. Raspberry Pi's run off of USB power which is 5V, and not generally available on the boat in a permanent way. I always wanted mine to run off of the 12v DC battery bank without any connection to an AC outlet, inverter, or USB converter that isn't hard wired. I have had good luck with this 12v-5v converter from Tobsun, and I particularly like it because it has four screw down terminals on it, making it easy to connect cabling.

Once the power problem is solved, connecting the Pi to the boat network involved either an Actisense NGT-1 USB adapter ($) or a canable.io adapter to get it on the NMEA 2000 network. Both have pros and cons and require connecting to a USB port on the Pi, plus some configuration.

An easier way….

A reader and Instagram follower (thanks Ilker Temir!) pointed me to an add-on board, or HAT, for the Raspberry Pi called the PICAN-M, and I was intrigued. I ordered one from Copperhill Technologies here in the US and it arrived a few days later. The original manufacturer of the board is SK Pang Electronics out of the UK.

Raspberry Pi 4

I had a Raspberry Pi 4 that I had been playing around with ever since it came out, but didn’t have a clear purpose for it. I decided to install the PICAN-M on it, and then try out a few different things. I generally purchase the CanaKit bundle when I am buying a Raspberry Pi (I think I have about 15 right now doing various things at home and on the boat) as they tend to include a nice power supply, case, cables, and mainstream brand SD card, but you can get them cheaper without those pieces if you prefer. In this case, the extra parts and pieces were important when I bought the Pi to do testing in general, but were not necessary since the PICAN-M provides power, and the case provided by CanaKit won't work.

PICAN-M HAT board

The PICAN-M is a pretty simple, yet well designed board. It has a NMEA 0183 terminal block and NMEA 2000 port on the left side in the picture above, and the connector for the Raspberry Pi on the right hand side.

Close up of PICAN-M board

There is a really nice schematic and user guide that SK Pang have provided on their website. The board looks very well built with clearly labeled bits. Here's what SK Pang say the board is capable of:

Features

  • CAN connection via Micro-C connector
  • 120Ω terminator ready
  • SocketCAN driver
  • appears as can0 to application
  • NMEA 0183 (RS422) via 5-way screw terminal
  • appears as ttyS0 to application
  • LED indicator (GPIO22)
  • Qwiic (I2C) connector for extra sensors
  • Include 3A SMPS to power the board and the Pi from 12v line.
  • Compatible with OpenCPN, OpenPlotter, Signal K and CANBoat

So besides NMEA 2000 and 0183, you can also connect other I2C sensors if you'd like.

The biggest challenge with the board is going to be finding a proper case that has the right cutout.

PICAN-M installed on top of Raspberry Pi 4

Installing the board is straightforwards. Included in the package are four standoffs and screws which need to be attached to the Raspberry Pi. Then carefully slide the PICAN-M down the pins on the Raspberry Pi until it is well seated, and screw it down to the standoffs.

If you're interested in a step-by-step guide on how to set this up with Signal K, Grafana, InfluxDB and more, check out my article below:

Case

This is probably the only downside to this setup. The standard cases that come with the Raspberry Pi do not assume you will have an add-on or HAT board with it. Those that accommodate HATs are pretty specific, and have holes or punch outs for specific types of connectors. I have not found a NMEA 2000 specific case – perhaps an opportunity for 3d printing!

I found a case from HiFiBerry that was meant for an audio HAT and hacked holes in it to allow the NMEA 2000 port to be exposed. It's not great, but it works for now and keeps the boards reasonably safe.

Software & Usage

I installed three different things on the Pi to test with, just for OpenPlotter, OpenCPN, and then just Linux with Signal K.

To do this, I simply connected the NMEA 2000 port to power up the Pi, plugged the included HDMI-mini to HDMI cable into a monitor, connected a keyboard, and followed the install instructions for OpenPlotter/OpenCPN. You can do this in an automated way, or even headless (without a monitor or keyboard) but it can get a bit fiddly if you make a mistake in the installation.

For Linux + Signal K, I used the standard Raspbian server minimal distribution and then installed Signal K afterwards.

PICAN-M + Raspberry Pi running Signal K

The super nice thing is that the NMEA 2000 port just shows up as can0 to the operating system, so it is very easy to start using one of these applications to access the data on the NMEA 2000 network.

The absolute best part about this entire setup is the fact that the NMEA 2000 port is native, and that it powers the entire computer. No other cables or connections are required.

This opens up even more utility when considering what you could use this for. Besides running heavier applications like the above, you could use these in strategic places all around the boat to create an entire sensor network. Connect it to a NMEA 2000 tee somewhere, and have I2C or other sensors (Raspberry Pi have a wealth of different ways to connect various sensors) connected to tanks, temperature, momentary, etc. and run Signal K on each, spitting the data back to a central Pi or other computer to display things. The possibilities are actually quite exciting. I've tried to do this in the past with Arduino and other technologies, and it has been a bit of a mess with having to power them by battery or other conversions.

Cost & Conclusion

Overall this is a pretty inexpensive way of getting a boat computer on board:

Total: $242.89

This is a very reasonable price, and is actually about the same cost as the Actisense NGT-1 USB to NMEA 2000 interface alone! For just under $250,  you end up with a bus-powered, low power usage, reasonably powerful computer on your NMEA 2000 network.

You could buy a bare Raspberry Pi instead of one in a kit like I did and save some money, since you won't need a power supply or the case it comes with. You could throw in a 7″ touch screen, similar to what I did on Grace's navigation panel, and have a complete computer setup that you could interact with like a chart plotter, all powered by the NMEA 2000 bus connection.

I think this is a fantastic way to get Signal K on board your boat in a single hardware device, all powered by the NMEA 2000 network. It's also a great way to add OpenCPN or OpenPlotter if you don't have a good navigation / boat management tool already on board. It's well made, easy to put together, and opens up the possibility of having access to boat data for those not interested in the more DIY approach. If you have a NMEA 2000 network, and don't have Signal K installed, this is a perfect way to do it.

Subscribe to SeaBits News

Get all the latest & greatest posts delivered straight to your inbox

Please check your inbox for a confirmation email!

Something went wrong.

Related Articles

  • Victron has had a lot of impressive connectivity products, but one area they have had challenges with is in getting all of that data onto NMEA 2000. In their recent v2.40 release, that has changed for the better.

  • Keep your NMEA 2000 network running smoothly with a universal terminator that has an LED showing bus voltage, and can be used easily at either end of the bus.

14 thoughts on “NMEA 2000 powered Raspberry Pi”

  1. Thanks for this article. I am currently building my own setup and this PICAN Hat will be part of the game !
    I however have a question : how would you manage to add an active cooling device to this setup knowing that Raspberry pi 4 tends to produce a lot of heat and will need to be cooled by a fan if enclosed in whatever case I can fit all of this into ?

    Reply
  2. Have been using this board full time for about 2 months now. I have not had any problems with a Pi 4 getting hot (in and enclosed case). A tip that caught me out was the the NMEA0183 (RS422) input. to send data to the PiCAN-M use pints IN+ and Ground, not IN+ and IN-

    Reply
  3. Hi Steve,
    great article, thanks! I do wonder though if this won’t harm the NMEA2000 power supply, as I believe it is restricted to 1A per client, and a Raspberry Pi can draw up to 3A?
    Cheers,
    Bram

    Reply
    • The Raspberry Pi specs are off the 5V line on the USB port, and it’s a 2.5A theoretical max draw through that. However, in reality, even when you’re doing video transcoding and melting the CPU and GPU on a Pi 4, it’s still been measured well under 1A. 1A @ 5V = ~.4A @ 12V. The max of 2.5A would be right around 1A @ 12V, if you could somehow add enough addon boards and such to use the entire spec, which would be the max 16 LEN or whatever it is on the N2k bus.

      Reply
  4. I have purchased the Pican-M and followed their installation guide. Using the candump, I am able to see the data stream similar to what is shown in the guide. I am however not able to see the data within SignalK, what are the steps for setup within SignalK to recognize the data coming from the Pican?

    Note I have successfully been able to get the usb data from my Lobster fridge.

    Reply
  5. I was just googling ways to connect a raspberry pi to nmea2k for my Beneteau sailboat, and this article is basically everything I was looking for! Thanks

    Reply
  6. Can i use this setup to read the data of my analog sensors, fuel, etc., and export those reading on the nmea 2000 port to my garmin charploter???

    Reply
    • You could potentially do this, but it would depend on the analog sensors. You’d have to connect the Raspberry Pi to the analog sensors with some sort of additional connector or device, figure out the analog to digital conversion, and then convert that using a plugin or custom software on the Raspberry Pi and use Signal K to put that data onto NMEA 2000. It would be a decently technical project involving a few pieces.

      There are a number of NMEA 2000 sensor products that can adapt analog tank level sensors and such to NMEA 2000 native messages without using the Raspberry Pi that might be easier to get working in a shorter amount of time. It would really depend on the sensors and what they were.

      Reply
  7. Would there be any incompatibility with using a Navionics chart in this type of setup ? I know it would be more expensive, but where we live, the CPN charts are not as detailed as Navionics.

    Reply
    • I’m not sure you could use Navionics here. This setup is mostly for building a server that runs open source software and connecting it to your network. Navionics is a commercial charting company, and I think they only sell their charts for devices like chart plotters, tablets and phones using their apps, etc.

      OpenCPN and OpenPlotter both have charts, but they don’t support Navionics either. You’d be stuck using open charts or other free sources.

      Reply
  8. Hi, Thanks for your article.
    Im looking into upgrading my system with a raspberry pi and openCPN, and wanted to ask something regarding this PICAN-M hat.. I have a daisy AIS reciever (https://shop.wegmatt.com/collections/frontpage) that outputs for NMEA0183. Is it possible to connect this AIS device to NMEA0183 on the PICAN-M board, and from there send the signal out on the NMEA2000 network? So basically using the board as a bridge between the ais and the NMEA2000 network, and at the same time get the ais data on the pi?

    Thanks for any help 🙂

    Reply
    • Hi Hans,
      What you’re proposing should be possible, although I have not tested it myself. You’ll need something like Signal K which would run on the Pi and receive the NMEA 0183 data and ingest it into Signal K. You’d need the Signal K to NMEA 2000 plugin which has support for AIS PGNs 129794, 129038, 129041. This would take the data that Signal K consumes via NMEA 0183 and put it on NMEA 2000.

      Reply

Leave a Reply to ML_C36 Cancel reply