Arduino Whistle Detector Switch Using Sound Sensor Module

Photo of hIOTron

Made by hIOTron / Sensors / IoT

About the project

In this project, we will see how to detect Whistle sound and once it is detected we will toggle the AC lamp via a relay.

Project info

Difficulty: Moderate

Platforms: Arduino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Tiny Breadboard Tiny Breadboard x 1
Arduino MKRFOX 1200 Arduino MKRFOX 1200 x 1
Sound Sensor Module Sound Sensor Module x 1
Relay Module Relay Module x 1
Connecting wires Connecting wires x 1
AC Lamp AC Lamp x 1

Software apps and online services

Arduino IDE Arduino IDE

Story

Working of Project

As we know a fundamental component in a sound sensor is the microphone. The diaphragm inside the microphone flutters to the sound waves in the atmosphere which creates an electrical signal on its output pin. But they can not be processed directly due to its low magnitude.

To amplify such low signal sine waves and transform them into square waves the module utilizes the on-board LM393 Comparator module. The low voltage audio output from the microphone is provided to one pin of the comparator through an amplifier transistor while a reference voltage is set on another pin using a voltage divider circuit involving a potentiometer.

When the audio output voltage from the microphone beats the threshold voltage the comparator goes high with 5V else the comparator remains low at 0V. In this way, the low signal sine wave can be transformed into a high voltage (5V) square wave.

So by calculating the frequency of the square wave, we can find the frequency of the sound signals in the atmosphere. Check it once by connecting it to the to make sure things are working.

The Relay module and the Sound sensor is powered by the 5V pin of the Arduino. The output pin of the Sound sensor module is connected to the digital pin 8 of the Arduino. The Relay module is triggered by pin 13 which is also attached to the in-built LED on the UNO board.

On the AC supply, the neutral wire is directly attached to the Common(C) pin of the Relay module while the Phase is attached to the Normally Open (NO) pin of the relay via the light bulb. In this way when the relay is triggered thus the light bulb will glow. Else the blub will remain off.

With the help of this application, you can easily manage Smart Home Appliances.

                                                                                                      Whistle Detector

Whistle Detector

Classroom IoT Training will help to start building your IoT Career.

Code

Run a Code

Credits

Leave your feedback...