When thinking of outdoors, one of the first things that came into our minds was GPS. We use it nearly constantly in our everyday activities – from locating your own position to finding the right directions to your goal. From this concept an idea started to form, and soon the GPS box was born.
What is it?
A box with a secret locked inside. The only way to reveal it is to bring the box to a specific location. Only then will the box open and allow you to access its contents.
The box lid is equipped with a distance meter (here the four LEDS), a needle and has a compass rose engraved on it. Once the box closes, the needle spins on itself and finally stops to point at the direction of the goal. As you walk, the less blink or turn off to signal when you are getting closer.
Overall, it is a very versatile object that can be put to several uses. One of them would be to use it for a sort of “inverses geocaching”, only instead of having to find a certain object, you have to bring the object to the location. Once you reach the destination, you can let to world know of your success, and then re-program the GPS coordinates for the next person to take up the challenge.
Another idea would be to use the GPS Box for an original blind date. In this case, there are two possibilities: in a first instance, the content of the box would be a little surprise such as cinema tickets for two or the box could lead you to a romantic restaurant with table for two. However, if you use two boxes, it can become even more interesting. In this situation, there would be two boxes leading to the same location. One person would have one, and the other would have the second. By following the indications on the box, the two lonely souls would eventually be lead to the same location, where the box would open and again reveal a little surprise – perhaps a dinner for two.
The potential of the box does not stop here, however. Some of the others situations we found where the box can be used would be: a birthday present, a treasure hunt, a game for kids, team building, finding your way home… with a little bit of creativity, the possibilities are endless.
How does it work?
Apart from its secret and reward, the box contains quite a few other pieces of electronics and mechanic that make it work.
On the outside:
- 4 LEDs + engraved distance meter
- a direction needle
- an engraved compass rose
On the inside:
- a power supply (batteries)
- two servo motors
- two meshing gears with a 2:1 mechanical advantage
- a simple lock mechanism
- Arduino + WiFly shield
The Arduino contains the GPS data and, through the TinyGPS library, allows to calculate the distance and direction between the starting spot and the coordinates of the goal’s location. The LEDs turn on and off according to this information, displaying the distance (>= 1000m, 500m, 100m, and 50m) from the goal. This also operates one of the two Servo-Motors, turning the needle so that it points at the linear direction of the goal. Because of technical constraints, the indication of the direction is static – meaning that if you turn on yourself, the needle won’t correct its position. To overcome this issue, there is a compass-rose engraved on the lid, so that by orienting oneself to the north, one is able to stay on track.
When a defined minimal distance to the goal has been reached, the software switches to “Unlock-Mode”. At this point, the second servo motor is activated and switched its position from “Locked” to “Unlocked”, allowing to open the box. When this happens, all LEDs start blinking.
This signals to the user that he has reached his destination and can now open the box.
While the Arduino has a compatible GPS Hardware, it was not provided in the material we were supplied. We were thus forced to find an alternative solution (see Problems) to be able to receive and use the GPS data. The final prototype thus worked with the Wlan-Hotspot function of the Android phone, which used the BlueNMEA software to send GPS strings to the Arduino. These were then processed through the TinyGPS Library of the Arduino code.
As explained on the TinyGPS website:
“TinyGPS is designed to provide most of the NMEA GPS functionality I imagine an Arduino user would want ñ position, date, time, altitude, speed and course ñ without the large size that seems to accompany similar bodies of code. To keep resource consumption low, the library avoids any floating point dependency and ignores all but a few key GPS fields.” – TinyGPS website
BlueNMEA is an Android application which sends location data over Bluetooth (RFCOMM) or TCP in the NMEA format.
Due to time, budget and material constraint, we came across several issues while building our prototype:
- The servo motors at our disposition would only turn 180°. The compass needle, however, needs to go all way round. The solution for this was a system of gears, one with a double amount of cogs or teeth than the other, thus creating a 2:1 mechanical advantage. (amount of time involved: 2 hours + research on gear mechanisms)
- We did not have a GPS-shield compatible with the Arduino
- Transmission of GPS data via Bluetooth through a mobile phone also was not possible due to lack of a Bluetooth shield.
Solution: using phone as a WlanHotspot combined with the BlueNMEA app. which sends GPS data over TCP. We could thus receive this data with the Arduino’s WiFI-Shield. (amount of time involved: 1 day until everything worked)
4. Energy supply: one 9V battery for the two servos + WiFly + Arduino + LED is not enough. Solution: more batteries
5. The engravings and the lock mechanism required very precise measurements, which were often tricky to get especially due to the rounded shape of the lid. Solution: patience, trial & error, lots and lots of measurements.
Tips & Tricks:
Code snippet: getting Data from BlueNMEA
The following code snippet is used to get the GPS data through WiFly:
Conclusion and short video:
The SHW stage was a fun, engaging and challenging experience. Due to the limited time and materials we were often forced to think outside the box and find alternative solutions to get everything to work. However, once seeing everything fall into place and overcoming these problems was a very rewarding and useful learning experience.
(Thanks to Team WAMP for posting)