Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Voice Activated Light with Sound Sensor & Raspberry Pi Pico
Raspberry Pi Raspberry Pi Pico Projects

Voice Activated Light with Sound Sensor & Raspberry Pi Pico

Mamtaz AlamBy Mamtaz AlamUpdated:October 2, 20222 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Sound Sensor Raspberry Pi Pico
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this guide, we will make a Voice Activated Light using a Sound Sensor & Raspberry Pi Pico Board.

The sound sensor detects the level change of the sound sensor through Raspberry Pi Pico. When the sound loudness is greater than the threshold, the sensor is triggered, and then the RGB LED is controlled to light up. Then the LED will automatically turn off after waiting for 3 seconds.


Components Required

In this guide, I used Elecrow Raspberry Pi Pico Starter Kit to test different Modules. You can buy the kit and perform some other operations as well. From this kit, you can use the following components.

1. Raspberry Pi Pico Board -1
2. Sound Sensor – 1
3. RGB LED Module – 1
4. Breadboard -1
5. Jumper Wires – 10
6. Micro-USB Cable




Sound Sensor

The sound sensor acts like a microphone, which is used to receive sound waves. The sensor has a built-in condenser electret microphone that is sensitive to sound. Sound waves make the electret film in the microphone vibrate, resulting in a change in capacitance and a small voltage corresponding to the change. This voltage is then converted into a 0-5V voltage, which is received by the data collector after A/D
conversion and transmitted to the microcontroller.

Sound Sensor

The Sound sensor module has 4 pins VCC, GND, Digital Out, and Analog Out. We can either use the AO pin as an output for analog reading or the DO pin as an output for digital readout. In this module, we only have D0 Pin which is the digital output pin.


Circuit Diagram & Hardware Setup

The circuit for Voice Activated Light using Sound Sensor & Raspberry Pi Pico Board is given below.

Voice Activated Light with Sound Sensor Raspberry Pi Pico

Connect the Sound Sensor VCC, GND & Out pin to Raspberry Pi Pico 5V (VBUS), GND & GP0 Pin.

Similarly connect the R, G & B Pin of the RGB LED to Raspberry Pi Pico GP2, GP3 & GP4 Pin respectively. Connect the GND Pin of RGB LED to Pico GND Pin.



MicroPython Code/Program

Copy the following code and paste it into the Thonny Editor.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from machine import Pin,PWM
from  utime  import sleep_ms
sound = Pin(0, Pin.IN, Pin.PULL_DOWN)  # Port internal pull-down
Led_R = PWM(Pin(2))
Led_G = PWM(Pin(3))
Led_B = PWM(Pin(4))
Led_R.freq(2000)  
Led_G.freq(2000)  
Led_B.freq(2000)  
 
if __name__ == '__main__':
    while True:
        print(sound.value())
        if sound.value() == 1:
            Led_R.duty_u16(65535)
            Led_G.duty_u16(65535)
            Led_B.duty_u16(65535)
            sleep_ms(2000)
        else:
            Led_R.duty_u16(0)
            Led_G.duty_u16(0)
            Led_B.duty_u16(0)

Run the script and start testing the above-connected circuit.

Voice Activated Light

When you clap near the sensor the LED will turn ON for 2 seconds. Then it will turn OFF. You can retest this multiple times.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleLED Control using Push Button with Raspberry Pi Pico
Next Article Interfacing PIR Motion Sensor with Raspberry Pi Pico

Related Posts

ADXL375 Accelerometer with Raspberry Pi Pico & MicroPython

ADXL375 Accelerometer with Raspberry Pi Pico & MicroPython

Updated:July 24, 2025
Interface BMI160 with Raspberry Pi Pico & MicroPython

Interface BMI160 with Raspberry Pi Pico & MicroPython

Updated:February 2, 20253K
Shift Register 74HC595 with Raspberry Pi Pico & MicroPython

Shift Register 74HC595 with Raspberry Pi Pico & MicroPython

Updated:February 2, 202513K
Interfacing XBee Module with Raspberry Pi Pico & MicroPython

Interfacing XBee Module with Raspberry Pi Pico & MicroPython

Updated:February 2, 20253K
Modbus RTU with Raspberry Pi Pico & Micropython

Modbus RTU with Raspberry Pi Pico & MicroPython

Updated:February 2, 20258K
Fever Detector with MLX90640 & OpenCV Raspberry Pi

Thermal Fever Detector with MLX90640 & OpenCV Raspberry Pi

Updated:February 2, 20256K
Add A Comment

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • IoT Based PM & Air Quality Monitoring System using ESP32
    IoT Based PM & Air Quality Monitoring System using ESP32
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • How to use INA219 DC Current Sensor Module with Arduino
    How to use INA219 DC Current Sensor Module with Arduino
  • How to use ADS1220 24-Bit ADC Module with Arduino
    How to use ADS1220 24-Bit ADC Module with Arduino
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • L293D Dual H-Bridge Motor Driver IC Pins, Circuit, Working
    L293D Dual H-Bridge Motor Driver IC Pins, Circuit, Working
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.