Arduino Tinkering: Reverse Geocache Box

A few months ago I started learning about Arduino microcontrollers. Since then, I've learned quite a bit about electronics and these devices, but I wanted to build something, and a "reverse geocache box" seemed like a fun project. The idea is that a box cannot be opened, except when it is physically located in a certain spot on the surface of the earth. You put something good inside the box, lock it, and give it to a friend. They, looking confused, push a button on the box. The little screen on the box says X miles, and then shuts off. That's the only clue that one must move the box to a certain latitude and longitude for it to open. Once there, the lock pops open, and the goodies inside can be retrieved.

In some ways, that's the opposite of a geocache, where you have to find the container. Here, you have the container, but you can't get at the contents.

This was a fun project. It involved learning about how GPS receiver chips communicate with the devices they're embedded in. It involved reviewing serial communications, and learning to solder on circuit boards.

In case you want to attempt to build it yourself, the above video shows how my project went, and some resources you might find helpful are included below.

You can download my code by clicking here
And you can download my crude hand-drawn schematic by clicking here (I gave up trying to use fritzing).

Inspiration came from:

  • http://www.arduino.cc, which is the home page for the Arduino platform, a great place to start to learn about these little devices and how to program them.
  • Mikal Hart, who built the first reverse geocache, provided a lot of inspiration (and code) to those who've built their own versions of these boxes since.
  • Tyler Cooper, who build a version of this project and used it to propose marriage, also provided some of the code I used in my version of the project. He provided a great step-by-step explanation.

Helpful information came from:

  • This tutorial on how to use an "I2C backpack" with an LCD character display.
  • This tutorial on how to use the Pololu pushbutton power switch.
  • This page, also from Mikal Hart, which describes the software module I used to control my servo. The standard servo library in Arduino IDE 1.6.1 seemed to conflict with the interrupts used by "software serial" to read data from the GPS chip. When the GPS was hooked up, the servo was jumping all over the place. PWMServo fixed the problem.

My parts list:

  • Arduino Uno R3 from adafruit.com, $24.95
  • Adafruit Ultimate GPS Logger Shield from adafruit.com, $49.94
  • SainSmart I2C Serial 20x4 LCD Display from amazon.com, $14.99
  • Pololu Pushbutton Switch SV (product #750), from pololu.com, $6.95
  • 9v battery holder, from amazon.com, $2.38
  • 10K resistor (20 pack), from sparkfun.com, $0.95
  • 16mm Panel Mount Momentary Pushbutton, black, from adafruit.com, $0.95
  • Tower Pro SG92R Micro Servo, from adafruit.com, for $5.95
  • 6mm tactile button switch (10 pack), from amazon.com, $5.35
  • Dupont cables male-female and female-female (40 pack), from amazon.com, $6.59
  • 22-gauge, solid-core "hook up wire," in multiple colors, from adafruit.com, $2.50
  • Wooden dowel, from Hobby Lobby, $0.59
  • Wooden box, from Hobby Lobby, $8.99
  • Scrap wood for servo and eyelet brackets, from my garage, $0
  • Eyelets, from local hardware store, $3.00
  • Stain, varnish, paintbrushes, from hardware store.
  • A few scraps of sandpaper, from my garage.

For more, visit my home page at http://jsignal.com

Feed: