KY-038 Sound Detection Sensor Module
Detects claps, knocks, and ambient noise level for reactive projects.
The KY-038 is a small electret-microphone breakout that provides both a digital and an analog output for detecting sound. The digital output flips when volume crosses an adjustable threshold set by an onboard potentiometer, ideal for simple clap-switch or knock-detector projects, while the analog output tracks the raw waveform/envelope for more nuanced sound-reactive builds like level meters or beat-triggered lighting.
Specifications
| Sensor type | Electret condenser microphone with onboard LM393 comparator |
| Operating voltage | 3.3V–5V DC |
| Digital output (DO) | Goes LOW when detected sound exceeds the threshold set by the onboard potentiometer, HIGH otherwise (some boards invert this) |
| Analog output (AO) | Continuous analog signal proportional to the microphone's raw audio envelope |
| Sensitivity adjustment | Onboard trimmer potentiometer sets the digital-trigger threshold |
| Detection range | Best for close-range sounds (claps, knocks, voice) within roughly 0.5-1m |
| Interface | 1 digital pin (threshold trigger) + 1 analog pin (raw signal) |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 3.3–5V DC |
| 2 | GND | Ground |
| 3 | DO | Digital output — threshold-triggered HIGH/LOW sound detection |
| 4 | AO | Analog output — raw microphone signal, read with analogRead() |
Turn the onboard potentiometer clockwise/counter-clockwise while testing with a clap to tune the digital trigger sensitivity — too sensitive and it fires on background noise, too insensitive and it misses claps. For beat-detection or volume-level projects, use the analog output instead and do the thresholding in software.
Variants
The KY-038 and KY-037 are functionally interchangeable for clap detectors and simple sound-reactive triggers. If the project needs to actually process or record audio (rather than just detect loudness), a dedicated mic amp like the MAX9814 gives much cleaner analog output.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| KY-038 (4-pin, LM393 comparator) | ~$1-2 | ||||
| KY-037 | ~$1-2 | ||||
| MAX9814 / MAX4466 microphone amplifier | ~$3-6 |