Close
0%
0%

Arduino Metrophones

More Aware with Less Distraction when Crucial

Similar projects worth following
More Aware with Less Distraction when Crucial

The metropolitan in it's natural habitat; unaware, oblivious, purposefully deafened and subsequent prey. To increase perception thus safety, we wed an Arduino Nano and ultrasonic sensor to regulate volume to proximity to some one behind you; easily deactivated per environment and rechargeable. Beyond this proof of concept, intention for apparel or accessory (purse, back pack) embedding is ideal.

(Disclaimer) TVMiller is NOT a metro-any-dang-thing!

This prototype of a prototype is a mono-version. A stereo version would merely require dual channels (pots). Aptly, imagine if you will, you plug your head phones in to your purse strap which is embedded with a Metrophone with bluetooth that streams to your smart phone...or or or you could PAY ATTENTION! Sorry not sorry.

.

Add the HackADay Skull and Wrenches logo to your project...

https://hackaday.io/project/11709-hackaday-sketchup-logo

  • 1 × Arduino Nano Arduino IDE
  • 1 × Digital Potentiometer 10K
  • 3 × CR2032 Rechargeable Coin Cell
  • 1 × Stereo Jack
  • 1 × USB Female

View all 9 components

  • Arduino Sketchy Sketcherson

    Vije Miller05/13/2016 at 16:13 0 comments

    // MetroPhones
    // TVMiller
    
    #include <SPI.h>
    
    // Chip Select Pin
    int csp = 10;
    
    // Sensor Values
    long dur, dis;
    // Echo Pin
    int echo = 4;
    // Trigger Pin
    int trig = 5;
    
    // Position
    int pos = 0;
    
    // Centimeters
    // Minimum Distance
    int mindis = 0;
    // Maximum Distance
    int maxdis = 90; // 2.6FT
    
    void setup() {
    
      // Pot Com
      SPI.begin();
      pinMode(csp, OUTPUT);
      // Set Chip Select LOW
      digitalWrite(csp, LOW);
    
      // Testing
      Serial.begin (9600);
    
      // Sensor Pins
      pinMode(trig, OUTPUT);
      pinMode(echo, INPUT);
    
    }
    
    void loop() {
    
      // Poll Sensor
      digitalWrite(trig, HIGH);
      delay(10);
      digitalWrite(trig, LOW);
      dur = pulseIn(echo, HIGH);
      // Convert to Centimeters
      dis = dur / 58.2;
    
      if (dis < maxdis) {
        // Convert Distance to Pot (256 Steps)
        pos = map(dis, mindis, maxdis, 0, 255);
        // Alert Chip
        SPI.transfer(0);
        // Adjust Volume
        SPI.transfer(pos);
      } else if (dis > maxdis) {
        pos = 255;
        SPI.transfer(0);
        SPI.transfer(pos);
      }
    
      // Testing
      Serial.print(dis);
      Serial.print("  ");
      Serial.println(pos);
    
      delay(100);
    }

  • Fritz Fritzerson

    Vije Miller05/13/2016 at 16:10 0 comments

    Mono-prototype-version.

    Stereo-version simply requires another MCP3141 digital pot.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates