Introduction: Using Breakout Board for ADMP401 MEMS Microphone on PcDuino

Picture of Using Breakout Board for ADMP401 MEMS Microphone on PcDuino

Module introduction:
Breakout Board for ADMP401 MEMS Microphone is a supersensitive omnidirectional microphones.Its PCB is very small, signal output is simple, with only 3 signal output, one VCC (positive power), one GND(negative power), one output(signal output), when the voice is changing around the module, the output signal (output) is also chaging. So we can use the pcduino ADC function to collect speech signal (Of course, the sample rate is not very high)

Step 1: Wiring Diagram

Picture of Wiring Diagram

Step 2: Sample Code

#include 
int adc_id = 2; int delay_us = 100000; int HistoryValue = 0; char buffer[100]; void setup() { memset(buffer,0,sizeof(buffer)); } void loop() { int value = analogRead(adc_id); // get adc value value = ((float)value/4096)*sizeof(buffer); if(((HistoryValue>=value) && ((HistoryValue - value) > 2)) || ((HistoryValue 2))) { memset(buffer,'*',value); buffer[value] = 0; printf("%s\n",buffer); } HistoryValue = value; }

Step 3: The Results

Picture of The Results

When we touch the module with hand, we can detect the sensor output:

When the sound changes , the reversed waveform like spectrum will be shown on the screen.

Comments

VinodN5 (author)2015-10-29

if(((HistoryValue>=value) && ((HistoryValue - value) > 2)) || ((HistoryValue 2))) //what is the HistroryValue2 will do here ?

at this instruction i am getting the error as

MEMS_microphone.ino: In function 'void loop()':

MEMS_microphone:22: error: expected ')' before numeric constant

MEMS_microphone:29: error: expected ')' before 'HistoryValue'

MEMS_microphone:29: error: expected ')' before ';' token

VinodN5 (author)2015-10-29

if(((HistoryValue>=value) && ((HistoryValue - value) > 2)) || ((HistoryValue 2))) //what is the HistroryValue2 will do here ?

at this instruction i am getting the error as

MEMS_microphone.ino: In function 'void loop()':

MEMS_microphone:22: error: expected ')' before numeric constant

MEMS_microphone:29: error: expected ')' before 'HistoryValue'

MEMS_microphone:29: error: expected ')' before ';' token

VinodN5 (author)2015-10-29

if(((HistoryValue>=value) && ((HistoryValue - value) > 2)) || ((HistoryValue 2))) //what is the HistroryValue2 will do here ?

at this instruction i am getting the error as

MEMS_microphone.ino: In function 'void loop()':

MEMS_microphone:22: error: expected ')' before numeric constant

MEMS_microphone:29: error: expected ')' before 'HistoryValue'

MEMS_microphone:29: error: expected ')' before ';' token

About This Instructable

3,340views

4favorites

License:

Add instructable to: