wojo1086
Posts: 2
Joined: Fri May 24, 2013 7:56 pm

Audio Sensor - Does one exist?

Fri May 24, 2013 8:01 pm

I was wondering if there was an audio sensor that existed for the raspberry pi that could detect changing levels in frequency. My goal is to get some lights dancing to music using the raspberry pi.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Audio Sensor - Does one exist?

Fri May 24, 2013 8:54 pm

Not that I'm aware of, however you could construct an electronic circuit with band pass filters to detect certain ranges of frequencies, then provide a TTL output (of 3.3v) to the Pi's GPIO pins.

Richard S.

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Audio Sensor - Does one exist?

Fri May 24, 2013 8:59 pm

I kindof doubt it, but I also think one would be fairly easy to build. Have a look at stuff from here: http://www.discovercircuits.com/C/color-org.htm - and try to figure out how to interface it with the GPIO...

edit: beaten to the punch!
note: I may or may not know what I'm talking about...

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Audio Sensor - Does one exist?

Sat May 25, 2013 4:10 pm

Look at circuits and software to DTMF (Dual Tone Multi Frrequency) how different frequencies are used to pass telephone numbers over analog phone systems to an exchange or similar (push 1 for ....)

That should give you some ideas you expand to different frequencies.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

pimania
Posts: 9
Joined: Sun Sep 09, 2012 11:09 am

Re: Audio Sensor - Does one exist?

Tue Jul 30, 2013 11:13 am

I'm going to be building a couple of these for just such a task:

http://www.scary-terry.com/more_stuff/t ... onedet.htm

It looks fairly straightforward. I'll then need to write a bit of Python or grab some learnin' from Adafruit:

http://learn.adafruit.com/adafruits-ras ... uring-gpio

Keeps me busy...

j

MarkR
Posts: 156
Joined: Fri Jan 25, 2013 1:55 pm

Re: Audio Sensor - Does one exist?

Tue Jul 30, 2013 1:09 pm

I've got a project where I'm using a USB microphone to detect sound. I then use the "arec" program from ALSA to convert it into a binary stream, and pipe it into a Python program.

I use numpy to get the data in chunks into an array, then use the FFT algorithm to measure the amplitude in various frequency bands. I do this on 250ms chunks of data, so the latency is at least 250ms, although you could use smaller.

The Pi only uses about 15% CPU doing this - completely in software in not-very-optimised python (albeit using numpy for the numerical analysis)

Does that sound like what you wanted to do?

Mark

More Pi Please
Posts: 50
Joined: Mon Jun 17, 2013 5:26 pm

Re: Audio Sensor - Does one exist?

Wed Jul 31, 2013 12:58 am

MarkR wrote:Does that sound like what you wanted to do?

I'm very interested in this : P


But I just need basic amplitude. No frequency stuff needed :)

If a noise is above a certain level I would like to use it in python.

cudofcow
Posts: 12
Joined: Mon Jul 29, 2013 7:57 pm
Location: Portland, OR

Re: Audio Sensor - Does one exist?

Wed Jul 31, 2013 11:09 pm

retrofit a "Clapper"?

More Pi Please
Posts: 50
Joined: Mon Jun 17, 2013 5:26 pm

Re: Audio Sensor - Does one exist?

Fri Aug 02, 2013 10:52 pm

I thought it would be easy to find some i2C audio sensor for the Pi :cry:

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Audio Sensor - Does one exist?

Sat Aug 03, 2013 1:40 am

Use a USB sound card and a microphone :)

...or just Google 'i2c microphone' if you really want i2c...
note: I may or may not know what I'm talking about...

Return to “General discussion”