Home        Store        Learn        Blog

Ping sonar and recent firmware (v3.28)

Hi there, we bought a BlueROv2 and some single components and they are still working fine. We also bought the ping sonar, which works fine with the ping viewer and on an arduino mega (with 115…baud).
As we have bought a device with the latest firmware (V3.28) it has an auto option for baudrate on the ping viewer.
If I would like to use an arduino uno, do I have to flash (downgrade) it to the V3.27 firmware with 9600?
Thank you for your support.
Andreas

ps… as there are “thousands” of fish finders available on the market, which cost from 15-150€ and provide bluetooth, or wifi or cable connection,battery, higher scanning depth, suitable analysis and sometimes with display, would it be possible for you to send a cheaper device to the market. YOurs can be integrated in ROV and is reliable and so on, but very often people search simple stuff for using it from surface to map a lake. so nice would be a simple, smaller and cheaper device with suitable connections :slight_smile:
thank you

Hi @andreas, welcome to the forum! :slight_smile:

I just tried this with my Arduino Uno and it worked fine to just use the auto option, although I had to change the pingSerial call to use 115200 baud instead of the 9600 default value in the code. When I left that line using 9600 it failed to initialise correctly. I’m unsure whether that’s because the last time the Ping1D was used it was using 115200, or if that’s just the default baudrate for the auto-mode and there’s some kind of special protocol for the auto-detect functionality to work.

If you specifically want to use the slower 9600 baud between the ping1d and your Arduino then I’d probably suggest using the 9600 variant of 3.27, although it may be worth trying the 3.28-auto first.

Dear Eliot, Thank you for the quick reply. Have you used the standard example code or the code for the Arduino Mega? Ithought (from reading the explanations) that the hardware serial port on the Arduino Uno eccapts only the 9600 Baud.

  • for unterstanding: If I start the ping viewer and I choose one of the baud rate options, does it changes the baud rate of my ping sonar?

I was using ping1d-simple.ino with an Arduino Uno, which uses software serial, and works for the 115200 baud without an issue. I tried the same example today with an Arduino Mega, but with the pins changed from 9+10 to 10+11, still using software serial. I haven’t yet tried hardware serial on either the uno or the mega (ran out of time today).

Assuming you’re referring to the following comment from ping1d-simple.ino:

// If you are using and Arduino UNO or Nano, this must be software serial, and you must use
// 9600 baud communication

I’m not sure why that’s there - I’m guessing that’s still there from when 9600 baud was the only ping firmware option, in which case setting a different baud in the Arduino code would just result in failed communication. As mentioned, 115200 works fine for me.

According to the Arduino Serial page it’s not recommended to have connections to the hardware serial on the Uno while programming, so if you’re wanting to use that instead of software serial then you’ll need to disconnect the ping1d while programming, and plug it in afterwards. I believe the hardware pins are capable of 2Mbaud, so there shouldn’t be any particular issues with either 9600 or 115200 baud ping firmwares if you do choose to use hardware serial.

I tried this and it didn’t seem to make a difference when connecting with the Arduinos afterwards - only the 115200baud code worked while running on the ‘auto’ firmware - 9600baud didn’t initialise.

I believe my testing confirmed this today. If you want to use 9600 baud for some reason then you’ll need to downgrade to the 9600 variant of v3.27 firmware. If you’re happy to use 115200 baud then the auto firmware is fine.

Dear Eliot, thank you very muchfor the fast and helpful answers. Tomorrow I can test it with my arduino Uno and I will reply the results (I have to doubt that your way works fine for me too).
Then I can create a much smaller data logger due to the decreased size of the Uno.

HI Eliot, I just tested the approach you recommended and it worked fine, after changing the baud rate to 115200. Thak you for your kind support

1 Like

@andreas, please see the following update, so you can make a more informed decision on how best to operate your Ping sonar :slight_smile:

Dear Eliot, thank you for the new reply. I am happy to see, that your team continuesly improves the software. I can’t get the programm running at 9600. At 115200 it works fine.
I was the last two weeks in vacation and had time to test the ping sonar. I used it to measure the depth of a lake in combination with an arduino uno and a GPS shield. It worked fine as far as I can see.
The sonar also gave me depth deeper than the mentioned 30 meters. Is that okay or what is the “real” max depth that can be measured.
In the beginning, it takes a longer time to produce data with a higher confidence. How does that comes?
Why can’t I use the ping bib with an arduino feather? (my arduino knowledge is very limited)
Thank you in forward

To get it running at 9600 baud at the moment requires flashing to one of the 9600 baud firmwares, so if you haven’t done that then only 115200 will work until we update the Arduino library to properly support the auto mode.

That’s good to hear :slight_smile:

I believe 30m is the maximum depth where we’re confident the readings are accurate, but it’s possible that’s changed with some firmware updates. I’ve asked the relevant engineers and will get back to you when I’ve got a response - we may need to update our documentation if it’s outdated.

