Introduction: Eyeris: Bionic Goggles

About: I'm a just a not-so-average human with a passion for making. I see a world of hackers, makers, and producers as the sun rises in the near future. I'm starting olopede, an educational electronics kits compa…
Eyeris is an electromechanically actuated model of a human iris with programmable sensitivity to stimuli like displacement from an object and ambient light.  It spawned from my findings one summer afternoon while digging through trash bags at a local lab cleanout.  I was lucky enough to find a high-quality iris aperture that needed a home.  After months of debate, I was determined to make some awesome goggles, and so I give you: Eyeris

Step 1: Materials

Some things you might need to make your own pair of bionic goggles are:

* 1Iris Aperture (1 9/16" OD, 1 1/8" aperture diameter)
* 1 brass gear with a diameter larger than your iris aperture's (2 1/16"
* 1 brass gear with a diameter smaller than your iris aperture (1" or smaller)
* 1 small stepper motor
* 1 ultrasonic rangefinder (I used an SRF04)
* 1 large photoresistor
* 1 ATmegaX8 family uC (48, 88, 168, or 328)
* 4 2n7000 or equivalent mosfets
* 1 LM7805
* 1 100K potentiometer (optional)
* Ribbon Cable
* Male and Female breakaway pin headers
* Pipe with the same OD as the aperture
* Black thread
* Elastic Band
* Perf Board
* 12V Battery or power source

Tools:
* Bench Grinder
* Super Glue
* Needle - straight or curved work
* Soldering Iron

Caveats:
* You can totally do this with two iris apertures!  Adjust your materials appropriately
* The mosfets (2n7000) can be replaced by almost any other fet, or even BJTs.  If you're going to use BJTs, Don't forget to put 1K base resistors.
* The battery can be anywhere between 9 and 12 volts.  I used an 11.1V LiPo battery.

Step 2: Size the Frame

All goggles need a frame to give them shape.  We'll let the aperture that you chose determine the rim size.  In that case, measure the diameter of your aperture and make a ring with an inner diameter equal to that out of some 1/16" steel wire.  The easiest way to do this is to wrap your wire twice around the pipe with an OD equal to that of your aperture. Then cut the two loops in one place, such that you're left with a cut ring.

When it comes to completing the ring, I used a bandsaw blade spot welder, but you should be able to use super glue just as well.

Step 3: Embed the Ultrasonic Rangefinder

We need to embed the sensors in a piece of leather that will wrap around the frame ring we made in the last step.  We're going to start with the Ultrasonic Rangefinder.  
To do this, cut out a piece of leather about half an inch wider in diameter than the frame ring.  You can use pencil to mark where you'd like to cut, if it helps.

Then, shiny side up, place the frame ring in the center of the piece of leather and try to fit the ultrasonic rangefinder inside of the ring.  Make sure that the rangefinder's PCB doesn't overlap the frame ring.  If it does, try to sand down the edges of the PCB using a bench grinder or belt sander.  Make sure not to break any traces.

Trace the outline of the ultrasonic transducers (the metal cans with the cool metal mesh) on the leather circle with pencil.  Then, draw an 'X' on the circle.  You'll cut along the lines that form the 'X' with a knife in order to push the transducers through the leather.  Check out the attached pictures if you're confused.

Finally, push the ultrasonic rangefinder into place by pushing the 'X' flaps inward, towards the rough side of the leather, then squeezing the rangefinder into place.  This can be difficult if you didn't cut the 'X' large enough.  

Now, onto the photoresistor!

Step 4: Embed the Photoresistor

Remove the ultrasonic rangefinder and follow the last half of step three to embed the photoresistor.

Make sure that the frame ring still fits when both sensors are embedded at the same time.

You can trim and fold the excess leather over the ring so that the frame ring is embedded inside a hoop of leather.  I used fabric glue to hold the flap down, but you could also sew it shut.

Step 5: Make It Comfortable

Having a PCB and some leads pressed up against your eye isn't very er... comfortable.

I got the idea to add some form-fitting support from aintMichael's Steampunk Airship Goggles.
In step 3 of his instructable, you can see how to construct the eye-cup that I used in my goggles.

In this case, cut out a pentagonal piece of leather, like the one in the picture below, so that the width is just a bit longer than the circumference of the frame ring, height is between 1/4" and 1/2".  The angle of the taper on the last two sides is up to you.  Try fitting it to your face when you're making your own.

Step 6: Attach the Actuated Gear

The iris aperture that I found in the garbage had a little pin that you could rotate side-to-side to make the aperture open or close.  To actuate the aperture, I decided to make a concentric gear that would fit around the entire aperture.  

First, cut out a hole slightly larger than the aperture in the center of the brass gear whose diameter is larger than the iris aperture's OD.  By slightly, I mean somewhere between 1/100" and 1/32".  To do this, I drilled out the center of my gear and mounted it to a plastic disk with a screw.  I then put this in a lathe chuck and turned out the center of the gear.

Next, cut a slit the width of the iris aperture's pin into the brass gear.  The slit should be along a radius of the gear, so it may be helpful to cut the slit first, depending on your method of cutting the hole.  I used a bandsaw to cut the slit with pretty poor accuracy, but I still had a couple of 64ths of an inch to play with.  To correct for this, I sanded down the gear until the slit looked nearly radial.

Finally, place the ring-gear around the aperture so that the actuator pin fits within the slot in the ring-gear.  Stand-off the gear so that the gear is in the center of the actuator pin when looking at it from the top of the pin.  Turn up your soldering iron and start to heat the junction.  Try and heat the gear first, tin it, then move on to the pin.  Tin the pin, then bridge the gap.  Use flux if needed.


Step 7: Make the Supportive Eyepiece

Since the larger gear will be rotating, we need to keep it from hitting the skin on your nose or cheek, otherwise... rip! And you skin will tear.  

I found a piece of bicycle tubing that fit the edge of my aperture perfectly, so I decided to cut off a good 11/16".  You can round up or down, depending on the structure of your face.  Make it long enough so that the gear will fit comfortably.  

Note: Notice how the ID of the tube isn't small enough to overlap with those little circles on the aperture. This is CRITICAL!  Those circles are actually pegs that rotate in holes.  If you're going to super glue the tube to the aperture, you need to make sure that the super glue won't go into those holes!

Now, we're going to carve part of the tube out so that the tube isn't just jamming into your face.  I tried to trace out all of the parts of my face that were coming in contact with the tube while holding it up to my face.  Then, I'd go over to the belt sander and go at it until I thought I was done.  This was an iterative process, so I'd say just go for it.  If you mess up, you always have more tube!  The largest grind that I made was to accommodate my brow.

Step 8: Attach the Supportive Eyepiece

I was at first perplexed by how I'd end up attaching the eyepiece to the aperture, then it hit me like a butterfly hitting a shoe!  Crazy Glue!

To glue the eyepiece to the aperture, you need to use a secret ingredient - thread!  The thread keeps wicks the glue away from the aperture via capillary action, preventing the glue from getting into the holes that I mentioned in the last step.  

I lined up my eyepiece with the aperture so that the little pin was pointing 45° left of vertical when the aperture was all the way open and I was looking at it from behind.  This way, when the aperture is closed, the pin rotates around to 45° right of vertical.  

Next, I wrapped some cotton thread twice around the circle where the eyepiece and the aperture meet.  I made sure that they were both lined up perfectly, then I put in two drops of super glue, on opposite sides of the aperture.  If you feel like you need more glue, feel free to use more, but don't overdo it!  Otherwise the glue will wick into those holes, and your aperture will freeze up.

Step 9: Attach the Drive Gear

To attach the drive gear to the stepper motor, you either need to get lucky and find a gear that fits your motor, or you need to make a coupler.  I went with the latter.

To make my coupler, I turned down some aluminum on the lathe at my local hackerspace (MITERS), drilled out a hole equal to the diameter of the motor shaft, (which happened to be perfect for tapping 4-40 screws, then faced it off.  I tried to tap a hole for the 4-40 screw that you see sticking out of the coupler in the picture, but the threads stripped and I ended up crazy gluing the whole thing together.

I also tapped a hole for a set-screw to hold the coupler to the motor shaft.

Step 10: Give the Aperture an Actuator

Attaching the stepper motor to the eyepiece holding the aperture is actually pretty difficult.  To do it right would require machining a large piece of 1/4" aluminum to fit perfectly around the eyepiece and the stepper motor, or use set screws to hold them together well.  This seemed like a bit too much work to me, though if you have access to a water jet, that method is definitely the way to go.

I chose to cut out a strip of 1/8" aluminum about 1/2" wide and 1ft long.  I started by wrapping the stepper motor as tightly as I could in the middle of the strip.  I then drilled two holes and clamped the stepper motor in the strip with a nut and bolt.  

Attaching the clamped stepper motor to the eyepiece required trial and error, but I basically bent the strip so that it wrapped around the eyepiece while supporting the stepper motor rigidly at some distance from the eyepiece.  You need to make sure that the gears are meshing correctly, and that the two gears stay in contact throughout the aperture's entire 'swing', if you will.  If the gears are too close to each other, the stepper motor might not be able to drive the aperture because of friction.

I super glued the aluminum strip to the eyepiece to fix it in place.
At this point, you might want to test the stepper motor/aperture assembly.

Step 11: Wrap Her Up in Leather

To attach all of the pieces together, I wrapped leather around the non-leathery parts (the eyepiece, the motor) and sew that leather tight.  Then I made simple straps for the headband by cutting 3/4" strips of leather and sewing them to the newly "leathered" motor on the actuator eye, or the already leather eye cup on the sensor eye.  

The bridge was made out of a 1 1/4" strip of leather rolled up, then sewn to the eyepiece and the eye cup.  I tried to figure out how long the strip should be and where it should be placed based on my own head.  You should try to do the same!

Finally, I added an elastic band on the back.  I found mine from an old bed-sheet holder, but you can pull yours off of underwear or whatever you find lying around.  I didn't cover the strap in leather because my last needle broke while finishing that, but I'm sure it'd look much more awesome if it were covered.

Step 12: Wiring

For wiring, I used ribbon cable that I pulled off of IDE hard-drive cables that I found in the trash. It's really easy to rip off the perfect number of conductors you want!

For the stepper motor I used, I needed six, for the ultrasonic rangefinder I needed four, and for the photoresistor I needed two.  I attached female headers to both ends of the ultrasonic rangefinder's cable, one male 2X4 header and one female 1X6 header to the stepper motor cable, and one female header to the photoresistor, since I could just solder the cable directly to its leads.

You can route the wires nicely by sewing them into the straps, then zip-tying them together behind the neck.

Step 13: Give It Brains

The brains behind this electromechanical iris is an atmega48 running at 8MHz (divide clock by 8 fuse bit not set).  

I soldered a DIP header onto some perfboard, then added male headers for the sensor and stepper motor cables.  I have a potentiometer that's used as a variable resistor in a resistor divider with the photoresistor.  This lets me play with the scaling in case I go from a really dark room to the outdoors on a sunny day.  I also used four mosfets (2n7000) to use as switches so that the motor can be driven from the ~12V battery, and not from the microcontroller.  Finally, I added a 5V regulator (LM7805) to power the microcontroller.

I'm programming the microcontroller off-board, but you can add a programming header if you'd like.

The code is fairly simple.  Basically, I ping the ultrasonic rangefinder, sample the photoresistor, calculate a scaled time average, and then step the stepper motor in the direction that it needs to go.  Rinse and Repeat();  I also run an initial calibration cycle that forces the iris to open all the way, since I have no clue how open the iris is initially. (If someone's been messing with it)  I've included the code and the makefile that I use.


Step 14: Eyeborg It Out

Now you've got a pair of super sweet bionic goggles!  Go around town and experience the world in super-actuated 2-D.  

These baby's kill your ability to perceive depth, but at least you get to have a superhuman response to the same stimuli that your real iris uses!

Video coming later today!