Ultrasonic Batgoggles





Introduction: Ultrasonic Batgoggles

Instructables and RoboGames Robot Contest

Second Prize in the
Instructables and RoboGames Robot Contest

Wish you were bat? Want to Experience Echolocation? Want to try to "see" with your ears?

For my first Instructable, I will show you how to build your own ultrasonic batgoggles using an Arduino microcontroller clone, Devantech ultrasonic sensor and welding goggles for around $60 or less if you already have standard electronics components. You could also skip the electronics and make a simple bat-mask perfect to wear to the next Batman movie. In that case, the cost would only be about $15.

These goggles allow you to experience what it is like to use auditory cues like a bat and is intended for children in a science center setting to learn about echolocation. The goal was to keep costs as low as possible, avoid making the form of the interaction to be generic or unrelated to its educational purpose and to ensure that the physical form of device embodies the subject matter. For a more thorough discussion of its design, please see the project webpage.

To keeps costs and size low, an Arduino clone is built used however, but this project works just as well with pre-built Arduino microcontrollers.

These goggles were built for "Dynamic User-centered Research and Design" course in the Arts, Media & Engineering program at Arizona State University.

Step 1: Necessary Materials

-Arduino or comparable microcontroller* (if you have the money you can buy the Arduino mini/nano or use a boarduino, otherwise I will show you how to make a small and cheap Arduino clone for this project.)
-Welding goggles (Mine are "Neiko" brand and are easily found on eBay as "Flip up welding goggles" for 3-10 dollars shipped, this specific type works really well)
-Devantech SRF05 Ultrasonic Sensor (or other comparable sensor -- however, the SRF05 has a very low power consumption of 4mA and great resolution from 3 cm to 4 meters, it is about $30)
-something to make ears out of (I used plastic cones, see also: "How to build a better bat costume")
-some type of enclosure for electronics
-3/8" split seam flexible black convoluted tubing (to hide connecting wires)
-piezo buzzer that can run on 5v-9v
-assorted wires
-plasti-dip spray can (black)

Microcontroller Electronics (these components can be skipped if using a pre-built controller)
- Arduino programmed Atmega8 or 168 DIP chip.
- a spare Arduino board or ArduinoMini USB programmer
- Small PC board (available at Radioshack)
- 9V battery connector (available at Radioshack)
- 7805 5v voltage regulator
- 16 MHz crystal (available @ sparkfun)
- two 22pF capacitors (available @ sparkfun)
- 10 microF electrolytic capacitor
- 1 microF electrolytic capacitor
- 1k resistor and 1 LED (optional but highly recommended)
- 2N4401 transistor (optional)
- female and male headers (optional)
- 28 pin DIP socket or two 14 pin DIP socket s(optional)
- small breadboard for prototyping (optional)

The electronics components can also be obtained from www.digikey.com or www.mouser.com

Tools and supplies you may need
-soldering iron
-hot glue gun
-news paper
-masking tape
-wire strippers etc.

Step 2: Design Some Ears

You are free to use your imagination to build your ears. No bat-goggles should be the same!

I used plastic cones that are used for physical therapy, which we happened to have a large supply of in our lab. But this tutorial gives another nice option for bat ears.

I first drew an oval with a sharpie and cut it out with a Dremel. I saved the cutoff piece to use for the inside of the ear.

Step 3: Cut Ears

I trimmed the cut-off pieces of the cone with the Dremel, so that they were smaller and hot glued them to the inside of the larger cone pieces. They did not fit exactly but after holding them in place by hand the hot glue held it in place quite well. If you leave yourself enough space under the ears, you could easily embed the electronics inside the ear, one ear for the controller, and one for the battery. Unfortunately, I did not leave enough space and had to use an external enclosure.

Please take care not to burn yourself while using a hot glue gun!!! You can also easily melt the plastic cones by accident.

Step 4: Prepare Goggles

The goggles that I purchased were a very un-batlike shiny aqua color. To make the goggles more batty, take the lenses out (remove the nose piece first), sand them, and spray with Plasti Dip spray to give them a nice leathery rubber texture. Before spraying, I masked the interior of the goggles and the parts that touch the skin with masking tape. I also did not apply any paint to the nose piece because the paint reduces the flexibility of the goggle material a little bit and the nose piece is necessary to hold the goggles together.

You will also want to sand and spray the ears as well. Sanded plastic dust is nasty for your lungs and eyes so please wear a mask and safety glasses for these steps.

I sprayed about 3 coats with about 10-15 minutes between coats to get an even texture. When wet, the paint appears glossy, but it dries to a matte texture.

Step 5: Assemble Electronics

These steps are optional if you use an already built Arduino microcontroller. However, since you are only using a small amount of its capabilities it makes more sense to make a barebones version of an Arduino that is much smaller and cheaper to reproduce. This section might be slightly difficult for someone with no electronics experience, but should be easy for anyone who has assembled a simple electronics kit. A "schematic" sketch for the electronics is attached. The schematic is highly derived from David A. Mellis's Atmega8 Standalone schematic. If there is interest I will make a dedicated Instructable for this step. The decoupled power circuit is from Tom Igoe's Physical Computing book.

I included picture of the PC board version (with sensor/buzzer not connected) as well as a prototyping version built on a breadboard for reference. The breadboard version also shows how to connect the Arduino board as a USB programmer for the microcontroller chip. Since I used a DIP socket for the chip, I can also remove the chip and put it in an Arduino board to program it, but it can be tricky to pull the chip out without bending all the pins -- thats why i included the female header pins for the tx/rx. Even though the board is very cramped, you can see that all of the pins of the controller have a solder pad available to connect to. Since they aren't necessary for this project I did not solder female headers to the unused pins but if they were, you would have the full capabilities of an Arduino Diecimilia except on-board USB in a very small package. The width of the board is approximately one half of the Diecimilia board and about the same length. (here is a similar setup.) It is optional to use a transistor to power the buzzer, the Arduino can provide enough current from the pin itself. However, using the transistor allows you to use other sound making devices other than a buzzer if you have one.

