2021-01-25 12:10 AM
Solved! Go to Solution.
2021-01-26 06:22 AM
Hi @Király Béla ,
Please consider that, if you acquire with the DFSDM peripheral, your signal is already in PCM format, so you are bounded to place your microphones at a minimum between-microphone distance of 2.1cm, since for the PCM the minimum delay (of 1 sample) that can be implemented with the library is equal to 2.1cm. In this way, however, you save the cost of the PDM to PCM conversion.
If you use the SAI peripheral and the PDM signal, the delay resolution that the AcousticBF library can provide is higher, depending directly on the clock frequency, so that you can place the microphones at the distance you want. The drawback is that the library will perform PDM to PCM conversion and so it will consume more MCU resources.
You may find further information in this design tip DT0117.
Please let me know whether these suggestions are useful.
-Eleon
2021-01-26 06:22 AM
Hi @Király Béla ,
Please consider that, if you acquire with the DFSDM peripheral, your signal is already in PCM format, so you are bounded to place your microphones at a minimum between-microphone distance of 2.1cm, since for the PCM the minimum delay (of 1 sample) that can be implemented with the library is equal to 2.1cm. In this way, however, you save the cost of the PDM to PCM conversion.
If you use the SAI peripheral and the PDM signal, the delay resolution that the AcousticBF library can provide is higher, depending directly on the clock frequency, so that you can place the microphones at the distance you want. The drawback is that the library will perform PDM to PCM conversion and so it will consume more MCU resources.
You may find further information in this design tip DT0117.
Please let me know whether these suggestions are useful.
-Eleon
2021-01-26 06:46 AM
Thanks. It was useful. Another question: In PCM mode you wrote we need "minimum between-microphone distance of 2.1cm". So can we use bigger distances, too? For example 2.5cm, or we can use only the multiplies of that distance (e.g. 4.2cm, 6.4cm...).
2021-01-26 08:15 AM
The minimum distance is defined by the maximum audio frequency to be acquired, i.e. 20kHz considering the audio bandwidth. So it is not necessary to place the devices at multiples of the minimum distance, but just at distances higher than the minimum.
-Eleon
2021-02-01 02:40 AM
Hello,
I played a little bit with beamforming lib setup. In PCM mode I can use only 21mm distance. And in PDM mode the max. usable distance is 40mm, else the init function returns an ACOUSTIC_BF_DISTANCE_ERROR. So now I think, the STs beamforming library is not usable for bigger distances than 40mm. Am I right?
2021-02-05 04:56 AM
Hi @Király Béla ,
the maximum allowed distance is 21.2mm (so the maximum value allowed in the mic_distance variable is 212).
Our experts confirm me that this is also the optimal measure for which ST library has been calibrated.
For a more reasoned choice between PDM and PCM, you can refer to the table below:
If you control PDM clock, you have to pass also that parameter to the library
Otherwise, it would be better to use ST PDM2PCM library and run the BF in PCM mode.
-Eleon
2021-02-05 05:09 AM
Thanks, now it is clear for me.