August 16th - Sound Sensor Unit Part 1

 So, after seeing my video of the integration of a thermal sensor for an incubator that I am building (link), my uncle asked if I would be able to make a device that could trigger a strobe light based on the increase of sound over a certain threshold.

Bleh, rephrased: He wants a light to turn on if things get too loud. Much better.

So, I did a bit of googling, ordered a sound sensor off of Amazon, and created the circuit below.

It just uses a 1k ohm resistor, an led, and the sound sensor (amazon link).


After writing a bit of code, we are done, and  I have a sound sensor that can trigger an led.

  • int soundSensor = 7;
  • int LED = 8;
  • boolean LEDStatus = false;

  • void setup() {
  •   pinMode(soundSensor, INPUT);
  •   pinMode(LED, OUTPUT);

  • }

  • void loop() {

  •   int SensorData = digitalRead(soundSensor);
  •   if (SensorData == 1) {

  •     if (LEDStatus == false) {
  •       LEDStatus = true;
  •       digitalWrite(LED, HIGH);
  •     }
  •     else {
  •       LEDStatus = false;
  •       digitalWrite(LED, LOW);
  •     }
  •   }
  • }

Next step, add a relay, and hook up a strobe light. Seems simple enough





Comments

Popular posts from this blog

August 8th - My Custom Built PC

May 25th - The Frog

August 20th - Sound Sensor Unit Part 2