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

Opencpn Raspberry Pi4 Plotter V1f

The document provides instructions for setting up a 15-inch touchscreen plotter using a Raspberry Pi 4 microcomputer and OpenCPN marine plotting software. It details the hardware and software components used, including a touchscreen monitor, Raspberry Pi, cooling fan, micro SD card, power supply, and GPS receiver. It then provides step-by-step instructions for setting up the Raspberry Pi operating system, downloading and installing OpenCPN, loading charts, and configuring additional settings and plugins to integrate the GPS receiver and enable touchscreen functionality.

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)
166 views

Opencpn Raspberry Pi4 Plotter V1f

The document provides instructions for setting up a 15-inch touchscreen plotter using a Raspberry Pi 4 microcomputer and OpenCPN marine plotting software. It details the hardware and software components used, including a touchscreen monitor, Raspberry Pi, cooling fan, micro SD card, power supply, and GPS receiver. It then provides step-by-step instructions for setting up the Raspberry Pi operating system, downloading and installing OpenCPN, loading charts, and configuring additional settings and plugins to integrate the GPS receiver and enable touchscreen functionality.

Uploaded by

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

15” TOUCHSCREEN PLOTTER USING RASPBERRY Pi4 B MICRO COMPUTER

& OPENCPN V5.0.0 MARINE PLOTTING SOFTWARE. V1f

About: I set out to build a touch screen 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” Eyoyo touchscreen monitor
2 – Raspberry Pi4B 4 gig Micro computer
3 – Metal case with 5 volt fan for Pi4B
4 – 64 gigabyte micro SD card
5 – 30 volt adjustable 10 amp power supply
6 – 4 way fuse panel
7 – Earth terminal strip
8 – 3mm Aluminium back plate
9 – Raspberry Pi header strip solder plug
10 - Micro to standard 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
15 – TTL to USB connector

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 Pi case's.
These fans should be powered from the fuse box & 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.
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.
1/ Downloading Opencpn:
A1/ Open the Terminal Application
B1/ Type - sudo nano /etc/apt/sources.list Press enter (This opens the software source list)
Scroll to end of existing text then add C1 below
C1/ Type – deb http://ppa.launchpad.net/opencpn/opencpn/ubuntu bionic main
D1/ Press – Control & X keys together
E1/ Press – Y key for yes
F1/ Press – Enter to save
G1/ Type – sudo apt-get install dirmngr Press Enter
H1/ Type – sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys c865eb40 Press
Enter
J1/ Type – sudo apt-get update Press Enter
K1/ Type – sudo apt-get install opencpn Press Enter
Hopefully that worked & Opencpn has been installed on the Raspberry Pi4
Making Opencpn autostart from boot
L1/ Open the Terminal Application
M1/ Type - sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
N1/ At the bottom of the list, Type – sudo opencpn
P1/ Press – Control & X keys together
Q1/ Press – Y key for yes
R1/ Press – Enter to save
S1/ Type reboot to test

2/ 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
A2/ Open the Terminal Application
B2/ Type – sudo apt-get update Press Enter
C2/ 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):


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

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

4/ 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.
A4/ Open the Terminal Application
B4/ Type – sudo usermod -a -G dialout root Press Enter then reboot the Raspberry Pi

5/ 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 Opencpn use the same USB port numbers when the
program starts up.
I have no idea how this “Kernel” command works but it does seem to.

A5/ 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 this case “10c4 : ea60”
Write each address down to use next.

C5/ Type – sudo nano /etc/udev/rules.d/70-serial-opencpn.rules Press Enter

D5/ Type – kernel== “ttyACM[0-9]”, ATTRS(idVendor)==”10c4”, ATTRS


(idProduct)==”ea60” SYMLINK+=”APMFC” Press Enter

E5/ Type - kernel== “ttyACM[0-9]” as above for other USB devices Press Enter

F5/ Press – Control & X keys together


G5/ Press – Enter to save

6/ Load Screensaver App:


Note: After a period of time the Raspberry Pi shuts down the screen, to prevent this do the
following.
A6/ Open the Terminal Application
B6/ Type – sudo apt-get install xscreensaver Press Enter
C6/ Open the “Preferences” menu & select “Screensaver”
D6/ In Screensaver select “Mode” then “Disable screen saver”.
7/ Setting a Raspberry Pi4 to boot using a Solid State Drive.
A7/ Upgrade the system:
sudo apt update
sudo apt full-upgrade

