Seatalk Connections

Introduction

Please note that this setup will not, for the moment, run on a Raspberry Pi 5 !!

The Signal K Server supports a variety of data connection types including Seatalk (GPIO) which provides the ability to receive Raymarine Seatalk 1 (ST1) data, via simple DIY hardware connected to a Raspberry Pi GPIO, and convert it to Signal K deltas. This information can then be forwarded by the Signal K Server to a NMEA 0183 or NMEA 2000 network using appropriate hardware and plugins.

A guide to SeaTalk can be found here.

Inspired by Read SeaTalk1 from the Raspberry Pi GPIO using pigpio.

Hardware

Using an optocoupler as the hardware interface is recommended as it creates electrical isolation from hazardous voltages and avoids ground loops.

The circuit below uses the PC817 optocoupler board but any equivlent product can be used. The LED in the circuit will flicker when there is ST1 traffic.

ST1_opto_SK

If you are building the interface yourself use the below circuit instead. If you don't want any flickering just drop the LED at the input.

ST1_opto_SK

A simpler, non-electrically isolated, solution is detailed below, using a low signal NPN transistor which inverts and shifts the voltage from 12V DC to 3.3V DC.

ST1_Tr

Software

Before configuring the data connection in Signal K Server, you will need to install pigpio and associated python libraries on the Raspberry PI.

Open a terminal and enter the following:

  1. Update the package manifest
    sudo apt-get update 
  1. Install the software
    sudo apt-get install pigpio python-pigpio python3-pigpio
  1. Enable and start the pigpio daemon which handles the data connection.
    sudo systemctl enable pigpiod && sudo systemctl restart  pigpiod
  1. Check the _pigpio_service is running
    sudo systemctl status pigpiod

Note: The pigpio deamon by default provides a socket interface on port 8888, which may conflict with other software running on your Raspberry Pi. To have the socket interface use another port you will need to change the pigpiod.service file using the Python program with the -p option.

Data Connection

Now you have installed the required software, you can now add a new data connection using the Signal K Server Admin UI.

Example Data Connection:

ST1_connection_SK

  • Select Server -> Data Connections from the main menu.

  • Click the Add button to create a new connection.

  • Select Seatalk (GPIO) in the Data Type dropdown list.

  • Set the Enabled to Yes.

  • Enter an ID (e.g. Seatalk).

  • In GPIO Pin, select one of the green GPIO pins from those pictured below (this will be the pin to which you connect your hardware e.g. GPIO04).

GPIO

  • Set Invert Signal based on the hardware interface you have used (e.g. Select No if using the optocoupler hardware setup above. Select Yes if using a hardware interface that inverts the ST1 signal).

  • Click Apply to save your data connection settings.

  • Restart the Signal K Server.

Viewing Received Data

Once the server has restarted, confirm that data is being received from the ST1 connection by using the Data Browser in the Admin UI .

The data received via the Seatalk connection will be displayed in the Data Browser with a source value that contains the ID you provided when setting up the connection.

If there is no data displayed in the Data Browser from the Seatalk connection, you can check if there is data available at the selected GPIO using the STALK_read.py utility.

You can download a program from a terminal session with the following command:

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

Run the utility with the following command:

    sudo python STALK_read.py

If the display shows ST1 sentences being received at the GPIO pin then review your data connection settings.