ARDUINO one Transistor sound detector

F68CB8IIF6NNYJV_MEDIUM

 

This easy to build circuit will let you detect sound with your ARDUINO, You can buy a pre made sound detection sensor module but they don’t work worth a sh!t from my experience.
The picture below shows you the simple circuit design (if you click on it, it will enlarge so you can see it better), just build that and it will work better than most of the pre maid modules you can buy.

PARTS LIST:
2 – 10kΩ resistors.
1 – 100kΩ resistor.
1 – 1mΩ resistor.
2 – 0.1 µf capacitors (Mylar is the best but ceramic will work if that’s all you have).
1 – microphone.
1 – MPS2222A Transistor (a 2N2222 , 2N2222A, 2N3904 or any small signal NPN transistor should work).
1 – diode a 1N4001 or similar will work.
1 – ARDUINO micro controller of any type should work.
For the output (Testing side of the circuit you will need):
1 – RED led.
1 – 220Ω resistor.

If you need to order any of these parts or need some new stuff to play with check out this link to the site I buy all my ARDUINO supplies.... This is the cheapest place I have found to date!!!!

 

 

sound

Now that you have built the circuit lets see it in action!
copy and past the code below into your arduino ide…
int led=9;
void setup() {
Serial.begin(9600);
pinMode(led,OUTPUT);
}
void loop() {
int val=analogRead(A0); //read the sound level
Serial.println(val); //print sound level to serial monitor
if (val>15) //change this value (15) to tell the program when to trigger the effect!!
{
digitalWrite(led,HIGH); //put what you want the program to do if sound is detected here!!!
delay(1000);
digitalWrite(led,LOW);
}
delay(10); //for stability
}
The code is pretty straight forward so I’m not going to explain it…..

when you make a noise the led should light up for one second, if it don’t work check to make sure the circuit is constructed properly…