Skip to content

Latest commit

 

History

History
56 lines (29 loc) · 3.55 KB

Seatalk(GPIO).md

File metadata and controls

56 lines (29 loc) · 3.55 KB

Seatalk(GPIO)

1. Intro

The connection with ”Input type” => ”Seatalk(GPIO)” supports the function to receive, via simple DIY hardware and one of the GPIO:s on the Raspberry, Raymarine Seatalk 1(ST1) data and convert it to SignalK delta. This information can then be forwarded to a NMEA 0183 or NMEA 2000 network with appropriate hardware and plugins. A guide to SeaTalk is found here

Original idea is picked from https://github.com/Thomas-GeDaD/Seatalk1-Raspi-reader

2. Hardware

ST1_opto_SK

The circuit is referring to this optocoupler but a similar product can of course be used. The LED in the circuit will flicker when there is ST1 traffic.

Choosing an optocoupler as the hardware interface is a smart way to avoid ground loops and creats electrical isolation from hazardous voltages.

Do You want it simple ? The simplest possible interface solution is according to the picture below. You use a small signal NPN transistor which shifts the DC level, from 12 V DC to 3,3 V DC, and inverts the signal.

ST1_Tr

3. Software

Due the DYI approach and that this function have limited users You have, before configuring the actual connection, to install some software manually in a terminal window. Start with an update and then the software install

$ sudo apt-get update && sudo apt-get install pigpio python-pigpio python3-pigpio

The connection relies on a daemon which is enabled and started via a systemd service. Install with

$ sudo systemctl enable pigpiod && sudo systemctl restart  pigpiod

Could be checked with

$ sudo systemctl status pigpiod

Please note that pigpio deamon provides, by default, a socket interface on port 8888, which could conflict with other software You have installed. If You want to move the socket interface to another port You have to change the pigpiod.service file with the -p option, and the Python program. So maybe it's easier to move the conflicting program ?

Now go on add a connection, in the admin GUI, with type ”Seatalk(GPIO)” according to the picture.

ST1_connection_SK

Select which pin, one of the green ones in the picture below, You have shoosen as input and use ”Invert signal” "YES" if You are using the hardware setup above. Invert "NO" is used if You have a different hardware interface which is not inverting the input signal.

GPIO

Restart the SignalK server and then use the ”Data Browser” in the admin GUI to confirm that You are receiving the SK data

If You are in doubt, if there is data available at the selected GPIO, You can download a program

$ wget https://raw.githubusercontent.com/MatsA/seatalk1-to-NMEA0183/master/STALK_read.py

change the setup in the beginning of program and execute it with

$ sudo python STALK_read.py

If You succed You will se the ST1 sentences roll in.