Author Topic: Hi quality(>= cellphone Mics) and high sampling rate microphone recording  (Read 9322 times)

0 Members and 1 Guest are viewing this topic.

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
Hi everyone,

I am new in this space. I am trying to make a microphone recorder with 2 essential components:
  1.  a microphone
  2.  a micro controller

I want to get high quality readings on the micro-controller(>= cellphone Mic quality). I would like some guidance on my approach and some help choosing parts.

My ideal goal is:
  1. recorded quality to be as high as possible(>= cellphone Mic quality)
  2. sampling rate to be as high as possible for MATLAB post-processing purposes(of course, within a <$50 budget)

Here is the components I am considering:
  - Microphones:
    a. just direct electret microphone and operational amplifiers then to the Analog port of MCU. since I want high quality audio, is there some specific op-amp I should get ?
    b. use a electret breakout board like this one https://www.sparkfun.com/products/9964.
    c. use a Mems microphone breakout board like this one https://www.sparkfun.com/products/9868

  - MCU:
    a. arduino with Atmel chips - I am a bit concerned about the clock frequency and sampling rate
    b. teensy 3.1 (72MHz clock rate)

I am most concerned with microphone choices. Any guidance on it is greatly appreciated!
« Last Edit: June 30, 2014, 09:21:43 pm by keithTO »
 

Offline DavidDLC

  • Frequent Contributor
  • **
  • Posts: 755
  • Country: us
"1. recorded quality to be as high as possible(on par with cellphone is good enough)"

Nowadays cellphones use what is called digital microphones. It is a module that delivers digital content using I2S or some other protocol. That can be one of your choices

David.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2625
  • Country: 00
    • My random blog.
>MATLAB post-processing

so why exactly do you need a microcontroller if recording will end up on the pc?
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
"1. recorded quality to be as high as possible(on par with cellphone is good enough)"

Nowadays cellphones use what is called digital microphones. It is a module that delivers digital content using I2S or some other protocol. That can be one of your choices

David.

Thanks David, I'll look into digital MEMS microphones. I couldn't find a breakout board for it. Hmm, that means I'll need to learn some surface mount tricks.
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
>MATLAB post-processing

so why exactly do you need a microcontroller if recording will end up on the pc?

Hi Rasz,

Thanks for the response. This is a college project. I plan to use MATLAB to develop signal processing algorithms for sound source localization.(and of course generating plots and reports :) )  But in the end ,the demo will be ported back to the micro controller.
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
I took a look at the digital microphone (MEMS, PDM output). It seems all the parts on digikey has a max clock frequency of 3.25MHz, which translates to about 25K sampling rate(if my calculation is not wrong). Do you guys know if there are higher sampling rate solutions?
 

Offline PChi

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: gb
I believe that cell phones are using MEMS microphones because they can be assembled and soldered (I guess infra red reflow) not necessarily for quality.
Keeping the GSM buzz out of a microphone pre-amplifier isn't easy so one with a digital interface gets around this.
I wouldn't sat that cell phones have good audio quality. The low bit rate Vocoders are plain nasty. I am a little out of date but the 'high quality' codec only used a 16 kHz sample rate.
There are ICs out there that have the voice A/D, D/A, microphone amplifiers and headphone amplifiers. Texas Instruments are just one source.
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
Thanks PChi.  I'll look into voice ADC and microphone amplifiers. In terms of sound quality, would you recommend electret microphones or MEMS analog microphones(or other options I am not familiar with) ?

I believe that cell phones are using MEMS microphones because they can be assembled and soldered (I guess infra red reflow) not necessarily for quality.
Keeping the GSM buzz out of a microphone pre-amplifier isn't easy so one with a digital interface gets around this.
I wouldn't sat that cell phones have good audio quality. The low bit rate Vocoders are plain nasty. I am a little out of date but the 'high quality' codec only used a 16 kHz sample rate.
There are ICs out there that have the voice A/D, D/A, microphone amplifiers and headphone amplifiers. Texas Instruments are just one source.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
An avr or pic will work, with a sample rate of a few ksps.

a faster speed can be achieve with a fast ADC feeding a DMA channel into tons of memory, internal or more likely parallel external ram.
================================
https://dannyelectronics.wordpress.com/
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5350
  • Country: ro
  • .
You could just use an integrated chip like Si3000 : http://www.digikey.com/product-detail/en/SI3000-C-FS/336-1382-ND/1131235

It will send data to your microcontroller through i2c and it also has line out and/or headphones amplifiers built in. You could take audio data from it into the microcontroller and then send it through uart to pc, if you have something against just using line in on your sound card.

The above chip is only 16 bit but it's not like it matters, 16 bit is enough. Sampling frequency can be configured (as well as lots of settings) through i2c commands.   

another good chip (24bit and up to 216kHz) would be Cirrus Logic CS4270, but it's somewhat expensive : http://www.digikey.com/product-detail/en/CS4270-CZZ/598-1040-5-ND/923160
« Last Edit: June 30, 2014, 10:43:27 pm by mariush »
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2625
  • Country: 00
    • My random blog.

Hi Rasz,

Thanks for the response. This is a college project. I plan to use MATLAB to develop signal processing algorithms for sound source localization.(and of course generating plots and reports :) )  But in the end ,the demo will be ported back to the micro controller.

I took a look at the digital microphone (MEMS, PDM output). It seems all the parts on digikey has a max clock frequency of 3.25MHz, which translates to about 25K sampling rate(if my calculation is not wrong). Do you guys know if there are higher sampling rate solutions?


this:

http://www.gizmag.com/seesv-s205-sound-camera-locates-noises/27447/
http://smins.co.kr/html/en/product/product_0201.html

uses mems microphones

and here is me talking with Jean-Marc Valin, author of

http://sourceforge.net/p/manyears/wiki/Main_Page/

in slashdot comments (citizenr = me):

http://tech.slashdot.org/comments.pl?sid=3742015&cid=43701913

:)

You can use small FPGA or Xcore to interface array of MEMS mics. SeeSV-S205 uses FPGA. Xcore should be easier if you have no fpga experience.

ps: If you want to get fancy you can even use "special" dual (high dynamic range) MEMS microphones designed for Nokia (they eventually sued HTC over those :P)
http://pocketnow.com/2013/03/06/htc-one-microphone-tech
http://www.wpcentral.com/nokia-awarded-injunction-against-htc-court-netherlands

$1 each
http://www.ebay.com/itm/Lots-10pcs-New-Replacement-Mic-Microphone-Mic-Speaker-For-Nokia-Lumia-920-/380686847993?pt=US_Cell_Phone_Replacement_Parts_Tools&hash=item58a2b44ff9

My intuition/guy tells me PDM signal could easily be used directly (without converting back into continuous form) for the purpose of phase comparison.
« Last Edit: July 01, 2014, 03:21:57 pm by Rasz »
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
What are you sampling WITH?  At what RATE? At what DEPTH?
MEMS microphones are NOT known for their sensitivity OR fidelity vs.. electret. Their main application is voice-grade (i.e. cell phone) appliances.
If you are "localizing" gunshots at 50m then MEMS would probably do it.
But if you are experimenting with insect sounds or even bird sounds from far away, I think you will be disappointed by MEMS performance.
There are a wide range of different quality levels of electret mic capsules from <<$1 to >>$200, depending on various factors, not the least of which is self-noise.
Are you trying to do this with a micro-controller (Arduino, et.al.)?  Or with a proper computer?
WHERE are you? What suppliers do you have access to?
 

Offline PChi

  • Frequent Contributor
  • **
  • Posts: 265
  • Country: gb
I agree with Richard Crowley.
If quality is your goal electret is probably best.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
My intuition/guy tells me PDM signal could easily be used directly (without converting back into continuous form) for the purpose of phase comparison.
PDM can be filtered in analog back to the original signal fairly easily, but dealing directly with the PDM bitstream itself seems a lot more challenging.

All the articles I've read on this descend into CIC filters that make my head spin. Does anyone here know of a way to convert PDM to PCM without proprietary code and/or matlab wizardry?

 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2625
  • Country: 00
    • My random blog.
My intuition/guy tells me PDM signal could easily be used directly (without converting back into continuous form) for the purpose of phase comparison.
PDM can be filtered in analog back to the original signal fairly easily, but dealing directly with the PDM bitstream itself seems a lot more challenging.

finding direction is all about finding phase change (right?) and this should be easy with PDM, all you do is shift bits until you get something similar in two buffers.
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
Thanks everyone for all the pointers (mariush for the part number and Rasz for the links to various projects, especially ManyEar).

For the first iteration, I'll go with Electrect Microphones, since I have a few at home and they have better qualities compared to MEMS. For me, the MIC form factor is not a major concern, since localization requires a distance span to mount multiple MICs anyways.

@RichardCrowley, I am in Toronto(electrical engineering student at University of Toronto). I don't have access to specific suppliers, but I do have a few hundred dollars funding for this project. For the end demo, I want the system price to be on the lower end of 50~100 dollars. I want it to work on micro controller instead of a computer(I can replace the micro controller with a low end FPGA if the end algorithm requires parallel computation that CMU can't handle in real-time)

As for my required sampling rate and depth question, I don't have an answer right now. As part of the project, I do want to figure out trade off between these parameters and accuracy. So, for now, I can only say as high as possible(within budget limit).

For the audio acquisition part, it seems I have three approaches:
  1. electrect microphone -> amplifier circuit -> ADC (Micro controller onboard ADC or separate ADC)
  2. electrect microphone -> audio codec integrated chip like Si3000 -> I2C to Micro controller
  3. electrect microphone -> sound capture card(like project ManyEar http://sourceforge.net/p/manyears/wiki/Main_Page/) -> Micro Controller

I am wondering which approach do you guys think is the best? I am not very clear about the benefits of using dedicated sound capture card, would it help in this case ?
« Last Edit: July 02, 2014, 05:56:45 pm by keithTO »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
I don't know how approach #1 would work.

Approach #2 would be too slow, being i2c. If you could find an I2S chip (more spi-like), that may be possible.

Approach #3 - why would you then download it to a mcu, having acquired the data on a pc?

If I were you, I would figure out the bandwidth requirement (a few Khz on the high-end, I think). From there, you get a sense of sample rates. Based on that, you can figure the implementation.

You will also need to figure out how to store or transmit the acquired data. That is likely the biggest issue for you.
================================
https://dannyelectronics.wordpress.com/
 

Offline keithTOTopic starter

  • Contributor
  • Posts: 14
Sorry Approach #1 should be ADC instead of DAC. I have edited my post.

I don't know how approach #1 would work.

Approach #2 would be too slow, being i2c. If you could find an I2S chip (more spi-like), that may be possible.

Approach #3 - why would you then download it to a mcu, having acquired the data on a pc?

If I were you, I would figure out the bandwidth requirement (a few Khz on the high-end, I think). From there, you get a sense of sample rates. Based on that, you can figure the implementation.

You will also need to figure out how to store or transmit the acquired data. That is likely the biggest issue for you.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2625
  • Country: 00
    • My random blog.
#3 can be done with Raspi or any other ARM dev board running Linux


What is the goal of your project? Developing software or whole system including hardware? Are there any detailed requirements? Can you reuse off the shelf components?

For quick and dirty start get yourself M$ Kinect, it has an array of 4 microphones. There is Linux support
http://home.heeere.com/tech-kinect-audio.html
4 wav files you get from kinect should be clock synced.

This will get you started on PC side. Later you can use Beaglebone, Raspee, Cubieboard, any Android tablet or your own board with USB Host functionality.

Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
You need to consider what your basic requirements are before you can specify anything.
What kind of noises are you trying to sense?  (i.e. what kind of microphone would work, or not?)
How loud are they?  (i.e. how much sensitivity and signal-to-noise do you need in the system)?
How sharp is the waveform?  (i.e. what sample rate, and how much computing horsepower will you need?)
Now much time between samples are you expecting (i.e. what kind of sampling time accuracy do you need?)
Those parameters (sample-rate, bit-depth, timing accuracy, etc.) seem crucial to the success of your project.
You have not mentioned any of those factors here, so we ould only be shooting in the dark to recommend anything specific.
And, IMHO, that would be doing you a disservice.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->