The KY-038 is a sound sensor module that can be used to detect changes in ambient noise levels. It consists of a microphone, amplifier, and comparator circuit, all of which work together to produce a digital output signal that can be read by a microcontroller or other electronic device.
The microphone in the KY-038 is a condenser microphone, which means it uses a capacitor to convert changes in air pressure (i.e. sound) into electrical signals. These signals are very weak, however, so an amplifier circuit is used to boost the signal strength before it is sent to the comparator circuit.
The comparator circuit compares the amplified microphone signal to a reference voltage, and produces a digital output signal that is either high or low depending on whether the microphone signal is above or below the reference voltage. This output signal can then be read by a microcontroller or other electronic device to determine the ambient noise level.
The KY-038 module has a potentiometer that can be used to adjust the sensitivity of the sensor, allowing you to set a threshold for the ambient noise level. This means that you can set the module to only output a signal when the ambient noise level exceeds a certain level.
Following is the schematic diagram of KY-038 microphone sound sensor.
The circuit schematic shows the connections between the microphone, amplifier, LM393 op-amp comparator, and potentiometer in the KY-038 sound sensor module. The microphone is connected to the non-inverting input of an operational amplifier (LM393 op-amp) which is used as an amplifier. The potentiometer is connected to the inverting input of the op-amp, which can be used to adjust the sensitivity of the microphone. The output of the op-amp is connected to the non-inverting input of a comparator, which compares the output of the op-amp to a reference voltage.
The reference voltage is provided by a voltage divider circuit, which is made up of two resistors, R1 and R2. The voltage divider circuit is connected to the power supply, which provides a fixed voltage, and divides it into two parts, one part is connected to the inverting input of the comparator and another part is connected to the ground.
The output of the second LM393 comparator is a digital signal, it can be either high or low, depending on whether the input voltage is above or below the reference voltage. The output of the comparator is connected to a digital pin on the module, which can be used to read the output signal.
The KY-038 mainly uses LM383 comparator IC(Integrated Circuit). It is a dual differential comparator, which is an electronic component that compares two input voltage levels and outputs a digital signal indicating which voltage is larger. The LM393 has two independent comparators inside of it and it can be used in a variety of applications such as voltage level detection, temperature sensing and oscillator circuit. It's widely used in Arduino projects and other microcontroller based projects because it has a wide voltage range and can operate with low power consumption. The LM393 is widely available and relatively inexpensive, making it a popular choice for many electronic projects. If you interested in learning the basic of LM393 then see the tutorial Light and Darkness sensor Circuit with LM393.
The following shows video demonstration of how the KY-038 sound sensor works.