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
SeaTalk 1 to NMEA0183/2000 with Raspberry Pi
#31
(2021-03-13, 11:35 PM)Pierrot277 Wrote: Hello everybody,

Thanks for all of these answers and informations.
I am actually looking at how to connect my raymarine ST70 instruments to the raspberry. ST70 instruments are connected via a seatalkNG cable and not via a standard seatalk cable.
My question is, am i able to connect via an octocoupler as described above my instruments to the raspberry using pin numbers 6 and 2 (see the picture) on the seatalkNG white cable?

Thanks for the highlight....
Yes that should work. But I would check that the ST70 really outputs ST1 and that the ST NG cable really have the pin 6 populated. 
On the other hand I wouldn't go for ST1 !!
You are building for the future using ST NG/N2K using for example one of these products
https://github.com/SignalK/signalk-serve...00-can-bus
/Mats
________________________________________

Blog; https://pysselilivet.blogspot.com/
Reply
#32
(2021-03-14, 05:21 PM)MatsA Wrote:
(2021-03-13, 11:35 PM)Pierrot277 Wrote: Hello everybody,

Thanks for all of these answers and informations.
I am actually looking at how to connect my raymarine ST70 instruments to the raspberry. ST70 instruments are connected via a seatalkNG cable and not via a standard seatalk cable.
My question is, am i able to connect via an octocoupler as described above my instruments to the raspberry using pin numbers 6 and 2 (see the picture) on the seatalkNG white cable?

Thanks for the highlight....
Yes that should work. But I would check that the ST70 really outputs ST1 and that the ST NG cable really have the pin 6 populated. 
On the other hand I wouldn't go for ST1 !!
You are building for the future using ST NG/N2K using for example one of these products
https://github.com/SignalK/signalk-serve...00-can-bus
/Mats
 Hey Mats, 

Thanks for the advice, i think you are right and there is maybe nothing on the pin 6. 
I will use the waveshare RS485 can hat and configure directly via openplotter. It's maybe a more easier option.
Reply
#33
(2020-09-08, 01:10 AM)Cari20 Wrote: https://github.com/dnegrotti/seatalk1_ou...lk1_out.py

You can import the flow directly into Nodered with this code:

Code:
[{"id":"c964b9cf.79b678","type":"signalk-app-event","z":"46419c75.a897b4","name":"NMEA0183 Out","event":"seatalkOut","x":110,"y":140,"wires":[["4633789b.f5aac8"]]},{"id":"4633789b.f5aac8","type":"python-function","z":"46419c75.a897b4","name":"Seatalk1 Out","func":"#!/usr/bin/env python\n#Sends seatalk1 datagrams to serial output\n#By Cari20 (2020) loosely based on Marco Bergman ST2000 RPi remote\n\nimport RPi.GPIO as GPIO\nimport serial\nimport binascii\n\nmsg2 = msg['payload']\nlst = msg2.split(\"*\")[0].split(\",\")\nlst.append(msg2.split(\"*\")[1])\n\nif lst[0]=='$STALK':\n  with serial.Serial('/dev/serial0', 4800, timeout=10, writeTimeout=0) as ser:\n      ser.parity = serial.PARITY_MARK\n      ser.write(binascii.unhexlify(lst[1]))\n      ser.parity = serial.PARITY_SPACE\n      for i in lst[2:-1]:\n        ser.write(binascii.unhexlify(i))\n      ser.close()\n\nreturn msg","outputs":1,"x":290,"y":140,"wires":[[]]}]


With this setup you can have bidirectional communication with the ST2000 and the autopilot app is fully functional, I have a very long ToDo list to keep adding functionality, as I mentioned before the ST40 emulation and also the OpenCPN waypoint navigation. This can be extended to any signalk event provided you translate it to a seatalk1 datagram and inject the message into the “Seatalk1 Out” node. 

If you (or any other member) need any further details feel free to enquire.

Cari20

Cari20, Great work and also for SignalK team.
When I imported and examine the node for phyton function while waiting my circuit parts for boat test, I see the some parsing for *$STALK but when I tested this on phyton at VSC at home, the output is not exactly what I expected. 
I'm not experienced on programming maybe  I'm missing something here?
Your support appreciated,
Thanks,Sancan
Test code and result is:
#Sends seatalk1 datagrams to serial output\
#By Cari20 (2020) loosely based on Marco Bergman ST2000 RPi remote\
msg2 = '*$STALK,30,00,0C'
print(msg2)
lst = msg2.split('*')[0].split(',')
print(lst)
lst.append(msg2.split('*')[1])
print(lst)
if lst[0]=='*$STALK':
   print('helloinif')
   for i in lst[2:-1]:
       print(lst[i])
       print('helloinloop')

Sancans-MacBook-Pro-2:~ sensesp$ /usr/bin/python /Users/sensesp/Documents/PythonScripts/gpioseatalk.py

*$STALK,30,00,0C

['']

['', '$STALK,30,00,0C']
Sancans-MacBook-Pro-2:~ sensesp$ 
Reply
#34
Hi!
I'm desperate about making the Seatalk work on my Raspberry, so may be someone here will have an idea about what is wrong.

I have build the optocoupler interface described at https://github.com/SignalK/signalk-serve...k(GPIO).md
with the optocoupler circuit below. I measured with an ohmmeter the  resistance on the board and they are 3K as in Github optocoupler.

I have at least 4 Seatalk instruments daisy-chained with official cables. On one of the cable there is a splice that connect to the autopilot course computer ST100/300 where I took out the Seatalk input signal to the Optocoupler.I also tried to connect the optocoupler directly to another instrument ST output, with the same results.

I connected the circuit with a 4660 Ohm resistor to a Raspberry Pi zero W (headless, running Signalk server) and created the connection as describer in Github (GPIO 4 / inverted).
I have no signal in Signalk, nor with the tool STALK_read.p.

Then I measured the voltage (with a voltmeter, I don't have an osciloscope) at the Seatalk connector (with the optocoupler disconnected): I can see a fluctuating voltage between 11V and 12V so I conclueded that that was actually ST data (plus as the autopilot ST100/300 works fine, I gess it can be concluded that it receives correct ST data).

Then I measured the voltage when the optcouper is connected at the same point: I can see fluctuating voltage around 5V to 6V.
Then I measured the voltage at the GPIO pin and could see a fluctuating voltage of 1.5-1.7 V.

So I imagined that for some reason, the voltage at the GPIO was not suffisant to pull the signal down (I've read somewhere on line that you need at least 1.8V to change GPIO inputs). So I replaced the 4660 resistor with 4000, then 3000 to see what happens. With 3000 the STALK_read.p started to display STALK messages (that I'm unable to decode) and the SIgnalK server started to show only 2 data (Magnetic deviation and depth). Nothing else (on top of that the only instrument which is not connected is the depth sounder ;-).

I tried to remove the invert setting but it didn't change anything (Is there a possibility that I burnt the GPIO doing that?).


- What is not working? the optocoupler part? The raspberry?
- Is the Raspberry pi zero fast enough to decode the ST data flow ? (I believe 4.8 kbauds is not that fast for a pi zero.
- Why do I receive only 2 paths or are they just badly decoded?

Any idea?

Thanks!

BTW I'm in barcelona if any need for testing on a boat!

Ray
Reply
#35
(2020-08-07, 10:25 AM)Sailoog Wrote: We are working in a simple board with a waterproof case to convert Seatalk1 using this method but we have a big problem, we have not any Seatalk1 device Smile
If someone is in Catalonia or surroundings and has a Seatalk1 device I can send a set to try.
-----------------------------------------------------------------------------------------------------------------------------------------------
Estem treballant en una senzilla placa amb una petita caixa estanca per convertir Seatalk1 mitjançant aquest mètode, però tenim un gran problema, no tenim cap dispositiu Seatalk1 Smile
Si algú es troba a Catalunya o voltants i té un dispositiu Seatalk1, hi puc enviar un conjunt per provar-ho.

Did you succeed in building this box and testing it? I'm in Badalona Marina with ST1 instruments if you still need a test.
Reply
#36
(2021-09-13, 11:02 AM)Corosol Wrote: Hi!
I'm desperate about making the Seatalk work on my Raspberry, so may be someone here will have an idea about what is wrong.........
Hi !

Did a comment, yesterday, on this blogpost https://pysselilivet.blogspot.com/2020/0...r-diy.html if you missed it.
________________________________________

Blog; https://pysselilivet.blogspot.com/
Reply
#37
(2021-09-14, 09:09 AM)Corosol Wrote:
(2020-08-07, 10:25 AM)Sailoog Wrote: We are working in a simple board with a waterproof case to convert Seatalk1 using this method but we have a big problem, we have not any Seatalk1 device Smile
If someone is in Catalonia or surroundings and has a Seatalk1 device I can send a set to try.
-----------------------------------------------------------------------------------------------------------------------------------------------
Estem treballant en una senzilla placa amb una petita caixa estanca per convertir Seatalk1 mitjançant aquest mètode, però tenim un gran problema, no tenim cap dispositiu Seatalk1 Smile
Si algú es troba a Catalunya o voltants i té un dispositiu Seatalk1, hi puc enviar un conjunt per provar-ho.

Did you succeed in building this box and testing it? I'm in Badalona Marina with ST1 instruments if you still need a test.

Yes we did and we succesfully tested it in Masnou Marina. I think I still have some prototipes, I need to know where... send me a private message please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)