Back to Parent

Outcome


The Destresser is a simple device, consisting of a mic/control unit and a specially adapted hat. It accompanies you while you work on homework, taxes, or whatever stressful things you might be doing at your desk. The Destresser listens for your stress by listening to how fast you tap on the desk. The Destresser doesn't judge. It's here to help.

If you’re tapping slowly, the Destresser shows a green light. You’re ok. A little tap here or there is natural. Don’t sweat it.

If you start tapping faster—at around what a musician would call an andante (“walking”) pace, the Destresser will notice that you’re sounding a little worried, and indicate with a yellow light that it’s starting to get concerned. Take a chill pill, friend. Maybe it's a good moment to rest your eyes. You can get through this.

But if you persist and start tapping very fast, the Destresser knows you’re really struggling and it wants to help. It does this, of course, by giving you a calm, reassuring touch in the form of a friendly dabbing of the forehead with a moist cloth. There's not much in the world that feels better than a well-timed forehead dabbing.

There, there. All is well. The Destresser is here to help.

Dsc 0029.jpg.thumb
Show Advanced Options

A simple cardboard enclosure keeps the guts tidy and protected. The box sports a magnetic closure. After prototyping this on a table, the chief thing I needed to adjust was the sound threshold; once that was in place, the device worked fairly reliably.

Dsc 0035.jpg.thumb
Show Advanced Options

Four wires run into the control/sensor box:

White: 5V for the hobby servo

Red: 9V for the Arduino's barrel plug

Black and Green: grounds (tied together at the supply)


Three wires run out: the motor's power,  and ground lines (which simply pass through the box), and the motor logic control line.


I wrapped these wires into the configuration I wanted by clamping the far side in a vise and using a cordless drill to twist the bundle together.

Dsc 0039.jpg.thumb
Show Advanced Options

The indicators are pretty straightforward.

If no tapping is detected after a timeout period, the Destresser will default to its green you-are-doing-just-fine state.

Destresser schematic bb.thumb
Show Advanced Options
Show Advanced Options

The code essentially listens for taps and keeps a running average of the millisecond gap between successive taps. One issue I encountered early on was that during certain procedures the Arduino's single thread was tied up inside of if statements and unable to hear new taps come in; I needed to make sure it was available for listening more often.

I had a sleep procedure that was running every cycle, checking that if the Destresser hadn't heard a tap in a while that it wouldn't just keep running the clock up, since this would skew the timing average very high when tapping resumed. This procedure was important to include, but in order to prevent it from burdening the main loop too much I wrapped it in a two-condition if: 1) counter value is 100, and 2) it's been more than 5 seconds since the last tap was heard. 

The counter would increment by one each loop cycle. Using counter == 100 as the first condition of the if, I incorporated a short-circuit evaluation which would only run the rest of the if statement one out of one hundred loops. This freed up the Arduino to listen to the mic and greatly reduced false negatives in detecting taps.

Show Advanced Options
Drop files here or click to select

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