Showing results for 
Search instead for 
Did you mean: 

Gain setting for microphones on STWINKT1B

Associate II

Hi guys

I have a couple of questions.

I've been using the microphones on STWINKT1B to record some events for about a month now. I've utilized both the FP-SNS-DATALOG1 and FP-SNS-DATALOG2 firmware for data logging. While the digital mic (imp34dt05) delivers a good signal, there have been instances where the analog mic (imp23absu) produces noisy output with high-pitched tones, either intermittently or throughout the recording. I'm not sure why this is happening, but the interference has certainly compromised the quality of the recording. If anyone's interested, I have attached a recording for review. I'm curious if anyone has any insights into why this might be occurring.

My other question relates to the gain settings for these microphones. Is there a way to adjust the gain of the microphone? According to the datasheet of the imp23absu, the output feeds into an op-amp. Is the gain adjustable, or is it fixed?

Additionally, according to the JSON configuration file of FP-SNS-DATALOG2, the sensitivity is set to 3.0517578125e-05. What does this value mean? It seems highly specific. Is it the output voltage at 94 dB-SPL (@ 1 kHz)? Can I modify this setting?

I realize this is a lengthy inquiry, but I really appreciate any insight you can offer. Thank you in advance.

ST Employee

Hello @Daeisajjad 

Can you share the entire folder related to the wav you already attached? Which firmware and version is the acquisition related to? I'd like to have a look also to the json files and try to reproduce your setup.

Unfortunately gain can't still be setup by the user, but we can work to add this feature for the next release of FP-SNS-DATALOG2.

3.0517578125e-05 stands for 2*(1/2^16). Mic data are streamed as integer 16bit as a digital audio waveform signal(FS), with a dynamic from -1 to 1. In other words, data are 16bit-quantized in the range [-1, 1]. The sensitivity value is used by our SDK to properly plot and visualize the data.


Best regards


Hi Simone  @SPRAD.1 


Thank you for your response. I've included a rar file containing the configuration files and the output of digital and analog microphones (IMP34DT05 & IMP23ABSU).

For recording, we utilized the latest version of FP-SNS-DATALOG1, which is available on the ST website.

It would be nice if users could adjust the gain for the microphones. However, I'm uncertain whether this necessitates hardware modifications, as the gain value is associated with the pre-amplification stage. Is that correct?

As for the sensitivity value, it's still fuzzy to me. From what you've explained, it appears to be related to the resolution and bit depth. How does this relate to sensitivity? Isn't sensitivity supposed to represent the output voltage at 94 dB-SPL (@ 1 kHz) from the microphone? Should we have any control over this, considering it's hardware-dependent?


Thanks in advance,



thanks for sharing the .zip file. I'll have a look into.

Gain depends both on hardware and software: hardware has been designed to have the best SNR, then signal is controlled by a MCU peripheral (DFSDM on STM32L4, ADF/MDF on STM32U5) + a pure multiplicative factor at the end of the processing. We can work on the 2 last processing stages (that can be controlled in runtime) to introduce a gain/volume control.

The processing chain described above is set trying to respect the 94 dB-SPL (@ 1 kHz). But MEMS microphone are not calibrated. To guarantee a 1-to-1 conversion between digital signal and dBSPL value a calibration step is needed case by case and this is out of scope of the demo we are providing. The FP was intended for evaluating and comparing data from different acquisitions (i.e.: find out where data are drifting w.r.t. a standard, evaluate outliers, spikes, ...). In a general use case without calibration we can only guarantee digital values in dBFS.

I agree with you that in your use case volume setting is needed. We can work on that for the next release.


I'll keep you updated on your acquisition folder.

Best regards


Associate II

Hello @Daeisajjad , 


I am trying to work with STWINKT1B as well and tried to upgrade the firmware from datalog1 to datalog2... However, am not successful yet in doing it. Is it the same as datalog1? Do I need to erase and then upload DATALOG2_Release as the firmware? Any help in this would be greatly appreciated. 




The two FW are very similar if you intend to log data. Regarding downloading the FW into the STWINKT1B, there should not be any issue as far as I know. Just select the binary under "file path" in "Erasing & Programming" of STM32CubeProgrammer and then program it. 



Thank you for the fast reply. The reason to move to datalog2 was to run the python GUI to check the realtime data. The binary I tried to install was DATALOG2_Release... there is also DATALOG2_Debug... but I was not able to detect the board after I did it.


Well, that's strange that you cannot detect the board. Have you tried holding the user down when plugging the usb? the other option would be to use ST-LINK for programming.

HSDPython_SDK utility is also available for datalog1 FW but I am not sure if there is any big extra features in that of datalog2. Please compare the section on HSDPython_SDK in both UM3106 and UM2688 to see how they differ. 

Good luck

Thank you. 

Will check it and do the needful. 🙂