Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Monday, January 8, 2024

A 15" Touchscreen Chartplotter for around $500?

 First a belated Merry Christmas and Happy New Year everyone!

My boat came with a Garmin 4208 chartplotter.  Unfortunately, the prior owner(s) did quite a hack job installing it and, as a result, there was a rather large and unsightly open hole in the hull behind the unit.  This hole prevented me from ever removing the chartplotter from the helm as it was the rain shield.  Well, a chartplotter is an expensive umbrella, and after having spent many years acting as such, it began having some issues.  The case seal had failed and allowed moisture to enter. Best I can tell, this caused a light film of mold to start growing in the screen and was slowly making it unreadable.  It was time to find a solution.

The Old Garmin Plotter,
as installed by prior owner

I could have bought Garmin's current replacement unit for around $3000, and would have the same functionality that I had.  There were a couple problems with this.  Since my depth, wind, and autopilot are Raymarine, they did not like talking to the Garmin.  Being from the aviation world, I'm also not a big fan of Garmin (particularly after they charged me over $150 for a 32 MB data card while standard 1GB SD cards were selling for around $20).  While talking with the harbormaster at my new marina, he was telling me about Openplotter and how he and others had built their own chartplotters using a Raspberry Pi computer and a few other inexpensive electronic bits.

Who cuts a hole like this?

Fixed, with a mount and connectors
for the new touchscreen

I did some research and decided that it would be worth the effort to try and build my own chartplotter using Openplotter.  If successful, I would have a nice chartplotter that would be capable of integrating the information from the Garmin radar, Garmin sonar, Raymarine wind, Raymarine depth, and Raymarine autopilot without having to replace all of this equipment with items from the same maker.  I could also add a 15" touchscreen interface, AIS receive functionality and, the best part, this would cost me only a fraction of the cost of a complete solution from any of the big name marine electronic manufacturers (a 16" Garmin package would likely run over $7000 by the time all was said and done).

