Go Down

Topic: Tone, pitch, etc with Arduino Sound Sensor (537473) (Read 3802 times) previous topic - next topic

I bought the sound sensor (YwRobot 537473). I've found many examples that detect volume using the sensor, but nothing that detects tone or pitch. For grins I'd like to see if I can make a simple guitar tuner. Is it possible with this device?

Grumpy_Mike

Well a link to the sensor would help google turns up nothing.

However if it is used to measure the volume of a sound then it is likely that it is a peak detector followed by a filter. In that case it will not let the full audio waveform into the arduino in order for you to make these measurements.

The sensor is like this:

http://www.electricheap.net/arduino-blocks/36-arduino-sound-sensor-module.html

Grumpy_Mike

Yes just like I said, you can't get sound signals from that board only envelope information.

Do you have any suggestions (link) as to what I should get if I want to make a device that can determine the frequency of a sound?


Thanks! I'm still confused as to what the difference is between that and what I got.    :smiley-eek:

Grumpy_Mike


Thanks! I'm still confused as to what the difference is between that and what I got.    :smiley-eek:

Look at the schematics. That is a simple amplifier, what you have is an envelope detector which is an amplifier, diode, capacitor and discharge resistor. Like this:-
http://www.allaboutcircuits.com/vol_3/chpt_3/5.html


rickso234

> However if it is used to measure the volume of a sound then it is likely that it is a peak detector followed by a filter.

Wouldn't that be a filter followed by a peak detector. I suppose that depends on your definition of a filter.

spatula

I'm also perplexed (schematics notwithstanding) about the differences between the two products/links from electricheap and dfrobots, they look very similar to me. I think I found the link to the manufacturer, not very informative I'm afraid but with larger pictures.

http://item.taobao.com/item.htm?spm=a1z10.3.w7504506493.3.0QqHPb&id=13338760752

A question: shouldn't pitch detection be performed in the ADC? Assuming that the output of the external device is just an amplified signal (unfiltered), roughly corresponding to the output of the mic, in order to get the pitch one needs to sample the signal.

Then, shame on me, I don't know how many samples would be necessary to detect, say, a 440Hz frequency with good approximation, it's a very simple calculation but I don't remember the parameters to be factored in. But if, let's say, we needed just 880 samples / second, it would probably be within the reach of a program running on an Arduino.

Grumpy_Mike

To determin a frequency you need to sample at at least twice the rate of the frequency. Look up Shannon.
Yes all those circuits need feeding into an analogue input.

You determin the frequency by using an FFT. The arduino can just about do this.

rickso234

Also look up "Goertzel algorithm and Arduino". The DFT Goertzel may be easier than an FFT but, since the DFT captures discrete frequencies, it can determine if you're on-frequency but not as easily if you're high or low. FFT may be better then. THere are many code examples for FFT and Arduino.

Go Up