NMEA 183 depth/speed/distance to Analogue conversion

neilandshiv

Well-Known Member
Joined
15 Oct 2008
Messages
113
Location
Bucks, England
Visit site
I want to convert NMEA 0183 depth and speed/distance to the analogue signal that comes from a B&G Hecta piezoelectric depth transducer.

Actisense's DST converts from older transducer signals to NMEA 0183 but I can't find anything that does it the other way round.

So my questions
1. Does anyone know what these old transducers output. Eg Is it something like 0 to 5 volts for 0 to 100m.

2. I'm sure I could program a Raspberry-Pi to read NMEA 0183 depth/speed/distance and get a the values in a variable in the program but can anyone help with how to get an analogue signal out of the device.

Ok before someone says Why - here's the answer.

We have an old B&G system on the boat. The instruments below and repeaters above are great, but the log transducer housing is failing and no spares are available.

I want to fit a single transducer eg Airmar DST800 and drive the existing instruments. I want simple separate depth and speed and not some multi function display with loads of options.

Fitting Garmin / Raymarine instruments above and below deck to recreate what we have now
is too expensive.

One other option for the log is the NASA Easy Log which accepts NMEA 183. NASA also have a wind instrument that will input NMEA 183. And the Yacht repeater multi function display that does wind, speed, distance, depth and lots of other stuff but for some strange reason they don't do an "Easy depth" instrument on its own that reads NMEA 183.
I think they are missing a trick here as with versions of their clipper instruments that read NMEA and display individual items such as Wind, Speed/Distance and Depth they could provide an option for much cheaper repeaters for Raymarine / Garmin etc systems where there instruments are £300+ each.
 
2. I'm sure I could program a Raspberry-Pi to read NMEA 0183 depth/speed/distance and get a the values in a variable in the program but can anyone help with how to get an analogue signal out of the device.
.
An arduino would probably be better suited, a mega has 4 serial inputs and 5v analogue/digital in/outs. There's a good library already to get the required numbers from the nmea sentences. The analog outs are pwm so might need bit of smoothing but it shouldn't be too tricky, loads of online help and code to cut and paste.
 
The analog outs are pwm so might need bit of smoothing but it shouldn't be too tricky

Huh?

The OP is trying to simulate a plain transducer. He's going to need to watch for an outgoing ping and then, at precisely the right time interval later, generate the returning pong in a manner that's recognisable to the instrument. In both cases almost certainly requiring appropriate analogue electronics as interface. Maybe it's easier than I think, but I wouldn't like to try it, and I'd suggest that it's probably not feasible for someone at the skill level of "I can probably get the NMEA values in a variable in the program".

Better to find a compatible transducer, fix the existing transducer housing, build some new displays to his liking, or (if analogue pointer) replace the guts of the existing displays with an Arduino driving a stepper motor.

Pete
 
Hi Pete and GHA

Thanks for the replies.
Not heard of an Arduino - will do some googling

My understanding, which may well be wrong, is that the transducer did the actual conversion of ping-pong to voltage internally.

The cable length to the transducer can be cut and made shorter if required with out affecting the depth reading. If the instrument not the transducer was timing the Ping-Pong then the cable length would need to be fixed wouldn't it?

Re: "skill level of "I can probably get the NMEA values in a variable in the program".
Actually I have code that reads all standard NMEA 0183 in C, and I know C, php, html, Fortran and SQL so all I have to do is learn a bit of whatever the R-Pi talks. Also created 95% of www.marchwoodyc.org.uk so not completely useless. Just trying to get all the bits of the jigsaw before I spend the time putting them together, and tap the accumulated knowledge out there as some folk have probably done it or something similar before.

But I do know sod all about electronics so will have to look up pwm!
 
Last edited:
Ok thanks - if you are right then its is much to complicated to encode without definitely knowing the original tech. specs. of the instrument which even for something that's been 20+ year since its last sold are seemingly still not available! Those that have the specs will not share and are not interested in doing a custom converter, on a one off and won't even quote for it.
 
Re: "skill level of "I can probably get the NMEA values in a variable in the program".
Actually I have code that reads all standard NMEA 0183 in C, and I know C, php, html, Fortran and SQL so all I have to do is learn a bit of whatever the R-Pi talks.

No offence intended, it's just a bit hard to know where to pitch things without much information :)

The Raspberry Pi is a full Linux system, so it'll run all of those plus anything else for which there's an ARM compiler (or an interpreter) available. You can run X and a full desktop if you like, don't let the size and bare PCB mislead you.

The Arduino is a microcontroller, closer to a PIC if you're familiar with those, but there's a vastly better ecosystem of tools and libraries for people who aren't full-time embedded programmers. The default language is essentially C, but it goes through some kind of pre-processor that hides all the gory details at least for basic stuff and there's a simple IDE that makes it very easy to get started. I believe you can sidestep all that and write directly in the Atmel dialect of C if you want to, though.

Pete
 
Hi Pete
"bit hard to know where to pitch things without much information" - fair comment
- that's sort of why I provide more.

Thanks for the very useful summary of R-Pi and Arduino

Now think you are right about needing to time the ping pong, after finding some stuff buried on the Airmar website. Problem with this is that with speed of sound in water of 1482m/s so we are needing to detect ping and send pong in sub millisecond accuracy to get depth accurate to 0.1m I'm not sure this will be possible as most programme languages only have "delays" down to 1ms.

My other option is to find an depth instrument that will take NMEA 0183 straight in. The old Navman 3100 Depth did this but they are no longer available. I don't understand why instrument makers don't just make instruments that accept NMEA now that smart transducers that output NMEA are common and you can have a speed/depth/temperature unit all in one so only need one hole in your boat.
 
Hi Pete
"bit hard to know where to pitch things without much information" - fair comment
- that's sort of why I provide more.

Thanks for the very useful summary of R-Pi and Arduino

Now think you are right about needing to time the ping pong, after finding some stuff buried on the Airmar website. Problem with this is that with speed of sound in water of 1482m/s so we are needing to detect ping and send pong in sub millisecond accuracy to get depth accurate to 0.1m I'm not sure this will be possible as most programme languages only have "delays" down to 1ms.

My other option is to find an depth instrument that will take NMEA 0183 straight in. The old Navman 3100 Depth did this but they are no longer available. I don't understand why instrument makers don't just make instruments that accept NMEA now that smart transducers that output NMEA are common and you can have a speed/depth/temperature unit all in one so only need one hole in your boat.

If you enjoy a tinker then an arduino might be worth having a play with, they're cheap as chips. Timing can get down to microseconds..


https://www.arduino.cc/en/Reference/Micros
 
Now think you are right about needing to time the ping pong, after finding some stuff buried on the Airmar website. Problem with this is that with speed of sound in water of 1482m/s so we are needing to detect ping and send pong in sub millisecond accuracy to get depth accurate to 0.1m I'm not sure this will be possible as most programme languages only have "delays" down to 1ms.

If you want to start programming at that level with non intelligent transducers you will need to program at assembler level for one of the microcontrollers like PIC etc. This way you have complete control of the program and get timing very precisely.

I used to do this many years ago using the old 8051/31 microcontroller.
My other option is to find an depth instrument that will take NMEA 0183 straight in. The old Navman 3100 Depth did this but they are no longer available. I don't understand why instrument makers don't just make instruments that accept NMEA now that smart transducers that output NMEA are common and you can have a speed/depth/temperature unit all in one so only need one hole in your boat.

My old Simrad IS11 display can receive NMEA 0183 direct and display depth/speed/wind using the NMEA messages. In my case there is a Simrad Micro box between the display instruments and the non intelligent transducers that does all the calculations and message formatting.
 
There is no way an Arduino or Pi virgin is going to be able to convert nmea data into the signal to emulate that from a Piezo depth transducer.
These operate using a high voltage pulse and obviously measured the time between sending it and receiving the smaller echo signal - all of which is done in the instrument. So realistically, its not a practical proposition.
The B&G transducer will need replacing with a compatible one.
 
Pete
- thanks - will have a tinker. This is were programming meets electronics and as I said I know sod all about the latter, but hope I'm not to old to learn new tricks. But it can't be as simple as detecting the input pin going high as the echo sounder sends the ping and then delaying the pong on the output pin dependent on the depth value read from the NMEA, can it? Guess setting the arduino up to detect & output the timings of the pongs from the instrument and the pings from the transducer can't do much harm to start with. Then can find out if its a simple time delay, that changes the depth.
 
ianJ99 - do you know for sure it its the time delay or the amplitude of the returned signal that effectively is used in the instrument to convert to a depth?
thanks Neil

Its the time delay between the output signal and the return which gives you the total distance that the ping ans traveled there and back total being the speed of sound in sea water times the time delay divided by 2 will give you the depth.
 
Its the time delay between the output signal and the return which gives you the total distance that the ping ans traveled there and back total being the speed of sound in sea water times the time delay divided by 2 will give you the depth.

Yes, the signal just needs to be of sufficient amplitude to be detectable and then the time measured.
The received signal (there is only one piezo element which is both transmitter and receiver) will be amplified and filtered with a 40Khz bandpass filter (I believe most older sounders used a 40khz transducer: the receiver input will be disconnected from the transducer when it transmits to avoid being overloaded)
So converting NMEA to a pulse position signal can be done. You would need an input from the sounder to pickup the ping, and then send it the delayed one. Whether a single pulse or a burst of 40khz would be needed is hard to say - depends on the filtering employed in the sounder. (i suspect a 40khz low amplitude burst might be needed due to the bandpass filter)

A pocket scope is a very handy thing to have onboard and you will be able to view the transmitted and received signals before you change the transducer (you'd need to clamp the input to prevent the high voltage pulse damaging the scope).
 
Yes, the signal just needs to be of sufficient amplitude to be detectable and then the time measured.
The received signal (there is only one piezo element which is both transmitter and receiver) will be amplified and filtered with a 40Khz bandpass filter (I believe most older sounders used a 40khz transducer: the receiver input will be disconnected from the transducer when it transmits to avoid being overloaded)
So converting NMEA to a pulse position signal can be done. You would need an input from the sounder to pickup the ping, and then send it the delayed one. Whether a single pulse or a burst of 40khz would be needed is hard to say - depends on the filtering employed in the sounder. (i suspect a 40khz low amplitude burst might be needed due to the bandpass filter)

A pocket scope is a very handy thing to have onboard and you will be able to view the transmitted and received signals before you change the transducer (you'd need to clamp the input to prevent the high voltage pulse damaging the scope).

My simrad/stowe is 205 kHz and I think the raymarine transducer is 200 kHz but will work on my simrad dataline IS11 system.

The old seafarer rotating system used 150kHz
 
Last edited by a moderator:
My simrad/stowe is 205 kHz and I think the raymarine transducer is 200 kHz but will work on my simrad dataline IS11 system.

The old seafarer rotating system used 150kHz

Well, the OP can always put a scope on his system and find out what it emits.

Whether or not the project is feasible at all, I would suggest that it's certainly not sensible without a scope and/or logic analyser available.

Pete
 
Well, the OP can always put a scope on his system and find out what it emits.

Whether or not the project is feasible at all, I would suggest that it's certainly not sensible without a scope and/or logic analyser available.
Pete

Its certainly do-able & an interesting project, but a scope is essential to find out the frequency and typical return amplitude so you know what to send from the Arduino/Pi.

Getting the depth from a NMEA 0183 SDDPT or SDDBT sentence is straightforward, as is converting the depth in metres into a delay in millisecs (speed of sound in water is about 1.5m /millisec, ie 2 milisec between ping and return / metre).
 
Thanks again for all responses:
Sounder manual says:
Depth range 0.9 to 137m
Transmitted Power 50 watts rms
Frequency of operation 171kHz nominal
Sounding rate 2 to 20 pulses per second, automatically adjusted.
And it basic unit uses 270ma

Assume sounding rate is the key:
at 0.9m echo takes 1.2ms, so assume its doing 20 per second that's every 50ms
so it leaves a good 45ms to send the pong back to the instrument and it be processed and displayed before the next ping.
Arduino can certainly easily run loops faster than this and control time delays down to 10micro seconds accurately. So it depends on if the Arduino can detect a pin going high from the sounder sending the ping, and if setting a pin to high for mimicking the pong will be enough.

I don't have a scope put may try to use the Arduino to just read the ping pongs and see if I can output that to stdout, if I can't find someone with a scope I could borrow one.
 
Top