Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use KY036: Examples, Pinouts, and Specs

Image of KY036Design with KY036 in Cirkit Designer

Introduction

The KY036 is a sound sensor module designed to detect sound levels and convert them into an analog voltage output. It features a built-in microphone and a comparator circuit, making it suitable for both analog and digital sound detection. The module is widely used in applications such as voice-activated systems, sound level monitoring, and noise detection in smart home or IoT projects. Its compact design and ease of use make it a popular choice for hobbyists and professionals alike.

Explore Projects Built with KY036

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Nano-Based Wireless Joystick and Motion Controller: A project utilizing KY036 in a practical application
Arduino Nano-Based Wireless Joystick and Motion Controller

This circuit features an Arduino Nano microcontroller interfaced with an HC-05 Bluetooth module, an MPU-6050 accelerometer/gyroscope, and a KY-023 Dual Axis Joystick Module. The Arduino Nano is powered by a 9V battery through a rocker switch and communicates with the HC-05 for Bluetooth connectivity, reads joystick positions from the KY-023 module via analog inputs, and communicates with the MPU-6050 over I2C to capture motion data. The circuit is likely designed for wireless control and motion sensing applications, such as a remote-controlled robot or a game controller.

Open Project in Cirkit Designer
Image of Battery-Powered ESP32-C3 Interactive Control Panel: A project utilizing KY036 in a practical application
Battery-Powered ESP32-C3 Interactive Control Panel

This circuit features an ESP32-C3 microcontroller connected to various input devices and an OLED display. The input devices include two KY-023 Dual Axis Joystick Modules for directional input and a Rotary Encoder for incremental input, both interfaced with the ESP32-C3's GPIO pins. The circuit also includes a power management system with a Polymer Lithium Ion Battery, a JST connector, and a toggle switch to control power to an LED indicator.

Open Project in Cirkit Designer

Technical Specifications

Pin Configuration and Descriptions

Pin Name Pin Type Description
AO Analog Out Outputs an analog voltage proportional to the detected sound level.
DO Digital Out Outputs HIGH or LOW based on the sound level and the threshold setting.
GND Ground Connect to the ground of the power supply.
VCC Power Connect to a 3.3V or 5V DC power supply.

Usage Instructions

How to Use the KY036 in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect Outputs:
    • For analog sound level monitoring, connect the AO pin to an analog input pin on your microcontroller.
    • For digital sound detection, connect the DO pin to a digital input pin.
  3. Adjust Sensitivity: Use the onboard potentiometer to set the threshold for the digital output. Turning the potentiometer clockwise increases sensitivity, while turning it counterclockwise decreases sensitivity.
  4. Read Outputs:
    • The AO pin provides a continuous voltage that can be read using an ADC (Analog-to-Digital Converter).
    • The DO pin outputs HIGH when the sound level exceeds the threshold and LOW otherwise.

Important Considerations and Best Practices

Example: Connecting KY036 to Arduino UNO

Below is an example of how to use the KY036 with an Arduino UNO to read both analog and digital outputs:

// KY036 Sound Sensor Example with Arduino UNO
// Reads analog sound level and detects sound threshold using digital output.

const int analogPin = A0; // KY036 AO pin connected to Arduino A0
const int digitalPin = 2; // KY036 DO pin connected to Arduino digital pin 2
int soundLevel = 0;       // Variable to store analog sound level
int soundDetected = 0;    // Variable to store digital output state

void setup() {
  pinMode(digitalPin, INPUT); // Set digital pin as input
  Serial.begin(9600);         // Initialize serial communication
}

void loop() {
  // Read analog sound level
  soundLevel = analogRead(analogPin);
  
  // Read digital output state
  soundDetected = digitalRead(digitalPin);
  
  // Print sound level and detection status to Serial Monitor
  Serial.print("Analog Sound Level: ");
  Serial.print(soundLevel);
  Serial.print(" | Sound Detected: ");
  Serial.println(soundDetected ? "YES" : "NO");
  
  delay(500); // Delay for readability
}

Troubleshooting and FAQs

Common Issues

  1. No Output from AO or DO:

    • Ensure the module is powered correctly (check VCC and GND connections).
    • Verify that the microphone is not obstructed or damaged.
    • Adjust the potentiometer to ensure the threshold is appropriate for your environment.
  2. Erratic Digital Output (DO):

    • Check for noise or interference from nearby components.
    • Use a decoupling capacitor (e.g., 0.1µF) across the power supply pins to stabilize the voltage.
  3. Low Sensitivity:

    • Increase the sensitivity by turning the potentiometer clockwise.
    • Ensure the microphone is oriented towards the sound source.

FAQs

Q: Can the KY036 detect specific frequencies (e.g., voice or music)?
A: The KY036 is a general-purpose sound sensor and does not have frequency filtering capabilities. For frequency-specific detection, additional signal processing is required.

Q: Can I use the KY036 with a 3.3V microcontroller?
A: Yes, the KY036 operates at both 3.3V and 5V, making it compatible with most microcontrollers.

Q: How do I know if the potentiometer is set correctly?
A: Monitor the DO pin output while adjusting the potentiometer. When the sound level exceeds the threshold, the DO pin will output HIGH.

By following this documentation, you can effectively integrate the KY036 sound sensor module into your projects for reliable sound detection and monitoring.