So, for this experiment, I purchased the following:

  • A Raspberry Pi 4 w/4GB memory, case, data card, fan, and card reader $125
  • 15" touchscreen display $120
  • Outdoor VESA mount for monitor $23
  • 3 64 GB micro SD cards for programming and backup $20
  • 12v powered USB hub (for connecting and powering peripherals $20
  • A USB GPS antenna that outputs NMEA sentences $20
  • A Berry IMU gyroscope/compass/acceloremeter chip $38
  • USB RS485/422 converter (for NMEA output) $18
  • RTL-SDR Radio (for AIS receive) $33
  • VHF whip antenna (for AIS receive) $10
  • Opticoupler (for SeaTalk input) $8
  • 2 128GB USB flash drives (for chart/data storage) $25
  • 12v to 5v USBC power supply $12
  • Various cables, connectors, fuses $80
Installing the OpenPlotter software package is pretty easy.  You download the Openplotter image for Raspberry Pi and use an imaging tool to copy it to the micro SD card.  You then insert the MicroSD card into the Pi, hook up the monitor and boot it up.  In order to program and modify things, I also used a Bluetooth keyboard that I was able to add once the Pi booted up.  Then the fun really started.

A touchscreen at the helm
(had to add an anti-glare screen protector)

I won't go into all the details on how to setup OpenPlotter as there is a fair amount of information out there already and it all depends on what sensors and equipment you are trying to connect.  I actually started work on this at home, and overall it took me several months worth of occasional tinkering plus the actual installation on the boat.  But, if you are considering taking on a project like this, I do have a one bit of advice.  Buy a couple spare memory cards for the Raspberry Pi.  You will want them to make backups.  I would suggest keeping two different backups, one for every major milestone and another for more often created backups.  This way you will have options for going back to two points without having to start over.  There were a couple times during my work where a bug was introduced but not noticed until several changes later.  If I didn't have the major milestone backup, I would have been unable to back up to the point before the bug was introduced.

Another thing I didn't realize was that the Raspberry Pi, at least at the time of writing this, does not support the equivalent of a "right click" for touchscreens (either a long-press or double tap).  Since OpenCPN is difficult to use without the right click, I had to find a solution.  I found there is a software driver called Twofing that converts a two fingered tap into a right click.  I installed and configured this driver and was able to right click on things by tapping two fingers on the screen on either side of the item I wanted to right-click on.

I setup the Raspberry Pi to automatically start OpenCPN on boot such that it takes up about 75% of the screen real-estate and another package called Kip to display the information I wanted and is typical of a chartplotter on the other 25%.  The Kip package is actually a configurable web page and can display basic numeric and text data, graphs and gauges, and has a nice compass rose that can display wind speed, direction, laylines, and direction to your next waypoint all on a single dial.  It can display any data that is collected by the system.

Plotter interface in Day mode

...and in night mode

I've still got a little work to do, but so far I am very happy with the results.  The Raspberry Pi gets position information from the USB GPS receiver, wind and depth information from the Raymarine Seatalk connection, AIS information from the RTL-SDR card.  An OpenCPN plugin supports the Garmin HD radar and utilizes free NOAA digital charts and even Explorer charts for the Bahamas (and other areas) from O-charts.  Routes are finally able to be output via NMEA 0183 to the Raymarine autopilot, and I even have pitch and heel information from the IMU. Using a GRIB file downloader, I can load and display weather forecast information overlayed on OpenCPN charts. I can also connect wirelessly to the Raspberry Pi and monitor the boat using my cell phone or a tablet.  And one more added bonus, with the 128GB memory stick, I not only have enough storage for charts, but can also use it as a media server/player...so much of my music collection can be streamed to my Bluetooth enabled stereo. 

The two items supported by the old Garmin that I don't have working are the XM radio and the Garmin sonar.  Although I haven't removed the XM unit, I've never used it and thus far I don't have any intention of using it.  I am unaware of any existing support for the sonar and when I have more time will look at writing a plugin or app to interface and decode the data sent from it (I do see the sonar data on the Pi, just don't know what to do with it yet).  I should be able to at least get depth information from it, if not a full sonar image with fish detection, etc.

The one thing I may change is the touchscreen I am using.  Since this was essentially an experiment, I didn't want to throw too much money into it without knowing how well it was going to work.  I thought the screen I chose would be bright enough to be daylight readable, but I didn't take into account all the reflected glare onto a shiny touchscreen.  The first time I tested it with the sun behind me, the shiny surface made a better mirror than display.  I added an anti-glare screen protector that has helped a lot, but would also like if the screen was brighter.  I know there are brighter screens out there, but they will increase the price of this project a bit.

I will say that, if you are not comfortable with computers and soldering and playing with electronic internals, this project may not be for you.  There is a lot of fiddling with hardware and configuring software involved.  There is nothing that is too complex (except for possibly the sonar, I didn't write any code beyond the script to automatically start the interface the way I wanted it), but there are a lot of individual pieces that need to be setup to work together.  If you are comfortable with these tasks, you can make yourself a very capable chartplotter using well developed and free open-source software.

Thursday, July 24, 2014

Finding Your Way...More on OpenCPN

In my last post I mentioned the free chart viewing and plotter program for Windows, Linux, and Macintosh called OpenCPN.  I've been using the program for planning and navigation for a little while.  I also use it as a backup...or more appropriately secondary source...for navigation and logging my travels.  The program isn't perfect, but it is pretty good and the big appeal is that the program is free...always a good thing when you are doing your best to cut unneeded expenses.

So far I've used the Windows build of OpenCPN on a laptop running Winodws 7, so the experience may vary on other platforms, but I would think they should all be pretty similar. Overall the application has performed well.  It takes a little practice to get used to the interface and working with the application.  There are a couple times I've had the application suddenly close when zooming and panning in the Chesapeake Bay area (I think it happened when it needed to load more chart data from multiple data sets).  Restarting the application solved the issue and when you are traveling at 8 knots, it isn't a big deal...just avoid zooming if/when you are navigating in confined spaces.

Here are a few tips and tricks when working with OpenCPN.  Most of this information is based on it's use in the United States...sorry, but that is all I have experience with thus far.

Getting the Application


First, you need to download and install the application.  You can find the downloads here:
Since installation varies by platform, simply follow the instructions on the download page for your device.

Downloading Charts


After installing the application you will need some chart data.  The chart data can be a bit confusing and sometimes multiple terms are used for the same thing.

  • If you are looking for the digital images of the old paper charts, you are looking for things with names like RASTER charts, RNC (Raster Navigation Charts), Geo-Referenced charts, or BSB files. The application will then show you data that looks just like the paper charts for your area:
  • If you are looking for the positional data used by the chart plotter view, you are looking for files with names like VECTOR charts, ENC (Electronic Navigation Charts), S52 files, or S57 files. The application will use it's chart plotter view of the data like the following:

You will need to download the chart data that you need, in either or both formats, and copy it into a folder on your machine that you will setup as your chart folder inside the application. I recommend creating a folder with an appropriate title (such as "OpenCPNCharts") in an easy to find location. The following is the process for downloading the U.S. charts from NOAA. To find charts for other locations, please refer to this page of the OpenCPN documentation.

The place to go for the charts is: http://www.charts.noaa.gov/ 
To get the RASTER charts, click on the RNC link.  To get the VECTOR charts, click on the ENC link. 
Either of those links will take you to a page with listings of the charts.  You can download packages by coast guard district, state, or region.  The larger the area, the larger the downloaded file, so you may only want to download the minimum you need, especially if you are on a slow internet connection or are paying for internet access by the amount you use (such as over your cell phone).

The download may be a ZIP file.  This is a compressed archive file that contains all the chart files.  In order to use the charts, you will need to unpackage or "unzip" them.  Windows should allow you to view the archive as if it were a normal file folder and you can copy the files from the archive to the OpenCPN charts folder you created.  Other platforms should have tools to extract the files, so click on the archive file to brig up the application. You want to copy the "BSB_ROOT" (for raster charts) or "ENC_ROOT" (for vector charts) directory contained in the zip file to the OpenCPN charts folder you have created.



Once you add the charts you want to the OpenCPN chart directory, launch OpenCPN.  Once OpenCPN is running, open the options dialog (the button with the wrench).  When the options dialog displays, select "Charts" from the banner at the top of that dialog to display the Charts page.


Select the "Add Directory" button and choose the directory that you created and now contains the chart files. Click the "Apply" button and this will cause OpenCPN to look through the chart directory and recognize the charts you downloaded.  From here you should be able to zoom into the area on your map and see the downloaded charts (note that areas where charts are not available will show up as the simple default chart).

GPS Options


With the program and charts you can plan trips, review areas and obstacles and markers, and even perform basic navigation as you would with paper charts.  That's all cool, but one of the nice features of any chart plotter is the ability to put a little boat icon on the chart to indicate exactly where you are.  Ok, having distance off of course, estimated time of arrival (ETA), and velocity made good (VMG) information is also nice to have.  Oh, and if you have a blog, having a nice map of your path can be handy for those travel posts.

Unfortunately, most computers running Windows, Linux, or Macintosh don't have integrated GPS units to provide that information.  You can go out and buy a separate GPS unit that plugs into a USB port or connects via Bluetooth and speaks the NMEA protocol.  From my aviation days I actually have a small Bluetooth GPS that I have re-purposed for use with OpenCPN.

While the dedicated GPS is probably the better way to go, you may not want to buy one just to give this program a try.  Well, there is a chance you already own a Bluetooth GPS and you didn't even know it.  You see, most smart phones these days have integrated GPS units and are capable of speaking to other devices using Bluetooth.

If you have an Android phone, there is a program called BlueNMEA that will take the GPS position information from your phone and provide it via Bluetooth to your computer and the OpenCPN application. You will need to install the BlueNMEA on your phone, pair your cell phone Bluetooth with your computer, set the Bluetooth on your computer to provide the GPS data via a port, and then setup the port in OpenCPN.  I'd love to provide more detail here, but it depends on the operating system and drivers on your system.  So, if you decide to try this approach, hopefully the above info and some Google searches can get you going.  What I can tell you is that I have used this and if you can get it set up it can work.

Sorry, I tried looking for an iPhone alternative to BlueNMEA, but didn't see one that did what was needed (and I don't have an iPhone to give any apps a try).  There were several applications that talked about reading and displaying the GPS data...even via Bluetooth from an external device, but I didn't find one that provided the data from the phone's GPS via the Bluetooth connection.  So, if anyone with an iPhone knows of such a thing, please let me know and I'll update this.

Zooming and Changing Charts


Since this application is designed to work on several platforms (Windows, Linux, Mac), the user interface doesn't always do as you expect...at least on Windows.  I'm used to double clicking on a map to have it zoom in on that point, but that doesn't work here.  Instead you have to use the zoom buttons.

As previously mentioned, as you zoom in (when using RASTER charts), the program will try to load the image with a reasonable amount of scale.  But sometimes you either don't want that or it didn't guess very well.  Along the bottom of the application are a series of blue and green oval buttons.


The blue buttons/ovals represent raster views of the current window with the more detailed views on the left. The green buttons/ovals represent vector data views with varying levels of detail, again the more detailed views are to the left.  Using the zoom buttons, and then adjusting the view, if needed, with the bottom button bar should be able to get you to a view with the desired level of detail you are looking for.

Final Thoughts


I've had a few trips to play with OpenCPN and I've found it to be a reasonable chart plotter program.  I typically use the chart view as I prefer being able to view our location as it would look on the official paper charts (sure, call me old fashioned that way) and I found that the vector data takes longer to load when zooming and panning around.  Being able to easily download the latest charts for free anytime I have access to internet means I can always have the latest data for any trip.  And having all this on a device with it's own separate power supply (a laptop battery) makes for good redundancy.  Is it perfect, well no.  But it is just about as good as anything else out there...and the price is right.

Sunday, July 20, 2014

Finding Your Way...For Free

One of the more annoying aspects of owning a small aircraft was the limitations the FAA placed on navigation equipment.  Anything installed in a certified aircraft had to be approved by the FAA and this approval process was expensive and time consuming and the cost was naturally passed on to the customers.  Spending $15,000 U.S. or more to install a GPS navigation radio with a 3 inch by 4 inch screen was the norm. When small laptops and tablets became available, a whole new "affordable" option became available and now I don't know many pilots that fly without having one on board.

While chart plotters for boats are not as expensive, they can still be several thousand to purchase and install. And if you want to go low-tech and simply use paper charts for navigation these days, you may find it difficult to find a map (as noted in this story from Sail magazine).  My boat has a chart plotter at the helm, but my aviation days taught me the benefits of redundancy.Without finding reasonable cost paper charts, I've found a low-cost solution that both provides official charts and acts as a backup for my chart plotter.

Did I say low cost?  It is actually free.  The program is called OpenCPN and it runs on Windows, Linux, and Mac.  This program allows you to view both official electronic data just like your chart plotter as well as geo-referenced images (called raster images) of the official paper charts.  Below are a couple snapshots of the two views using the Beaufort NC inlet.

Beaufort NC Raster Image (chart) view

Beaufort NC Vector Data (chart plotter) view.
The electronic chart plotter (vector) data view is a bit cluttered in the above image but I wanted to show you some of the detail available.  When you zoom in or out of an area, the application will automatically filter the data to make it more readable.  Zooming in or out of the chart (raster) view, the application will load the maps at the appropriate scale (provided you have downloaded them) so you can see details when you need to or get the "big picture" view when viewing a whole region.

The software alone is sufficient for reading charts and navigational data as well as planning routes. Oh, and did I mention that it can load and display GRIB data too?  You can display predicted wind speed and direction, pressure bands, wave height, currents, etc. right on either view (but you may need to zoom out a bit more than depicted above to see it).

OpenCPN is the application to view charts and navigation data, but it does not come with that data.  Instead, it reads chart data from a variety of providers.  In the U.S., NOAA provides both the electronic chart plotter (vector) data as well as geo-referenced chart (raster) images for free.  Other countries provide one or both data types for free or a nominal charge.  The OpenCPN site provides an overview of where you can find charts for various locations here.

The software can also display position and course information provided you can provide GPS data to the program.  This shows you where you are at any given time and can also record tracks (all the tracks I've posted on the blog recently are images from OpenCPN) and provide basic navigational information like course and ETA.

I want to provide more detail on how to download and setup the application and charts, as well as a couple of ways to get GPS data to the application (including a free one if you have an Android based phone), but this post is getting rather long already...so I guess I'll be doing a part 2.

In the meantime, if you want to check out the application, you can download it and/or find installation instructions here.  Documentation can be found here.  For the current U.S. chart (raster) images, you can get them here.

I assume most cruisers, at least the ones reading and writing blogs, carry one or more computers on board so this should be a low cost option for navigational data.  And even if you don't have a supported laptop, you should be able to get one for 10~20% of the cost of a dedicated chart plotter.  And it is generally easier to update the software as things change than it is to update your dedicated chart plotter.