B7/ Edit eeprom update file:


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

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


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

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

D7/ Install the bootloader:


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

E7/ 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.

F7/ Next we download the “Rpi Imager” program


sudo apt install rpi-imager

Creating a bootable USB SSD


I used a Sandisk Extreeme 120gb solid state drive with a USB to SATA adapter cable.
It was formatted as FAT32 & the Rpi4 powered it from a USB3 socket with no problems. I am
however going to try the SSD connected to a separately powered USB3 hub.

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

G7/ Go to https://github.com/raspberrypi/firmware/tree/master/boot copy all of the files with


.elf & .dat extensions. I did this with a PC & copied the files to a memory stick which I plugged
into the Rpi4 & used to overwrite the .elf & .dat files in the boot directory of the SSD.

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.

Summary:
This project is after a great deal of trial & error finally working as stand alone touchscreen 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
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.

Programmable DC power supply


Up to 30 volts DC in & adjustable to 5 volts DC out.
Make sure you set the output to 5 volts before connecting Rpi4

120 gig solid state drive (SSD) with a SATA to USB connecting cable.
15” Touchscreen Monitor
12 volt HDMI monitor with USB cable to Rpi4 for touchscreen control.

GPS receiver mounted in a waterproof home made housing.


DUAL GPS/GLONASS SATELLITE RECEIVER
CONSTRUCTION NOTES

Constructed & tested for use with a PC or Raspberry Pi4 computer running
Opencpn as a navigation program.

This device receives signals from two satellite navigation systems GPS & GLONASS
it then combines these signals to make a more accurate fix than using just one system.

I have built two of these devices & tested one of them over a period of three months
during which time it performed perfectly without any known problems.

Performance

The left hand picture above shows the static position track for the dual receiver & the
right hand picture shows a static track for a single receiver GPS USB dongle.

Components required
1 Plastic 63x58x35mm waterproof box
1 Plastic cable gland P67 for 3.5mm cable
5mtrs data cable WND04 – 4 wires 3.5mm diameter with braid screen
1 Dual receiver GG-1802 GPS-GLONASS
1 USB>TTL Uart CP2102
1 USB solder on plug with plastic shells.
50mm Insulation sleeve 0.5mm I/D
Some clear Stick Like SH adhesive
Superglue

Tools required
very fine point soldering iron
Solder
Small wire cutters
Small phillips screwdriver
The components

Drill the plastic box with a 12.5mm bit to fit the cable gland
Install the cable gland & glue the receiver into the box as shown with Sticks Like SH.

Next very carefully desolder & remove the USB connector from the UART
Then solder the receiver wires & plug to the UART pins, insulate with sleeving.

Next solder the data cable wires to the USB tabs on the UART
Now plug the UART into the receiver & thread the data cable through the gland.

Glue the UART board into the box & tighten the cable gland.

Now solder the data cable to the USB plug then add the plastic shells.
After testing the shells can be super glued together.
Mount the plastic box in a vertical position with the data cable exiting from the
bottom.

The receiver can be mounted using either screws on a flat surface or cable ties on a
vertical tube.

Testing
1/ Check that all of the wires go to the correct pins & that no short circuits exist
between soldered connections.

2/ Plug the data cable into a PC USB socket

3/ With the cover removed from the receiver plastic box, check that the red power &
blue LED's on the receiver are lit.

4/ The LED on the UART flashes as it transfers data to the PC.

5/ When the receiver has acquired a position the constant blue LED begins to flash

6/ A good free test program is “U-Centre” which can be downloaded from U-Blox

7/ In Opencpn connection menu select “Silicon Labs CP2102 USB to UART Bridge
Controller 0001” Set Baudrate to 9600
Final note

Provided that all of the wires are neatly soldered in the right place & the gland hole is
safely drilled in a vice using pilot & final drill bits this project should take less than 2
hours to complete.

Be very careful using a hot soldering iron.

Be sure to tin the wire ends, UART pins/tabs & the USB tabs before soldering
together.

Fit the rubber gasket to the groove of the plastic box lid & fit the lid with the gasket
joint at the bottom most position.

Good luck & be neat with the soldering.


Notes:

Warning: Apart from the dual GPS receiver this setup is not waterproof & can only be used in
a dry atmosphere

You might also like