When a reading is wrong
There is no LED on this block, so the first test is always the same: print the resting level, then clap a hand's length from the capsule and watch the swing jump by hundreds of millivolts. If both happen, the block works, and the problem is the threshold, the room or the sketch.
Six symptoms
Pick what the reading is doing. The ringed part of the board is where to look first, and the list beside it is the order to check in, by how often each one is the answer.
It reads 0, or it is stuck at the top
A reading that sits at 0 and never moves means SIGNAL is not being pulled up: VCC is missing, or the cable is one pin over. A reading stuck at the top of the scale means the transistor is passing no current, and the usual reason is a missing GND. Count from the square pad: GND, VCC, NC, SIGNAL.
It rests nowhere near half the scale
That is how this block is built. The resting level is set by the gain of the transistor, which varies from part to part, so from 5V on an Uno it can be anywhere from about 325 to 815. The resting level works it out. The sketches measure it rather than assume it.
Talking does nothing
Also how it is built. Speech a metre away swings SIGNAL by a few millivolts, a few counts on an Uno and inside an ESP32's own wander. Clap a hand's length away: if the swing jumps by hundreds of millivolts, the block works.
It jumps with no sound, or one clap switches twice
Readings that wander in silence are the converter's own noise, which is larger on an ESP32. Measure the quiet swing at start-up and put the threshold above it, as reading it on an ESP32 does. A clap that switches twice is its own ringing and echo landing in the next window: stop listening for 300 ms after each switch, as a clap switch does.
When it does not work
Power it, GND and VCC only, and put a multimeter on its volts range between SIGNAL and GND. It should read a steady resting level somewhere between about 1.6 and 4.0 V from 5V, or 1.2 and 2.7 V from 3V3. A meter is too slow to show a clap, but it proves the transistor is biased and the wiring is right.
An ADC1 pin, so Wi-Fi does not stop the reading: GPIO 34 on an ESP32, GPIO 4 on an ESP32-S3. Never the flash pins, and preferably not the strapping pins read at reset. GPIO 34 is input only, which is all an analog pin needs.
A capsule can be damaged by heat when it is soldered, by a hard knock, or by water. If the resting level is right on a meter but no clap moves the swing, the amplifier is fine and the capsule is the suspect. Check its two leads for a cracked joint first.
Edit this page — content/books/analog-microphone/when-a-reading-is-wrong.mdx
Questions about this product
See what other owners have asked, and read their solutions.
Analog Microphone
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.