Introduction
Voice-activated devices and noise-level monitors both need a way of turning sound into a number a microcontroller can react to, and that is exactly what this experiment demonstrates. A small electret microphone sound sensor module is wired to the STM32F070RB, and its amplified output is sampled rapidly to calculate a live sound intensity reading, printed continuously over UART.
2. Scope
This experiment covers understanding how an electret microphone module's onboard amplifier converts sound pressure into an analog voltage, and tracking a running peak-to-peak measurement rather than a single instantaneous sample, since audio signals fluctuate extremely rapidly. This extends single-sample ADC reading to a case where one sample is not representative, and a short window of samples must be aggregated first.
3. Prerequisite
3.1 Hardware
-
STM32 Nucleo-F070RB development board
-
Electret microphone sound sensor module, with onboard amplifier and analog output
-
Breadboard and jumper wires
-
Micro-USB cable
-
PC with PuTTY
3.2 Software
-
STM32CubeMX (standalone)
-
STM32CubeIDE
-
ST-LINK USB driver
-
PuTTY, or an equivalent serial terminal application
Community Q&A
0 questionsAsk questions and get answers from our community and staff moderators.
No questions yet — be the first to start the conversation!
Ask a Question
Please log in to ask a question or post a reply.
Login to Participate