Showing posts with label Open Source Computing. Show all posts
Showing posts with label Open Source Computing. Show all posts

Sunday, 30 August 2020

Open Source Exploration

What the heck does this have to do with sailing?

At the moment I have absolutely no idea... (lol)

Prior to the summer of 2020 I’d progressively upgraded Windstar's electronics as follows:  

  • Raymarine SEATALKng backbone 
  • Raymarine Ev-100 evolution autopilot comprising:

    • Ev-1 compass sensor 
    • Acu-100 controller 
    • Wheel drive 
    • P70 control head
  • Raymarine i70 multi instrument display
  • Garmin gps antenna 
  • Maretron speed/depth sensor
  • ICOM M506 AIS VHF 
  • VYacht wifi gateway (this feeds network data nia wifi or Ethernet, , converted to nmea0183 format from nmea2000)
  • Actisense NGT-1 USB gateway.  This feeds nmea2000 data via a serial (USB) connection to any USB device.
  • 2 iPads running iSailor, fed by the vYacht gateway. (The iPad cannot accept USB data and iSailor was not able to accept nmea2000 data.)
All of the hardware is NMEA2000 (SeatalkNG) compliant, and it is documented in other pages on this blog.  (look at posts under "Electrical and Electronics")   Wanting to better understand and exploit the network and technology, and extremely curious about the open source world, I decided to take the plunge.  

The prototype assembly and installation of the various parts is discussed here.

Follow the links below to read more about the various components:
  • Raspberry Pi - a powerful palm sized computer utilizing a Linux OS, that runs on 3.2A max of of 5.2vdc USB power.
  • OpenPlotter - a complete suite of sailing applications, including openCPN, that runs on a Raspberry Pi 
  • openCPN - an full-featured open source chartplotter, with a range of plug-ins.
  • oSENC charts - open(ish) source charts for openCPN.

Also worth reading:

  • SignalK - An open source protocol for the exchange of marine data.
  • An excellent Panbo article discussing some applications and the potential of a SignalK server (included in OpenPlotter) can be found here

Below are some screenshots of OpenPlotter to provide some understanding of its components.   New functionality is underdevelopment for it and openCPN.




Below is a signalK Dashboard.   This is a custom view featuring 14 of the 45 datapoints on my NMEA2000 network.   Very cool, you can troubleshoot and monitor any aspect of the boat's systems.  As a simple example, I used this to quickly assess electronic compass deviation and create a deviation table.   


I used this setup for my route planning and navigation on a recent 8 day cruise between Whitby and the Thousand Islands in lake Ontario.  It was reliable and worked well.  (including wifi, web browser, email...)  

More to learn, more to follow.


















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.








Sunday, 18 September 2016

Electronics - what to do?

Marine Electronics - What to do?


Update - installed the vYacht wifi router and was able to get nmea data transmitted to my iPad - very cool.   I now have 3 redundant multifunction displays (laptop and two iPads) 3 chart plotter apps (opencpn, inavx, and NavionicsHD.) and 3 redundant gps sources, (garmin x19, garmin get Bluetooth glo, and iPad on board- is suppose my phone too.... ).  as well as a world of apps that are constantly evolving, all integrated with display devices I already own, and a standardized data set. 

Screenshot from inavx with nmea instrument data displayed.  Clearly shows Windstar in the marina parking lot.




Ram mount with Lifeproof ipad case bracket, and Edson Pod with autopilot control head at helm.


I started sailing my own boat circa 1990 with paper charts, a few books and after having taken at least one course on piloting (might have been two).  This was a skill taken quite seriously by all sailors at the time and was a very cool and satisfying part of the experience.  In fact, the challenge added some richness and a sense of adventure to sailing, which has been lost with the advent of inexpensive GPS and chart-plotter technologies.   While I do miss the satisfaction of being sheepishly consulted mid-lake by lost power boaters, I certainly wouldn't go back.   I do I like knowing exactly where i am and how fast I am going.  
When we bought Windstar in 2014, she was equipped with original, 1980s vintage B&G instruments, which were well made and still working fine.   She did not have an autopilot, and that quest resulted in an electronics refit spree which now includes:
  • SeatalkNG backbone
  • Raymarine P70, EV1, EV 100 autopilot bundle
  • DST-800 transducer
  • Garmin X19 GPS
  • Raymarine i70 multifunction instrument
  • Icom M506 VHF - AIS, NMEA 2000
I had original contemplated the addition of a Raymarine chartplotter but was not ready to choose the particular model.   There was no rush anyway, as I had two ipads (one with GPS) both running NavionicsHD.   To enable the one non-GPS ipad I acquired a:
  • Garmin GLO Bluetooth GPS.
This gave me three GPS sources, two chartplotters and most of the functionality I wanted.  I bought two Edson pedestal arms, one pod for same (thanks to a kind cnc lister) and a lifeproof case, bracket and ram mount.  I added a Bluesea USB charger to the electrical panel, and a RAM ball at the chart table.   The iPad can be easily moved from nav station to helm.  

Some more photos:

the ipad on its mount, and the Ray marine P70 autopilot controller in its pod.  both can be rotated 180 deg. 

I have another RAM mount ball that will be screwed through the hull liner directly above where the ipad sits in this photo.  This will provide a location to keep it safe, that is also within reach of the panel mount charger.   It could also be rotated and extended on its mount for viewing from several angles.  It occurs to me that a third mount near the companion way might be useful.  You can see the Garmin GLO between the stereo and VHF.

The lifeproof case, its mounting bracket and the compatible RAM hardware are all ruggedly made and are quite adequate for my use.

The good:  it works.  I have no issues with screen brightness (it's under the bimini)
The bad:  one needs to be mindful of the ipad chartplotter's state of charge, and that it is not integrated with the network, and therefore cannot use the Garmin X19 antenna, nor can it drive waypoints to the autopilot. 
In practice, none of this has been a big deal  given how I use the boat, but the underexploited potential bothers me.   So, I decided to buy a gateway, enabling tablets and PCs to connect to the n2k bus.   What was recommended was the:
  • Actisense NGT-1 USB gateway.
This is cool, and after a being tortured by an old laptop and Windows 7 bugs, I can now run a laptop-based chartplotter, instruments, etc.   I can also view all of the devices on the bus, check their firmware versions etc.    What I did not anticipate, was that the iPad could not be made to connect to the network via USB.  This is not true of other tablets.   So, to use the iPad I need wifi, and have ordered and await a:
  • vYacht wifi router.
This was not the most expensive router out there, but it is proven to work with the iPad.   As I research this whole area, it is clear advancements are being made at a rapid pace, and I expect some further evolution.

In the end, decisions will need to be made about a single OS, and a single chartplotter app, where today I have 3.

Would a chartplotter/MFD have been a better approach?

Certainly, it would have been simpler to integrate, though more costly to install.  Until recently I was considering a Raymarine unit.  To date I have used both ipads with Navionics, one with its internal GPS, and one with the bluetooth-connected garmin GLO.   Both are very accurate.  I have connected an old laptop running OPENCPN to the network, and it appears to work fine.  I am about to integrate the ipads through wifi.   All of this  for much less money than the installed (hardware) cost of a chartplotter.  (I can't bring myself to call it a multi-function display, because compared to an android tablet or iPad, it simply isn't one.)

The more I learn, the more convinced I am that disruptive digital technologies are knocking hard at the door of the old boys club of electronics manufacturers, and that a chart-plotter bought today will be obsolete very soon indeed.  For me, it already is.




.