Listening to PSDATA files

Ask for and share advice on using the PicoScope kit to fix vehicles here.
Post Reply
ben.martins
Pico Staff Member
Pico Staff Member
Posts: 539
Joined: Tue May 16, 2017 1:02 pm

Listening to PSDATA files

Post by ben.martins »

Hello everyone,

I trust we are all keeping safe and well in these difficult times.

Recently we I’ve noticed the increase in use of Piezo as a trigger solution, pulse sensor, knock detection and also as a microphone. This is just a small introduction into how to listen back to a capture made using these little crystals.

I’m sure most of you reading this will know how we can manipulate Piezo with electricity and also the other way but just a brief overview – by applying voltage to a Piezo crystal we can change it’s shape and by changing a Piezo crystal’s shape we can generate a, small, voltage. This may not seem useful but with Pico we can actually capture these small changes in voltage and then save them in PicoScope.

I’m not going to profess that I’m in anyway a sound engineer or understand sound manipulation software but I can show you how I’ve manged to listen captures that have utilized the little Piezo discs that you may see being used on the internet. These discs are very fragile and although cannot really be used for accurate measurements but what they can do is give you comparable results. The first capture you will see below was taking by a PicoScope user that was looking at noise. The noise was traced to the front of the vehicle and the technician decided that he would try out the little discs on the front hubs of the vehicle.

These crystals output an AC voltage. As this floats around 0 volts, we can easily turn it into a sound wave. But before we can do this, we need to pay attention to some important parameters that affect how we can translate the signal to an audio file. The most important of these is the sample rate. Typically, for audio, the required sampling frequency tends to be between 44,100 Hz and 48,000 Hz. In samples per second, that makes 44.1 kS/s and 48 kS/s.
Wheel Bearings.png
Wheel Bearings PS7.png
Note: PS7 cannot yet export data to CSV format but I wanted to make sure people knew where to find the sample rate.

In the above capture we can see in the properties panel (timebase overview for PS7) that this capture had a sample rate of 50kS/s. A little high for our purpose but it can be used. One thing I’ve learnt along this journey is it tend to work without being too precise.

Once we have a capture, we need to export this data to CSV format. To do so click File > Save As enter any vehicle details you may have and click Save. At this point you will be asked where to save you file and in what format. By clicking in the format field we are presented with a number of different options including CSV.
Save as CSV.png
For the next step you’ll need to have some form of audio software to import data from CSV or have the ability to convert CSV into a WAV file. There a number of converters online but more often than not within audio software there is ability to import files from CSV format. One particular program I have found easiest to use in this situation is Sonic Visualiser. It is free to download, https://www.sonicvisualiser.org/, and whilst probably a more limited audio package it has the ability to import files from CSV format.
Sonic Import.png
With the software installed you will need to create audio from a data file. To do this click File > Convert Audio from Data File. You will now be asked which files you would like to use. Navigate to the folder you earlier saved your CSV files too. If you had a large file or a number of buffers you may see more than one file present.
Selecting CSV file.png
Select a file. In this example I will use the first file listed as Number 1.

Next you will be asked about the data format. You can see the software has picked out that we had two channels and the time which is stored in the CSV file.
Selecting Audio.png
Selecting Audio.png (11.61 KiB) Viewed 11654 times
I tend to find it easier to work with one channel at a time so the following video displays how to select just one channel.
Selecting Audio Format.gif
Selecting Audio Format.gif (3.55 MiB) Viewed 11654 times
There are a couple of other options also to note here, one being the sample rate and the other being the sample values. If we remember that our capture was taken with a sample rate of 50kS/s. With this in mind we can look to the sample rate available to us in this menu and match up the correct audio sample rate with the sample rate from our capture. I know this isn’t exact as there is a difference between the two but if we are in the right area it will be OK.

