Liam ChildersJacob JoynerJoshua Cecil
Published

Please Be Quiet

This device will monitor sound levels throughout the night and let you know if you are being too loud by flashing an LED.

IntermediateFull instructions provided707
Please Be Quiet

Things used in this project

Hardware components

Argon
Particle Argon
×3
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×2
Breadboard (generic)
Breadboard (generic)
×1
Big Sound
×2
Standard LCD - 16x2 White on Blue
Adafruit Standard LCD - 16x2 White on Blue
×1
Jumper wires (generic)
Jumper wires (generic)
×5
breadboard Trimpot 10k
×1
LED (generic)
LED (generic)
×2

Software apps and online services

Cura
Creo PTC
ThingSpeak API
ThingSpeak API

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Sound Sensor Front Plate

3D Model of the front plate for the sound sensor

Sound Sensor Back Plate

This is the 3D model for the backplate of the sound sensor

Display Module Front Plate

This is the 3D model of the front plate for the display sensor

Display Module Back Plate

This is the 3D model of the back plate for the display module

Schematics

Sound Sensor

This is the circuit schematic for the sound module

Display Module

This is the circuit setup for the display module

Code

Listening Module

C/C++
This will detect sound at a certain decibel and send the data to the display module
int big_sound = D5;
int led1 = D3;
int led2 = D7;
int micState;
int loud = 1;
int quiet = 0;

void setup() {
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(big_sound, INPUT);
  digitalWrite(led1, LOW);
  digitalWrite(led2, LOW);
}

void loop() {

micState = digitalRead(big_sound);
if(micState == HIGH)
{
    Mesh.publish("PleaseBeQuiet-L");
    for (int i=1; i <= 25; i++)
    {
    digitalWrite(led2, HIGH);
    delay(50);
    digitalWrite(led2, LOW);
    delay(50);
    }
}
else
{
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
   
}

Mesh.subscribe("PleaseBeQuietReturnSignal-L", BlinkReallyFast);

}


void BlinkReallyFast(const char *event, const char *data)
{
    for (int i=1; i <= 25; i++)
   {
    digitalWrite(led1, HIGH);
    //digitalWrite(led2, HIGH);
    delay(50);
    digitalWrite(led1, LOW);
    //digitalWrite(led2, LOW);
    delay(50);
    }
}

LCD Display

C/C++
This will count the amount of times the sensor is activated and record the time and then send a signal back to the listening module to flash its LED.
#include <LiquidCrystal.h>


LiquidCrystal lcd(7,6,5,4,3,2);

void setup() {
 lcd.begin(16,2);
 lcd.print("Waiting For Event");
 Time.zone(-5);
 
}
int quiet = 0;
void loop() {

  Mesh.subscribe("PleaseBeQuiet-R", Right_LCD);
  Mesh.subscribe("PleaseBeQuiet-L", Left_LCD);
 
  for (int positionCounter = 0; positionCounter < 5; positionCounter++) {
    // scroll one position left:
    lcd.scrollDisplayLeft();
    // wait a bit:
    delay(500);
  }
 Particle.publish("PleaseBeQuiet-R", String(quiet) , PUBLIC);
 Particle.publish("PleaseBeQuiet-L", String(quiet) , PUBLIC);
  //if Time.timeStr()
}
int NR = 1;
int loud = 100;

void Right_LCD(const char *event, const char *data)
{
    delay(15000);
    Mesh.publish("PleaseBeQuietReturnSignal-R");
    Particle.publish("PleaseBeQuiet-R", String(loud) , PUBLIC);
    lcd.begin(16,2);
    lcd.setCursor(0,0);
    lcd.print("Right side was loud " + String(NR) + " times last night.   ");
    lcd.setCursor(0,1);
    lcd.print("Last event was " + Time.timeStr());
    NR = NR + 1;
   
}
int NL = 1;
void Left_LCD(const char *event, const char *data)
{
    delay(15000);
    Mesh.publish("PleaseBeQuietReturnSignal-L");
    Particle.publish("PleaseBeQuiet-L", String(loud) , PUBLIC);
    lcd.begin(16,2);
    lcd.setCursor(0,0);
    lcd.print("Left side was loud " + String(NL) + " times last night.");
    lcd.setCursor(0,1);
    lcd.print("Last event was " + Time.timeStr());
    NL = NL + 1;
   
}

Credits

Liam Childers

Liam Childers

1 project • 0 followers
Jacob Joyner

Jacob Joyner

1 project • 0 followers
Joshua Cecil

Joshua Cecil

1 project • 0 followers

Comments