0% found this document useful (0 votes)
96 views

Opencpn Raspberry Pi4 Plotter V1hv4

The document provides instructions for setting up a 15.6" plotter using a Raspberry Pi 4 and OpenCPN marine plotting software. It details the hardware and software used, including a Raspberry Pi 4, GPS receiver, monitor, and OpenCPN. It provides step-by-step instructions for setting up the Raspberry Pi operating system, installing OpenCPN, loading charts into the software, and configuring USB ports and screensaver settings. The goal is to create a low-cost yet functional and reliable marine plotter for navigation.

Uploaded by

Johnny BoatLine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Opencpn Raspberry Pi4 Plotter V1hv4

The document provides instructions for setting up a 15.6" plotter using a Raspberry Pi 4 and OpenCPN marine plotting software. It details the hardware and software used, including a Raspberry Pi 4, GPS receiver, monitor, and OpenCPN. It provides step-by-step instructions for setting up the Raspberry Pi operating system, installing OpenCPN, loading charts into the software, and configuring USB ports and screensaver settings. The goal is to create a low-cost yet functional and reliable marine plotter for navigation.

Uploaded by

Johnny BoatLine
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

15.

6” PLOTTER USING RASPBERRY Pi4 B MICRO COMPUTER


& OPENCPN V5.2.0 MARINE PLOTTING SOFTWARE. V1h

About: I set out to build a plotter for Amethyst that would be highly functional, reliable & cost
effective. Previously I had built a PC based plotter which although it worked ok was using
Windows 10 which I thought was not entirely suitable for a stand alone dedicated device.
Because the Raspberry Pi4 (Rpi) works on 5 volts DC it makes it ideal to run from a 12 volt boat
supply through a low cost 12 > 5v voltage converter.
The Opencpn software is free to download & use but you can make a donation to the authors.
There are many chart features in Opencpn that are not present in the cheaper leisure software
versions. This makes the Opencpn very useful for small commercial vessels.
The satellite device I employed is a dual receiver which will use GPS & GLONASS satellites
simultaneously to determine the position. The manufacturers claim around 2mrt accuracy. I doubt
that but it is certainly much more accurate than a GPS PC dongle receiver.
Everything I used to built the plotter & GPS receiver was found & purchased on Ebay.
The Raspberry Pi4 uses Linux software, this I found very difficult to understand & really struggled
to find my way through the setup. So I recorded what I did & checked it to make sure it works.
Overall it has been a challenging project but now it is working well worth it. The following is a
guide only which should get the system running after which Opencpn will need setting up using
their manual.
Hardware Items I used:
1 – 15.6” 12v HDMI monitor
2 – Raspberry Pi4B 4 gig Micro computer
3 – 3D printed case with 5 volt fan & printed mounting bracket
4 – 64 gigabyte micro SD card
5 – 5 volt adjustable 10 amp power supply
6 – 2 glass fuse holders
7 – 3D printed case & mounting bracket
8 – 2mm Aluminium end plates
9 – Raspberry Pi header strip solder plug
10 - Micro to mini HDMI cable
11 – USB mouse
12 – USB mini keyboard.
13 – 4 way USB hub with external 5 volt power supply
14 – GPS GLONASS satellite receiver & TTL to USB connector
15 – Sandisk Cruzer Blade USB2.0 32gb memory stick.

Note: The power supply is very important with a Raspberry Pi4, if it does not provide enough
current the onboard WIFI will not function properly & a lightning symbol will appear on the screen.
It is best to power the external USB hub from the 10amp 5v supply via the fuse box.
It is also advisable to fit a 5v silent cooling fan to both the power supply & Raspberry Pi4. This fan
should be powered from the fuses & not the onboard Raspberry Pi header. I also had problems with
overheating that affected the HDMI output to the monitor, the addition of a cooling fan solved this.
I connected the 5v power to the GP10 header on the RPi using a header plug (see picture of Rpi).
The accuracy of the satellite receiver can also be affected by a bad power supply.

Software Items Required:


1 – Raspbian operating system software https://www.raspberrypi.org/downloads/noobs/
2 – Opencpn V5.0.0 marine plotter software for Raspberry Pi (Linux)
3 – PC for downloading Raspbian & formatting micro SD card

Raspberry Pi4 stetup


