This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How I did it
#1
How I did it was a long evolution that will continue to change as I add components and continue to learn. For now I can control or monitor most everything I need to from nearly anywhere on the boat with significantly more ease that any off the shelf system that would have cost significantly more to do less.

My system uses a Pi3B+ running OpenPlotter at the Nav station cabled to a monitor at the Nav station or another smaller FayTech monitor near the Helm. In addition to the Openplotter Pi I have a Pi Nano running Tiny Pilot that I purchased from Sean at PyPilot.org. The Pypilot is cabled to a “McNugget” clone motor controller I built which drives a hydraulic pump and processes rudder feedback.

My main interface for the entire system is a 10” Samsung tablet on a ball mount at the helm. It runs the non-free OpenCPN app from the Google App Store and I can splitscreen OpenCPN and a web browser and run PyPilot using its web interface.

Serial sensors -
AirMar DT800 which provides NMEA 0183 Depth & temp and I plan to upgrade it to a DST800 to add boat speed. It terminates into a 9 pin RS232 connector and shell which plugs into a TrendNet USB to Serial adapter
AIS cabled to TrendNet USB to Serial adapter
GlobalSat-BU-353 USB GPS receiver, I’ve also used the cheap Glonas USB GPS devices

Most of these devices are feeding into a Manhattan 7-Port USB 2.0 Ultra Hub. I have a Davis Annemometer to install, radar and a few other things planned to improve my system but for the time being I love what I have and it functions extremely well.

Wireless -
In addition to the Pi’s onboard WLAN, I have a TPLink TL-WN725N USB WiFi adapter plugged into the USB Hub.

I’ve learned the hard way to buy the same components that others have successfully used with these setups. I’ve had difficulty using some of the cheap knock-off RS232/422 converters, USB hubs and other devices that require strange driver files and often aren’t fully supported by an off the shelf Raspbian/Linux distro. Save yourself some headaches and buy proven components. Research everything carefully before you order parts. My FayTech touch display monitor was somewhat of a letdown. Its difficult to get their Touch functionality working with Linux so its mainly used as a backup monitor and I have to run the system with a Logitec M570 trackball/mouse when I use that monitor. Their support dept never replied to my emails.

One lesson I repeatedly taught myself the hard way was that I didn’t make system backups using Openpoltter’s built it Accessories>SD Copy to duplicate the MicroSD card of a working system. I’d change a few settings trying to improve things or tweaking network settings and inadvertently brick my system forcing me to start over from scratch to rebuild what I had working properly. Turns out the biggest issue I was struggling with was the Raspbian Pi3B+ WLAN “Set WiFi Country bug” that's still present on new installs.

The other lesson I learned along the way was to document my settings so that in the event of system issues a year down the road I’ll know how to configure ports and serial devices without guessing. I now take simple screenshots of serial and network setting pages so I have something to reference going forward.

Another lesson I learned the hard way was make certain you can buy a waterproof case before buying a Tablet. ArmorX, LifeCase, Otter and others have a pretty wide selection. Ram, I-bolt and Arkon make some pretty slick mounting solutions.


I like what I’ve got and owe a huge debt of gratitude to everyone whom have spent many long hours to make these Open Source projects such a great success. I never could have done this on my own and wish to convey my sincere thanks to Sailoog, Sean, Timo, Rick and everyone else that has shared their time and talents so freely. Thank you very much.

OpenPlotter Rasberry Pi 3B+, dedicated PyPilot & helm tablet setup

This is how I set my system up, these are more or less my notes to myself so I know how to build the system again if needed. My document has photos, when I'm able I may link to some photos showing serial connections and other settings. I'm quite certain there are likely some bugs I'm not aware of in my configuration and that perhaps some settings could be employed more efficiently. More than anything I'm hoping to help other people avoid or overcome some of the basic and simple stumbling blocks I faced. If you have a suggestion I'm open to input, keep it lighthearted, I'm not an expert or pro here. My legal disclaimer is that these are experimental systems and I am not liable nor responsible for your results, boating accidents or errors; you are responsible for the safe operation of your vessel.


1. Gather and format boot image
Download OpenPlotter Starter distro -
https://cloud.openmarine.net/s/sL9doDML7P4CQDo

write to MicroSD Card using dd or whatever you desire to burn the .img file to a MicroSD card.
dd if=/home/user/downloads/2020….openplotterfile_name.img of=dev/sdb/ bs=4m

2. Boot & fix network issues-
Once image is on MicroSD insert it into Pi, boot system and follow install prompts.

user = pi, pw = openplotter

* WiFi issues - After the Pi reboots you may experience wlan not available issues and it may be necessary to fix a Pi wlan networking glitch within Raspian OS network configuration (affects Pi 3B+’s mainly). Fix WiFi country not set issue by editing the wpa config file.

