• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoArduino-ish ProgramADCUsing Breakout Board for ADMP401 MEMS Microphone o ...
Previous Next

Using Breakout Board for ADMP401 MEMS Microphone on pcDuino

Posted by: Alvin Jin , March 27, 2014

[vc_row][vc_column][vc_column_text]4

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)[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Wiring Diagram” tab_id=”1395829088-1-19″][vc_column_text]8[/vc_column_text][vc_column_text][/vc_column_text][/vc_tab][vc_tab title=”Sample Code” tab_id=”1395829088-2-86″][vc_column_text]

#include <core.h>
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<value) && ((value - HistoryValue) > 2)))
    {
      memset(buffer,'*',value);
      buffer[value] = 0;
      printf("%s\n",buffer);
    }

    HistoryValue = value; 
}

[/vc_column_text][/vc_tab][vc_tab title=”The Results” tab_id=”1395840020422-2-1″][vc_column_text]When we touch the module with  hand, we can detect the sensor output:

9

When the sound changes ,  the reversed waveform like spectrum will be shown on the screen.[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: ADC

Share!
Tweet

Alvin Jin

About the author

One Response to “Using Breakout Board for ADMP401 MEMS Microphone on pcDuino”

  1. Pingback: Using Breakout Board for ADMP401 MEMS Microphone on pcDuino | LinkSprite Learning Center | embeddist

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors