PixHawk3 and echosounder with NMEA output

the driver is in master now and I’ve created this wiki page detailing the setup using the echologger ECT400. Something similar should work with a Garmin DT800 or other NMEA protocol echosounders.

1 Like

Hi guys,

I have only just come across this thread. I am wanting to do something similar but I am using a SonarMite SM3 sounder that has either Bluetooth or Serial connection. It states that the serial connection supports UART already so unsure if I need the RS232 Sparkfun Adapter? I am hopefully going to give it a play this weekend.
One thing I am interested in is getting the sounding/depth readings from a stored tlog of datalash log? I have done that before with the 3DR Solo to get a GPS tag etc. and it works a treat. Will the sounding be located at a particular point in that file? Will there be a setting somewhere that I tell the unit to log at specified intervals (5 or 10 secs etc.)?? My idea is that I will have RTK Gps connected to the Rover (Boat) and want to ultimately line up the depth reading with the GPS position at particular times. This is a great addition to be able to see that the unit is logging data when its in the water.
Thanks, Scott

Hi Scott,

I’ve had a quick look at the SonarMite SM3 and it looks like it can output NMEA messages so I think if it can be connected to a flight controller’s serial port it will work.

A “DPTH” message is stored to the dataflash log and this includes the vehicle’s lat and lon so hopefully this can be used to easily gather the required mapping data. There’s a small issue in that these DPTH messages recorded in this issue but it’s a fairly minor issue.

What about using a separate NMEA shield to allow creating a proper backbone and connecting multiple devices?

For the echo sounder, recently I have been using the Airmar UST800 which gives out speed, water temperature and depth data for a quite low price, ~$200.

Rene,

I think connecting multiple devices will work fine. ArduPilot will just ignore all the messages except the ones that it recognises (i.e. depth messages). I toyed with the idea of adding support for reading the speed and temperature but we didn’t immediately have a need for it. Now that we have the DPTH logging messages we could potentially add temperature to that.

The water speed would be very useful for sailboats but we don’t support those yet … it’s not far off though actually.

Hi @rmackay9,

I seem to be having some issue with hooking up the SonarMite SM4/BTX to my Pixhawk2.1.
I updated the Pixhawk to the latest firmware. I purchased a RS232 to TTL Converter and wired it up as shown (I even did testing to make sure I had the correct cables from my sounder unit). Once all hooked up, I keep getting bad LiDAR Data in MP. I also notice that my unit isn’t logging data. I connected via bluetooth to my sonar unit with my pc and logged data in hyperterminal, which it then works. While this is logging no output goes to the RS232 port (I assume as no changes previously).

I got to a stage where the pixhawk didnt say bad lidar, only bad ahrs (not an issue) but then i switched wires while plugged in and it says bad lidar. Swap again and it goes away. All the while no data logging on the unit.

Not sure if I’ve got a dud RS232 to TTL Converter or whether I would need a RS442 Convertor? I didn’t think so, considering the unit can work via the serial cable to a Windows CE Data Collector for survey work).

Seems that the pixhawk isnt sending a ‘start’ command to the logger to start sending the data? And I assume NMEA 0183 data is all the same? It has 2 lots being DBT and DPT. (It auto reads what data it needs to send). Sort of a bit lost for ideas, I’ve checked all the serial parameters in MP and gone from 2400bps to 115kbps. It is currently plugged into TELEM2 on the pixhawk 2.1 also.

Any ideas would be greatly appreciated.
Thanks, Scott.

Scott,

From a look at the datasheet it doesn’t look like it supports the NMEA format. Instead it has a few other formats. So unless I’m making a mistake, i think we’d need a new driver…

Thanks for getting back to me @rmackay9. That datasheet isn’t for my model. This datasheet is.

The NMEA Strings are as follows:
Format 2 DBT NMEA mode (e.g. $SMDBT,5.94,f,1.81,M,67)
Format 3 DPT NMEA mode (e.g. $SMDPT,1.81,0.0
66)

I tried looking through your driver code on GitHub but I haven’t had alot to do with that side of things and got lost.

It looks like the baud rate should be 4800 or maybe 9600 but I’m not sure.

I think our NMEA range finder driver should be able to consume either format 2 (DBT) or format 3 (DPT) messages.

If you have a dataflash log I could have a peek to be sure that the data is or isn’t coming in and that you have your parameters set correctly (as far as I can tell)…

Bad news, the Pixhawk has no dataflash log. I can only get the tlog from the PC via MP.
Not sure why the unit doesn’t have one.

Not sure if this affects it, but I didn’t have the GPS plugged in? I’m using the Here+ with the RTK base for input.
If it is meant to store a file with Lat/Long and the Depth, no GPS connected it wouldn’t be able to store it?

Hi @rmackay9, I have had a win!

