SIRON

Made by amusse

The device will detect loud emergency vehicle sirens and alert the diver to move over to the side.

Created: September 17th, 2015

0

Motivation

The motivation for this project stems from the experiences I had driving with my grandmother. On many occasions, when an emergency vehicle is approaching the car, my grandmother wouldn't hear the sirens until the emergency vehicle is right behind her. But by then she panics and freezes and puts parks the car in the middle of the road making the emergency vehicle have to go around her. I realized that the root of the problem is that she didn't hear the sound ahead of time to take the necessary precautions. A device that will alert her that an emergency vehicle is approaching would be ideal for her and the other 38 million Americans that suffer from hearing loss.   

Design Decision

I had a limited amount of resources to work with but that actually was not a big deal.  I knew that product had to be simple that it can sit on the dashboard of any vehicle. Thus, a small box that is unobtrusive in a vehicle seemed like the right approach. Additionally, my grandmother would appreciate objects that are simple to use that is not flashy that it distracts her from driving. The LED's flash in a a cool blue mainly because I wanted  something that is soothing. Colors like red would signal trouble, danger etc. Blue rather is associated  with peace, serenity, ethereal, spiritual, and infinity. 




The set up

A small mic is attached to an Arduino that receives digital input from the environment. 


All of that is tightly packaged into a standard black encasing that can be placed anywhere in your car. A USB is attached to the device for easy power from your car battery outlet. 

    

Code 

The code was the sample code given with slight adjustments. Rather than analog, the receiver was switched to digital for the output. Further, I adjusted by changing the arrays size to 500 to make the LED light up much smoother. The outputting signal is the signal input -30 so show the progression of the light as the sound gets closer. 




0
/*

  Smoothing

  Reads repeatedly from an analog input, calculating a running average
  and printing it to the computer.  Keeps ten readings in an array and 
  continually averages them.
  
  The circuit:
    * Analog sensor (potentiometer will do) attached to analog input 0

  Created 22 April 2007
  By David A. Mellis  <dam@mellis.org>
  modified 9 Apr 2012
  by Tom Igoe
  http://www.arduino.cc/en/Tutorial/Smoothing
  
  This example code is in the public domain.


*/


// Define the number of samples to keep track of.  The higher the number,
// the more the readings will be smoothed, but the slower the output will
// respond to the input.  Using a constant rather than a normal variable lets
// use this value to determine the size of the readings array.
const int numReadings = 500;

int readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;                // the average

int inputPin = A0;

void setup()
{
  // initialize serial communication with computer:
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  Serial.begin(9600);                   
  // initialize all the readings to 0: 
  for (int thisReading = 0; thisReading < numReadings; thisReading++)
    readings[thisReading] = 0;          
}

void loop() {
   
  
   


  // subtract the last reading:
  total= total - readings[index];         
  // read from the sensor:  
  readings[index] = analogRead(inputPin); 
  // add the reading to the total:
  total= total + readings[index];       
  // advance to the next position in the array:  
  index = index + 1;                    

  // if we're at the end of the array...
  if (index >= numReadings)              
    // ...wrap around to the beginning: 
    index = 0;        
      

  // calculate the average:
  average = total / numReadings; 
  analogWrite(3, average-30);  
  analogWrite(5, average-30);// turn the LED on (HIGH is the voltage level)        
  // send it to the computer as ASCII digits
//
//if (average>215){
//  analogWrite(3, LOW);
//  delay(200);
//}

  Serial.println(average-30);   
  delay(1);        // delay in between reads for stability            
}
Click to Expand
0

Next Steps

A Next steps would be to have the mic on the outside of the car wirelessly transmit sound via bluetooth to the device. This will eliminate the sound in the car such as crying babies, loud music and the device will still alert the driver. Additionally, having a way of alerting the driver which way the emergency vehicle is approaching would be ideal. 

x
Share this Project

Found In
Courses

48-739 Making Things Interactive

· 0 members

Making Things Interactive (MTI) is a studio course based on physical prototyping and computing. You will develop novel sensing, interaction and display techniques through projects and short assignm...more


About

The device will detect loud emergency vehicle sirens and alert the diver to move over to the side.