Opencpn Raspberry Pi4 Plotter V1hv4
Opencpn Raspberry Pi4 Plotter V1hv4
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.
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.
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.
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.
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
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.