This tutorial explains how to make Clap Lamp using Sound Detection Sensor with Arduino.
1. Introduction:
In this tutorial we are making a clap lamp, which is turn ON/OFF with sound of clap or any other sound by using Sound Detector Sensor. The Sound Detector is a small board that combines a microphone and some processing circuitry. It detects the sounds of door knocks, claps, voice or any other sounds loud enough to picked up by the microphone.
2. Hardware required
S.No. | Item | Quantity |
1. | Arduino | 1 |
2. | 1 Channel Relay Board | 1 |
3. | Sound Sensor | 1 |
4. | LAMP | 1 |
5. | Male to Female Jumper Wires | 7 |
6 | 12V Power Adapter | 1 |
3. Circuit Diagram
Make the following connections with Arduino-
4. Programming
You may download this Arduino Sketch from here.
//Robo India tutorial on Clap Lamp //https://www.roboindia.com/tutorials int soundSensor = 2; int LAMP = 4; void setup() { pinMode (soundSensor, INPUT); pinMode (LAMP, OUTPUT); } void loop() { int state=digitalRead(soundSensor); if(state==1) //when detect some sound { digitalWrite(LAMP, HIGH); } else { digitalWrite(LAMP, LOW); } }
5. Output
When sound of clapping or any other is detected by sensor, the lamp attached to module will illuminate.
If you have any query please write us at support@roboindia.com
Thanks and Regards
Content Development Team
Robo India
https://roboindia.com