sound module – Kevin Gulling http://www.kevingulling.com Game Development, VR, and more Fri, 29 Sep 2017 17:38:11 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.13 81085834 Arduino Nano Voice Activated (sound sensor) LED Halloween / DJ Mask http://www.kevingulling.com/2017/09/arduino-nano-voice-activated-sound-sensor-led-halloween-dj-mask/ Fri, 29 Sep 2017 10:38:11 +0000 http://www.kevingulling.com/?p=1710 Voice Activated LED Mask Be the life of the party this Halloween with a voice (and music if it’s loud!) activated LED biohazard mask. Everybody knows that a genius conceptual Halloween costume will make you the star of the party. Sure you could be one of the millions of people to wear a caricature Trump […]

The post Arduino Nano Voice Activated (sound sensor) LED Halloween / DJ Mask appeared first on Kevin Gulling - Game Development, VR, and more.

]]>

Voice Activated LED Mask

DIY LED Mask Youtube

Be the life of the party this Halloween with a voice (and music if it’s loud!) activated LED biohazard mask. Everybody knows that a genius conceptual Halloween costume will make you the star of the party. Sure you could be one of the millions of people to wear a caricature Trump mask this year, or you can be original with this DIY project!

Materials required:

Steps:

  1. Take apart the biohazard mask filters and empty out the contents
  2. Wire LED 1 and 9v battery into one of the filters, pulling wires through the respirator air passage ways. If you make the wires the correct length, you can easily tuck them beneath the rubbery plastic liner
  3. Solder your nano and other components to the perf board (see circuit diagram below). I left the KY-038 sound module free from the board so that I could easily position it and make adjustments to the sensitivity via the on-board potentiometer.
  4. Connect the wiring from the 9v power supply and the LED.
  5. (Optional) Slap a biohazard sticker on the front, and voila!

Check out the video above to get a look at how I did it!

Here is the circuit:

(simply put your desired amount of LED’s in parallel, I used one in each filter. Using 2 or more in each filter will drain your battery a bit faster, but might make it a bit brighter)
LED Mask Circuit

Here is the Sketch code:

int LED = 3;
int mic = A0;
int brightness = 0;
int fade = 5;
int level = 30;

void setup() {
Serial.begin(9600);
pinMode(LED, OUTPUT);
pinMode(mic,INPUT);
}

void loop() {

int sound = analogRead(mic);
analogWrite(LED, brightness);
if(sound>=level && brightness < 255){
brightness = brightness + fade;
delay(5);
}
else if(sound < level && brightness > 0){
brightness = brightness - 1;
delay(10);
}

Serial.println(brightness); //Use this line to test your levels in the serial monitor

}

Did you make one? Feel free to link to your costume pics in the comments.

Did you like it? Please take a moment to subscribe to my blog and be notified every time I create something new!

The post Arduino Nano Voice Activated (sound sensor) LED Halloween / DJ Mask appeared first on Kevin Gulling - Game Development, VR, and more.

]]>
1710