-
1Microphone Sound Sensor
I have used a LM393 Microphone sound Sensor, It is having built-in Potentiometer to adjust the sensitivity of digital output pin. This module allows you to detect when wind(sound) has exceeded a set point you select by varying potentiometer. Sound is detected via microphone and fed into an LM393 op-amp for the digital input to the Arduino Board.
-
2How to Connect ?
- Connect OUT pin of LM393 microphone sound sensor to Arduino Digital pin 7
- Connect GND pin of sensor to GND pin of Arduino
- Connect VCC pin of sesnor to 5V of Arduino
- Connect a 220 ohm resistor series with negative terminal of LED and connect resistor to GND of Arduino.
- Connect positive terminal of LED to Arduino Pin 13
Note:
The value of resistor in series with LED may be a different value than 220 ohm ,the LED will lit up also with values up to 1k ohm.
-
3Prototype
-
4Code
upload the following code to your Arduino Board
int ledPin=13; int sensorPin=7; boolean val =0; void setup() { pinMode(ledPin, OUTPUT); pinMode(sensorPin, INPUT); Serial.begin (9600); } void loop () { val =digitalRead(sensorPin); Serial.println (val); // when the sensor detects a signal above the threshold value, LED turns off based on delay if (val==HIGH) { digitalWrite(ledPin, LOW ); delay(2000); // turns off for 2 seconds } else { digitalWrite(ledPin, HIGH); } }
-
5Demonstration
After Uploading the code , you can blow next to the sensor .If the led is not lighting up, you need change the sensor sensitivity (reduce Sensitivity) by rotating the potentiometer .
Here in this video I am demonstrating how the prototype works. The full circuit can be made into birthday candle as your imagination and idea .
Happy Making :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.