I went and rewired the whole setup I have from the sounder to the Pixhawk. Installed some new quick connects, etc. I followed the wiring setup as specified in the ArduRover documentation.

Doing it this way I got no data in MP. I switched the TX and RX between the RS232 to TTL Converter and the Pixhawk. I then got data in MP but only when I connected to the unit via Bluetooth to the PC. Stop the Bluetooth and then no data.

So I switched the TX and RX wires from the Unit to the RS232 to TTL Converter and Viola!
So I am unsure if the Converter I got already does the switching internally? But I am getting the data through MP via RS232 and correct values.

I can’t wait to install this into the Boat and get the RTK Logging with the Depth. This saves me about 1-2kg of Weight that I don’t need anymore.

Great job with the NMEA Driver. If you like I can draw up a wiring diagram of my setup so you could add this onto the list of supported depth sonars/sounders?

Thanks, Scott. (P.S. Donation coming to ArduPilot in the coming days for the Software in the Public Interest, Inc.)

2 Likes

Scott,

Great that it’s working!

Yes, if you’ve got a connection diagram (and links to parts if possible) then I’ll add it to the wiki. Great!

Hi all,

I’m trying to connect a Lowrance Totalscan and Elite 5Ti to Pixhawk but I have some doubts.

  • The NMEA 0183 output from Elite is an analog or digital signal?

  • Can I wire it with a Sparkfun RS232-to-Serial converter to the Pixhawk’s TELEM port as Randy did with ECT400?

All your comments will be very appreciated.

@PaulG,

I’m not toot familiar with the Lowrance Totalscan but a NMEA 0183 output is certainly a digital signal. In particular it’s a serial protocol (i.e. a string of characters). I think the RS232-to-serial converter used for the ECT400 should work.

If you’re looking to use the Elite 5Ti as well then that probably means that the output from the Lowrance Totalscan needs to be split and sent to both the flight controller and the Elite 5Ti. The diagrams for the ECT400 setup show both the transmit and receive pins are connected but in fact, it should work with just the transmit output (from the Lowrance Totalscan) split and sent to both the flight controller and the Elite 5Ti.

The thing to be careful of is the voltage of the pins connected to the flight controller’s telemetry (aka serial) port. The flight controller can only handle voltages up to 5V so if you check the voltage across the ground and transmit or receive pins and find it’s over 5v then that’s dangerous to connect.

1 Like

Hi Randy,

After some trials, this is my situation:

  • Totalscan connected to Elite 5Ti with the standar cable
  • Nmea/power cable output from Elite 5Ti to RS232-to-TTL converter.
  • RS232-to-TTL converter to TELEM2 Pixhawk

As you can see on picture, from nmea cable I have 5 cables (TX_A, TX_B, RX_A, RX_B and ground) It seems a RS422 output not RS232. But there’s an alternative wiring for RS232.

My wiring scheme is:

Yellow (TX) from ELITE to RX at DB9 converter
Orange (RX) from ELITE to TX at DB9 converter
Shield (ground) from ELITE to GND at converter

From converter to TELEM2 I’ve followed your diagram.

On ELITE config I only define DPT nmea sentence as output
RS232-to-TTL is like this one: (MAX3232 chipset)

The MP parameters setup as http://ardupilot.org/copter/docs/common-echologger-ect400.html

Results:

  • No Sonarrange data
  • 8-9 Volts on converter input
  • 4-5 Volts on converter output

Inverting RX and TX does the same.

Any idea? :sweat:

Thanks so much

1 Like

No need in converters just add a resitor.
Yellow (TX+) from ELITE to telem ground
Orange (RX+) from ELITE to telemetry +5v
Blue(Tx-) from ELITE to telemetry rx
Green(Rx-) from Elite to telemetry tx
And you need to join Blue(Tx-) from ELITE and Yellow (TX+) by 100 Om resistor. Niko77_lowrance_NMEA_pinout

1 Like

Hi Andrei,
Thanks for your comments.
I’ve tried your scheme but it doesn’t work for me. No sonarrange or sonarvoltage data.
Maybe any detail I’ve missed?
Thanks

Sure that all settings and all wiring is correct? The things I did not get right from the start was:

  1. Setting RNGFND_ORIENT = 25 (down), ref wiki page
  2. The transducer to be put in a water tank/bucket (to provide readings output)
  3. Serial input wiring mismatch (tx/rx) and common ground

Hi Olav,

Thanks for your comments.
I’ve tried all this and other situations but no success.
I will inform if I finally reach anything.
It colud be nice to connect a commercial fishing sonar to pixhawk for most people.

Hi,

I would like to know if there is any way to output these NMEA sentences given to Pixhawk 2 by Emlid Reach M+ to a Ground Penetrating Radar (GPR) which has a RS232 connector?

If so, would you be kind enough to detail how it can be done? (which port can i configure and what parameters/commands will i have to use/change?)

Thank you!