Note: be sure to connect the monitor to the HDMI 1 socket on Raspberry Pi (see picture of RPi).
A/ Format the micro SD card as FAT32 system (Only FAT32 will work with Raspberry Pi)
Note: Name the SD card “boot” with volume label “boot”
B/ Download NOOBS for Raspberry Pi4 to PC
C/ Create a directory on the PC called Noobs
D/ Extract downloaded files to the Noobs directory
E/ Copy & paste the extracted files from the Noobs directory to the Formatted SD card
F/ Plug the SD card containing Noobs into the Raspberry Pi & switch it on.
G/ Set up the WIFI at the Noobs opening screen
H/ Then select “Install Raspbian Operating System”
J/ Setup Zones & Country
K/ Check for updates to Operating System by opening the Terminal Application
L/ Type - sudo apt-get update Press Enter
M/ Type - sudo apt-get dist-upgrade Press Enter
N/ These two commands will check for any software update downloads & then installs them.
1/ Setting a Raspberry Pi4 to boot using a Solid State Drive.
A1/ Upgrade the system:
sudo apt update
sudo apt full-upgrade

B1/ Edit eeprom update file:


sudo nano /etc/default/rpi-eeprom-update

C1/ Change text from “critical” to “stable”


From: firmware_release_status”critical”
To: firmware_release_status”stable”

Control + X keys then”Y” to save & exit.

D1/ Install the bootloader:


sudo rpi-eeprom-update -d -a
Then type reboot

E1/ Check firmware version


vcgencmd bootloader_version
Result on mine was “Jul 16 2020 16:15:46”

vcgencmd bootloader_config
The result should be BOOT ORDER=0xf41 If you see this it means your Raspberry Pi 4 will look
for an SD card and if there isn’t one it will try to boot from a drive connected to the USB ports of
the Raspberry.

F1/ Next we download the “Rpi Imager” program


sudo apt install rpi-imager

Creating a bootable USB memory stick


I used a Sandisk Cruzer Blade 32gb USB2.0 memory stick.
It came formatted as FAT32 & the Rpi4 powered it from a USB3 socket with no problems.

Plug the stick into a USB3 socket, then use “Rpi Imager” to create a bootable drive by copying
files from the Rpi4 SD card to the stick. “Rpi Imager” can be found in “Accessories”.

Now the SSD should be ready to test, so shutdown the Rpi4 & remove the SD card. Switch on &
see if the SSD will boot the Rpi4.

DOWNLOADING & INSTALLING OPENCPN ON THE RASPBERRY Pi4B


Note: This next bit can be very frustrating & took me several goes to get it right. The Linux
language is also case sensitive so copy the following text exactly as it is written.
2 Downloading Opencpn:
A2/ Open the Terminal Application
B2/ Type - sudo nano /etc/apt/sources.list Press enter (This opens the software source list)
Scroll to end of existing text then add C2 below
C2/ Type – deb http://ppa.launchpad.net/opencpn/opencpn/ubuntu bionic main
D2/ Press – Control & X keys together
E2/ Press – Y key for yes
F2/ Press – Enter to save
G2/ Type – sudo apt-get install dirmngr Press Enter
H2/ Type – sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys c865eb40 Press
Enter
J2/ Type – sudo apt-get update Press Enter
K2/ Type – sudo apt-get install opencpn Press Enter
Hopefully that worked & Opencpn has been installed on the Raspberry Pi4
Making Opencpn autostart from boot
L2/ Open the Terminal Application
M2/ Type - sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
N2/ At the bottom of the list, Type – sudo opencpn -fullscreen
P2/ Press – Control & X keys together
Q2/ Press – Y key for yes
R2/ Press – Enter to save
S2/ Type reboot to test

3/ Loading charts into Opencpn:


Note: There are various sources of charts that Opencpn can use. If you want to use up to date vector
charts that carry a licence you can download these from O-Chart . I bought the oeSENC “British
Isles” set which includes UK & Ireland. There is an annual fee which was 22 euros paid for using
Paypal.
To load the oeSENC charts into Opencpn you need to purchase a chart from O-CHART then
download & install a plugin. This is an additional program that does a specific task & runs inside
Opencpn.
Downloading oeSENC plugin
A3/ Open the Terminal Application
B3/ Type – sudo apt-get update Press Enter
C3/ Type – sudo apt-get install oesenc-pi Press Enter
This should load the plugin into Opencpn
Now run Opencpn then open options & plugins. In the plugin list should be one called oeSENC,
click on it then click enable.
Now come out of plugins & go to charts, there will be a menu for oeSENC Charts.
Click on Refresh Chart List, this will then open a box that you enter the email address & password
you used when you set up the O-Chart account. From here on follow their instructions.