The sample values are best selected as an unknown range. This is mainly down to the voltage levels we took our capture in, if we make a selection here, we could remove some data as the software is only looking between a predetermined threshold. There is an advantage with using the Unknown Range as it also normalizes the sound on loading. The normalization of audio files has the effect of increasing the volume to allow for all captured noise from the quietest to the loudest to be near audible. This is takes away some of the worry about making sure we can hear the capture on playback.
Converted CSV file.png
Once we press OK, we should now see the converted CSV file as an audio image. Here we can press play and listen to the sound. I think you will agree that despite the raw signal coming from a Piezo pick, the sound is pretty good! Remember that this was selected from Channel A which from our notes on the PSDATA file indicate it is the front left wheel bearing housing. We can now add the Right-hand side-wheel bearing in a new view in order to compare the two. Loading them separately means we can actually switch the sound off from other channels to listen to just one. To import channel B follow the same process as channel A expect now select ignore on channel A. The rest of the settings are the same as before.
Importing second channel.png
Channel A and B converted.png
Again, pressing play will allow you to listen back to the file but you will notice not a great deal of change with this file as channel A is significantly louder than channel B. To toggle the sound off for channel A there is a button in the top pane, on the right-hand side that looks a little like a speaker.
Toggle sound.png
Now you will be able to mute the pane/channel during playback. From here it is quite conclusive that we have an extremely noisy front left wheel bearing which should you ever need too, could be played back to the customer as evidence.

There are some other nice features within Sonic Visualiser that can further show the differences. The two we typically use are Spectogram and Peak Frequency Spectogram. It’s just another way of showing the audio capture but leaning towards colours. To add this view, right click in the channel pane and select Layers > Add Spectogram.
Selecting Spectogram.png
Spectogram.png
Above I have done the same selection for Channel B. Whilst this looks OK, you can change the colors to help highlight different frequencies. One particular favorite is Fruit Salad!
Fruit Salad Selection.png
Peak frequency is another one we like to use which can be found in the same way as the Spectogram by right clicking in a pane select Layer > Add Peak Frequency Spectogram.
Peak Frequency Spectogram.png
As before I have changed the colour to Fruit Salad using the drop-down menu.

Both the above methods give a visual indication as to the differences between the two channels.

Other examples I have tried are using a Piezo device on an injector pipe. These can be useful in providing trigger but not much else. Even then it can be tricky as the vibrations from neighboring cylinders are often picked up. Removing the clips that tie injector pipes can sometimes help with lower the effects of other cylinders but you will still see them. However, it is yet another technique we can try. Being able to listening back to captures made me think would there be any diagnostic value in hearing what the sound is going through the injection pipe?
PS6 Injector Pipe.png
The above capture was taken using a current clamp around the injector wiring to determine that the sync was correct, but what does this sound like? Please note the sample rate here as it is quite high – 200kS/s. This is needed for when we import the CSV data into the audio software.

Quick Tip – When saving as a CSV file only the channels that are actively visible will be exported. If there are channels you are not interested in converting then right click on the grid highlight Channels and untick any you do not want exported.

Import the date as before into Sonic Visualiser and alter the Audio sample rate. The highest this will go to is 192000 so please bear this in mind if you wish to try old captures.
Injector Pipe.png
As you can see it looks very much like the capture from channel B but we have the added benefit of now being able to listen to it.

This isn’t a guide on how to use Sonic Visualiser because I’m sure there are more features that I’ve not yet discovered that could be used to our advantage. You can of course export any converted files to WAV files to play back on other devices and I have attached the wheel bearing Channel A and B below. One thing I can tell you is that this has opened my eyes to see what other captures we could potentially listen too!

There may be people that use alternative audio software which will allow the importing of CSV files. The same process can be applied although my only experience of using this technique has been with Sonic Visualiser.

I hope this helps in some way!

Ben
Attachments
Volkswagen_Tiguan_2013 CCTA wheel bearings.psdata
(8.57 MiB) Downloaded 531 times
VW Channel B.wav
(3.81 MiB) Downloaded 511 times
VW Channel A.wav
(3.81 MiB) Downloaded 502 times

User avatar
sigoaprendiendo
TwoWaves
TwoWaves
Posts: 54
Joined: Tue Aug 05, 2014 8:58 pm
Location: Slovenija

Re: Listening to PSDATA files

Post by sigoaprendiendo »

Very nice idea.
I have some piezo sensors, WavePad sound editor and an annoying noise from the front of my Honda Accord. Just need to set up connections from sensors to my 4423. Suspecting there is a problem from the front hub bearings, I think this is a good opportunity to try out this technique.

Thank you very much for sharing this information

Post Reply