Echo Guard: Passive Auditory Protection

by jlb268 in Circuits > Arduino

42 Views, 1 Favorites, 0 Comments

Echo Guard: Passive Auditory Protection

Prototype (1).jpg
20241120_164409.jpg

The Echo Guard Project's intention is to act as a passive alarm for people who desire to protect their hearing. It listens to the wearer's environment and vibrates on the skin when the Environment reaches a dangerous decibel of sound that could potentially endanger the user's hearing and possibly cause permanent and irreversible hearing damage.

I made this Project due to my own concerns towards my hearing, I was born deaf in one ear and do not want to risk going completely deaf, I always have to be consciously aware of my environment and if I might risk my hearing for being there for too long, but with Echo Guard I’ll be alerted if I’m at risk and not have to be consciously aware so I can jam out to a Concert and Parties to their full potential while keeping peace of mind.


Supplies

20241119_174358.jpg
20241119_174301.jpg
20241119_173852.jpg
20241119_173848.jpg

A Red Bandana: Amazon.com: MDSTYLE 100% Cotton Solid Color Bandana for Men & Women 22" x 22" Handkerchief Headband Scarf (Red 1pc) : Clothing, Shoes & Jewelry

An Arm Strap: Insignia™ Fitness Armband for Cell Phones with Screens up to 6.7" Black NS-MA7PAB - Best Buy

Aurdino Set: Amazon.com: ELEGOO: Arduino Starter Kit

Wooden Box from Micheals: Amazon.com: 24 Pcs 5 Inch Small Wooden Crates for Crafts Unfinished Wood Craft Mini Craft Storage Basket Wooden Crates for Display

9 V Battery Plus Adapter: Found in Aurdino Set

Aurdino Digital and Analog Microphone: Amazon.com: DEVMO 3PCS Mic Microphone Sensor High Sensitivity Sound Detection Module Compatible with A-rduino PIC AVR : Electronics

Mistakenly used at one point: DAOKI 5PCS High Sensitivity Sound Microphone Sensor Detection Module for Arduino AVR PIC: Amazon.com: Industrial & Scientific !DO NOT USE: IT WILL NOT WORK FOR THIS PROJECT! 

Vibrational Motor: tatoko 20PCS 10mmx3mm Mini Vibration Motors DC 3V 12000rpm Flat Coin Button-Type Micro DC Vibrating Motor for Mobile Cell Phone Pager Tablet Household Appliances - Amazon.com (For this Project I used my university soldering Kit in order to solder the Black (Ground) and Red (Power) wire of the to two wires of the Male to Male jumper wires that can be found in the Aurdino Kit to give the Motor a longer reach which is needed in this project)

Soldering Kit: Amazon.com: Soldering Iron Kit, 60W Soldering Iron, 5 Soldering Iron Tips, 21-in-1 Adjustable Temperature, Solder Wire, Stand, Desoldering Pump, Soldering Welding Iron Kit for Electronics Hobby DIY 110V US Plug : Tools & Home Improvement ( I used my Universities Soldering Kit)

Elastic Metal Bracelets: Amazon.com: Emibele Twisted Bangle Bracelets for Women, Chunky Stainless Steel Non Tarnish 18K Gold Plated Bracelet Stack, Flexible Stretch Wide Wristband Bangle 2 Layers Mixed Metal Snake Chain Bracelet, Gold & Silver: Clothing, Shoes & Jewelry

SOFTWARE DOWNLOAD: Software | Arduino

AirHorn: Amazon.com: Air Horn Can for Boating & Safety Very Loud Canned Boat Accessories Hand Held Fog Mini Marine Air Horn for Boat Can and Blow Horn or Small Compressed Horn Refills 1.4oz : Sports & Outdoors

Collect Materials, Assemble Board, and Properly Code Arduino

FY09E1IM48GYZVK.jpg
20241203_234604.jpg
20241203_234544.jpg

(Quick Note I had some issues with the Instructables Add Media option so I will link it here. Here is the Audio to Vibration Test for the Echo Guard Prototype and here is me testing out the code and seeing the Microphone Value indicator on the Serial Plotter.)

To assemble the prototype pretty much all I did was use four female-to-male wires for the Microphone prongs, the Prongs on the Microphone have indicators for what pins they need to be wired on the Arduino board so that's pretty self-explanatory but I used the Input pin A0 for the coding.

As for the motors wires I put them on the Digital Side of the board on Pin GND and D13.

As for the Arduino Code that I used for this prototype I cannibalized some code I found on the internet and tweaked it for this project here is that code's link if you want to check it out, let me state that that code does not belong to me all credit for the reference code belongs to the creator.

Anyway here is how the code for the Project Evolved as I built this project.


Reference Code: Doesn't Belong to Me! I DID NOT CREATE THIS ONE!

#include <LiquidCrystal.h>

LiquidCrystal lcd(7,8,10,11,12,13);

 

int num_Measure = 128 ; // Set the number of measurements  

int pinSignal = A0; // pin connected to pin O module sound sensor  

int redLed = 5;

long Sound_signal;  // Store the value read Sound Sensor  

long sum = 0 ; // Store the total value of n measurements  

long level = 0 ; // Store the average value  

int soundlow = 40;

int soundmedium = 500;

void setup ()  

{  

  pinMode (pinSignal, INPUT); // Set the signal pin as input  

  Serial.begin (9600);

  lcd.begin(16,2);

}  

  

void loop ()  

{  

  // Performs 128 signal readings  

  for ( int i = 0 ; i <num_Measure; i ++)  

  {  

   Sound_signal = analogRead (pinSignal);  

    sum =sum + Sound_signal;  

  }  

  level = sum / num_Measure; // Calculate the average value  

  Serial.print("Sound Level: ");

  lcd.print("Sound Level= ");

  Serial.println (level-33);  

  lcd.print(level-33);

  if(level-33<soundlow)

  {

    lcd.setCursor(0,2);

    lcd.print("Intensity= Low");

  digitalWrite(redLed,LOW);

  }

  if(level-33>soundlow && level-33<soundmedium)

  {

    lcd.setCursor(0,2);

    lcd.print("Intensity=Medium");

  digitalWrite(redLed,LOW);

  }

  if(level-33>soundmedium)

  {

    lcd.setCursor(0,2);

    lcd.print("Intensity= High");  

    digitalWrite(redLed,HIGH);

  }

  sum = 0 ; // Reset the sum of the measurement values  

  delay(200);

  lcd.clear();

}

-




Adjusted Code to fit to Echo Guard:

const int MIC = 0; //the microphone amplifier output is connected to pin A0


int adc;


int dB, PdB; //the variable that will hold the value read from the microphone each time

int motor = 13;



void setup() {


  Serial.begin(9600); //sets the baud rate at 9600 so we can check the values the microphone is obtaining on the Serial Monitor


  pinMode(motor, OUTPUT);

}



void loop() {



  PdB = dB; //Store the previous of dB here


  adc = analogRead(MIC); //Read the ADC value from amplifer


  //Serial.println (adc);//Print ADC for initial calculation


  dB = (adc + 83.2073) / 11.003; //Convert ADC value to dB using Regression values



  if (PdB != dB) {


    Serial.println(dB);



    if (dB >= 85)


    {


      digitalWrite(motor, HIGH); // turn the LED on (HIGH is the voltage level)


      delay(10); // wait for a second


      digitalWrite(motor, LOW);

      delay(10);


    } else if (dB < 70 && dB > 60) {


      digitalWrite(motor, HIGH); // turn the LED on (HIGH is the voltage level)


      delay(50); // wait for a second


      digitalWrite(motor, LOW);

      delay(50);


    } else if (dB < 70 && dB > 60) {


      digitalWrite(motor, HIGH); // turn the LED on (HIGH is the voltage level)

      delay(100); // wait for a second

      digitalWrite(motor, LOW);

      delay(100);


    } else {

        digitalWrite(motor, LOW);

      }

    //delay(100);

  }

}

After much testing of the Altered Code, I concluded that it needed much more testing and Adjustment as the Vibrational Motor was going off at any little sound so I did a lot of trial and error with the code until I came down with the current code that I used for my practical trails.

-

Final Code for the Echo Guard:

  const int MIC = 0; // the microphone amplifier output is connected to pin A0

 

int adc;

int dB = 0, PdB = 0; // Initialize dB and PdB to avoid undefined behavior

int motor = 13;

bool motorState = false; // Track the state of the motor

 

void setup() {

  Serial.begin(9600); // sets the baud rate at 9600

  pinMode(motor, OUTPUT);

}

 

void loop() {

  PdB = dB; // Store the previous value of dB here

 

  adc = analogRead(MIC); // Read the ADC value from amplifier

 

  // Serial.println(adc); // Print ADC for initial calculation

  dB = (adc + 83.2073) / 11.003; // Convert ADC value to dB using Regression values

 

  if (PdB != dB) {

    Serial.println(dB);

 

    // Turn on the motor if the sound level is above 85 dB

    if (dB >= 85) {

      if (!motorState) { // Only turn on if the motor is not already on

        digitalWrite(motor, HIGH); // turn the motor on

        motorState = true; // Update motor state

        delay(10); // wait for a moment

      }

    }

    // Turn on the motor for a shorter duration if the sound level is between 60 and 70 dB

    else if (dB < 70 && dB > 60) {

      if (!motorState) { // Only turn on if the motor is not already on

        digitalWrite(motor, HIGH); // turn the motor on

        motorState = true; // Update motor state

        delay(50); // wait for a moment

        digitalWrite(motor, LOW); // turn the motor off

        delay(50);

        motorState = false; // Update motor state

      }

    }

    // Ensure the motor is off if the sound level is below 60 dB

    else {

      if (motorState) { // Only turn off if the motor is currently on

        digitalWrite(motor, LOW); // ensure the motor is off

        motorState = false; // Update motor state

      }

    }

  }

}


After Making that the Microphone is responding and working properly by using the Serial Plotter or Monitor please move onto Step two.

Adjust Microphones Sensitivity

20241203_234516.jpg

After making sure the Code worked correctly, all I had to do was manually Adjust the Microphone to be as sensitive and accurate as possible. I had several issues with this, as I had to constantly fix the microphone sensitivity, even failing one on my Practical Trials with the Prototype EchoGuard. Yes, it would still vibrate once it read 85 Decibles, but the Microphone wouldn’t pick up environmental sounds, so I had to adjust the sensitivity so that it would pick up sounds. I also came across another problem with the Practical trials as I realized that not a lot of Speaker devices will produce up to 85 decibels of sound or above sounds as those are dangerous levels that damage hearing if exposed for too long. This presented me with a new issue as I could not do a practical test in the intended environment. 

This is a problem that I had a hard time solving as that meant I could not get an accurate readout for the Echo Guard. I had no other way to simulate the intended environment for the Echo Guard Prototype other than going to a Concert or a residential Block party none of which were available options for me as none were taking place during the Practical Trials. So what I did to solve this issue was I used a DeciBel Reader app on my phone. (If it’s possible to use a preowned DeciBel reader or buy one for yourself for this project then do that instead of what I did here) I played some environmental sounds and music while manually adjusting the microphone’s sensitivity and checking the read-out on the Aurdino software and the Decibel reader until I was satisfied with the sensitivity and the accurate read-out. One thing I noticed when doing this is that the readout on the Serial Plotter was a tad bit different than the Decibel Reader but that is due to adjusting the sensitivity to be accurate in reading the sounds in the environment.

I adjusted the Microphone so that it wouldn't activate the Vibrating motor unless it accurately reads that it goes into the danger zone for noise; 85 Decibels or above. Once that was done I assembled the Echo Guard and put it through some practical trials to test its usability.


Start Practical Trial's

-Practical Trial 1-

In my first practical trial, I used an unbiased Test Subject, whom I will refer to as Assistant 1 in my documentation. In this Practical test, I tested how the Echo Guard Prototype looks and feels when assembled and put on a user's person correctly. In this case, I will name the steps that I used to assemble the Echo Guard Prototype Apparatus onto one person. 

First I put the correctly Wired Aurdino board with the 9V battery and Microphone in the small wooden crate box, then I fed the Vibrational motor with the soldered wires for length through one of the crate openings on the length side (The Smaller Hole) I then taped the mother onto the inside of one of the elastic metal bracelets which went around Assistant 1’s wrist, I made sure the Arduino Uno and the Microphone are on which are signified by the LED’s are on, after that, I wrapped and secured the Phone Armband onto the user in which case will be on my assistant for this trials upper arm above the elbow, and finally I feed the red bandana longways through the width sides of the wooden crate holes (The Longer Holes) and wrap it around the armband with the bottom of the crate on top of the phone holding part of the armband. It should be noted that I used a double not to tie the bandana onto the arm and I spread the bandana in the crate the length of the box to secure the Board, battery, and Microphone to the box without it falling out and to keep the wires from getting dislodged.

Assistant 1: Stated it felt secure on his arm however the prototype did feel awkward on his arm at first however he did quickly get used to it. We tested how the Prototype reacts to sounds in enclosed spaces, playing music on the TV and screaming near the microphone to ensure that it did work. The Prototype did react to my screaming but did not react to the music due to the music being below 85 Decibels which is the intention.

Practical Trial 1.mp4



-Practical Trial 2-

In this Practical Trial, I tested the EchoGuard in an outdoor environment, testing how it affects mobility and such. For this Practical Trial, I got another unbiased assistant that I will refer to as Assistant 2. For the most part, I practiced the same assembly of the Echoguard Prototype on Assistant 2’s person. 

I had Assistant 2 Run, Jog, and walk with the EchoGuards prototype in which only in Running did some of the wiring come out of the Aurdino Uno R3 which was promptly fixed before we took it to an outdoor event that was happening nearby to test its reaction to the speaker that was playing. While we did ensure that the Microphone and Motor were still working unfortunately it still would only react when were testing it through the use of screaming since the Speaker was not sending any sound above 85 Decibel. However, I would still count this trial as a success as the Vibration was still felt during the test and we confirmed that EchoGuard can be used mobilely. 

Practical Trial 2 Part 1.mp4

Practical Trial 2 part 2.mp4

(Two parter due to Mistake in recording)

-Practical Trial 3-

This trial is one where I reached the most disappointment as the intention behind this trial was to try and simulate the intended environment for the EchoGuard Project, However, I was unable to do so though due to limitations on time, Environment, and Equipment. As I came to discover with this Practical trial that I would not be able to artificially create the desired environment I would I actually need to attend the environment that I created the EchoGuard Prototype for in which I was unable to do.

In this practical trial, Assistant 3 tried to artificially create a 85 Decibel environment and test the EchoGuard prototype’s reaction to it. However, we did not realize until later that we didn't have the correct speaker with that large of a range, and as a result, we had to choke this Practical Trial as a failure as it was limited on the time that I had left to finish my Trials. 

Practical Trial 3.mp4


-Practical Trial 4-

In order to make up the for failure of the last trial, what I did was I got an Air Horn to actually Simulate the intended environment and brought back my assistant all the way from the first practical Trial. For this Tial we went my University’s Nature trial due to us needing to use an Air Horn and we also went about testing the Range of the Prototype’s microphone and while I did need to adjust it once I was pleased with the result we got. We tested it 5 ft away from the Air Horn that test resulted in Vibration next we tested around 20 ft with the Airhorn which again resulted in Vibration. Then we tested it even farther and unfortunately we did not count how many feet away from the air horn but I would say maybe around 45+ feet (don't quote me on that) and it resulted in Vibration. All in all I would say this Trial was a success. The EchoGuard Prototype can be used the intended environment and will work as intended.

Practical Trial 4.mp4