For those that don't know, the Reverse Geocache puzzle is a puzzle box that opens only when the box is taken to a predefined location. You don't know what the location is, you have a limited number of attempts, and the box creator hates you enough to only tell you how far away you are (in the words of some French gentleman from Mikal Hart's story, “You are — how you say in English? — a BASTARD!").

I read about this back in 2009 and thought it was a cool idea, even purchasing some parts for the reverse geocache, but I never got around to making it.
Fast forward to 2013, and upon seeing those parts left alone in a lone Sparkfun box, I decided to revive the project.

Behold, introducing the Reverse Andycache!

My GPS module was out of order and I was lacking a screen, but I definitely wasn't lacking in the number of Android phones I had thanks to friends who graciously gifted old Android phones. So why not repurpose one of these phones for this project? After all, a smartphone has GPS and a screen that I can use for free!

Hence, the Reverse Andycache (short for Reverse Android-Geocache) was born. But here's what sets it apart from all other reverse geocaches: it is a multipurpose box. It is currently set up as a reverse geocache, but because of how it is controlled and operated, it can also be used for other purposes without ever touching the firmware on the box.

(To clarify, you only need a spare Android phone if the person you're giving this to doesn't have an Android phone. In my case, the recipient has an iPhone.)

The source code for my app can be found here.

As I will be entering the Make-to-Learn Youth Contest, here are my answers to the four questions:

What did you make?
I made a reverse geocache box that uses an Android phone as the UI as well as the GPS. The box itself has no screen or GPS, a departure from traditional designs. The phone and box communicate via Bluetooth, and all programming logic is done on the phone (with data stored securely on an EEPROM chip inside the box). Otherwise, it currently acts as a standard reverse geocache box.
The beauty of this design is that because all programming logic is done on the phone, the box is modular and can be repurposed for other things (for example, a lockbox, or perhaps a very good alarm system that would hide a regular alarm clock inside the box >:D) by simply writing another app that uses the box's functionality in a different way.
The Reverse Andycache required quite an extensive list of materials and tools, such as the IOIO Mint, some assorted electronics bits and pieces, a servo, an old phone, and tools such as a drill, saw, and soldering iron.

How did you make it?
I had been inspired by the original design back in 2009 but never really had time to work on a box of my own. So when I was thinking of creative ways to ask someone to my senior prom (as it's my senior year of high school), I eventually thought of making one of these.
The electronics and programming were 100% designed, built and coded by me (with a little programming help from Ytai Ben-Tsvi, creator of IOIO). The mounting, drilling and other physical tasks required some assistance from my mom and uncle, who have a garage full of tools and supplies.

Where did you make it?
I worked on the box mostly at home, with a little bit of work done in my hotel room in San Diego. Over 100 hours were put into writing the code (which is admittedly rather rough in quality, but that's expected for writing so much code in so little time), and about 20 hours were put into planning the electronics, wiring them up, and building the box.
I figured that because I was going to ask to prom a member of another FIRST robotics team, a project like this one would go perfectly.

What did you learn?
Never expect to finish a huge undertaking like this in less than a week :P
Fortunately, when you're coming up with something like this for a prom proposal, I found there are always people who are willing to help! Many thanks to my friends who provided materials, feedback, phones, or just thought it was awesome and wanted to help in whatever way possible.
I learned how to use the IOIO platform with Android (and Ytai has done an awesome job in making it easy to use in Android development) as well as how to use SMS messaging (to an extent), block location spoofing in apps, and how to use servos.

A few pitfalls that I noted:
-The Galaxy S series of devices have issues with locking onto GPS (confirmed using GPS Test/GPS Status apps). Flashing new ROMs seemed to solve the issue.
-IOIO is only capable of a maximum 127-byte read operation over I2C (I was trying to read 256). Ytai pointed this quirk out in the IOIO firmware. My code now only does 64-byte reads at most.
-Android 4.2.2 implements whitelisting for Android Debug Bridge, and my laptop's USB ports are non-functional. I ended up having to manually transplant my laptop's RSA key onto my phone to whitelist it for wireless ADB.
-Servo locking mechanism is one of the trickiest parts of the physical build: the mechanism needs to ensure the box stays locked, it needs to be physically strong and resist forced attempts to open, and it needs to be reliably controllable. I went through 4 different locking mechanism ideas before settling on this one.
-Making a board from scratch is always a pain. I'd try to have a PCB etched next time.

I'm proudest of having finished this project in such a short period of time given the demands of school, scholarship applications, robotics, etc. Writing over 1500 lines of code (the bulk of my app) in 3 days is no easy feat. And the finished appearance of my Reverse Andycache is aesthetically pleasing, always a bonus.

If I had to do it again, I would spend more time making a better UI (I personally think I suck in making functional UIs) as well as writing cleaner code. In addition, I'd try to get a better soldering iron and use that (it's always a pain to use firestarters, but I didn't really have any other option for this project).

Step 1: Gather Materials

This is a list of all the materials I used for this project. You can probably source these from cheaper places if you look.
Also, Adafruit has awesome customer service, I highly recommend buying from them!

-Decorative wooden box (from Michael's ~$15)
-IOIO Mint ($65)
-Hitec HS-55 servo ($10) (I'd also recommend getting an aluminium arm for the servo like this one)
-Illuminated LED on/off pushbutton ($6)
-Quick-connect wires ($5)
-Extra-long male headers ($3)
-Panel-mount USB-B to micro-B cable ($4)
-6000mAh Lithium-polymer battery ($40)
-Snap-action 3-wire block connector ($3)
-JST-PH wire extension ($2)
-8-pin DIP socket ($0.50)
-24LC256 I2C EEPROM ($2)
-3x 10k ohm resistors
-0.1uF decoupling capacitor
-Protoboard (I used a spare I had lying around)

You also need:
-Soldering iron + solder
-Dremel or other cutting tool
-A sheet of MDF
-Hot glue gun + glue
-Assorted fasteners and such
-Android phone for testing/debugging/deployment (should be running 4.0 or above if you're using my code)
-Computer with Android SDK set up (completely optional, but highly recommended)

How much I spent: ~$160 for box and electronics (does not include wire, MDF, fasteners, glue, tools, or phone)
This made my day. Nice! Thanks for sharing. :) <br> <br>Mikal Hart
Sorry for the delay. I am just at the beginning. I am having trouble getting the app to connect to the IOIO MINT. Any thoughts? I have not started the assembly.
I think the issue is that you need to have an EEPROM wired up to the IOIO before the app will recognize it. Small little quirk in my programming.<br>If you have a breadboard, I would suggest wiring that part of the circuit up and then checking to see whether it works.<br>I'm not 100% sure on this though, so let me know. I might have to rewrite some of the code if this isn't the case.
Hey. Nice instructable, but sincerely I don't know how you can actually use it. <br>Enter in Indestructibles Contest. Maybe you'll win.
Reverse geocaches have been used for treasure hunts since 2009 as well as in at least 14 successful marriage proposals. Just a few ways you can use it
And they also can be used to deliver birthday presents... <br>http://forums.parallax.com/showthread.php/118830 <br> <br>Excellent job on this one. The Android app eliminates the cost of the GPS which is usually the biggest cost, too bad the IOIO takes its place.
The benefit of that though is that because much of the box logic happens on the Android side, it makes the box much more versatile. You could go about reprogramming an Arduino for that purpose, but the benefit of using an IOIO is that you can utilize the hardware built into a device with no extra expenditure (eg. Compass, Wi-Fi, cellular, IR, etc.)<br>But yeah, if the box is meant to be just a one trick pony then its not as useful. I like my alarm clock idea for this one though.
For example, one way this box could be extended is by adding NFC tags to the hunt. Adding a NFC reader to a normal reverse geocache would be expensive, but with the advent of NFC in Android phones it would be zero additional cost (though you'd need to make sure the phone being used was NFC capable).<br>Another idea I had was to embed a Nexus 7 onto the box lid, allowing even more interactivity, but that adds price and complexity. Getting a used Android tablet and hacking together your own ADK compatible hardware would be a feasible alternative though.
Yes, all good ideas to expand the usefulness. My struggle has always been with how to reduce the overall cost to get these types of cool projects into more hands. Even bluetooth modules for micros are expensive enough to make a dent on the bottom line. <br>I agree with NFC. I have a version of mine in a prototype stage that uses RFID tags to advance the &quot;player&quot; to the next &quot;level&quot; of a scavenger hunt.
*I am having a problem getting the APP to connect to the IOIO. The hardware test APP works fine with the IOIO. Am I missing an easy step somewhere. Thank you for your time.
The hardware test app simply pulses on the servo pins. I would have to review the source code to find where the app is messing up. <br>I did make a note in my wiring diagram with a few fixes for mistakes that I had made. Did you check those? <br>If not, please send me a picture of your setup so I can take a look.
The only question I have is....did it work? Did your intended recipient get to the correct location and accept your invitation? <br> <br>Great little instructible, well planned and executed, and got my vote !!
If everything goes well, it should open sometime tomorrow. I tried to keep the hunting rather simple for this one, and I'll post an update here when that happens. <br> <br>And of course thanks for the vote!
so when you say reverse geocache, does that mean that the geocache finds you?
No. <br>A traditional geocache is when you know the GPS coordinates of the geocache and you don't actually have the geocache with you. You're trying to find the geocache. <br>A reverse geocache is just the opposite. You don't know the coordinates, but you have the reverse geocache, and you need to find the coordinates in order to open it.
you could have use MIT's app inentor to make the app. Much much faster to use
I prefer writing straight-up Java as opposed to using something like App Inventor. I remember using it when it was still owned by Google, and I found it far too limited for my needs. <br>Plus then you lose the benefits of version control.

About This Instructable




More by wchill:The Reverse Andycache (Android-powered reverse geocache) 
Add instructable to: