Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Marco GarciaDaniel Law
Created November 5, 2020

Lane Tech HS PCL- Detecting TV volume with Big Sound Sensor

Identify the threshold in which your tv gets too loud and get notified via LED when it passes your set threshold .

BeginnerWork in progress64
Lane Tech HS PCL- Detecting TV volume with Big Sound Sensor

Things used in this project

Hardware components

Argon
Particle Argon
×1
Jumper wires (generic)
Jumper wires (generic)
×1
LED (generic)
LED (generic)
×1
Big sound sensor
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

Schematics

These schematics show the circuit set-up you should use to test the sensor. Blue wire= analog, Brown Wire= ground, Yellow Wire= Positive

Schematics

Here is an example of a simple way to incorporate an led into the set-up! *Note* Resistor may be required (ground connection to led light) depending on what kind of LED light you're using

Code

Program Code

C/C++
THINGS TO NOTE:
-For this project only the analog sensor is required to capture, which is why there's no code for the digital pin.
-Because this Project uses a Particle Argon, I'm publishing any recorded serial (analog) values to the build.particle.io console window *You can download the arduino IDE in order to measure the serial/analog data as an alternative.... this may be more effective if your computer has com ports*
-You may need to change the led and threshold values (Values in the if statement) to accommodate your set-up
-The delay on line 28 is to make sure the program doesn't overload data
-Code has been modified from the code from the particle database, as well as aid from my instructor
int analogPin = A0; 
int led = 5;

void setup ()
{
  pinMode(analogPin, INPUT);
  pinMode(led, OUTPUT);
  Serial.begin (9600); 
}

void loop ()
{
  int analogValue = analogRead(analogPin);
  
  Particle.publish("Sensor: " + String(analogValue) );
  
  Serial.println(analogValue);
  
  if(analogValue>60){
    digitalWrite(led, HIGH);
    delay(50);
  }
  else{
    digitalWrite(led, LOW);
    delay(50);
  }
  
  delay(1000); 
}

Credits

Marco Garcia
2 projects • 1 follower
Contact
Daniel Law
46 projects • 9 followers
Teacher. Maker. Citizen of the planet.
Contact

Comments

Please log in or sign up to comment.