0

tone recognition and FFT
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

tone recognition and FFT

by nickine9 on Wed Apr 19, 2017 6:39 am

I recently got two excellent circuitplaygrounds and am trying to build a simple system allowing the two to do basic communications using the tones generated by the buzzer. My aim was to find a few tones that gave easily recognisable signatures using the FFT functions. Have got as far as writing a program that generates tones on one CP and outputs the FFT bins on the other.

from this I have been able to identify a few candidate tones where the output in one bin is significantly larger than any of the others and have written a program that generates just those tones on one cp whilst the other CP listens for those tones and lights up less based on the tones detected and it sort of works (it doesn't need to be totally reliable as the end product is merely a bit of fun)

during my testing I found a number of things which have caused me to pause before doing any more work

1) the listener will report different results based what CP is running the tone generator software. One buzzer has a bit of a rattle which the other does not.

2) different tones seem to have different ranges so distance between the two Cps is key for accurate reception. I had anticipated that this could be an issue but some tones can be recognised at about 12 inches whereas others need to be as close a 2 inches.

3) background noise can have good or bad effects. I had a TV on in the background showing a sporting event and it sometimes as you would expect the noise from the TV seemed to interfere with tone detection except when audience applause could be heard in which case accuracy seemed to improve.

has anyone else tried tone recognition and did they find a way of making it work to their satisfaction?

nickine9
 
Posts: 31
Joined: Fri Jan 06, 2017 4:14 am

Re: tone recognition and FFT

by adafruit_support_carter on Wed Apr 19, 2017 10:19 am

has anyone else tried tone recognition and did they find a way of making it work to their satisfaction?


Sounds similar to what was done in this project:
https://learn.adafruit.com/circuit-play ... troduction

adafruit_support_carter
 
Posts: 1378
Joined: Tue Nov 29, 2016 2:45 pm

Re: tone recognition and FFT

by kgreene on Thu Apr 20, 2017 1:11 pm

You got much further than my stab at this...interesting, the crowd noise implies that doing some gaussian smoothing on the FFT might improve the result.

kgreene
 
Posts: 11
Joined: Tue Sep 02, 2014 2:08 pm

Re: tone recognition and FFT

by adafruit_support_carter on Thu Apr 20, 2017 1:24 pm

Thanks, but not my project or code. Just pointing it out.

adafruit_support_carter
 
Posts: 1378
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.