Step 6: Prepare Buzzer and Sensor Wires

The ultrasonic sensor and buzzer need long wires to run from the goggles to the electronics. The ultrasonic sensor requires 4 wires(5v, ground, echo, trigger) and the buzzer requires two wires (digital output from controller, ground). With some planning you could use a 5 wire ribbon cable, if you have one and share the ground connection between the buzzer and the sensor. I only had a 4 wire ribbon so I used that for the ultrasonic sensor and used a two wire cable for the buzzer. Since the buzzer has two connectors i soldered a row of female headers to the two wires at the correct spacing, this way I can easily remove the piezo buzzer if necessary. The sensor has some solder holes to solder to which you should go head and use. Make sure to use the correct side, the holes on the other side are for programming the sensor and won't work!

Step 7: Finish Wires

Next solder male header pins to the other end of the wires. (These will connect to the microcontroller.)

Step 8: Upload Code

To upload the code, connect the 5v, ground, TX, RX pins on the PC board to those same pins on a chip removed Arduino board using some wires. Then connect the reset pin on the PC board to the where pin 13 would go in the DIP socket on the Arduino board. If this is confusing, please see the image which this replicates, except with an Arduino Mini. Next simply past the attached code in the Arduino editor (or brows to and open the .pde file in Arduino after downloading) and select the appropriate serial port and Arduino chip you are using and press the upload button.

The code works by playing beeps and then varying the inter-beep interval based on the distance measured by the sensor. So, if you are close to an object, the inter-beep interval decreases and the beeps occur faster. If you are far away from an object, the inter-beep interval increases so the bleeps occur more slowly. The controller checks the distance every 60ms, so the inter-beep interval changes dynamically. Currently it is scaled so 1 inch makes a 10ms difference in inter-beep interval. This makes the goggles work better for closer distances, but can be increased to work better for further distances. I tried an exponential scaling that increased the range at closer distances(using fscale but it didn't seem to change the response much in exchange for tons of code, so I scrapped it.) Since the time it takes to read the distance depends on the distance of the object being sensed (the sensor returns pulses up to 30ms long) the code measures the time it took to get the reading and compensates the delay times by that amount.

Every line on the code is commented and is (hopefully) self-explanatory.

Step 9: Put Electronics in an Enclosure

Cut the convoluted tubing so it is the right length from the goggles to someones hand or pocket. Put the wires connecting to the ultrasonic sensor and piezo buzzer inside the split seam convoluted tubing.

Drill a hole in your enclosure that can fit the convoluted tubing. I did this using a trial and error approach starting with a small size and increasing the diameter until the tubing fit just right. Run the wires through the hole then squeeze in the convoluted tubing. My cables are slightly long so I had to fold them around to fit. Some Velcro holds the circuit board to the enclosure.

Step 10: Connect Wires

Now you can use the male header pins at the ends of your wires and connect to the appropriate pins on the PC board (use the schematic!). If you are using your own Arduino then just use the same pin mappings as in the schematic.

Step 11: Close Enclosure

This enclosure had screws to hold it shut but other enclosures (altoids tin?) could just snap shut. Since I wasn't sure if it was working, I used tape to keep it closed for now.

Step 12: Attach Ears

To attach the ears we have to first put two vertical slots with the dremel in the ears for the strap to pass through.

Step 13: Attaching Ears Continued

After running the straps through the ears, I used Velcro to affix the ears to the goggles. This ended up being somewhat unstable, but highly adjustable to get them pointed to the right way. Gluing them would have been more permanent, but the Velcro has survived several demos.

The ultrasonic sensor somehow was the perfect fit to be shoved onto the locking mechanism for the flip up capability of the goggles. You have to pull the rubber goggle frame out of the plastic lens piece slightly from the top to make space then the sensor fits right in. The sensor does pop out sometimes, so a little glue could fix it for good. Unfortunately this method of attachment makes it impossible to flip the lenses up anymore.

Step 14: Experience Echolocation

Plug in a battery put the enclosure in your pocket and explore! The close you get to objects in your line of sight, the faster it beeps, the further you get, the slower it beeps.

Please do not wear these in hazardous environments or in traffic! These goggles are for educational purposes only and meant for controlled environments since they are intended to block your peripheral vision and regular vision so you are more reliant on auditory cues.

I am not responsible for any injuries as a result of wearing these goggles! Thanks!

Since this is based on Arduino, you could easily add a Zigbee or blueSMIRF module to interfaces these with computers wirelessly. Future work might be adding a dial to adjust the sensitivity and adding a on/off switch.



  • Epilog Challenge 9

    Epilog Challenge 9
  • Gluten Free Challenge

    Gluten Free Challenge
  • First Time Author Contest 2018

    First Time Author Contest 2018

We have a be nice policy.
Please be positive and constructive.




How do you do the hook up if you have a Arduino Uno and you are not building the board yourself

Hi, erm - can't see the link to build one...

The steps are listed in the instructable, have you gone through all the steps?

Excelent first instructable! thanks for your initiative! Keep going with inovative ideas! Congratulatios, again! ;)

i would personally go with a smaller more compact version of this, but the ears would most likely be mounted by straps.

Whats the point of the ears and goggles? looks a range finder module running the manufactures sample code.

I was expecting something cool like converting the Ultrasound ping data into a visual medium.

Very cool