KY-036 Module is a sound detection circuit board that uses an electret condenser microphone. It can detect environmental noise levels and works with microcontrollers like Arduino, Raspberry Pi, and ESP32. The module has both digital and analog outputs. The digital output acts like a switch that turns on when noise is detected, while the analog output can measure the sound levels. It features an on-board potentiometer to adjust the sensitivity of the sound sensing.
KY-038 Sound Detection Module Specifications
The quick specifications of this sensor module is given below:
- Module: Sound Detector
- Type: Analog/Digital
- Main Chips: LM393, CMA-4544PF-W Microphone
- Pin Connector to board: 4 Pins
- Operating Voltage: DC +3.3V to +5V
- Frequency Range: 20 Hz ~ 20 kHz
- Microphone Sensitivity: -44dB ±2dB
- PCB Color: Red
- Board Dimensions (L x W x H): 44 x 15 x 10 mm
- Weight: 4gm
Pinout of KY-038 Sound Detection Module
The module has 4 male header pins those are -
|
Working Explanation of KY-038 Sound Detection Module Circuit
Schematic of the KY-038 sound detection module circuit is shown below.
Components are used in the circuit - U1: IC LM393, Q1: CMA-4544PF-W Electret Condenser Microphone, VR1: 100kΩ Multiturn Potentiometer, R1 & R4: 10kΩ, R2 & R6: 100kΩ, R3: 150Ω, R5: 1kΩ, L1 & L2: Red LED, and P1: 4 pin Male header.
The module integrates both analog and digital circuits designed to operate within a voltage range of 3.3-5V DC. It has an LED (L1) to indicate the power supply status through blinking.
When the electric condenser microphone detects sound (20 Hz ~20 kHz), it allows a flow of current through a potentiometer (VR1) and a resistor (R3) to the ground. The combination of the potentiometer (VR1) and the resistor (R3) acts as a voltage divider, producing a reference voltage. This reference voltage is then taken as the analog signal output (A0) of the circuit, and the sensitivity of the sound detection can be adjusted by the Multiturn potentiometer (VR1).
An LM393 dual comparator IC (U1) is utilized in the circuit for digital functions, which contains two comparators. The analog signal output from the voltage divider (VR1 and R3) is fed into the inverting input (pin-2) of the first comparator, while a fixed reference voltage from a second voltage divider (R2 and R6) is connected to the non-inverting input (pin-3) of the same comparator.
When a certain level of noise is detected and current flows through the microphone (Q1) to ground, the reference voltage across the voltage divider (VR1 and R3) decreases. If this voltage drops below the reference voltage from the voltage divider (R2 and R6) at the non-inverting input of the first comparator, the output at pin-1 goes high.
The output from the first comparator is connected to a pull-up resistor (R1), ensuring a defined logic level for the output signal (D0). This high signal from the first comparator is also sent to the non-inverting input (pin-6) of the second comparator, while the reference voltage from the voltage divider (R2 and R6) is connected to the inverting input (pin-7) of the second comparator.
When the first comparator outputs a high signal in response to the detected sound, the second comparator checks if this high signal exceeds the reference voltage from the divider (R2 and R6). If the signal from the first comparator is greater than the reference voltage, the second comparator outputs a low signal at its output (pin-6). This low signal causes the LED (L2) to blink.
KY-038 Arduino Programming Code
This Arduino sketch will reads values from the KY-038 sound detection module. When any environmental noise is detected near the microphone, the digital output sends a HIGH signal to the Arduino, causing the onboard LED to turn ON.
Additionally, the analog output returns a high value when no sound is detected; this value depends on the supplied voltage and the position of the potentiometer's sound-sensing threshold. When sound is detected near the microphone, the analog output signal value decreases. Use Tools > Serial Plotter in the Arduino IDE to visualize the graphical values from the analog output.
No comments
If you have any doubts or questions, please let me know. Don't add links as it goes to spam. Share your valuable feedback. Thanks