Go Down

Topic: Sound analyizing (Read 1 time) previous topic - next topic

Noisecontrol

Hello
I want to get sound by microphone and send to ardiuno uno  and then analyiz  sound to freqency in this freqency channel
63,125,250,500,1000,2000,4000,8000 Hz
And show amplitude in that channels.

I used  source code example in arduinofft library but it can't show frequency correctly
For example i send a tone with 1000 hz to microphone but it show maximum amplitude in another frequncey

Please help me

Grumpy_Mike

The frequency bins of an FFT are determined by the sample rate of your input signal. To get the bands you want you will need to sum the appropriate number of bins. If you know the sample rate this can be calculated. If not the put in a known frequency and see what bins peak.

How accurate do you need his to be?
For a sound to light display you don't need precision.

Noisecontrol

I want to use sample rate 128
But i can not determin frequency correctly by ardiunoff library
I use an example in ardiunofft that get sound by microphone and change sample rate 128 and sampling freqency 16000 then send a tone with 1000 hz but it can not determin freqency of it correctly

I want to determin amplitude of frequency in octav bands

22 TO 44 and show amplituid this band for 31.5 Hz(central freqency or cf)

44 TO 88Hz -->cf=63
88 TO 177Hz-->cf=125
177 TO 355Hz -->cf=250
355 TO 710Hz -->cf=500
710 TO 1420Hz-->cf=1000
1420 TO 2840Hz-->cf=2000
2840 TO 5680Hz--->cf=4000
5680 TO 11360Hz--->cf=8000

If maybe help becuse i am beginer in arduino and need this source code


Grumpy_Mike

#3
May 29, 2018, 09:47 am Last Edit: May 29, 2018, 09:48 am by Grumpy_Mike
Quote
I want to use sample rate 128
128 what? Samples per second?

Quote
I use an example in ardiunofft that get sound by microphone and change sample rate 128 and sampling freqency 16000 then send a tone with 1000 hz but it can not determin freqency of it correctly
What in your mind is the difference between sample rate and sample frequency, in my mind one is just the reciprocal of the other. So what you say makes no sense.

Quote
I want to determin amplitude of frequency in octav bands
Why? I asked what is your application.

Please re read what I said in my previous post. It seems to me you are ignoring me.

Noisecontrol

I use this code
https://github.com/kosme/arduinoFFT/tree/master/Examples/FFT_03
I dont know about fft
I change sample from 64 to 128 and samplingfrequency to 16000 hz


I want to determin amplitude of frequency in octav bands ,how do it?

22 TO 44 and show amplituid this band for 31.5 Hz(central freqency or cf)

44 TO 88Hz -->cf=63 
88 TO 177Hz-->cf=125 
177 TO 355Hz -->cf=250
355 TO 710Hz -->cf=500
710 TO 1420Hz-->cf=1000
1420 TO 2840Hz-->cf=2000
2840 TO 5680Hz--->cf=4000
5680 TO 11360Hz--->cf=8000

 I want to make analyzer for sound messurement for health hearing i need analyze sound in octavband and determin dB in per band but first i should analize sound in octaband

Noisecontrol

In a band we have low freqency and up frequency and central frequency
For example a sound has frequency 800 hz  this application show amplitude in central freqency of it in 1000 Hz

See this picture understand me

http://s9.picofile.com/file/8327793834/%DB%B2%DB%B0%DB%B1%DB%B8%DB%B0%DB%B5%DB%B2%DB%B9_%DB%B1%DB%B2%DB%B5%DB%B6%DB%B4%DB%B4.png

Sound have 800 hz freqency but sound level show in 1000 hz

Noisecontrol


[/quote]
http://s9.picofile.com/file/8327793834/%DB%B2%DB%B0%DB%B1%DB%B8%DB%B0%DB%B5%DB%B2%DB%B9_%DB%B1%DB%B2%DB%B5%DB%B6%DB%B4%DB%B4.png

I want to make this sound analizer by ardinuo
How do it?

slipstick

So you changed "samplingFrequency = 100; //Hz, must be less than 10000 due to ADC" to 16000? Do you really think that 16000 is less than 10000?

BTW even if you could use a sampling frequency of 16000 that would only work for audio frequencies up to 8000Hz. Anything over that present in the signal could cause all sorts of problems.

Steve

Noisecontrol

#8
May 29, 2018, 11:51 am Last Edit: May 29, 2018, 11:52 am by Noisecontrol
So you changed "samplingFrequency = 100; //Hz, must be less than 10000 due to ADC" to 16000? Do you really think that 16000 is less than 10000?

BTW even if you could use a sampling frequency of 16000 that would only work for audio frequencies up to 8000Hz. Anything over that present in the signal could cause all sorts of problems.

Steve
I change samplingfrequency  to another number also 8000
But this source can not show correctly sound frequnecy
I use a ton with 1000 hz but this source show 2000 hz!

Grumpy_Mike

Quote
I change samplingfrequency  to another number also 8000
You can change the sample numbers all you like but unless the Arduino is capable of acheaving that sample rate it will do no good.
The appropriate bin will fill up based on the real sample rate you use, there is no way the calculations can compensate for a bad sample rate.

Was that graph something you produced or something you want? You have still not told us about your real application, that is what you will use that graph for.

It looks like you will not have a sufficient sample rate to be able to group the bins how you want.

Noisecontrol

I am sorry my english is not good and i had to translate your sentences by google translator

I want to make an application to show dB in per band and then A_weighing


I want to make sound level meter analyzer
But i didnt success to find any source code to help me that analyize sound in octavband in 20 till 20 khz




Grumpy_Mike

What Arduino do you have?

In order to see 20KHz you need to sample at least at 40KHz and preferably much higher.

The project will require you know about FFT and windowing functions applied to the input waveform. I don't think it is something you can do with a Uno class Arduino.

Noisecontrol

#12
May 29, 2018, 03:03 pm Last Edit: May 29, 2018, 03:05 pm by Noisecontrol
Was that graph something you produced or something you want? You have still not told us about your real application, that is what you will use that graph for.
That graph is somthing i need of course i need to amplitude in per band i dont need to graph shap .that graph is from a sound level meter analizer application in android mobile

Noisecontrol

What Arduino do you have?

In order to see 20KHz you need to sample at least at 40KHz and preferably much higher.

The project will require you know about FFT and windowing functions applied to the input waveform. I don't think it is something you can do with a Uno class Arduino.
I use uno

Noisecontrol

Your mean ardunio can not analize sound at least to 8000 hz?
Idont know about FFT ,i just want source code for analize and then change something i need for achive to a weighting and show dB

Go Up