1.Product Introduction
Sound sensor is a sensor used to detect the strength or frequency of sound signals in the environment.
Sound is essentially a kind of mechanical wave, which is generated by the vibration of the object caused by the vibration of the surrounding medium (such as air, water, etc.) molecules, and then form sound waves. When people speak in front of a microphone, the sound waves generated by their voice strike the membrane inside the microphone, causing it to vibrate. This vibration is converted into an electrical signal whose amplitude corresponds to the intensity of the sound. By measuring the amplitude of this electrical signal, we can determine the magnitude of the sound.
Application reference: voice control switch, noise detection, etc.
2.Parameter Specification
Parameter | Value//Description |
---|---|
Operating voltage | 5V |
Operating temperature | 0°C~+70°C |
Output signal | analog signal |
Size | 3.16cm*2.38cm |
3.Wiring Diagram
Sound Sensor | UNO |
---|---|
VCC | 5V |
GND | GND |
S | Analog pin A0 |
4.Sample Code
1//www.acebott.com
2void setup(){
3pinMode(A0, INPUT);//Set pin A0 to input mode
4Serial.begin(9600);//Set baud rate to 9600
5}
6void loop(){
7Serial.println(analogRead(A0));// Read the state of pin A0 and print it to the serial monitor
8delay(100);
9 }
5.Test Result
After you have successfully connected the line according to the wiring diagram and successfully uploaded the correct program, open the serial port, set the baud rate (9600 baud rate), and switch to the rolling mode.
Speak into the sound sensor, the louder the sound, the higher the number.
6.Related Resources
7.Get One Now
B2B Business: info@acebott.com