Reverse GeoCache

My family and I have recently become interested in the ‘sport’ of GeoCaching – as it was coming up to Christmas I thought it would be a great idea to combine their interests with my need for a project to keep me busy. I therefore decided to build a ‘Reverse GeoCache’ as a Christmas present. As this was relatively successful I thought I’d share the details of my build.

GeoCaching is a bit like a treasure hunt – dotted across the globe are more than a million hidden containers (GeoCaches) waiting to be found by those who are aware of their GPS co-ordinates. A Reverse GeoCache however, is a box which will only open in one location. Therefore the (un)lucky recipient of such a device can only discover it’s contents if they are successful in taking the box to the correct location.

Typically with Reverse GeoCaches the location where the box will open is not known – instead the user is prompted to press a button to ‘attempt’ to open the device. If you’re not in the right place the box won’t open and instead the device will tell you how far away the secret location is. Using this method the user can use trial and error to get closer to the final destination. Whilst you can’t buy a Reverse GeoCache – the idea is not new and others have created such a device (see here, here, here and here). Though the fun is always in the making!

With this functionality in mind and the pressing schedule (it was already the first weekend of December) I came up with a rough design, ordered some components online (Maplin, SKPang, CoolComponents and ValueZone) and eventually produced the following:

Location Awareness
In order to obtain the location I used the 20 Channel EM-406A SiRF III Receiver. Whilst this device was chosen mainly by it’s price tag – it does represent a highly sensitive receiver with built in antenna – which more than meets the needs of this Reverse GeoCache. The GPS unit, like most receivers, is interfaced using RS232 with either NMEA/SIRF protocols. Out of the box it will start outputting NMEA messages without any prior configuration.

Locking Mechanism
Being un-confident in my construction abilities – the locking mechanism had to be very simple. I chose to use a Full Rotation Servo where the arm of the servo will rotate into a groove cut out of the lid. This approach worked surprisingly well and kept the lid firmly shut. However the choice of servo was not ideal – most servo’s are interfaced with a PWM signal – such that the width of the pulse determines the position of the servo arm – for this particular servo – the position of the pulse determines the arm velocity. In reality this means that it’s difficult to keep track of the position of the servo arm – and after a few uses the position needs to be reset/recalibrated.

In order to reduce the risk of being locked out of the box during and post-development – I added a ‘backdoor’ software mechanism which allowed you to lock/unlock the box – via use of the push button in a special way. However the risk remained that the battery could flatten with no way to unlock the box!

User Display/Controls
For the user display I chose to use an attractive Red on Black – Basic 16×2 Character LCD Display. The majority of such displays are interfaced through a similar on-board HD44780 chip – it’s a commonly used chip and as a result there is plenty of reference code to make use of.

After much deliberation I settled on the Breakout Board for PIC24HJ64 – mini-Bully. This PIC was chosen as it provided enough I/O pins for the project, was straight forward to use and there was plenty of support for it on the internet. The mini-Bully also came with a ‘boot loader’ – this eliminated the need to buy a PIC programmer as flashing an application image could be achieved over serial.

The software was written in C utilising the PIC24 Support Library which resulted in a short hardware bring up time.

Finally power was supplied through a 9V PP3 battery – regulated down to 5V via a L78S05CV chip – the majority of the devices in the system could be run off this voltage. Power consumption and battery life was always a concern and some efforts were made to reduce power consumption via the PIC’s power saving features. If I had more time to spend I would added additional circuitry to remove power to the GPS and display units.

Here are some photos of the finished device:

You will see that my construction method is a little messy and not very robust – however time was a always a constraint and I didn’t want to mount any components permanently as I intend to use some of these parts in future projects. Therefore I settled on excessive use of Blu-Tack – which did the job. I was quite pleased by how little space I was able to cram all the electronics into.

You’ll also notice that I chose to mount the GPS unit inside the box – the GPS unit’s Horizontal Dilution of Precision (HDOP) figures showed that this has little effect on it’s ability.

The Reverse GeoCache was ready in time to be loaded with goodies and wrapped up for Christmas. The battery lasted and the recipient was successful in taking the GeoCache to it’s location and unlocking it. All I need to do now is figure out what else to do with the box! [© 2011]

, , , , , , , , , , , , , , , , , , ,

About Andrew Murray

Andrew is an experienced commercial Linux developer with a first class degree in Software Engineering and is the founder of Embedded Bits Limited. His day-to-day role fulfils his passion for learning and provides him with plenty of embedded Linux experience including kernel and embedded applications development on a wide variety of platforms. He loves to talk about boot time reduction and has performed a number of presentations on the topic at technical conferences - he has also been successful in achieving sub-second cold boot on Linux based products. Feel free to drop him an email at

Subscribe & Connect

Call: +44 (0) 117 369 0 930

One Response to “Reverse GeoCache”

  1. Olternaut October 17, 2011 at 4:19 am # Reply


    Is it possible to find out what was the scenario of how the gift receiver figured out where to take the box to open it? I’m currently having a custom gps puzzle box built by someone and I’m trying to figure out what would be the perfect destination for her to go.

Leave a Reply to Olternaut Click here to cancel reply.