Raspberry Pi Boat Monitoring

May 17, 2004
5,475
Beneteau Oceanis 37 Havre de Grace
Over the last few years I’ve been tinkering to build and expand a way to monitor my boat with an onboard Raspberry Pi computer. A few times I’ve mentioned the types of data I get from it and a couple people have asked for more details. I’ve made some progress documenting the code and the setup to give people ideas on how they could go about something similar.

All of the code, some architecture diagrams, and a full explanation are now at

The Readme file provides a more complete write-up, but some of the features I have are:
  • Bilge pump monitoring
  • Sensors to read things like battery voltages, battery current, cabin and engine temperatures, engine RPM’s, cabin VOC’s and heel angle
  • Logging all NMEA and sensor data for later review
  • Making all of the data available in dashboards to view from anywhere
  • Sending email alerts if parameters go out of tolerances
  • Making the sensor data available on the boat’s NMEA network for display on the chartplotter
Some screenshots of the types of dashboards I can see on my phone:

1658575759978.png


1658579675938.png


And an example of having the data on my chartplotter:
1658579775971.jpeg


Let me know if you have questions or any suggestions to improve the write-up or design.
 

walt

.
Jun 1, 2007
3,532
Macgregor 26S Hobie TI Ridgway Colorado
Over my head. but I know just enough to be impressed!

I am curious about the sample rate you are doing for the current measurement. I have a now more than 10 year old battery monitor and Im pretty sure it samples current from a shunt considerably faster than 1Khz, maybe at least 10Khz.
 

Tedd

.
Jul 25, 2013
766
TES 246 Versus near Vancouver, BC
Fantastic! I was planning to make a similar system for our new boat, but perhaps I'll just leverage yours?

What's involved in tying into the NMEA bus?

[Ah, I see it's basically an implementation of CANbus. So, connecting is similar to connecting to a CANbus network?]
 
Last edited:
May 17, 2004
5,475
Beneteau Oceanis 37 Havre de Grace
I am curious about the sample rate you are doing for the current measurement. I have a now more than 10 year old battery monitor and Im pretty sure it samples current from a shunt considerably faster than 1Khz, maybe at least 10Khz.
I’m pulling the shunt measurements once per second for the logging and presentation. The State of Charge calculation is done by a Victron Smart Shunt. I don’t know what frequency it polls the amperage at to do its calculations. Most of the DC loads are constant enough that I would think 1 or maybe 10 HZ would be adequate for tracking SOC accurately.
 
May 17, 2004
5,475
Beneteau Oceanis 37 Havre de Grace
What's involved in tying into the NMEA bus?
I have a Yacht Devices USB to NMEA 2000 adapter. The adapter just plugs into the Pi and the NMEA2k network. SignalK on the Pi has plug-ins to ingest the NMEA2K data and to output specific sentences back onto the network. The chartplotter sees the Yacht Devices adapter as a data source and shows the sentences it’s providing.

An NMEA 0183 can be easier to deal with, since the protocol’s been around longer and is better reverse engineered. Hardware to talk to that is a little cheaper. But the sentences that can be sent are a little more limited.
 
May 17, 2004
5,475
Beneteau Oceanis 37 Havre de Grace
Thanks, @Davidasailor26 ! I have a little bit of experience working with CANbus networks that I hope will help in learning NMEA.
There are other hats you can get for the Pi for NMEA connectivity at a slightly lower cost than the Yacht Devices adapter. It’s just a little more DIY than the USB option but probably not too bad, especially with some canbus experience.
 

walt

.
Jun 1, 2007
3,532
Macgregor 26S Hobie TI Ridgway Colorado
Victron Smart Shunt.
Aha.. There are some current pulses that are fairly fast such as trying to measure the DC current into an inverter because these generally have a DC side current spike near the peak voltage of the AC cycles (best for efficiency) or the current pulsing from an outboard each time a magnet goes by the stator coil. I looked up the smart shunt, its basically a battery monitor without a display.
 
Last edited:
Jun 23, 2019
1
S2 8.5 Haverstraw
You can give a try to BBN Marine OS. There are more options for monitoring dashboards. Via NodeRed, SignalK, Grafana, or HomeAssistant.


There are plenty of articles on integrating Victron with HomeAssistant

Thanks
 
May 17, 2004
5,475
Beneteau Oceanis 37 Havre de Grace
You can give a try to BBN Marine OS. There are more options for monitoring dashboards. Via NodeRed, SignalK, Grafana, or HomeAssistant.


There are plenty of articles on integrating Victron with HomeAssistant

Thanks
BBN OS is definitely worth checking out. I didn’t know about the Victron HomeAssistant integrations. Both are pretty interesting depending on what your exact needs are.