Pages: [1]   Go Down
Author Topic: Tone, pitch, etc with Arduino Sound Sensor (537473)  (Read 3146 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sensor is like this:

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are lots of them but this would work:-
http://www.dfrobot.com/index.php?route=product/product&product_id=83#.URaXLejR34g
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah! Thank you!  :-)
Logged

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> 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.
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 619
Posts: 33975
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: