Hi quality(>= cellphone Mics) and high sampling rate microphone recording - Page 1
Forum section: electronics / projects

author: keithTO
author_rank: Contributor
timestamp: June 30, 2014, 06:24:52 pm
content: Hi everyone,I am new in this space. I am trying to make a microphone recorder with 2 essential components:1. a microphone2. a micro controllerI 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 onehttps://www.sparkfun.com/products/9964.c. use a Mems microphone breakout board like this onehttps://www.sparkfun.com/products/9868- MCU:a. arduino with Atmel chips - I am a bit concerned about the clock frequency and sampling rateb. teensy 3.1 (72MHz clock rate)I am most concerned with microphone choices. Any guidance on it is greatly appreciated!

author: DavidDLC
author_rank: Frequent Contributor
timestamp: June 30, 2014, 06:30:44 pm
content: "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 choicesDavid.

author: Rasz
author_rank: Super Contributor
timestamp: June 30, 2014, 06:38:03 pm
content: >MATLAB post-processingso why exactly do you need a microcontroller if recording will end up on the pc?

author: keithTO
author_rank: Contributor
timestamp: June 30, 2014, 06:46:48 pm
content: Quote from: DavidDLC on June 30, 2014, 06:30:44 pmThanks 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.

author: keithTO
author_rank: Contributor
timestamp: June 30, 2014, 06:49:14 pm
content: Quote from: Rasz on June 30, 2014, 06:38:03 pmHi 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.

author: keithTO
author_rank: Contributor
timestamp: June 30, 2014, 07:13:52 pm
content: 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?

author: PChi
author_rank: Frequent Contributor
timestamp: June 30, 2014, 09:06:16 pm
content: 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.

author: keithTO
author_rank: Contributor
timestamp: June 30, 2014, 09:20:26 pm
content: 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) ?Quote from: PChi on June 30, 2014, 09:06:16 pm

author: dannyf
author_rank: Super Contributor
timestamp: June 30, 2014, 10:11:28 pm
content: 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.

author: mariush
author_rank: Super Contributor
timestamp: June 30, 2014, 10:38:24 pm
content: You could just use an integrated chip like Si3000 :http://www.digikey.com/product-detail/en/SI3000-C-FS/336-1382-ND/1131235It 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

author: Rasz
author_rank: Super Contributor
timestamp: July 01, 2014, 03:04:08 pm
content: Quote from: keithTO on June 30, 2014, 06:49:14 pmQuote from: keithTO on June 30, 2014, 07:13:52 pmthis:http://www.gizmag.com/seesv-s205-sound-camera-locates-noises/27447/http://smins.co.kr/html/en/product/product_0201.htmluses mems microphonesand here is me talking with Jean-Marc Valin, author ofhttp://sourceforge.net/p/manyears/wiki/Main_Page/in slashdot comments (citizenr = me):http://tech.slashdot.org/comments.pl?sid=3742015&cid=43701913You 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)http://pocketnow.com/2013/03/06/htc-one-microphone-techhttp://www.wpcentral.com/nokia-awarded-injunction-against-htc-court-netherlands$1 eachhttp://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=item58a2b44ff9My intuition/guy tells me PDM signal could easily be used directly (without converting back into continuous form) for the purpose of phase comparison.

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 01, 2014, 03:18:53 pm
content: 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?

author: PChi
author_rank: Frequent Contributor
timestamp: July 01, 2014, 05:11:13 pm
content: I agree with Richard Crowley.If quality is your goal electret is probably best.

author: andyturk
author_rank: Frequent Contributor
timestamp: July 01, 2014, 05:23:41 pm
content: Quote from: Rasz on July 01, 2014, 03:04:08 pmPDM 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?

author: Rasz
author_rank: Super Contributor
timestamp: July 01, 2014, 05:35:44 pm
content: Quote from: andyturk on July 01, 2014, 05:23:41 pmfinding 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.

author: keithTO
author_rank: Contributor
timestamp: July 02, 2014, 04:07:38 pm
content: 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 controller3. electrect microphone -> sound capture card(like project ManyEarhttp://sourceforge.net/p/manyears/wiki/Main_Page/) -> Micro ControllerI 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 ?

author: dannyf
author_rank: Super Contributor
timestamp: July 02, 2014, 05:01:13 pm
content: 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.

author: keithTO
author_rank: Contributor
timestamp: July 02, 2014, 06:01:15 pm
content: Sorry Approach #1 should be ADC instead of DAC. I have edited my post.Quote from: dannyf on July 02, 2014, 05:01:13 pm

author: Rasz
author_rank: Super Contributor
timestamp: July 02, 2014, 07:30:01 pm
content: #3 can be done with Raspi or any other ARM dev board running LinuxWhat 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 supporthttp://home.heeere.com/tech-kinect-audio.html4 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.

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 03, 2014, 04:34:57 am
content: 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.