Install on RPI & CubieT

Links to sites/blogs/forums with instructions for installation of OpenCPN on specific systems



OpenCPN For Dummies


One User's RPI Setup/Configuration


Rpi and HDMIPI Chartplotter

by StuartGunn


I have been using open source chartplotting for some years, starting with Seaclear on an old notebook computer and adding an Actisense multiplexer and connecting in instruments and autopilot. My previous setup was on a 41 ft boat in the Med and I had solar panels to keep up with the 3 amp load of the computer. My current boat is smaller and in the UK so I don't want the problem of large current drain. For that reason I changed to a Raspberry pi to run the chartplotter and changed to OpenCPN because Seaclear was not developed for the Rpi platform.


I have developed the system in stages and it now comprises:
            Rpi 2 within an HDMI screen as the chartplotter
            Rpi 1B running KPLEX multiplexer
            Matsutec HP33A AIS/GPS providing data
            NASA nmea wind instrument
            Raymarine ST 60 Tridata and Graphic display in the cockpit
   Seatalk/nmea translator  See CF Post
            Temperature sensor in the exhaust
            BMP180 barometer and HTU21 humidity sensors

See photos here


In developing the system the main issues I have faced are:

1. Power: shortage of power has been a constant bugbear either because the boat batteries ran down to below 12v or because of poor connections or because of surges during engine starting. I have tried various power stabilisers but my current arrangement which works well comprises a MeanWell 12v adjustable DCDC stabiliser and a 12/5 adjustable stepdown. I obtained both reasonably cheaply on Ebay; the Meanwell turned out to be from Westland helicopters old stock and the 5v unit is good and shows output voltage and current on a small screen. I have used chunky terminal blocks for all connections. I have also doubled up the boat's service battery.

2. Serial/USB devices: these come in two types,
  1. a) a unit about 5cm long with a USB at one end and 9-pinD at the other. The problem with these is that they require a 9-pinD to be soldered to a wire and then the two bolted together. Invariably the bolts are either male and male or are too short. The resulting affair is sensitive and can fail to work
  2. b) a unit which has the chip within the plug at the end of the wire. This seems to be a much more secure system but I have not got them to work properly yet and have fried 2 or 3.
  3. Whichever type of device is used the second problem comes when one needs to identify the units in a rule file so that the Rpi can recognise the correct USB port (I have 3 units attached to the multiplexer). Each unit must have a unique identifier (IDVendor, IDProduct, product, serial, etc.) but I seem to have found only 2 basic types of chips: Prolific and FTDI. IDVendor and IDProduct are identical for all units from Prolific or FTDI whatever shape they come in. Only FTDI has serial and they are aften identical. The only way to find out what data is on the unit is to buy and try it.

3. Software: I am very grateful to the developers of OpenCPN, KPLEX and other open software and I contribute financially in a modest way. However, several of my hiccups which have cost me days, have resulted from minor bugs in the software. I blame myself first but the possibility of bugs should always be considered.

4. Navigation Data: The Matsutec HP33A outputs AIS, GPS, and autopilot data but it will not mix the data at will. There are 5 different sets of data to choose from but none of them combine AIS with navigation (waypoint info). The AIS is transmitted at 38400 baud and other sets at 4800 baud. Thus it is not possible to use the Matsutec as the navigator and still receive AIS data on the chartplotter. The work-around is to usually set for AIS transmission and use the Rpi to navigate. A fallback if the Rpi fails is that the Matsutec will send data directly to cockpit instruments. I just have to change the setting through the menu.

5. Capacity of the Rpi: My first setup used an RPi B which worked well though it was sometimes overpowered by data when in the vicinity of many other vessels because of the need to handle all their AIS signals and compute potential collisions. I overcame this by switching off some of the AIS capability when traffic was heavy. I have now installed an Rpi2 and so far it seems to be coping, though I haven't been into very heavily trafficed ares yet.

6. OpenCPN sometimes fails to save the .conf file. This seems to happen possibly when voltages are low. Having spent some time setting up comms, screen defaults, dashboards etc it is upsetting to see them all disappear and a  start-up message appear. I have overcome this by saving a “good” opencpn.conf file as opencpn.x and writing a script linked to a desktop icon that removes the new .conf and replaces it with opencpn.x. If OpenCPN fails to open to the previous setup I stop it, click the reset icon and then start OpenCPN again.

Physical Setup

My boat is a Jeanneau Sunfast 32. The HDMIPI chartplotter sits next to the Matsutec GPS/AIS on the chart table. I made a wooded mount for the HDMIPI which works well. The photo of it shows a strange lug on the back. This is a second mount point to hold the HDMIPI in portrait mode but I have found that rotating the screen slows things up a lot so abandoned that idea.

There are 3 lockers next to the chart table. One is dedicated to the power supply for the boat and has the switch panel on the door. A second had previously been used for instruments cut into the door and I have removed these, repaired the holes, and converted the locker to hold the mulltiplexer and all associated nmea wiring connections.

I have put the 2 power stabilisers in the power locker and run wires to a terminal bus in the multiplexer locker.
To avoid having usb/serial connectors and the Rpi rolling around I made an open wooded box-like structure which contains the Rpi and monts the powered USB hub and connectors on the top. All connections from the Rpi GPIO are made to a terminal block on the side of the box.

Electronic Setup

I am running OpenCPN on the chartplotter and KPLEX and Python script on the multiplexer.
The following data comes in via serial/usb : nav data from Matsutec, wind from the masthead, depth and speed from SeaTalk

See CF Post:

Navigation data goes back out via SeaTalk.
Sensor data (barometer, humidity, air temperature, and exhaust temperature) come into the GPIO pins. Python scripts read the sensor data and export it to FIFO files which are in turn read by KPLEX.
KPLEX communicates with the chartplotter via TCP on the ethernet port.
KPLEX also broadcasts all data via wifi.
I can read the nmea messages from the chartplotter on OpenCPN on my tablet or SeaWi.

To Do

1. Wire in the tiller pilot: not really a priority.
2. Turn my Nexus 7 tablet into a reliable Linux unit running OpenCPN for cockpit viewing (I'm fed up with Google and Android; it just gets slower and slower)
3. Write a script to sound an alarm when exhaust temperature rises.
4. Get the sound working on the chartplotter and sound output via bluetooth to the car radio installed on board.
5. A couple of winters ago I made a weather unit which read intermittently from the barometer and humidity sensors and displayed current readings plus a constantly updating graph of the past 3 days. I programmed in Python using tkinter and matplotlib.This is the most useful thing for weather monitoring. I set it on one side because of problems with the touch location reversing on the Waveshare 3.5 inch screen I was using but at the same time I realised that it was going to be a drain on the battery. I thus hope to be able to convert the program to force the multiplexer to wake every 2 hours if asleep and record data to file and then have the viewing program runnable on the chartplotter and reading from the data file on the multiplexer. This will be a next winter project.