Over what time period? If you’re operating in auto mode then in the first few seconds it’s expanding the distance range being measured until it can’t look further, or if it detects a stable reflection. The same transition period would occur if you were operating in quite shallow water and then went over a sharp drop, or if you were measuring distance forwards to a wall and then piloted the ROV sideways so the wall was no longer in the sensor detection area.

Sorry I’m not sure what you’re asking here. What’s a “ping bib” and an “arduino feather”?

It is fine for me at 115200…I just mentioned it. No downgrade necessary :).
I was running a deeper (fishfinder available in Germany and Europe) parallel. I have to compare the results for depth above or better deeper than the 30 meters. The issue with the fishfinder was, that 1. it stores the data on the companys server and they most likely sell the data to them who pays and it is nasty to download data and 2. there is not a gps coordinate belonging to every depth reading.

I meant the arduino library (sorry- in Germany it is Bibliothek) you provide…The library works not with the arduino based chips from Adafruit called “feather”. They are small, have huge memory (most of them), power and often provide bluetooth, WLan, (3.3V ) … you can directly power them with a LiPo battery and have many more advantages. Of course I would have to use a level shifter for the 5 V required by the sonar but this should be easy

[quote=“EliotBR, post:9, topic:9866”]
Over what time period?
[/quote] I have to check this too, comparing when I start the arduino and when am I in the water with the system…I’ll reply

This topic was automatically closed after 5 days. New replies are no longer allowed.

Following up on this, our documentation has now been updated to specify a 50m maximum expected range (which depends on your operating conditions), and 70m for the limit in the firmware (the number will never go higher than that at this point). The original 30m number was an estimate from when they were first released, but it’s since been determined that they’re consistently capable of detecting more like >=50m, which I’ve updated the documentation to reflect.

I did a quick search and it seems like the Adafruit Feather boards aren’t necessarily Arduino based (it depends which one you have). I found this page which discusses Adafruit boards that can be programmed with the Arduino IDE, so I’d at least naively expect that our ping-arduino library should work with those ones, as long as they support serial communication and have precise enough timing (which may require using hardware serial, and likely also looking to see which pins you’re able to use for the required communication).

Have you tried to use those boards and they don’t work, or are you asking why we don’t advertise that it might work with those boards? (I personally hadn’t heard of them before)

1 Like

Hi Eliot,
thank you for reopening our conversation und your reply.

is very good news, so I can trust my data. Thank you for asking and updating! I couldnt compare the data from the deeper exactly as it does not saves always the position to the depth data.

you are absolutely right. A lot of (or maybe all) of the Adafruit boards can be programmed, using the Arduino IDE. I only use this Arduino IDE, as I m a novice in programming at all.

Yes, I tried a board, a Feather M4 Express, and I get a failure message that the library is for a AVR architecture, while my board uses SAMD architecture.

The hardware ideas, the support of Adafruit and their “learning” and documentation stuff are great. So I try to buy my products there to support them and not the cheaper chinese products. I like the feather series, as it is small in size and mighty with the features.

I just checked, if they provide also AVR based feather boards and they do. Basic Feathers | Introducing Adafruit Feather | Adafruit Learning System

So one way for me is to use another feather board with the right (AVR) architecture or the other way is, that your library supports not only AVR ;).
Which chipsets were supported by your library?
Best
Andreas

I just corrected some other mistakes while changing from Arduino UNO to Feather M4 Express and now the failure changed to a warning. Maybe it works to…?!

I went for a look through our ping-arduino github repository, and it seems like there is an architectures=avr line in the library properties. The original code was made before I joined Blue Robotics, so I’m not sure if there are actual compatibility issues with other architectures or if avr was just the only one tested. I’ve just raised this as an issue on our github, which you can track if you’re interested:

Likely doesn’t hurt to try it. If it does work it’d be great if you could let us know so we can update the list of supported architectures :slight_smile:

I`ll do so.
Thank you for allowing to keep you busy :slight_smile:

Sorry for the late reply, I had a few days off an in Germany we have regions without proper internet.
Meanwhile I uploaded the PING code to the SAMD based M4 express Adafruit feather. The chip and the Arduino IDE accepted the code (the IDE gave their warning as mentioned) So your library might work on ather architecture as well. I Wasnt able to test it properly as the level shifter I already ordered two weeks ago didnt arrived yet. SO I cant use a 5V device on my 3,3 V feather. When it finally arrives, I’ll give a comment.

1 Like

Hi @andreas,

Thanks for getting back. Glad to hear the flashing was successful, and hopefully you receive your level shifter soon so you can test with your M4 Feather board :slight_smile:

On our end, we’ve ordered a few different board types that I should be able to test with in the next couple of weeks. Once I’ve tried those out we can update our documentation with a list of tested boards, and possibly remove the architectures restriction/warning if none of the tested types end up having compatibility issues :slight_smile: