MICROPHONE WITH ANALOG/DIGITAL OUTPUT

Description

  • High sensitivity electret microphone
  • Analog and digital outputs (on board comparator)
  • Built-in potentiometer is used to set digital out threshold level
  • Built-in LED lights up when audio signal reaches set threshold
  • VCC input voltage 5V
  • Easy to use and set up

The digital output (DO) with settable threshold makes it easy to use in applications where you want to detect noise or certain sound levels. At the same time you can do complex processing with the analog audio output (AO) of the board. With it you can build, among many others, a sound level meter, a clapping meter or a noise alarm.

Supply voltage +5 VDC
Frequency range 100 ~ 10 000 Hz
Sensitivity – 46 ± 2.0, ( 0 dB = 1V / Pa ) at 1 KHz
Signal to noise ratio 58 dB
Comparator LM393
Sensitivity ≤-84 dBm at 0.1% Bit Error Rate
LED 2 On when sound reaches threshold
LED 1 Power
Built-in potentiometer Used to adjust the DO threshold level
Mounting screw hole size 3 mm
Size 40 mm * 15 mm * 10 mm
Weight 0.003 kg

Easy to connect, with only four cables (if you use digital and analog outs). You can pin the module on the breadboard and use the male to male jumper cables, or use the male to female jumper cables and connect the module directly to the Arduino-compatible board.

To supply voltage to the board, connect the +5v pin on your Arduino-compatible board to the + power pin on the microphone module, and the GND pin on your Arduino-compatible board to the G pin on the microphone module. For our example, connect AO on the microphone module to analog pin 0 (A0) on your Arduino-compatible board and DO on the microphone module to digital pin 7 (D7)  on your Arduino-compatible board.

Have fun!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// ---------------------------------------------------------------------------
// Example by Dr. Mangus for MangoLabs
// ---------------------------------------------------------------------------
 
 
//Sensor Pins
int pin_analog = A0;
int pin_digital = 7;
// variables to store sensor data
int val_A0 = 0;
int val_D = 0;
 
void setup()
{
  Serial.begin(9600);
   
  //Define digital pin as input)
  pinMode(pin_digital, INPUT);
}
 
void loop()
{
  val_A0 = analogRead(pin_analog);
  val_D = digitalRead(pin_digital);
  Serial.print("A0:");
  Serial.print(val_A0);
  Serial.print("  D0:");
  Serial.println(val_D);
  //low intensity
  if (val_A0 > 20 && val_A0 < 300)
  {
   Serial.println("quiet");
  }
  //medium
  if (val_A0 > 301 && val_A0 < 700)
  {
    Serial.println("regular");
  }
  //high
  if (val_A0 > 701)
  {
    Serial.println("noisy!!!");
  }
  delay(50);
 
}
  1. In this example we are connecting:
    Arduino    Microphone
    D7     —–  DO
    A0     —–  AO
    GND —–  GND
    5V     —–  +
  2. Download and install the Arduino environment from here or use the web editor.
  3. Download the sketch here and open, or open the Arduino environment and copy the code onto a blank sketch.
  4. Connect your board to your computer with the included USB cable.
  5. Select your board in Tools / Board / Arduino Uno.
  6. Select your port in Tools / Port / COM# (Arduino Uno). This may be slightly different depending on your operating system.
  7. Upload by pressing the arrow in the circle to the upper left.
  8. Open the serial terminal on the Arduino environment. Click on the magnifying glass icon on the upper right.
  9. Select 9600 baud on the lower right.
  10. Make some noise and watch the serial monitor.
    That’s it!