Sending data to SeaTalk (1): Circuit Design?

Joined
20 Jun 2007
Messages
16,234
Location
Live in Kent, boat in Canary Islands
www.bavariayacht.info
My next project needs to send data to the SeaTalk (1) bus. Being a perfectionist I'm torn between different approaches:

[1] Copy the schematic diagram of a Raymarine instrument:
ST-IO.png


[2] Use a very simplified circuit from Thomas Knauf:
seabidi.GIF


[3] Try to devise a circuit of intermediate complexity. I could have a stab at it, but not my area of expertise.

Bearing in mind that this is on a live SeaTalk bus that is relied on, what would you choose?
 
Last edited:
I'm currently working on a project involving an Arduino reading and writing to Seatalk. I've built the hardware, still working on the code for doing Seatalk. The circuit I used is from one of Angus's PIC projects, closer to the Knauf version (but not identical because that is for a PC serial port rather than 5v microcontroller pin).

I'm not overly worried about the analogue side of things - Seatalk is a pretty robust system really, with a slow rate and a massive 12v swing that makes it hard to mistake a 1 for a 0. Angus says his circuit looks very clean on a scope; I bought a USB oscilloscope board the other week and I'll have a look at mine once I get to the point of reading and writing, but I don't expect any trouble.

As for the bus being "relied on" - in my case really the only way it could cause harm before I was able to open the binnacle and unplug it is if it somehow manages to emit a well-formed "Engage autopilot" packet, locking the steering, in a confined space. That seems a remarkably unlikely thing to happen by chance. Otherwise, if the instruments start going haywire - well, so what? I don't need them to sail the boat.

Pete
 
The Raymarine circuit is apparently pulsing TR1a on a +ve going edge to pull the data line up quicker via 390ohms.
The Knauf circuit relies on the 10k resistor to do that, which will be slower, for the same bus capacitance.
The Knauf circuit inverts the data, FWIW. And has less controlled data thresholds.

I expect the Knauf circuit works, while the Raymarine one might meet a specification.

With either of these, the bus can be locked by the talker.
Which can be a nuisance, I have had an instrument bus hang locking the depth readout at something like 3.8m, which was believable until we noticed it was not changing.
 
There are two differences that concern me.

1. Edge speed.

The "official" version has components that will enhance (speed) the transmitted edges. That will make for better performance over a long bus. Make it more immune to noise. But it will also generate a little more EMC.

2. Conducted noise and spike withstand.

The "official" version has quite a lot of protection. LC filtering (maybe even common mode chokes). Diode clamps and a transient suppressor.
The "Knauf" version has nothing.

In a small boat installation, I doubt edge speed is an issue. But I would be very unhappy to have no protection against noise or spikes.

I would (will when I have time) use the "official" version. It's only a few cheap components.

But if you go for your option 3, make sure you think about noise and spikes.
 
I would be very unhappy to have no protection against noise or spikes.

Presumably that's protection for the homemade device, not protection from it?

If my widget gets damaged it'll be mildly annoying, but no more. I have a box of transistors, and the Arduinos are 2 quid each and I have spares to hand. I've already knackered two of them by accidentally shoving 12v up an input pin, just drop 'em in the bin and rip open a new pack.

Pete
 
Presumably that's protection for the homemade device, not protection from it?

If my widget gets damaged it'll be mildly annoying, but no more. I have a box of transistors, and the Arduinos are 2 quid each and I have spares to hand. I've already knackered two of them by accidentally shoving 12v up an input pin, just drop 'em in the bin and rip open a new pack.

Pete

Both.

If you use the simple circuit and the input transistor gets damaged such that it goes short circuit C to E.

Then you won't damage your other devices, but they won't be able to transfer data on a shorted bus either.
 
Then you won't damage your other devices, but they won't be able to transfer data on a shorted bus either.

Thanks - this is all a bit of a new world to me so others' experience and knowledge is very welcome.

As I said above, provided my expensive Raymarine kit doesn't get damaged, things like that aren't a serious problem. I don't need Seatalk to work 100% reliably for safety purposes, and if my gadget causes trouble I can open an access hatch on the front of the binnacle and unplug it.

Pete
 
Presumably that's protection for the homemade device, not protection from it?....

Pete
C76, L3 and L11 will reduce the interference the transciever puts on the bus, which may help with radio reception.
Or not.
 
... In a small boat installation, I doubt edge speed is an issue. But I would be very unhappy to have no protection against noise or spikes. I would (will when I have time) use the "official" version. It's only a few cheap components. But if you go for your option 3, make sure you think about noise and spikes.
From experience of decoding waveforms it's a good idea to keep edge speed up within reason. My longest SeaTalk cable is about 20m, so there will be some HF loss.

Unfortunately, while I understand the issues you raise, I don't have enough experience in circuit design to figure out a circuit. I can do digital, but once you get into transmission lines, even digits become analogue! However, it did occur to me that there may be a suitable line-driver IC that could be used to reduce the component count.
 
That's on my list as well, feel free to share the code if you find yourself in a generous mood :)

9 bit serial isn't it?

Yes.

There are several approaches out there, but all have their issues. Things like existing only as a patch against an ancient version of the serial libraries, for example, as opposed to functional deficiencies (afaik).

The hardware will do 9-bit but it's not exposed in the standard Arduino libraries, so most of the approaches are about enabling that. However, the board I'm using only has one hardware UART, the one normally used for the serial monitor debugging, so for better or worse I decided to leave that alone and go with the SoftwareSerial technique, which will be more flexible. Hopefully the slow rate of Seatalk will work in favour of that. I've been hacking at a copy of the standard SoftwareSerial module to turn it into "SoftwareSeatalk"; I've never done any C++ before which slowed things down a bit initially, but I have a good handle on what I need to do now. Still not yet at the point of actually trying it out, and it's somewhat on the back burner for the moment.

Pete
 
I assume you're familiar with these. While there is a render of the PCB layout in the PDF documentation, no circuit diagram seems to be published - although perhaps the author would share advice on the email also published therein?

Edit: Ah, there's a circuit diagram in another of his projects. Seems he's just using the Knauf version, with a MAX232.
 
Last edited:
well, seems to work OK, 2 resistors and a transistor. Opencpn reading the data fine.

were you trying them as plain chip without the resistors?
fwiw, I got a few tiny boards with 6 resistors on the rear, work fine for TTL-RS232
they replace fried expensive boards with 9pin serial on them

V.
 
were you trying them as plain chip without the resistors?
fwiw, I got a few tiny boards with 6 resistors on the rear, work fine for TTL-RS232
they replace fried expensive boards with 9pin serial on them

V.

Using this circuit just on a breadboard so far, though can't remember the exact resistor values, something like that. Nmea from a nasa fluxgate compass goes in on the left, 5v ttl out into an arduino serial RX pin on the right.


To our learned friends, would a zener diode between the nmea input and ground help protect against any spikes on the input?

Ly0sECR.png
 
Top