Back to Parent

Outcome


Show Advanced Options

The earduino is a pocket-sized hearing loss prevention device that warns users and bystanders of harmful volume levels by flashing and vibrating. This project was completed as a part of the "Making Things Interactive" course with Instr. Jake Marisco  at CMU in Fall, 2015. This device can be used by frequent concert goers, musicians, constructions workers, drag racers and anyone else who wants to protect their ears from harmful sound levels. Further, a device such as this could be used by the hearing impaired, allowing them to feel and be alerted by loud sounds that they might otherwise miss.

LED colors, brightness and blinking patterns indicate safe and dangerous listening levels.

Safe listening. Whether you're rocking out or rock mining, a steady blue light indicates a safe ambient volume. As the volume increases, so does the brightness.

Too loud. Pulsing blue and yellow lights warn the user to turn down or use hearing protection. Frequency and brightness increase as the ambient volume gets closer to dangerous levels.

Danger zone. If the flashing lights don't bother you, dueling vibrations will warn you of unsafe volume levels. Vibration intensity and frequency increase with volume.

Earduino keychain.thumb
Show Advanced Options
Earduino dimlights.thumb
Show Advanced Options
Earduino open.thumb
Show Advanced Options
Earduino pocket.thumb
Show Advanced Options
Earduino covergloss.thumb
Show Advanced Options

While the name earduino implies that this project is based on an Arduino, the device actually uses a Teensy 3.1 to think. An Arduino Uno was used for prototyping, but was swapped with a Teensy so that it could fit in a pocket-sized package. Using Teensyduino, an add-on for the regular Arduino IDE, it's easy to compile and run an Arduino sketch on a Teensy.

The intensity of each LED and their choreographed pulsing and blinking patterns are controlled using PWM. The waves that drive these PWM values are sine and step functions that can be seen at the end of the following code. These functions take the oscillation period and wave amplitude, as well as phase for inputs. The outputs vales of these functions are mapped to the LED PWM input values, thus controlling the brightness of each LED. The phase argument in each function allows similar waves to be generated out of phase to create patterns like alternating or consecutive pulses and flashes.


Code Overview:

As can be seen in the code below, the first step is reading the signal produced by the microphone using the Teensy's analog to digital converter (ADC). This data is smoothed by taking an average of the most recent 4000 data points. This large averaging window prevents the earduino from reacting to quickly to spikes in the ambient volume. Instead, the average ambient volume over the last second or two affects the output of the earduino.

This average value is then compared to a couple of values which represent the volume thresholds at which "safe listening" becomes "too loud" and when "too loud" becomes dangerous.

In "safe listening" mode, or mode 1, only the blue LED is lit. The intensity or the sensed sound is mapped to the PWM duty cycle controlling the LED. The steadily lit LED therefore becomes brighter as the volume gets louder, until the threshold at the upper limit of safe listening is reached. In mode 2, alternating blue and yellow pulsing lights warn the user that they should either turn down the volume or use hearing protection. In this mode, the intensity of the sound drives both the frequency and amplitude, or pulse speed and brightness, of the sine waves displayed by the two LEDs. In mode three, all three lights, including the red light, are lit consecutively and repeatedly. Here, instead of a sine wave, a square wave is used to convey more urgency with more abrupt flashing. Again, the volume is mapped to the blinking frequency and brightness of the lights, as well as the frequency and intensity of pulsing vibrations.

Show Advanced Options
Drop files here or click to select

You can upload files of up to 20MB using this form.