Ping Sonar serial link specs

I’m (finally) up to integrating the Ping (PING-SONAR-R3-RP) into my AUV.

I’m talking to it with RS485 (via an I2C bridge chip). The Tech Details shows that the default baud rate is 115200. 9600 is also listed, but that’s all the details there are. I found this thread from 2019 which I think says that anything other than the default 115200 requires a new firmware load.

Intriguingly, it also says

you can open the sensor via the transducer ring

Whoa! How? Is it on a thread? I don’t want to break it by getting all caveman. Actually, I’d rather not open it anyway, because I should be able to run at 115200 with no problem.

The Ping Protocol doco show the message strings, but no more details on the serial line setup.

Is the serial format the usual 8-1-none? Is Xon/Xoff supported?

I could just try things until it works, but it’s usually quicker to ask for directions :slight_smile:

Hi @psupine -

IT’s worth noting that the Ping sonar doesn’t talk RS485, but TTL Serial! It’s not likely that whatever bridge chip you’re using is going to work properly - it communicates serial at 3.3V logic levels, but is 5V logic tolerant….

This repair guide details how to open the sonar, depending on which model you have.

8N1 is correct, Xon/Xoff is not supported - only Gnd, TX and RX need to be connected (along with 5V power of course!)

Thanks @tony-white.

I do know the difference between 485 and 232 TTL, so I shouldn’t be lazy using the wrong label.

The bridge chip I use is the NXP SC16I740, which supports both. It also happens to be 5V tolerant which is why I chose that particular chip in the first place, even though it turns out that the 5V tolerance is not needed.

Thanks for the repair guide link. I have the rev 1 with the blue ring. It’s pretty tight, so I might just leave it in place until I actually need to open it. Now that’ I’ve seen photos of what’s inside, my curiosity has been sated.

I’m just adding a quick comment to this thread for anyone who might read it one day - I don’t think it’s worth a thread of its own. (but Eliot might decide to split it to keep things tidier)

The current consumption rating giving on the Ping1D spec is 100mA typical, 900mA peak. I thought I just needed to support the capacitor in-rush at start up and then it’d be happy. I have a dc-dc convertor boosting from a single lithium voltage up to 5V that I designed to handle 250mA.

It turns out I was wrong.

When BR say 900mA peak they’re not fooling around. The Ping1D hammers the supply rail in little bursts every time it energises the transducer. And it wakes up enabled, so that complicates things too. I’m still working on a solution for this.

2 Likes

The “auto” firmware options (which have been installed by default since 5 years ago) should auto-detect the baud rate, although our libraries tend to send a string of alternating bits during connection to help the detection take place. I also don’t remember whether the Ping Sonar supports options other than 9600 and 115200, or if the auto detection is just between those two…

Hmm, the factory-installed firmware is intended for primarily high level configuration, so it doesn’t have direct control over sonar pulse timing and the like (short of the high level enable/disable option, and the interval setting).

If you need that kind of control you can try modifying the recently released open firmware option, with the caveat that the filtering and detection algorithms may not be as effective as the ones from the firmware we ship the devices with.

Thanks @EliotBR

115200 is not a problem. I have the serial interface happily working when I power the 5V from a lab supply.

When I try to run from my “local” 5V supply, the transducer hits the supply rail so hard it causes CPU reset. I see an average draw of around 80mA, so enough capacitance on the 5V rail should fix this. The next step is to find out how much is enough.

I shouldn’t need the open firmware option. I wasn’t planning on changing any of the pinger configuration other than enable/disable. The supply issue need to be addressed in any case, and the rest of it seems to be working. I could of course use the 5V 6A supply and be done with it, but there are a couple of reasons why I can’t.

(Edit: I should add for clarity, this is not a comment on any Blue Robotics controller. It is the CPU on my own board that is resetting because my own dc-dc supply is overloaded)

1 Like