How to connect a ping sonar to raspberry pi 3 a type for b+

I bought a type sensor ping sonar from here
https://bluerobotics.com/store/sensors-sonars-cameras/sonar/ping-sonar-r2-rp/
You did not clarify how to connect this sensor to raspberry pi With clear and detailed steps, as I could not install a file “AppImage” for raspberry pi This response was

pi@raspberrypi:~/Desktop/sonar $ chmod a+x pingviewer-Release.AppImage
pi@raspberrypi:~/Desktop/sonar $ ./pingviewer-Release.AppImage
-bash: ./pingviewer-Release.AppImage: cannot execute binary file: Exec format error

Please explain the connect method to raspberry pi clearly And what should be proven from libraries in advance

Hi @ahmedrashed, welcome to the forum :slight_smile:

To start with, what are you actually trying to achieve here?

Ping Viewer is a display software that runs on a topside computer. While you should be able to compile it yourself if you actually want to run it on a Raspberry Pi, that would be a very rare use-case. An ordinary workflow would involve one of

  1. Ping Viewer (topside computer) → tether → BlueOS (onboard computer (Raspberry Pi)) → Ping Sonar / Ping360 (via USB)
    • most common approach on a vehicle
  2. Ping Viewer (topside computer) → tether → Ethernet Switch → Ping360 (ethernet configuration)
    • higher performance approach for Ping360 (not relevant for Ping Sonar)
  3. Ping Viewer (topside computer) → Ping Sonar / Ping360 (via USB)
    • commonly used when initially testing sensor, without a vehicle
  4. manual control via code library (computer/Raspberry Pi/Arduino/etc) → Ping Sonar / Ping360 (via serial/USB/ethernet as relevant)
    • used for custom integrations
    • see “Technical Details” on Ping device product pages for library links

Hi
I am using the fourth case. and want to connect the ping 1D to raspberry pi 3 and use the qt tool to display the result in windows. but I could not install the sonar to the raspberry pi to read data from nor open it in the raspberry pi itself.
another problem is when I install ping viewer in windows and connect it to the sonar the confidence never crosses 40%. I search the forum and found that you suggested checking the wiring so I changed it but the results are still the same, unstable readings with confidence below 40% which is also unstable and varies continuously from zero to 40.
do you know why?
and please show me if there is a way to define the sonar in raspberry pi.

That’s contradictory - if you’re wanting to control it with the code running on the Raspberry Pi (workflow example 4.) then you won’t be using Ping Viewer and won’t have another computer connected. If you’re wanting to do use a Raspberry Pi as a proxy (that passes along communication to and from your topside Windows computer) then that’s workflow example 1. and you’ll need to install BlueOS or something else that can act appropriately.

How are you testing it?

If it’s in an enclosed space or operating around other sonar equipment then it’s very possible there are too many reflections / too much sound around for it to operate properly.

I don’t know what you mean by this. If you’re looking to get started with code-based control of the sensor I’d recommend starting out with our bluerobotics-ping Python library.

I want to use a Raspberry Pi as a proxy (that passes along communication to and from your topside Windows computer) I have ubuntu system and a raspberry pi 3 B+
Please explain the steps that I must follow

You can either

  1. Install BlueOS on your Raspberry Pi, and do the relevant topside network configuration
    • Doing this replaces any other software you have on your Raspberry Pi, but if the only purpose of the Raspberry Pi is to pass along the ping sonar communications then that’s fine
  2. Install our bluerobotics-ping Python library on your Raspberry Pi, and run the pingproxy.py tool, after which it should be detectable by Ping Viewer on the topside computer
    • This is lightweight, but requires a little more knowledge and effort on your part to set up and run
    • you need to manually find the device to connect to (e.g. by running ls /dev/tty*)
    • you’ll also need to manually set up running on startup (if that’s a feature you want)

Thank you very much, my brother, I started to become clear
But how can you be detectable by Ping Viewer on the topside computer?
I have installed َQt tool version 5.15.2 in topside computer and raspberry pi Is this tool with this version to do this purpose, or is there an easier way?
And if she is doing this purpose, please explain the way of linking
I hope that you will be excused because I am a startingever in learning this things and I would like to use more of your products in the future and work on them
So can you give me a way to directly communicate with you because I am working on the completion of the graduation project and the date of delivery next week

Hello everyone,
Uploading: 2022-09-19_042252.jpg…
2022-09-19_042252

we are trying to set up the Ping Echosounder with a custom Raspberry using pingproxy.py provided in the ping-python package

The device appears in PingViewer’s device manager
Why i cant detect device in the ping viewer for Windows or Linux system via UDP
I connect Ping1D to USB port for rasbperry and i was run pingproxy in raspberry then i was open ping view in pc
raspberry pi 3 b+ and install bluerobotics-ping lib
and run pingproxy.py as you see in screenshort

I also use this code and no result
2022-09-19_043217

I want to do this
Ping Sonar → BLUART → Raspberry Pi 3B → [pingproxy]→ Topside pc (windows or linux [Ping Viewer]

Hi @ahmedrashed,

I’ve moved your new post and comments to this post, since it’s on the same topic.

pingproxy does not have any printed output, so “no result” most likely means it’s running as intended.

Since you seem to be using PuTTY you presumably know the IP address of your Raspberry Pi. In Ping Viewer can you try making a Manual Connection, and selecting

  • Device: Ping1D
  • Communication: UDP
  • UDP Host: <your Raspberry Pi IP address>
  • UDP Port: 9090

(while pingproxy.py is running on the Raspberry Pi)

Thank you, my friend, the method has succeeded
I have another inquiry regarding the use of sonar to study the tidal status
What is the code used in this process and you can operate on

I’m not certain what you mean by this, or what you’re trying to achieve.

I haven’t used our Ping Sonar to study tides before, so I don’t have code targeted to that use-case. If you’re using Ping Viewer it will automatically log the profile and distance data in the Sensor_Log folder, which you can replay with Ping Viewer or retrieve for analysis (with code). Alternatively you can use code to control the sensor, in which case you can record the data to a csv as it gets created.