Thursday 27 August 2020

Raspberry Pies

The following is an overview of my recent experimentation with Raspberry Pi computers.    

For more detail on signalK, the OpenPlotter build and the oSENC vector charts I purchased, click here.



 The world of open source computing and the advent of devices like the Arduino and Raspberry Pi have periodically piqued my curiosity.    As I’ve contemplated various chart plotter strategies, I keep coming back to the conclusion that a dedicated chartplotter and the associated mounting hardware is a costly and rapidly obsolete convenience that is not really necessary for the sailing I do.  A computer at a desk is more comfortable for my occasional route planning and a helm-mounted tablet in an adequate case is fine for the times I need to know a more precise location while steering. 
As documented here I have relied solely on a wifi-connected iPad with a Lifeproof case, with a RAM mounting system.  This has been fine for my relatively undemanding navigational needs, though it has shortcomings; reliance on a wifi connection, (which drops periodically), a lack of full NMEA 2000 compatibility, no autopilot data exchange or control, and the need to be mindful of its state of charge.    It could also be dropped in the lake or damaged.  

These shortcomings, the eventual need to replace the aging ipad, and the desire for redundancy, have kept me thinking about other options.   This led to the experimentation with Opencpn on a laptop, which would need to be kept charged and plugged in, and somehow secured in a comfortable location to be viewed periodically while underway.   

Enter next the Raspberry Pi, and Openplotter.  The Pi is a a tiny Linux-based computer that runs very efficiently on 5.2vdc, that has attracted a huge following and a wide range of applications.   Openplotter is a ‘build’ - a bundle of software specifically developed for navigation, and for the Raspberry Pi.  (A Linux build includes only the components of the Linux operating system required to run the desired applications, plus those applications.)   The primary application in the Openplotter build is OpenCPN, a well established open-source chartplotter application that runs on many platforms.  Openplotter includes other apps like a web browser, signal K etc.  Both Openplotter and OpenCPN are well supported by an enthusiastic user/developer base.  Cool stuff!

Also in the back of my mind, and only partly related, was the desire to have a large music library on board.  As you might expect, this (along with video and other media) is also addressed through the raspberry pi/Linux community with a Media centre build known as Librelec, which is built around a well know media centre app called Kodi. (Ask any millennial....)   There are others media centre builds.

My initial thought had been to experiment with one Pi, configured to boot to or run either Openplotter or Librelec, and to situate a display (Or move one display between mounts) to suit either movie watching and navigation.   This, for a variety of reasons proved to be impractical.  Ultimately, I ended up with two computers and three displays,  (lol...  I was having fun and it was not expensive) providing  both a built in navigation computer (connected via the Actisense USB gateway to the NMEA2000 network), and a Kodi-based mediacentre with a large music and video library and the audio connected to the stereo system: effectively a home theatre.     Each system runs off the house bank via a USB charger port or directly off the 12vdc house bank.  No inverter needed, each device is frugal with power, and each is more integrated into the boat and less likely to get damaged than a laptop.      Each can be easily removed from the boat and operated/updated  at home like any other computer.  Parts and the computer itself are inexpensive off the shelf items that can be acquired and upgraded at minimal cost.   Further functionality is available and can easily be added as the mood strikes.  A very functional minimalist chartplotter could be built with as little as a Pi, a usb GPS dongle and small display monitor, running Openplotter.   The low cost of this is certainly similar to a Low end tablet, for those wondering, and each approach has its advantages.

The installation is still very prototypish, and that won’t change until I’ve determined a completed scope.  The  whole thing was fun to figure out, and it went though a variety of iterations mostly due to my very limited technological knowledge.   Either setup can be removed without a trace other than a discreetly mounted 1" ram ball.

The Chartplotter/Computer



The Pi and its 1080p monitor mounted via a Ram mount system and a vesa adaptor plate I made on the left, the ipad is on the right.   The locations can be easily swapped, either device easily removed.  The bluetooth keyboard controls the Pi.   The ipad is only in this specific location so it can be charged, though I leave it there to keep it safe.  Previously, it was located on the ram ball where the Pi is now (on the left) and it would charge there and be relocated to a ball at the helm when required.    Likely I will refine the Pi installation and relocate it at some point.  

Cabling is a challenge, and the connectors are not rugged.  This could use some refinement but the powerful little Pi bristles with ports, and the connections are many and dense.   I found that mounting the PI on the monitor was a bit ugly but was the tidiest for now, and makes removing the entire setup much easier.   

There are volumes already written about the technical aspects of the pi, openCPN, signalK, and openplotter, and much of it is geared toward developers and computer professionals.  I will avoid sharing my newly acquired but very limited technical knowledge, but will provide some links in a future post. 

So far the Pi/openplotter setup has worked flawlessly, though I now have more tech and clutter than I like, and not all of my wants have been addressed.  Will discuss this as well in another post in the near future.

The Media Centre 


On the left is a 7.5" touch screen display mounted in a housing I made from acrylic and some mahogany I had kicking around.  This slips over the fiddle in the shelf - no holes drilled, nothing cut.  The touch screen is convenient for operating KODI and is all that is required for music, but is obviously a bit small for movie viewing.




The librelec build/kodi does not support running both of the pi’s HDMI ports simultaneously, nor does it have provision for switching between them.   This required an AB switch to select between the touch screen and the a 12.5" monitor.  This monitor is  powered either by 12vdc or a USB-C connection.   Much better for movies!   Kodi’s menus can operated by either the touchscreen or a Bluetooth remote.  


The Pi and the ESD drive containing movies and music.   Same challenges with cabling of course.

The display and pi in place and connected to the USB power supply, clearly visible.


Thoughts so far 

Perfect?   No.   The pi is an inexpensive computer and its OS and apps reside on inexpensive media- an sd card.   It is best to shut down the pi using its software (vs simply shutting off the power) as the Sd card can be corrupted if the unit is powered down without a software shutdown.  The risk of this can be mitigated but it’s not bulletproof.   Nor is the pi itself bulletproof as it lives in an inexpensive enclosure bristling with its compact  PCB-mounted connections, which are somewhat exposed - it is left to the owner to ruggedize the install and secure the cables to keep them from bearing on the connections.  You can see my attempt to secure the cabling and various bits in the photos.   I would not rely on this arrangement for offshore use on a coast guard vessel!   Next step will be to consider how I can mount this in a more rugged housing with the connections strain relieved.  

That said, I’m impressed.  The openplotter system was very useful on our recent 8 day cruise, especially the 24 hour passages,  for both position verification but also AIS data.   (Dodging freighters in the dark)    

The media centre has become a reliable and well-used indulgence,   I will certainly keep enjoying and using both of these as I continue  to learn and explore their possibilities.  

Watching En Solitaire as I write.

 

Movie nights on our recent 8-day cruise - a compact folding chair enables comfortable viewing for 3  the folded chair fits easily on the shelf beside the quarter berth.








No comments:

Post a Comment

Comments and corrections welcome!