Loading BSB raster charts (Method I used):


D3/ Using the Raspberry File Manager create a new folder called **** Charts on the desktop
(Example this could be Cmap Charts or Raster Charts)
E3/ On the PC copy the charts to a USB memory stick
F3/ Plug the USB stick into the Raspberry Pi4 & using the File Manager copy the charts into
the correct chart folder
G3/ Follow the Opencpn instructions to open & use the chart folder.

4/ Downloading & loading all Opencpn plugins for Raspberry Pi (apart from oeSENC):
A4/ Open the Terminal Application
B4/ Type – sudo apt-get install opencpn-plugin* Press Enter
C4/ Follow the Opencpn instructions to open & use the plugins.

5/ To Open a TTL USB Port (I used this to communicate with the dual satellite receiver):
Note: To use USB input to Opencpn permission is required, this is granted using the following
code.
A5/ Open the Terminal Application
B5/ Type – sudo usermod -a -G dialout root Press Enter then reboot the Raspberry Pi
6/ To force Opencpn to use the same USB port numbers on startup:
Note: After you set up the USB connections in Opencpn then you restart, the connections are often
reversed. Use the following code to make the RPi use the same USB port numbers when it boots.
I have no idea how this “subsystem” command works but it does seem to.

A6/ Open the Terminal Application


B5/ Type – lsusb Press Enter (this will list all of your connected USB devices)
Typical device address will look like “bus001 device 008: id-10c4 : ea60 cynal intergated
products”
What you need is the id address for your connected USB device in my case “10c4 : ea60” for the
GPS & “1a86 : 7523” for the AIS
Write each address down to use next.

C6/ Type – sudo nano /etc/udev/rules.d/99-usb-serial.rules Press Enter


Then add the following text using your device address for each item.

D6/ Type – subsystem==“tty”, ATTRS(idVendor)==”10c4”, ATTRS (idProduct)==”ea60”


SYMLINK+=”gps”

E6/ Type - subsystem==“tty”, ATTRS(idVendor)==”1a86”, ATTRS (idProduct)==”7523”


SYMLINK+=”ais”

F6/ Press – Control & X keys together


G6/ Press – Enter to save

7/ Load Screensaver App:


Note: After a period of time the Raspberry Pi shuts down the screen, to prevent this do the
following.
A7/ Open the Terminal Application
B7/ Type – sudo apt-get install xscreensaver Press Enter
C7/ Open the “Preferences” menu & select “Screensaver”
D7/ In Screensaver select “Mode” then “Disable screen saver”.

Summary:
This project is after a great deal of trial & error finally working as stand alone plotter. If you decide
to use these notes to build your own system please do not blame me if it does not work. The
operating system used here was “Raspbian Buster” earlier versions might not work with the code
used here

Warning: This setup is not waterproof & can only be used in a dry atmosphere
All Components used were all sourced on Ebay

GPS receiver & USB TTL connector


Both items are joined together with a 5 wire cable then connected to the Rpi4
The GPS receiver needs to be housed in a weatherproof plastic container.
Covers can be purchased for the TTL USB connector, I made one for the GPS receiver.

10 amp DC power supply


12/24 volts DC in & 5 volts DC out.

32 gig Sandisk Cruzer BladeUSB 2.0 flash memory stick.


15.6” Monitor
12 volt HDMI monitor.

USB hub powered 4 input hub. Plastic case is easily removed to mount inside printed case.
3D printed case containing the Rpi4 computer, 10amp power supply, 4 port USB hub, cooling fan
& fuse holders. The mounting bracket was printed in 2 parts, part 1 screws to the vesa position on
the rear of the monitor & also holds the computer box. Part 2 is the base which allows the monitor
to pivot & provides a screw down main mount.

Notes:
1/ I have tried several memory sticks for booting from. Some work & some do not, the most reliable
I found was the Sandisk Cruzer Blade USB2.0 flash memory.
One of the ones that didn't work was a Sandisk USB3 version.

2/ If after Raspbian setup you end up with a black border around the screen do this in terminal:
Type – sudo nano /boot/config.txt
Find: #disable_overscan-1
Remove - #
Leaving - disable_overscan-1
Then – Control plus x keys together
Then – Y for save then Enter

3/ After creating a bootable memory stick the first boot will be quite slow but should sort itself out
after a few boot operations.

You might also like