Sound Detection Module(KY-037): 두 판 사이의 차이
잔글편집 요약 없음 |
잔글편집 요약 없음 |
||
| 2번째 줄: | 2번째 줄: | ||
[[File:소리감지센서1.jpg|center|class=coders100]] | [[File:소리감지센서1.jpg|center|class=coders100]] | ||
The Sound Detection Module (KY-037) is a compact and versatile sensor designed for detecting sound levels in the environment. It's commonly used in projects that require noise or sound detection capabilities, such as voice-activated systems, security alarms, or environmental sound monitoring. | The Sound Detection Module (KY-037) is a compact and versatile sensor designed for detecting sound levels in the environment. It's commonly used in projects that require noise or sound detection capabilities, such as voice-activated systems, security alarms, or environmental sound monitoring. | ||
== '''Specifications''' == | == '''Specifications''' == | ||
| 7번째 줄: | 8번째 줄: | ||
* Operating Voltage: 3.3V ~ 5V | * Operating Voltage: 3.3V ~ 5V | ||
* Output Type: Digital, Analog | * Output Type: Digital, Analog | ||
== '''Connection''' == | == '''Connection''' == | ||
| 68번째 줄: | 70번째 줄: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Execution Result === | === Execution Result === | ||
[[File:소리감지 테스트.png|center|class=coders100]] | [[File:소리감지 테스트.png|center|class=coders100]] | ||
2025년 3월 21일 (금) 16:27 기준 최신판

The Sound Detection Module (KY-037) is a compact and versatile sensor designed for detecting sound levels in the environment. It's commonly used in projects that require noise or sound detection capabilities, such as voice-activated systems, security alarms, or environmental sound monitoring.
Specifications
- Operating Voltage: 3.3V ~ 5V
- Output Type: Digital, Analog
Connection
The circuit utilized in the example code below.
An LED can be replaced with another module or omitted entirely.
| Resistor | Sound Detection Module | LED | Arduino | |||
| VCC | 5V | |||||
| GND | - | GND | ||||
| Connection | + | |||||
| DO | D8 | |||||
| Connection | D7 | |||||

Example Code
// Code that lights up the LED when the module detects sound.
#define led_pin 7
#define sound_pin 8
float state = 0;
void setup() {
pinMode(led_pin, OUTPUT);
digitalWrite(led_pin, LOW);
pinMode(sound_pin, INPUT);
}
void loop() {
state = digitalRead(sound_pin);
if (state == 1) {
digitalWrite(led_pin, HIGH);
delay(500);
} else digitalWrite(led_pin, LOW);
}
Execution Result
