Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differential pressure sensor spectrogram #7

Open
dizcza opened this issue Mar 12, 2023 · 0 comments
Open

Differential pressure sensor spectrogram #7

dizcza opened this issue Mar 12, 2023 · 0 comments

Comments

@dizcza
Copy link

dizcza commented Mar 12, 2023

Hi,
I've ported your example to plot a spectrogram of differential pressure sensor output and it looks promising! It's cool to see that I only needed to change the Sampler class logic to read I2C differential pressure values and pipe read data (in surprisingly the same data format, int16_t) to the Processor. And the application works fine.

You haven't touched the intrinsics of FFT processing in your youtube video, and I'm struggling to figure out a couple of things. The most important one, what's the magic number 30 in

m_fft_input[offset + i] = samples[i] / 30.0f;

Does it bear physical meaning or it's simply a scaling factor derived empirically to make the plots look nice?

Also, the sampling rate of my sensor is unfortunately way below 16 kHz: it's 1024 Hz. If I'm interested in all possible frequencies, from 0 to 1024/2, shouldn't I set the WINDOW_SIZE to 1024?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant