Does this project spark your interest?

Become a member to follow this project and don't miss any updates


Peril-Sensitive Sunglasses

A version of the Peril-Sensitive Sunglasses (as described by Douglas Adams in The Hitchhiker's Guide to the Galaxy)

Similar projects worth following
The Joo Janta 200 Super-Chromatic Peril Sensitive Sunglasses have lenses that turn completely opaque at the first hint of trouble, thus preventing the wearer from seeing anything that might alarm him or her.

I believe it should be possible to make a functional version inspired by the originals, as featured in Douglas Adams' work.

One of the characters in the books actually uses them in a practical way, believe it or not. As he's going up (or down, I forget) a very long and perilous ladder with a stunning view of tremendous heights, he uses the sunglasses to blissfully block out the alarming visuals - in essence, taking the common advice to "don't look down".

The Peril-Sensitive Sunglasses are the opposite of technology such as Monster Glasses.

Kimmy the Cat is also on the team. She communicates by eating treats. example:

She indicated that this project be started (I was against it.)

This entry is a general writeup along with post-prototype observations.

TO READ THE PROJECT PROGRESS FROM START TO FINISH (WITH PICTURES), CLICK HERE and start reading from the BOTTOM. This will let you read how the project came to life, the decisions taken, etc.


A set of glasses whose goal is to help keep you calm and mellow.  It does this with lenses that turn dark at the first sign of Peril (to prevent you from seeing anything upsetting.)

It consists of LCD shutter glasses controlled by a block of handheld electronics I decided to call the PPDD (Potential Peril Detector/Decider.)


It uses an Arduino (UNO at 5V in my case) with a variety of sensors to detect Peril by taking regular sensor readings and looking for anomalies - sudden changes in brightness, sound level, movement, etc.  This project log discusses early ideas on how to detect Peril, and this followup sums up the final design decisions.

The glasses are 3D shutter glasses (see the parts list) whose lenses can be turned dark by the Arduino.


Obviously detecting Actual Peril (AP) isn't really possible.  We use sensors to measure a variety of things (motion, light level, sound level, etc) and go from there.  Conceptually the sensors measure things that might indicate the presence of Peril - loud noises, sudden light level changes, things of that nature.

These are considered Possible Peril (PP).  The software simply considers all PP (possible peril) to be AP (actual peril) even though that's a pretty big stretch.  But it works well enough to be fun!



  • The Pulse Sensor Amped was a bust.
  • The GSR Sensor works but isn't as responsive as I hoped.
  • Taking readings from sensors is easy. Processing the data to find what you want is actually pretty tough.
  • The shutter glasses work well but wearing them looks turbo stupid.
  • The lenses don't really go opaque. They get dark (even very dark) but not opaque.
  • The AI Chatbot team member was devoutedly non-commital in all decision making.


  • The lenses of the glasses briefly going dark as feedback to the user is pretty cool and useful.  For example, I blink the lenses at startup as well as to indicate mode of operation (1 blink = GSR disabled, etc.)  It is unmistakable and silent and doesn't interfere with vision or need additional parts.  It's very good feedback.
  • I tried a test where I made the glasses "blink" every few seconds - like eyes.  You're talking to a person and the lenses blink dark randomly - it is sort of weird and kind of neat.
  • I also tried a "reverse strobe light" test, where the glasses stay dark and only blink clear briefly (so sort of a strobe light effect, but in reverse.)  It doesn't really work - probably because the lenses don't go fully opaque so you don't have the same effect that you do with a strobe light going off in a pitch black room.

  • Video Demo!

    Minimum Effective Dose04/27/2014 at 08:07 0 comments

    That's a wrap!  We're done, so let's leave you with a brief video demo of the glasses reacting to sound and light.

  • Don't Miss the Project Writeup

    Minimum Effective Dose04/27/2014 at 06:11 0 comments

    This project details entry has some added information I wrote up after designing, building, and testing the prototype.

    If you're interested in details about what worked, what didn't, and what was unexpected, give it a look.

  • Signal Processing Fine-Tuning in Progress

    Minimum Effective Dose04/19/2014 at 06:07 1 comment

    No pictures this update - but some information on the process of making the whole thing work.

    As seen in the last update, the prototype hardware construction is complete.  All the solder-y and nuts & bolts-y parts are done.  What's left is figuring out what exactly to do with all the data we are getting from the sensors.

    This is easier said than done.  I can read the sensors just fine but deciding what to do with the data at a high level is a bit tricky.

    Testing reveals that my current methods are good enough to tell the sensors are working -- but not well enough to reliably isolate anomalies. False positives (detecting Peril where there is none) and false negatives (failing to detect Peril) abound.  I need to re-evaluate my software.

    It helps to define the problem.  Here is what we want:

    Ignore slow and steady changes, and take action only on anomalous signals.

    To do this we need to:

    • Read sensors regularly and keep a history; from that we can establish what "normal" is.
    • Figure out what "anomalous" readings actually means for each sensor. (This can be different per sensor - is slow but steady change upwards for the past two minutes anomalous for Ambient Temperature?  What about for Ambient Sound level or Ambient Light level?)
    • Constantly re-adjust for one, and watch out for the other.

    No matter what method or thresholds we use for sensors, the common thread is that we need to take and keep accurate measurements over time.  Only by comparing what's happening to what has already happened can we make judgments about normal vs anomalous.

    The existing software does this, but as stated - not well enough.  Some software work should sort this out.  I'm reminded of why Signals Processing is an entirely separate discipline, because it's easier said than done!

View all 18 project logs

  • 1

    Disassemble the LCD shutter glasses.  This will expose the electronics.

  • 2

    These contacts will control whether the LCDs are dark or clear.  5V through a small resistor (56 ohms or so) to the "+" marked pads will darken the lenses.  ("-" should be connected to GND.)

  • 3

    Accelerometer is wired like this:

    In my case I used:

    Analog 0 = X axis

    Analog 1 = Y axis

    Digital 2 = 0g Detected

View all 9 instructions

Enjoy this project?



x3n0x wrote 04/17/2014 at 04:26 point
Looks like fun! Too bad I cant bear to destroy one of those horribly expensive 3d glasses sets I bought for my HT setup. Wait! Ive got it! I have some LCD shutter glasses from a long time ago, from a funny 3d thing I tried in the late 90s that hooked on the parallel port.... Could work...

  Are you sure? yes | no

Minimum Effective Dose wrote 04/17/2014 at 05:08 point
Happily the glasses I purchased (PS3 3D Shutter Glasses) were 9.99 each - and the store had rows of them on the shelf. Right at my "sure why not" price threshold!

  Are you sure? yes | no

andyhull wrote 04/15/2014 at 20:18 point
"The Hitchhikers guide" is a little thin on explanations regarding the underlying technology used in the Joo Janta 200 Super-Chromatics, there might be some mileage perhaps sending someone or something (I'm thinking the peril equivalent of the babel fish here) ahead of the wearer, so that the reaction of this entity can be used to protect the wearer.

Maybe you should be measuring the skin response or pupil response (or sphincter response, perhaps.. but may be that's pushing the limit's of technology too far) of the wearer's body guard, this would afford better protection in the sense that the wearer is completely protected from reacting to the peril (until that is the ravenous bug bladder beast of traal has finished snacking on the body guard, and turns its attention to the cool dude in the shades of course).

  Are you sure? yes | no

andyhull wrote 04/12/2014 at 11:35 point
Is there an SI unit of peril, if not, I suspect we need to propose one, otherwise it is going to be difficult to calibrate your design.

  Are you sure? yes | no

Minimum Effective Dose wrote 04/15/2014 at 16:34 point
Very true. And we kind of limit ourselves to detecting PP (Possible Peril) in practice - making inferences about AP (Actual Peril) rather than detecting it directly.

As discussed in an early project log ( telepathic technology doesn't yet exist, so we have to settle in various ways.

  Are you sure? yes | no

Eric Evenchick wrote 04/10/2014 at 18:59 point
"PERIL DETEECTED" is quite possibly the best debug message I've ever seen.

Looking forward to seeing your results with the pulse sensors. Too bad the Pulse Sensor Amped didn't work out.

  Are you sure? yes | no

Minimum Effective Dose wrote 04/10/2014 at 19:32 point
It's a pity but oh well. (A colleague of mine also gave up on the Pulse Sensor Amped for another application but I guess I just had to see for myself.) I hope to be able to integrate measuring Galvanic Skin Response which might help cover that biofeedback-ish angle.

  Are you sure? yes | no

Eric Evenchick wrote 04/10/2014 at 19:38 point
Nice, I guess the next step up for pulse sensing would be quite a bit more expensive...

  Are you sure? yes | no

Similar Projects