User guide for the Arduino KY-038 microphone sound sensor module, covering its AO and DO outputs, wiring to the Arduino, and example code.
This document describes the Arduino KY-038 microphone sound sensor module, a sound detection module with two outputs: AO, an analog output that provides the real-time output voltage signal of the microphone, and DO, which outputs a high or low signal when the sound intensity reaches a certain threshold. The threshold sensitivity can be adjusted via the potentiometer on the sensor.
The guide explains how to connect the module to the Arduino (5V, GND, A0 for analog programs, and D0 to pin 13 for digital programs) and provides example code for both the digital output and the analog output.
| Digital output behavior | Output high and low signal when sound intensity reaches a certain threshold |
|---|---|
| Digital output pin | D0 to Arduino pin 13 |
| Analog output pin | A0 to Arduino A0 |
For analog programs, A0 is connected to Arduino A0; for digital programs, D0 is connected to Arduino pin 13.
For digital programs, the module's D0 pin connects to Arduino pin 13. For analog programs, the module's A0 pin connects to Arduino A0.