# Raw profile data from Ping1D?

**URL:** <https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425>\
**Category:** Ping Sonar Devices\
**Created:** [June 29, 2022, 11:03pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425 "2022-06-29T23:03:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![animmosmith](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@animmosmith](https://discuss.bluerobotics.com/u/animmosmith)\
**Post date:** [June 29, 2022, 11:03pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/1 "2022-06-29T23:03:27Z")

</div>

Hi - is it possible to obtain raw (unscaled) profile data from the Ping1D? Thanks!

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [June 30, 2022, 12:36am UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/2 "2022-06-30T00:36:59Z")

</div>

Hi @animmosmith, welcome to the forum 🙂

I’m not certain what you mean by “scaled” data here - if you mean

1. the profile data that the sensor’s ADC collects then
  - that’s what’s included in the [1300 - profile](https://docs.bluerobotics.com/ping-protocol/pingmessage-ping1d/#1300-profile) message
  - if you’re using Ping Viewer then it’s included in the [sensor logs](https://docs.bluerobotics.com/ping-viewer/logging-and-user-files/#sensor-logs)
    - [extraction example](https://github.com/bluerobotics/ping-viewer/blob/master/examples/decode_sensor_binary_log.py)

2. data that’s not scaled by the [selected gain](https://docs.bluerobotics.com/ping-protocol/pingmessage-ping1d/#1005-set_gain_setting) then
  - that’s not possible because that gain is applied electrically in the receiving circuit, before the values are measured

---

<div class="post-metadata">

**Author:** ![animmosmith](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@animmosmith](https://discuss.bluerobotics.com/u/animmosmith)\
**Post date:** [June 30, 2022, 7:48pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/3 "2022-06-30T19:48:09Z")

</div>

Hi - many thanks for the quick response!

I’m reading directly from the 1300 - profile message.

Referring back to this [thread](https://discuss.bluerobotics.com/t/ping-echosounder-amplification-linear-or-log/4781/2), it seems that there is some on-board scaling rather than just raw ADC output. Or has this been updated in firmware since?

Thanks!

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [July 5, 2022, 2:30pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/4 "2022-07-05T14:30:51Z")

</div>

Hi @animmosmith,

The values are not raw data from the ADC, but the output of some algorithms to filter, adjust gain, add offset and more that I can’t give more details about.

Can you inform what you want to accomplish or the big picture ? With that we may help you more about your objective.

---

<div class="post-metadata">

**Author:** ![animmosmith](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@animmosmith](https://discuss.bluerobotics.com/u/animmosmith)\
**Post date:** [July 5, 2022, 11:30pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/5 "2022-07-05T23:30:19Z")

</div>

Hi Patrick - many thanks for your message.

I’m an oceanographer - I’m interested in mapping out the spatial distributions of scatterers (bubbles/plankton/sediment) and the ping 1D is a really nice, low cost/power package that could do this with access to the raw data from the ADC (and then calibration with known targets). I understand that your algorithms are proprietary, but it would be a really nice feature (and presumably a trivial amendment to the firmware for you) to bypass them completely and have access to the raw ADC values. Would you be interested in running some collaborative trials?

---

<div class="post-metadata">

**Author:** ![mlflavio](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@mlflavio](https://discuss.bluerobotics.com/u/mlflavio)\
**Post date:** [December 27, 2022, 12:36pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/6 "2022-12-27T12:36:57Z")

</div>

Dear all,

I intend to measure acoustic attenuation of the environment by using the amplitudes but I’m just able to get the envelope data from the raw profile data.

How can I collect the raw data from the ping-python repository?

Looking forward to your response.

Mariana.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [January 3, 2023, 9:23am UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/7 "2023-01-03T09:23:07Z")

</div>

Hi @mlflavio, welcome to the forum 🙂

> [@mlflavio](#):
>
> I intend to measure acoustic attenuation of the environment by using the amplitudes

Interesting application 🙂

> [@mlflavio](#):
>
> … but I’m just able to get the envelope data from the raw profile data.

I’ve moved your post here because it’s seemingly on the same topic. Just confirming, you’ve got the profile data points already, but you’re interested in the raw ADC measurements that the sonar takes in order to determine the intensity of the returned ping echoes? If so, that’s currently not possible with the existing firmware.

> [@mlflavio](#):
>
> How can I collect the raw data from the ping-python repository?

If you’re instead saying you’re currently only able to get the distance estimates and you’d like to receive profile data instead/as well then you should be able to do that with the `get_profile()` method (instead of the `get_distance()` method used in the example).

> [@animmosmith](#):
>
> I’m an oceanographer - I’m interested in mapping out the spatial distributions of scatterers (bubbles/plankton/sediment) and the ping 1D is a really nice, low cost/power package that could do this with access to the raw data from the ADC (and then calibration with known targets).

Cool! 🙂

> [@animmosmith](#):
>
> I understand that your algorithms are proprietary, but it would be a really nice feature (and presumably a trivial amendment to the firmware for you) to bypass them completely and have access to the raw ADC values.

This would be neat functionality to provide, but it may not be as trivial to provide as you expect - I’ll ask about it.

For context, the ADC samples are captured at a much higher rate than the current profile outputs are provided, so there may not be sufficient communication bandwidth in the serial connection to provide full resolution ADC values as they’re measured, and the microcontroller likely doesn’t have sufficient memory to buffer the data from an entire transmission.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [January 4, 2023, 12:31am UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/8 "2023-01-04T00:31:24Z")

</div>

> [@EliotBR](#):
>
> This would be neat functionality to provide, but it may not be as trivial to provide as you expect - I’ll ask about it.

Following up, with the current UART serial approach there would indeed be too much data to stream live (at either 8- or 12-bit ADC resolution), and not enough memory for buffering.

> [@jwalser](#):
>
> It would be possible if we implemented USB, which the device is wired for, but it hasn’t been implemented.

---

<div class="post-metadata">

**Author:** ![animmosmith](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@animmosmith](https://discuss.bluerobotics.com/u/animmosmith)\
**Post date:** [January 4, 2023, 4:51pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/9 "2023-01-04T16:51:38Z")

</div>

Hi Eliot - great to hear these further details and I’d be very interested in the USB interface… Or might it be possible to output the gain and offset values that have been applied to each processed profile so that an approximation to the initial raw values could be back-calculated? Thanks!

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [January 6, 2023, 2:22am UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/10 "2023-01-06T02:22:31Z")

</div>

> [@animmosmith](#):
>
> I’d be very interested in the USB interface…

Fair enough. I’ve noted that internally, but it’s not something we currently have a target timeline for.

> [@animmosmith](#):
>
> might it be possible to output the gain and offset values that have been applied to each processed profile so that an approximation to the initial raw values could be back-calculated?

The [profile](https://docs.bluerobotics.com/ping-protocol/pingmessage-ping1d/#1300-profile) messages from the Ping Sonar are for response strengths (to the transmitted pings), not raw acoustic measurements. The ADC samples the vibrations of the transducer (i.e. acoustic measurements), then there’s processing of that signal to get from “several sound wave samples” over a period of time into “one response strength measurement” representing a datapoint within the profile. The number of sound wave samples per profile datapoint changes depending on the `profile_data_length` and the currently configured `profile.scan_length` and `speed_of_sound`.

I’m not sure what the deal is with the offset Patrick mentioned - I assume that’s not something that would change between pings, but I’ll ask to confirm.

Assuming the offset is constant, if your priority is just making the profiles comparable (rather than getting a conversion to a physical unit of sound intensity), then if you turn off “auto” mode each profile datapoint should have the same scaling and number of ADC samples, at the cost of needing to set reasonable values for the gain and scan range by yourself. If the samples per datapoint number isn’t important (I’m presuming the strengths are time-averaged anyway, although that may be incorrect) then you could keep auto mode on and use the `profile.gain_setting` values (which are already provided in the profile messages) to scale the profile datapoints into some form of comparable ‘power’ estimate.

---

<div class="post-metadata">

**Author:** ![jonathan.w0w](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jonathan.w0w](https://discuss.bluerobotics.com/u/jonathan.w0w)\
**Post date:** [September 16, 2023, 12:29pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/11 "2023-09-16T12:29:22Z")

</div>

Hi there, I am looking to retrieve the returning echo in terms of a time-domain signal. Inside, the library returns the strength of the returing echo in a normalized range of 0 - 255. However, I want to see the actual time frequency signal which is if i set 750 kHz then that, and the returning one which is the echo.

In another word, I want the original sending pulse, and receiving pulse for each angle.

I dont see function to extract this, however, in ping viewer these signals are displayed. I am adding the image to better explanation. Community help would be great.

 ![MicrosoftTeams-image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/6/6f7e7f2725c0d371fed7ff21e35824afa1d941c3.png)

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [September 20, 2023, 12:10pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/12 "2023-09-20T12:10:13Z")

</div>

Hi @jonathan.w0w, welcome to the forum 🙂

I’ve moved your post here, because it’s on effectively the same topic (but for the Ping360 instead of the Ping1D). I’d recommend reading through the above messages for relevant context.

> [@jonathan.w0w](#):
>
> I dont see function to extract this, however, in ping viewer these signals are displayed.

The waterfall plot you’ve shown is just a mirrored line plot of the normalised profile data reported by the sonar ([`device_data`](https://docs.bluerobotics.com/ping-protocol/pingmessage-ping360/#2300-device_data) for the Ping360). Ping Viewer does not have access to some kind of hidden extra functionalities of the device - just the messages covered in the [ping-protocol](https://docs.bluerobotics.com/ping-protocol) documentation.

---

<div class="post-metadata">

**Author:** ![animmosmith](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@animmosmith](https://discuss.bluerobotics.com/u/animmosmith)\
**Post date:** [October 11, 2023, 1:28pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/13 "2023-10-11T13:28:30Z")

</div>

Hi @EliotBR - just revisiting this project now. Many thanks for your response. Were you able to confirm the “offset” with Patrick?

Thanks!

---

<div class="post-metadata">

**Author:** ![patrickelectric](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/patrickelectric/32/2162_2.png) [@patrickelectric](https://discuss.bluerobotics.com/u/patrickelectric)\
**Post date:** [November 5, 2023, 9:32pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/14 "2023-11-05T21:32:26Z")

</div>

Hi @animmosmith, the offset are just some initial points that are ignored.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [November 7, 2023, 1:13pm UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/15 "2023-11-07T13:13:43Z")

</div>

> [@patrickelectric](#):
>
> the offset are just some initial points that are ignored.

Just to clarify this, the “offset” is not applied to the values or the distance measurement - it’s just the minimum distance that’s considered as valid, in order to ignore the region of saturated signal at the start of each ping (due to the sonar resonating after a transmission).

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [April 29, 2025, 3:43am UTC](https://discuss.bluerobotics.com/t/raw-profile-data-from-ping1d/12425/16 "2025-04-29T03:43:47Z")

</div>

Noting that there is now [an open source sonar firmware](https://github.com/bluerobotics/ping-firmware-oss) that can be flashed onto our Ping Sonar devices, which could be modified to output data not covered by the existing ping-protocol messages 🙂