A 2nd wlan may not be usable until drivers are installed and it will make using the on-board wlan sketchy. Leave 2nd USB wlan unplugged until setup is complete, make sure wlan0 is connected to internet, start Openplotter Network app then plug in 2nd USB wlan, wait a few seconds then click update wireless drivers to install drivers for USB-wlan1, reboot once that is complete. Network Manager should now show both devices.


Set WiFi Country in wpa_supplicant.conf config file
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf,
add > “country=US” before the network items.
The file should look similar to this-
country=DE

network={
ssid="xxxxxxxxxx"
psk="yyyyyyyyyy"
key_mgmt=WPA-PSK
}

CNTL X to exit, save, then reboot, WiFi should work normally after setting WiFi Country in this manner.


Make Backup images as you build your system
You may wish to backup your work to a separate MicroSD card as you accomplish some of the sub items included here. Make a back-up copy once you get the full system provisioned and functioning properly. Its much simpler to repeat one or two steps than to completely restart this entire process. If you’re somewhere remote without internet it may not be possible to recover a system without being able to load new program or driver files without web access. Carry a back-up MicroSD and system components.


3. Raspberry settings > Interfaces
enable I2C, serial

reboot


4. Enter OpenPlotter Settings and install
PyPilot
I2C


5. Serial Device Configuration --
Manhattan USB hub connections and settings - Clockwise ports starting from back
select the remember port position tickbox for each item below.
AIS > USB0 >NMEA 0183 > GPSD
GPS > USB1 > NMEA 0183 > GPSD
Depth > USB2 > NMEA 0183 > GPSD



6. OpenPlotter PyPilot App – setup Signal K data feed (Use Only Compass unless the Pypilot is actually attached to and being controlled by the Pi, if the PyPilot is a 2nd device such as a Pi Nano TinyPilot leave Openplotter configured as “Compass Only”.)


Open Signal K - enter username and assign a password. Use to monitor data feeds.


7. Start OpenCPN (on OpenPlotter Pi)
Goto Options > Plugins > add / install Pypilot and enable (this forwards NMEA data to SignalK & Pypilot

Start OpenCPN and configure Options>Connections
Signal K, Localhost, port 3000
TCP, localhost or 127.0.0.1, port 20220

Start NMEA Debug display or Dashboard and look for active NMEA data – GPS, AIS, depth, if pypilot is connected via WiFi heading info should be available


Open OpenCPN’s Pypilot Plugin and click config > use 192.168.14.1
to control and calibrate AP from Nav Station monitor using Pi 3B+
tick Fwd NMEA = true
adjust compass alignment as necessary depending on your install (-180)


8. Open Plotter Network Settings
AP = none
All the devices I use access the system directly through pypilot. Two wireless clients are available through the Pi’s Network Manager. The ‘on-board wlan0’ is connected to the PyPilot, WLAN1 connects to the ship’s WLAN which receives web service via Marina WiFi or cellular. This way the crew has web access at the nav station as well as anywhere on the boat. With only two wlan’s and Openplotter’s current configuration the option isn’t there for either WLAN to act as both AP & Client at the same time. One of the wlan’s could be configured to have OpenPlotter act as an AP, however all of the data is available through Signal K if a device connects to the PyPilot AP. I set my system up this way so if I lose the Openplotter Pi I still have access to Pypilot to control the Autopilot without having to reconfigure anything and OpenPlotter has web access for downloading weather, browsing, etc..

(There are a lot of ways to configure this, when I'm near shore or anchored this was how the system is configured. Offshore I may set up OpenPlotter to act as an AP)

9. Tablet settings
Wifi SSID to use: pypilot
pw - xxxxxxxx
use web browser to access Autopilot controls
http:/192.168.14.1


Additional tablet, laptop or other device OpenCPN Connections & Port Settings
SignalK ip 192.168.14.93 port 3000
NMEA Signal k IP 192.168.14.1 port 20220
(Note – its possible IP address could change if the Pi/PyPilot are rebooted.)


10, PyPilot Settings/Config
Goto http:/192.168.14.1 and configure Pypilot WiFi settings-
Secure the AP – pypilot by adding a password
pw – xxxxxxxx

Calibrate the gyro compass, heading offset and rudder feedback.

11. Load Charts in each system
Load Charts in each device as needed, note Android OpenCPN app seems to provide more/better chart info using ENC charts.


**************************************

If you have a suggestion how to streamline or improve this, please let me know. It started out as my personal notes and I thought it might be helpful to share. There's a lot going on with likely over a dozen devices and several networks communicating and sharing information. I'm not exactly a forum regular so don't look for a quick reply. Thanks to those here who have inspired me and helpped bring this to fruition Smile
Reply
#2
Nice system and advice, I made a huge Onenote document as I went through mine and generated a couple of the pages in the Openplotter documentation from it to hopefully help others!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)