Sound Sensor (Big) Reference
A microphone-based sound detection module with a larger condenser mic, giving higher sensitivity than the small variant. Provides both analog and threshold digital outputs.
Pin names
| Name | Description |
|---|---|
| AOUT | Analog Out — voltage proportional to sound amplitude |
| GND | Ground |
| VCC | Power (5V) |
| DOUT | Digital Out — HIGH/LOW based on a threshold (adjustable via onboard trimmer on real hardware) |
Attributes
This component has no configurable attributes.
Usage
Connect VCC to 5V, GND to GND, and either AOUT to an analog input pin for a continuous amplitude reading, or DOUT to a digital input pin for a simple sound-triggered alarm (e.g. clap detection).
const int SOUND_ANALOG_PIN = A0;
const int SOUND_DIGITAL_PIN = 2;
void setup() {
pinMode(SOUND_DIGITAL_PIN, INPUT);
Serial.begin(9600);
}
void loop() {
int amplitude = analogRead(SOUND_ANALOG_PIN);
bool triggered = digitalRead(SOUND_DIGITAL_PIN) == HIGH;
Serial.print("Amplitude: "); Serial.print(amplitude);
Serial.print(" Triggered: "); Serial.println(triggered ? "YES" : "no");
delay(100);
}
Examples
| Description | Attrs |
|---|---|
| Default sound sensor | {} |
See also
- Sound Sensor (Small) — same pinout, smaller mic and lower sensitivity
- Heart Beat Sensor — another analog module with a similar reading pattern