Hackster will be offline on Monday, June 15 from 5pm to 7pm PDT to perform some scheduled maintenance.
regwes0310a
Published © GPL3+

Snitch Sound Detector

This project is to catch people in the act of making noise and sending out a signal to control something.

BeginnerWork in progress907
Snitch Sound Detector

Things used in this project

Hardware components

Arduino Mega
you can use any other board but i decided to use this one
×1
Relay (generic)
if you are using this also get: https://www.walmart.com/ip/Value-Brand-1-ft-16-3-Extension-Cord-SJT-5XFP6ID/40742322?wmlspartner=wlpa&selectedSellerId=1122&adid=22222222227028254957&wl0=&wl1=g&wl2=c&wl3=56339543831&wl4=pla-93110511191&wl5=9052937&wl6=&wl7=&wl8=&wl9=pla&wl10=101593696&wl11=online&wl12=40742322&wl13=&veh=sem&gclid=Cj0KCQiA_4jgBRDhARIsADezXcigjlx_jQsmz9RsDLgKJKn_SEL4TTxq8xvB2KzGDJuH_AE4q7-0A88aArJmEALw_wcB
×1
SparkFun Electret Microphone Breakout
SparkFun Electret Microphone Breakout
×1
the item you want to control
only if using relay module
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
if you are not using relay (you can also use any other component)
×1

Story

Read more

Schematics

basic

this is just for an example

the household appliance

this is the more complicated version meant for controlling different appliances throughout your house

Code

The Code

C/C++
int soundSensor = 2;
int LED = 3;
 
void setup() 
{
 
  pinMode (soundSensor, INPUT);
  pinMode (LED, OUTPUT);
}
 
void loop()
{
  int statusSensor = digitalRead (soundSensor);
  
  if (statusSensor == 1)
  {
    digitalWrite(LED, HIGH);
  }
  
  else
  {
    digitalWrite(LED, LOW);
  }
  
}

Credits

regwes0310a
0 projects • 1 follower

Comments