In this, we have used clap sound and MIC to sense the sound which will turn on and off the device as a switch.

Summery

In this, we have used clap sound and MIC to sense the sound which will turn on and off the device as a switch.

About Project

Basically, a microphone is a sound sensing transducer, which primarily transforms sound energy into electrical energy, so with the help of this sensor, we have sound as a changing voltage.

Working is followed basically in four ways such as: Filtration, Amplification, Analog-digital conversion and programming to toggle the LED.

Condenser MIC.jpg

Whenever there is sound, the MIC strikes it up and transforms it into voltage, direct to the magnitude of sound. So for a higher sound, we have a greater value and for the lower sound, we have a deeper value. This value is first filled to the High Pass Filter for the process of filtration.

Then this refined value is filled to the transistor for amplification and the transistor gives the amplified output at the collector. This collector signal is supplied to the ADC0 channel of the UNO, for Analog to Digital conversion.

        const int analogInPin = A0;  // Analog input pin 0
int sensorValue = 0;   

void setup() 
{
 DDRD = 0xFF;
}

void loop() 
{
 sensorValue = analogRead(analogInPin);    //read ADC value on channel 0
 if(sensorValue>60)
 {
  PORTD ^=(1<<7); //If there is a peak toggle the LED on and OFF on pin7.
  delay(250);
  }
}
    

With the help of the Internet of Things Course Training, you can learn more about IoT Solutions.

rasika Joshi
hIoTron offers an End-to-End IoT Training with live use cases using IoT hardware kit.

Categories